mirror of
https://github.com/ipxe/ipxe
synced 2025-12-12 14:32:49 +03:00
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:
@@ -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 );
|
||||
}
|
||||
|
||||
@@ -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 );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user