Add in the detection for a handful of additional boards found in the
Chromium repo. This ports over and simplifies the code in that repo.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
---
Are these boards in active distribution and is it worth having them in
the seabios main repo?
---
src/vgahooks.c | 90 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++--
1 file changed, 88 insertions(+), 2 deletions(-)
diff --git a/src/vgahooks.c b/src/vgahooks.c
index 6a4acfe..f7bf660 100644
--- a/src/vgahooks.c
+++ b/src/vgahooks.c
@@ -32,6 +32,7 @@ handle_157fXX(struct bregs *regs)
set_code_unimplemented(regs, RET_EUNSUPPORTED);
}
+
/****************************************************************
* Via hooks
****************************************************************/
@@ -175,7 +176,16 @@ via_setup(struct pci_device *pci)
* Intel VGA hooks
****************************************************************/
-u8 IntelDisplayType VARFSEG, IntelDisplayId VARFSEG;
+u8 IntelDisplayType VARFSEG, IntelDisplayId VARFSEG, IntelPanelFitting VARFSEG;
+u16 IntelActiveLFP VARFSEG;
+
+static void
+intel_155f34(struct bregs *regs)
+{
+ regs->ax = 0x005f;
+ regs->cl = GET_GLOBAL(IntelPanelFitting);
+ set_success(regs);
+}
static void
intel_155f35(struct bregs *regs)
@@ -194,6 +204,43 @@ intel_155f40(struct bregs *regs)
}
static void
+intel_155f51(struct bregs *regs)
+{
+ regs->ax = 0x005f;
+ regs->cx = GET_GLOBAL(IntelActiveLFP);
+ set_success(regs);
+}
+
+static void
+intel_155f70(struct bregs *regs)
+{
+ switch (regs->ch) {
+ case 0:
+ /* Get Mux */
+ regs->ax = 0x005f;
+ regs->cx = 0x0000;
+ set_success(regs);
+ break;
+ case 1:
+ /* Set Mux */
+ regs->ax = 0x005f;
+ regs->cx = 0x0000;
+ set_success(regs);
+ break;
+ case 2:
+ /* Get SG/Non-SG mode */
+ regs->ax = 0x005f;
+ regs->cx = 0x0000;
+ set_success(regs);
+ break;
+ default:
+ /* Interrupt was not handled */
+ handle_155fXX(regs);
+ break;
+ }
+}
+
+static void
intel_155f50(struct bregs *regs)
{
/* Mandatory hook on some Dell laptops */
@@ -205,9 +252,12 @@ static void
intel_155f(struct bregs *regs)
{
switch (regs->al) {
+ case 0x34: intel_155f34(regs); break;
case 0x35: intel_155f35(regs); break;
case 0x40: intel_155f40(regs); break;
case 0x50: intel_155f50(regs); break;
+ case 0x51: intel_155f51(regs); break;
+ case 0x70: intel_155f70(regs); break;
default: handle_155fXX(regs); break;
}
}
@@ -254,6 +304,34 @@ getac_setup(struct pci_device *pci)
{
}
+static void
+stumpy_setup(struct pci_device *pci)
+{
+ VGAHookHandlerType = VH_INTEL;
+ IntelPanelFitting = 0;
+ IntelDisplayType = BOOT_DISPLAY_DEFAULT;
+ IntelActiveLFP = 0x0003;
+}
+
+static void
+lumpy_setup(struct pci_device *pci)
+{
+ VGAHookHandlerType = VH_INTEL;
+ IntelPanelFitting = 0;
+ IntelDisplayType = BOOT_DISPLAY_DEFAULT;
+ IntelActiveLFP = 0x0001;
+}
+
+static void
+link_setup(struct pci_device *pci)
+{
+ VGAHookHandlerType = VH_INTEL;
+ IntelPanelFitting = 0;
+ IntelDisplayType = BOOT_DISPLAY_DEFAULT;
+ IntelActiveLFP = 0x0003;
+}
+
+
/****************************************************************
* Silicon Motion hooks
****************************************************************/
@@ -295,6 +373,7 @@ winent_mb6047_setup(struct pci_device *pci)
SmiBootDisplay = 0x02;
}
+
/****************************************************************
* Entry and setup
****************************************************************/
@@ -345,7 +424,14 @@ vgahook_setup(struct pci_device *pci)
getac_setup(pci);
else if (strcmp(CBvendor, "RODA") == 0 && strcmp(CBpart, "RK886EX") == 0)
roda_setup(pci);
- else if (strcmp(CBvendor, "Win Enterprise") == 0 && strcmp(CBpart, "MB6047") == 0)
+ else if (strcmp(CBvendor, "SAMSUNG") == 0 && strcmp(CBpart, "Stumpy") == 0)
+ stumpy_setup(pci);
+ else if (strcmp(CBvendor, "SAMSUNG") == 0 && strcmp(CBpart, "Lumpy") == 0)
+ lumpy_setup(pci);
+ else if (strcmp(CBvendor, "GOOGLE") == 0 && strcmp(CBpart, "Link") == 0)
+ link_setup(pci);
+ else if (strcmp(CBvendor, "Win Enterprise") == 0
+ && strcmp(CBpart, "MB6047") == 0)
winent_mb6047_setup(pci);
else if (pci->vendor == PCI_VENDOR_ID_VIA)
via_setup(pci);
--
1.8.3.1