mirror of
https://github.com/ipxe/ipxe
synced 2026-03-16 03:02:07 +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 );
|
||||
}
|
||||
|
||||
@@ -142,9 +142,15 @@ SECTIONS {
|
||||
*(.data.*)
|
||||
|
||||
/* Various tables */
|
||||
boot_drivers = .;
|
||||
*(.boot_drivers)
|
||||
boot_drivers_end = .;
|
||||
device_drivers = .;
|
||||
*(.drivers.device)
|
||||
device_drivers_end = .;
|
||||
bus_drivers = .;
|
||||
*(.drivers.bus)
|
||||
bus_drivers_end = .;
|
||||
type_drivers = .;
|
||||
*(.drivers.type)
|
||||
type_drivers_end = .;
|
||||
console_drivers = .;
|
||||
*(.drivers.console)
|
||||
console_drivers_end = .;
|
||||
|
||||
Reference in New Issue
Block a user