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>
Support S3 resume handler.
config VGAHOOKS
Support S3 resume handler.
config VGAHOOKS
bool "Hardware specific VGA helpers"
default y
help
bool "Hardware specific VGA helpers"
default y
help
}
static struct cb_memory *CBMemTable;
}
static struct cb_memory *CBMemTable;
-const char *CBvendor, *CBpart;
+const char *CBvendor = "", *CBpart = "";
// Populate max ram and e820 map info by scanning for a coreboot table.
static void
// Populate max ram and e820 map info by scanning for a coreboot table.
static void
+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;
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;
}
}
default: handle_155fXX(regs); break;
}
}
#define BOOT_DISPLAY_EFP2 (1 << 6)
#define BOOT_DISPLAY_LCD2 (1 << 7)
#define BOOT_DISPLAY_EFP2 (1 << 6)
#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)
{
static void
roda_setup(struct pci_device *pci)
{
void
vgahook_setup(struct pci_device *pci)
{
void
vgahook_setup(struct pci_device *pci)
{
- if (!CONFIG_VGAHOOKS || !CBvendor || !CBpart)
return;
if (strcmp(CBvendor, "KONTRON") == 0 && strcmp(CBpart, "986LCD-M") == 0)
return;
if (strcmp(CBvendor, "KONTRON") == 0 && strcmp(CBpart, "986LCD-M") == 0)
roda_setup(pci);
else if (pci->vendor == PCI_VENDOR_ID_VIA)
via_setup(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);