summaryrefslogtreecommitdiffstats
path: root/src/arch/i386/prefix
diff options
context:
space:
mode:
authorMichael Brown2005-04-21 20:18:29 +0200
committerMichael Brown2005-04-21 20:18:29 +0200
commit98ff29345ec0819498f131496db0d96262e3c05f (patch)
tree4b31c4d59e3293d7fc0b35587145a30d1b074f2e /src/arch/i386/prefix
parentForce a standard format upon debug messages. (diff)
downloadipxe-98ff29345ec0819498f131496db0d96262e3c05f.tar.gz
ipxe-98ff29345ec0819498f131496db0d96262e3c05f.tar.xz
ipxe-98ff29345ec0819498f131496db0d96262e3c05f.zip
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.
Diffstat (limited to 'src/arch/i386/prefix')
-rw-r--r--src/arch/i386/prefix/select_isapnp.c14
-rw-r--r--src/arch/i386/prefix/select_pci.c11
2 files changed, 23 insertions, 2 deletions
diff --git a/src/arch/i386/prefix/select_isapnp.c b/src/arch/i386/prefix/select_isapnp.c
index ac1af217c..14e3db032 100644
--- a/src/arch/i386/prefix/select_isapnp.c
+++ b/src/arch/i386/prefix/select_isapnp.c
@@ -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 );
}
diff --git a/src/arch/i386/prefix/select_pci.c b/src/arch/i386/prefix/select_pci.c
index 046c59f42..c9a62d526 100644
--- a/src/arch/i386/prefix/select_pci.c
+++ b/src/arch/i386/prefix/select_pci.c
@@ -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 );
}