diff options
author | Julian Pidancet <julian.pidancet@gmail.com> | 2012-02-05 04:51:06 +0000 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2012-02-05 13:25:50 -0500 |
commit | 02145150f64d4fcb9e122bc7fcc11c23fbbe9fbc (patch) | |
tree | 9ee52ec015482f69eec66307acd8c6527ab730eb /src/vgahooks.c | |
parent | 2469f89528a7da83eb608dfc86fda5fc780b8f92 (diff) | |
download | seabios-hppa-02145150f64d4fcb9e122bc7fcc11c23fbbe9fbc.zip seabios-hppa-02145150f64d4fcb9e122bc7fcc11c23fbbe9fbc.tar.gz seabios-hppa-02145150f64d4fcb9e122bc7fcc11c23fbbe9fbc.tar.bz2 |
Xen: Use VGA Hooks to make VGA passthrough work on certain devices
The Intel gfx VGA option ROM on certain platforms requires the 155f50 BIOS
function to be implemented (even if it does nothing), to work properly.
v2: Ignore the case where Option ROMs are pre-deployed.
Make vgahook_setup independent of wether the CB* variables are set.
VGA hooks can be enabled on non-coreboot and non-Xen configurations.
Signed-off-by: Julian Pidancet <julian.pidancet@gmail.com>
Diffstat (limited to 'src/vgahooks.c')
-rw-r--r-- | src/vgahooks.c | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/src/vgahooks.c b/src/vgahooks.c index a8f667c..20a2e2e 100644 --- a/src/vgahooks.c +++ b/src/vgahooks.c @@ -186,11 +186,20 @@ intel_155f40(struct bregs *regs) } static void +intel_155f50(struct bregs *regs) +{ + /* Mandatory hook on some Dell laptops */ + regs->ax = 0x005f; + set_success(regs); +} + +static void intel_155f(struct bregs *regs) { switch (regs->al) { case 0x35: intel_155f35(regs); break; case 0x40: intel_155f40(regs); break; + case 0x50: intel_155f50(regs); break; default: handle_155fXX(regs); break; } } @@ -206,6 +215,15 @@ intel_155f(struct bregs *regs) #define BOOT_DISPLAY_LCD2 (1 << 7) static void +intel_setup(struct pci_device *pci) +{ + VGAHookHandlerType = VH_INTEL; + + IntelDisplayType = BOOT_DISPLAY_DEFAULT; + IntelDisplayId = 3; +} + +static void roda_setup(struct pci_device *pci) { VGAHookHandlerType = VH_INTEL; @@ -254,7 +272,7 @@ handle_155f(struct bregs *regs) void vgahook_setup(struct pci_device *pci) { - if (!CONFIG_VGAHOOKS || !CBvendor || !CBpart) + if (!CONFIG_VGAHOOKS) return; if (strcmp(CBvendor, "KONTRON") == 0 && strcmp(CBpart, "986LCD-M") == 0) @@ -265,4 +283,6 @@ vgahook_setup(struct pci_device *pci) roda_setup(pci); else if (pci->vendor == PCI_VENDOR_ID_VIA) via_setup(pci); + else if (pci->vendor == PCI_VENDOR_ID_INTEL) + intel_setup(pci); } |