aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Brown <mcb30@ipxe.org>2023-02-10 23:18:47 +0000
committerMichael Brown <mcb30@ipxe.org>2023-02-10 23:34:59 +0000
commitbe8ecaf8059a34f27ed34bbc2e95806537802108 (patch)
tree42c78220f26a47eccdaec9d00b7f9d5d3b0a3965
parent62a1d5c0f5bc52227ba43ccb7924694d661449a2 (diff)
downloadipxe-be8ecaf8059a34f27ed34bbc2e95806537802108.zip
ipxe-be8ecaf8059a34f27ed34bbc2e95806537802108.tar.gz
ipxe-be8ecaf8059a34f27ed34bbc2e95806537802108.tar.bz2
[eisa] Check for system board presence before probing for slotseisa
EISA expansion slot I/O port addresses overlap space that may be assigned to PCI devices, which can lead to register reads and writes with unwanted side effects during EISA probing. Reduce the chances of performing EISA probing on PCI devices by probing EISA slot vendor and product ID registers only if the EISA system board vendor ID register indicates that the motherboard supports EISA. Debugged-by: Václav Ovsík <vaclav.ovsik@gmail.com> Tested-by: Václav Ovsík <vaclav.ovsik@gmail.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
-rw-r--r--src/drivers/bus/eisa.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/drivers/bus/eisa.c b/src/drivers/bus/eisa.c
index a4efe26..68837eb 100644
--- a/src/drivers/bus/eisa.c
+++ b/src/drivers/bus/eisa.c
@@ -98,8 +98,16 @@ static void eisa_remove ( struct eisa_device *eisa ) {
static int eisabus_probe ( struct root_device *rootdev ) {
struct eisa_device *eisa = NULL;
unsigned int slot;
+ uint8_t system;
int rc;
+ /* Check for EISA system board */
+ system = inb ( EISA_VENDOR_ID );
+ if ( system & 0x80 ) {
+ DBG ( "No EISA system board (read %02x)\n", system );
+ return -ENODEV;
+ }
+
for ( slot = EISA_MIN_SLOT ; slot <= EISA_MAX_SLOT ; slot++ ) {
/* Allocate struct eisa_device */
if ( ! eisa )