aboutsummaryrefslogtreecommitdiff
path: root/vgasrc/geodevga.c
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2012-01-16 19:05:27 -0500
committerKevin O'Connor <kevin@koconnor.net>2012-01-19 21:34:44 -0500
commit8cf8f8e6ce971b16ee25309df7ebf32f7a04dc14 (patch)
tree15bb7b3b65df723ef615075229735ed69d8f34bb /vgasrc/geodevga.c
parent160d34abcea594100f7322ba9d3a774ea33cb2c9 (diff)
downloadseabios-hppa-8cf8f8e6ce971b16ee25309df7ebf32f7a04dc14.zip
seabios-hppa-8cf8f8e6ce971b16ee25309df7ebf32f7a04dc14.tar.gz
seabios-hppa-8cf8f8e6ce971b16ee25309df7ebf32f7a04dc14.tar.bz2
vgabios: Check that the PCI BDF passed in is valid before using.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'vgasrc/geodevga.c')
-rw-r--r--vgasrc/geodevga.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/vgasrc/geodevga.c b/vgasrc/geodevga.c
index ce754a5..5c6caf0 100644
--- a/vgasrc/geodevga.c
+++ b/vgasrc/geodevga.c
@@ -363,6 +363,9 @@ int geodevga_init(void)
stdvga_override_crtc(i, crtc);
}
+ if (GET_GLOBAL(VgaBDF) < 0)
+ // Device should be at 00:01.1
+ SET_VGA(VgaBDF, pci_to_bdf(0, 1, 1));
ret |= vp_setup();
ret |= dc_setup();