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 725 additions and 556 deletions
+10 -1
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 );
}