Created a bus/device API that allows for the ROM prefix to specify an

initial device, and will also allow for e.g. a device menu to be presented
to the user.
This commit is contained in:
Michael Brown
2005-04-21 18:18:29 +00:00
parent 905ca1f21d
commit 98ff29345e
16 changed files with 726 additions and 557 deletions

View File

@@ -1,3 +1,4 @@
#include "dev.h"
#include "isapnp.h"
#include "registers.h"
@@ -16,5 +17,16 @@ void i386_select_isapnp_device ( struct i386_all_regs *regs ) {
* address in %dx.
*
*/
select_isapnp_device ( regs->dx, regs->bx );
union {
struct bus_loc bus_loc;
struct isapnp_loc isapnp_loc;
} u;
/* Set ISAPnP read port */
isapnp_set_read_port ( regs->dx );
/* Select ISAPnP bus and specified CSN as first boot device */
memset ( &u, 0, sizeof ( u ) );
u.isapnp_loc.csn = regs->bx;
select_device ( &dev, &isapnp_driver, &u.bus_loc );
}

View File

@@ -1,3 +1,4 @@
#include "dev.h"
#include "pci.h"
#include "registers.h"
@@ -15,5 +16,13 @@ void i386_select_pci_device ( struct i386_all_regs *regs ) {
* PCI BIOS passes busdevfn in %ax
*
*/
select_pci_device ( regs->ax );
union {
struct bus_loc bus_loc;
struct pci_loc pci_loc;
} u;
/* Select PCI bus and specified busdevfn as first boot device */
memset ( &u, 0, sizeof ( u ) );
u.pci_loc.busdevfn = regs->ax;
select_device ( &dev, &pci_driver, &u.bus_loc );
}