Consolidate intel vga int15 hooks
Change-Id: I9366dded98bf15f6da44ce893dd10698ba09fd55 Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com> Reviewed-on: http://review.coreboot.org/6820 Tested-by: build bot (Jenkins) Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
This commit is contained in:
parent
a4857052f7
commit
a2a906e47a
|
@ -32,3 +32,7 @@ config INTEL_DDI
|
|||
config INTEL_EDID
|
||||
bool
|
||||
default n
|
||||
|
||||
config INTEL_INT15
|
||||
bool
|
||||
default n
|
||||
|
|
|
@ -20,3 +20,6 @@
|
|||
ramstage-$(CONFIG_INTEL_DP) += intel_dp.c drm_dp_helper.c display.c
|
||||
ramstage-$(CONFIG_INTEL_DDI) += intel_ddi.c
|
||||
ramstage-$(CONFIG_INTEL_EDID) += edid.c
|
||||
ifeq ($(CONFIG_VGA_ROM_RUN),y)
|
||||
ramstage-$(CONFIG_INTEL_INT15) += int15.c
|
||||
endif
|
||||
|
|
|
@ -0,0 +1,124 @@
|
|||
/*
|
||||
* This file is part of the coreboot project.
|
||||
*
|
||||
* Copyright (C) 2007-2009 coresystems GmbH
|
||||
* Copyright (C) 2012 Google Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; version 2 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include <x86emu/x86emu.h>
|
||||
#include <arch/interrupt.h>
|
||||
#include "int15.h"
|
||||
|
||||
static int active_lfp, pfit, display, panel_type;
|
||||
|
||||
int intel_vga_int15_handler(void)
|
||||
{
|
||||
int res = 0;
|
||||
|
||||
printk(BIOS_DEBUG, "%s: AX=%04x BX=%04x CX=%04x DX=%04x\n",
|
||||
__func__, X86_AX, X86_BX, X86_CX, X86_DX);
|
||||
|
||||
switch (X86_AX) {
|
||||
case 0x5f34:
|
||||
/*
|
||||
* Set Panel Fitting Hook:
|
||||
* bit 2 = Graphics Stretching
|
||||
* bit 1 = Text Stretching
|
||||
* bit 0 = Centering (do not set with bit1 or bit2)
|
||||
* 0 = video bios default
|
||||
*/
|
||||
X86_AX = 0x005f;
|
||||
X86_CX = pfit;
|
||||
res = 1;
|
||||
break;
|
||||
case 0x5f35:
|
||||
/*
|
||||
* Boot Display Device Hook:
|
||||
* bit 0 = CRT
|
||||
* bit 1 = TV (eDP) *
|
||||
* bit 2 = EFP *
|
||||
* bit 3 = LFP
|
||||
* bit 4 = CRT2
|
||||
* bit 5 = TV2 (eDP) *
|
||||
* bit 6 = EFP2 *
|
||||
* bit 7 = LFP2
|
||||
*/
|
||||
X86_AX = 0x005f;
|
||||
X86_CX = display;
|
||||
res = 1;
|
||||
break;
|
||||
case 0x5f40: /* Boot Panel Type */
|
||||
X86_AX = 0x005f; // Success
|
||||
X86_CL = panel_type;
|
||||
printk(BIOS_DEBUG, "DISPLAY=%x\n", X86_CL);
|
||||
break;
|
||||
case 0x5f51:
|
||||
/*
|
||||
* Hook to select active LFP configuration:
|
||||
* 00h = No LVDS, VBIOS does not enable LVDS
|
||||
* 01h = Int-LVDS, LFP driven by integrated LVDS decoder
|
||||
* 02h = SVDO-LVDS, LFP driven by SVDO decoder
|
||||
* 03h = eDP, LFP Driven by Int-DisplayPort encoder
|
||||
*/
|
||||
X86_AX = 0x005f;
|
||||
X86_CX = active_lfp;
|
||||
res = 1;
|
||||
break;
|
||||
case 0x5f70:
|
||||
switch ((X86_CX >> 8) & 0xff) {
|
||||
case 0:
|
||||
/* Get Mux */
|
||||
X86_AX = 0x005f;
|
||||
X86_CX = 0x0000;
|
||||
res = 1;
|
||||
break;
|
||||
case 1:
|
||||
/* Set Mux */
|
||||
X86_AX = 0x005f;
|
||||
X86_CX = 0x0000;
|
||||
res = 1;
|
||||
break;
|
||||
case 2:
|
||||
/* Get SG/Non-SG mode */
|
||||
X86_AX = 0x005f;
|
||||
X86_CX = 0x0000;
|
||||
res = 1;
|
||||
break;
|
||||
default:
|
||||
/* Interrupt was not handled */
|
||||
printk(BIOS_DEBUG,
|
||||
"Unknown INT15 5f70 function: 0x%02x\n",
|
||||
((X86_CX >> 8) & 0xff));
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
printk(BIOS_DEBUG, "Unknown INT15 function %04x!\n", X86_AX);
|
||||
break;
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
void install_intel_vga_int15_handler(int active_lfp_, int pfit_, int display_, int panel_type_)
|
||||
{
|
||||
active_lfp = active_lfp_;
|
||||
pfit = pfit_;
|
||||
display = display_;
|
||||
panel_type = panel_type_;
|
||||
mainboard_interrupt_handlers(0x15, &intel_vga_int15_handler);
|
||||
}
|
|
@ -0,0 +1,35 @@
|
|||
int intel_vga_int15_handler(void);
|
||||
|
||||
enum {
|
||||
GMA_INT15_BOOT_DISPLAY_DEFAULT = 0,
|
||||
GMA_INT15_BOOT_DISPLAY_CRT = (1 << 0),
|
||||
GMA_INT15_BOOT_DISPLAY_TV = (1 << 1),
|
||||
GMA_INT15_BOOT_DISPLAY_EFP = (1 << 2),
|
||||
GMA_INT15_BOOT_DISPLAY_LFP = (1 << 3),
|
||||
GMA_INT15_BOOT_DISPLAY_CRT2 = (1 << 4),
|
||||
GMA_INT15_BOOT_DISPLAY_TV2 = (1 << 5),
|
||||
GMA_INT15_BOOT_DISPLAY_EFP2 = (1 << 6),
|
||||
GMA_INT15_BOOT_DISPLAY_LFP2 = (1 << 7),
|
||||
};
|
||||
enum {
|
||||
GMA_INT15_PANEL_FIT_DEFAULT = 0,
|
||||
GMA_INT15_PANEL_FIT_CENTERING = (1 << 0),
|
||||
GMA_INT15_PANEL_FIT_TXT_STRETCH = (1 << 1),
|
||||
GMA_INT15_PANEL_FIT_GFX_STRETCH = (1 << 2),
|
||||
};
|
||||
|
||||
enum {
|
||||
GMA_INT15_ACTIVE_LFP_NONE = 0x00,
|
||||
GMA_INT15_ACTIVE_LFP_INT_LVDS = 0x01,
|
||||
GMA_INT15_ACTIVE_LFP_SVDO_LVDS = 0x02,
|
||||
GMA_INT15_ACTIVE_LFP_EDP = 0x03,
|
||||
};
|
||||
|
||||
|
||||
#if CONFIG_VGA_ROM_RUN
|
||||
/* Install custom int15 handler for VGA OPROM */
|
||||
void install_intel_vga_int15_handler(int active_lfp, int pfit, int display, int panel_type);
|
||||
#else
|
||||
static inline void install_intel_vga_int15_handler(int active_lfp, int pfit, int display, int panel_type) {}
|
||||
#endif
|
||||
|
|
@ -13,6 +13,7 @@ config BOARD_SPECIFIC_OPTIONS # dummy
|
|||
select HAVE_MP_TABLE
|
||||
select BOARD_ROMSIZE_KB_2048
|
||||
select CHANNEL_XOR_RANDOMIZATION
|
||||
select INTEL_INT15
|
||||
select HAVE_ACPI_TABLES
|
||||
select HAVE_ACPI_RESUME
|
||||
select USE_OPTION_TABLE
|
||||
|
|
|
@ -33,42 +33,11 @@
|
|||
#include <pc80/mc146818rtc.h>
|
||||
#include <arch/x86/include/arch/acpigen.h>
|
||||
#include <smbios.h>
|
||||
#include <x86emu/x86emu.h>
|
||||
#include <drivers/intel/gma/int15.h>
|
||||
#include <device/azalia_device.h>
|
||||
#include "hda_verb.h"
|
||||
#define PANEL INT15_5F35_CL_DISPLAY_DEFAULT
|
||||
|
||||
#if CONFIG_PCI_OPTION_ROM_RUN_YABEL || CONFIG_PCI_OPTION_ROM_RUN_REALMODE
|
||||
static int int15_handler(void)
|
||||
{
|
||||
/* The right way to do this is to move this handler code into
|
||||
* the mainboard or northbridge code.
|
||||
* TODO: completely move to mainboards / chipsets.
|
||||
*/
|
||||
printk(BIOS_DEBUG, "%s: AX=%04x BX=%04x CX=%04x DX=%04x\n",
|
||||
__func__, X86_AX, X86_BX, X86_CX, X86_DX);
|
||||
|
||||
switch (X86_AX) {
|
||||
case 0x5f35: /* Boot Display */
|
||||
X86_AX = 0x005f; // Success
|
||||
X86_CL = PANEL;
|
||||
break;
|
||||
case 0x5f40: /* Boot Panel Type */
|
||||
X86_AX = 0x005f; // Success
|
||||
X86_CL = 3;
|
||||
printk(BIOS_DEBUG, "DISPLAY=%x\n", X86_CL);
|
||||
break;
|
||||
default:
|
||||
/* Interrupt was not handled */
|
||||
printk(BIOS_DEBUG, "Unknown INT15 function %04x!\n", X86_AX);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Interrupt handled */
|
||||
return 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
int get_cst_entries(acpi_cstate_t **entries)
|
||||
{
|
||||
return 0;
|
||||
|
@ -76,10 +45,7 @@ int get_cst_entries(acpi_cstate_t **entries)
|
|||
|
||||
static void mainboard_init(device_t dev)
|
||||
{
|
||||
#if CONFIG_PCI_OPTION_ROM_RUN_YABEL || CONFIG_PCI_OPTION_ROM_RUN_REALMODE
|
||||
/* Install custom int15 handler for VGA OPROM */
|
||||
mainboard_interrupt_handlers(0x15, &int15_handler);
|
||||
#endif
|
||||
install_intel_vga_int15_handler(GMA_INT15_ACTIVE_LFP_INT_LVDS, GMA_INT15_PANEL_FIT_DEFAULT, PANEL, 3);
|
||||
}
|
||||
|
||||
static void mainboard_enable(device_t dev)
|
||||
|
|
|
@ -18,6 +18,7 @@ config BOARD_SPECIFIC_OPTIONS # dummy
|
|||
select MAINBOARD_HAS_CHROMEOS
|
||||
select EXTERNAL_MRC_BLOB
|
||||
select MONOTONIC_TIMER_MSR
|
||||
select INTEL_INT15
|
||||
|
||||
config VBOOT_RAMSTAGE_INDEX
|
||||
hex
|
||||
|
|
|
@ -26,9 +26,7 @@
|
|||
#include <device/pci_def.h>
|
||||
#include <device/pci_ops.h>
|
||||
#include <console/console.h>
|
||||
#if CONFIG_VGA_ROM_RUN
|
||||
#include <x86emu/x86emu.h>
|
||||
#endif
|
||||
#include <drivers/intel/gma/int15.h>
|
||||
#include <pc80/mc146818rtc.h>
|
||||
#include <arch/acpi.h>
|
||||
#include <arch/io.h>
|
||||
|
@ -46,92 +44,6 @@ void mainboard_suspend_resume(void)
|
|||
outb(0xcb, 0xb2);
|
||||
}
|
||||
|
||||
#if CONFIG_VGA_ROM_RUN
|
||||
static int int15_handler(void)
|
||||
{
|
||||
int res = 0;
|
||||
|
||||
printk(BIOS_DEBUG, "%s: AX=%04x BX=%04x CX=%04x DX=%04x\n",
|
||||
__func__, X86_AX, X86_BX, X86_CX, X86_DX);
|
||||
|
||||
switch (X86_AX) {
|
||||
case 0x5f34:
|
||||
/*
|
||||
* Set Panel Fitting Hook:
|
||||
* bit 2 = Graphics Stretching
|
||||
* bit 1 = Text Stretching
|
||||
* bit 0 = Centering (do not set with bit1 or bit2)
|
||||
* 0 = video bios default
|
||||
*/
|
||||
X86_AX = 0x005f;
|
||||
X86_CX = 0x0001;
|
||||
res = 1;
|
||||
break;
|
||||
case 0x5f35:
|
||||
/*
|
||||
* Boot Display Device Hook:
|
||||
* bit 0 = CRT
|
||||
* bit 1 = TV (eDP) *
|
||||
* bit 2 = EFP *
|
||||
* bit 3 = LFP
|
||||
* bit 4 = CRT2
|
||||
* bit 5 = TV2 (eDP) *
|
||||
* bit 6 = EFP2 *
|
||||
* bit 7 = LFP2
|
||||
*/
|
||||
X86_AX = 0x005f;
|
||||
X86_CX = 0x0000;
|
||||
res = 1;
|
||||
break;
|
||||
case 0x5f51:
|
||||
/*
|
||||
* Hook to select active LFP configuration:
|
||||
* 00h = No LVDS, VBIOS does not enable LVDS
|
||||
* 01h = Int-LVDS, LFP driven by integrated LVDS decoder
|
||||
* 02h = SVDO-LVDS, LFP driven by SVDO decoder
|
||||
* 03h = eDP, LFP Driven by Int-DisplayPort encoder
|
||||
*/
|
||||
X86_AX = 0x005f;
|
||||
X86_CX = 0x0003;
|
||||
res = 1;
|
||||
break;
|
||||
case 0x5f70:
|
||||
switch ((X86_CX >> 8) & 0xff) {
|
||||
case 0:
|
||||
/* Get Mux */
|
||||
X86_AX = 0x005f;
|
||||
X86_CX = 0x0000;
|
||||
res = 1;
|
||||
break;
|
||||
case 1:
|
||||
/* Set Mux */
|
||||
X86_AX = 0x005f;
|
||||
X86_CX = 0x0000;
|
||||
res = 1;
|
||||
break;
|
||||
case 2:
|
||||
/* Get SG/Non-SG mode */
|
||||
X86_AX = 0x005f;
|
||||
X86_CX = 0x0000;
|
||||
res = 1;
|
||||
break;
|
||||
default:
|
||||
/* Interrupt was not handled */
|
||||
printk(BIOS_DEBUG,
|
||||
"Unknown INT15 5f70 function: 0x%02x\n",
|
||||
((X86_CX >> 8) & 0xff));
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
printk(BIOS_DEBUG, "Unknown INT15 function %04x!\n", X86_AX);
|
||||
break;
|
||||
}
|
||||
return res;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Audio Setup */
|
||||
|
||||
static void verb_setup(void)
|
||||
|
@ -187,10 +99,7 @@ static void mainboard_enable(device_t dev)
|
|||
{
|
||||
dev->ops->init = mainboard_init;
|
||||
dev->ops->get_smbios_data = mainboard_smbios_data;
|
||||
#if CONFIG_VGA_ROM_RUN
|
||||
/* Install custom int15 handler for VGA OPROM */
|
||||
mainboard_interrupt_handlers(0x15, &int15_handler);
|
||||
#endif
|
||||
install_intel_vga_int15_handler(GMA_INT15_ACTIVE_LFP_EDP, GMA_INT15_PANEL_FIT_CENTERING, GMA_INT15_BOOT_DISPLAY_DEFAULT, 0);
|
||||
verb_setup();
|
||||
}
|
||||
|
||||
|
|
|
@ -13,6 +13,7 @@ config BOARD_SPECIFIC_OPTIONS # dummy
|
|||
select HAVE_ACPI_RESUME
|
||||
select HAVE_SMI_HANDLER
|
||||
select MAINBOARD_HAS_CHROMEOS
|
||||
select INTEL_INT15
|
||||
|
||||
# Workaround for EC/KBC IRQ1.
|
||||
select SERIRQ_CONTINUOUS_MODE
|
||||
|
|
|
@ -24,9 +24,7 @@
|
|||
#include <device/pci_def.h>
|
||||
#include <device/pci_ops.h>
|
||||
#include <console/console.h>
|
||||
#if CONFIG_VGA_ROM_RUN
|
||||
#include <x86emu/x86emu.h>
|
||||
#endif
|
||||
#include <drivers/intel/gma/int15.h>
|
||||
#include <pc80/mc146818rtc.h>
|
||||
#include <arch/acpi.h>
|
||||
#include <arch/io.h>
|
||||
|
@ -196,91 +194,6 @@ void mainboard_suspend_resume(void)
|
|||
outb(0xcb, 0xb2);
|
||||
}
|
||||
|
||||
#if CONFIG_VGA_ROM_RUN
|
||||
static int int15_handler(void)
|
||||
{
|
||||
int res = 0;
|
||||
|
||||
printk(BIOS_DEBUG, "%s: INT15 function %04x!\n",
|
||||
__func__, X86_AX);
|
||||
|
||||
switch (X86_AX) {
|
||||
case 0x5f34:
|
||||
/*
|
||||
* Set Panel Fitting Hook:
|
||||
* bit 2 = Graphics Stretching
|
||||
* bit 1 = Text Stretching
|
||||
* bit 0 = Centering (do not set with bit1 or bit2)
|
||||
* 0 = video bios default
|
||||
*/
|
||||
X86_AX = 0x005f;
|
||||
X86_CL = 0x00; /* Use video bios default */
|
||||
res = 1;
|
||||
break;
|
||||
case 0x5f35:
|
||||
/*
|
||||
* Boot Display Device Hook:
|
||||
* bit 0 = CRT
|
||||
* bit 1 = TV (eDP)
|
||||
* bit 2 = EFP
|
||||
* bit 3 = LFP
|
||||
* bit 4 = CRT2
|
||||
* bit 5 = TV2 (eDP)
|
||||
* bit 6 = EFP2
|
||||
* bit 7 = LFP2
|
||||
*/
|
||||
X86_AX = 0x005f;
|
||||
X86_CX = 0x0000; /* Use video bios default */
|
||||
res = 1;
|
||||
break;
|
||||
case 0x5f51:
|
||||
/*
|
||||
* Hook to select active LFP configuration:
|
||||
* 00h = No LVDS, VBIOS does not enable LVDS
|
||||
* 01h = Int-LVDS, LFP driven by integrated LVDS decoder
|
||||
* 02h = SVDO-LVDS, LFP driven by SVDO decoder
|
||||
* 03h = eDP, LFP Driven by Int-DisplayPort encoder
|
||||
*/
|
||||
X86_AX = 0x005f;
|
||||
X86_CX = 0x0001; /* Int-LVDS */
|
||||
res = 1;
|
||||
break;
|
||||
case 0x5f70:
|
||||
switch (X86_CH) {
|
||||
case 0:
|
||||
/* Get Mux */
|
||||
X86_AX = 0x005f;
|
||||
X86_CX = 0x0000;
|
||||
res = 1;
|
||||
break;
|
||||
case 1:
|
||||
/* Set Mux */
|
||||
X86_AX = 0x005f;
|
||||
X86_CX = 0x0000;
|
||||
res = 1;
|
||||
break;
|
||||
case 2:
|
||||
/* Get SG/Non-SG mode */
|
||||
X86_AX = 0x005f;
|
||||
X86_CX = 0x0000;
|
||||
res = 1;
|
||||
break;
|
||||
default:
|
||||
/* Interrupt was not handled */
|
||||
printk(BIOS_DEBUG, "Unknown INT15 5f70 function: 0x%02x\n",
|
||||
X86_CH);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
printk(BIOS_DEBUG, "Unknown INT15 function %04x!\n", X86_AX);
|
||||
break;
|
||||
}
|
||||
return res;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Audio Setup */
|
||||
|
||||
static void verb_setup(void)
|
||||
|
@ -380,10 +293,7 @@ static void mainboard_enable(device_t dev)
|
|||
{
|
||||
dev->ops->init = mainboard_init;
|
||||
dev->ops->get_smbios_data = butterfly_onboard_smbios_data;
|
||||
#if CONFIG_VGA_ROM_RUN
|
||||
/* Install custom int15 handler for VGA OPROM */
|
||||
mainboard_interrupt_handlers(0x15, &int15_handler);
|
||||
#endif
|
||||
install_intel_vga_int15_handler(GMA_INT15_ACTIVE_LFP_INT_LVDS, GMA_INT15_PANEL_FIT_DEFAULT, GMA_INT15_BOOT_DISPLAY_DEFAULT, 0);
|
||||
verb_setup();
|
||||
}
|
||||
|
||||
|
|
|
@ -19,6 +19,7 @@ config BOARD_SPECIFIC_OPTIONS # dummy
|
|||
select EXTERNAL_MRC_BLOB
|
||||
select MONOTONIC_TIMER_MSR
|
||||
select MAINBOARD_HAS_NATIVE_VGA_INIT
|
||||
select INTEL_INT15
|
||||
|
||||
config VBOOT_RAMSTAGE_INDEX
|
||||
hex
|
||||
|
|
|
@ -26,9 +26,7 @@
|
|||
#include <device/pci_def.h>
|
||||
#include <device/pci_ops.h>
|
||||
#include <console/console.h>
|
||||
#if CONFIG_VGA_ROM_RUN
|
||||
#include <x86emu/x86emu.h>
|
||||
#endif
|
||||
#include <drivers/intel/gma/int15.h>
|
||||
#include <pc80/mc146818rtc.h>
|
||||
#include <arch/acpi.h>
|
||||
#include <arch/io.h>
|
||||
|
@ -46,92 +44,6 @@ void mainboard_suspend_resume(void)
|
|||
outb(0xcb, 0xb2);
|
||||
}
|
||||
|
||||
#if CONFIG_VGA_ROM_RUN
|
||||
static int int15_handler(void)
|
||||
{
|
||||
int res = 0;
|
||||
|
||||
printk(BIOS_DEBUG, "%s: AX=%04x BX=%04x CX=%04x DX=%04x\n",
|
||||
__func__, X86_AX, X86_BX, X86_CX, X86_DX);
|
||||
|
||||
switch (X86_AX) {
|
||||
case 0x5f34:
|
||||
/*
|
||||
* Set Panel Fitting Hook:
|
||||
* bit 2 = Graphics Stretching
|
||||
* bit 1 = Text Stretching
|
||||
* bit 0 = Centering (do not set with bit1 or bit2)
|
||||
* 0 = video bios default
|
||||
*/
|
||||
X86_AX = 0x005f;
|
||||
X86_CX = 0x0001;
|
||||
res = 1;
|
||||
break;
|
||||
case 0x5f35:
|
||||
/*
|
||||
* Boot Display Device Hook:
|
||||
* bit 0 = CRT
|
||||
* bit 1 = TV (eDP) *
|
||||
* bit 2 = EFP *
|
||||
* bit 3 = LFP
|
||||
* bit 4 = CRT2
|
||||
* bit 5 = TV2 (eDP) *
|
||||
* bit 6 = EFP2 *
|
||||
* bit 7 = LFP2
|
||||
*/
|
||||
X86_AX = 0x005f;
|
||||
X86_CX = 0x0000;
|
||||
res = 1;
|
||||
break;
|
||||
case 0x5f51:
|
||||
/*
|
||||
* Hook to select active LFP configuration:
|
||||
* 00h = No LVDS, VBIOS does not enable LVDS
|
||||
* 01h = Int-LVDS, LFP driven by integrated LVDS decoder
|
||||
* 02h = SVDO-LVDS, LFP driven by SVDO decoder
|
||||
* 03h = eDP, LFP Driven by Int-DisplayPort encoder
|
||||
*/
|
||||
X86_AX = 0x005f;
|
||||
X86_CX = 0x0003;
|
||||
res = 1;
|
||||
break;
|
||||
case 0x5f70:
|
||||
switch ((X86_CX >> 8) & 0xff) {
|
||||
case 0:
|
||||
/* Get Mux */
|
||||
X86_AX = 0x005f;
|
||||
X86_CX = 0x0000;
|
||||
res = 1;
|
||||
break;
|
||||
case 1:
|
||||
/* Set Mux */
|
||||
X86_AX = 0x005f;
|
||||
X86_CX = 0x0000;
|
||||
res = 1;
|
||||
break;
|
||||
case 2:
|
||||
/* Get SG/Non-SG mode */
|
||||
X86_AX = 0x005f;
|
||||
X86_CX = 0x0000;
|
||||
res = 1;
|
||||
break;
|
||||
default:
|
||||
/* Interrupt was not handled */
|
||||
printk(BIOS_DEBUG,
|
||||
"Unknown INT15 5f70 function: 0x%02x\n",
|
||||
((X86_CX >> 8) & 0xff));
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
printk(BIOS_DEBUG, "Unknown INT15 function %04x!\n", X86_AX);
|
||||
break;
|
||||
}
|
||||
return res;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Audio Setup */
|
||||
|
||||
static void verb_setup(void)
|
||||
|
@ -190,10 +102,7 @@ static void mainboard_enable(device_t dev)
|
|||
{
|
||||
dev->ops->init = mainboard_init;
|
||||
dev->ops->get_smbios_data = mainboard_smbios_data;
|
||||
#if CONFIG_VGA_ROM_RUN
|
||||
/* Install custom int15 handler for VGA OPROM */
|
||||
mainboard_interrupt_handlers(0x15, &int15_handler);
|
||||
#endif
|
||||
install_intel_vga_int15_handler(GMA_INT15_ACTIVE_LFP_EDP, GMA_INT15_PANEL_FIT_CENTERING, GMA_INT15_BOOT_DISPLAY_DEFAULT, 0);
|
||||
verb_setup();
|
||||
}
|
||||
|
||||
|
|
|
@ -17,6 +17,7 @@ config BOARD_SPECIFIC_OPTIONS # dummy
|
|||
select MAINBOARD_HAS_CHROMEOS
|
||||
select EXTERNAL_MRC_BLOB
|
||||
select MONOTONIC_TIMER_MSR
|
||||
select INTEL_INT15
|
||||
|
||||
config VBOOT_RAMSTAGE_INDEX
|
||||
hex
|
||||
|
|
|
@ -32,8 +32,8 @@
|
|||
#include <device/pci_ops.h>
|
||||
#include <pc80/mc146818rtc.h>
|
||||
#include <southbridge/intel/lynxpoint/pch.h>
|
||||
#include <x86emu/x86emu.h>
|
||||
#include <device/azalia_device.h>
|
||||
#include <drivers/intel/gma/int15.h>
|
||||
#include "hda_verb.h"
|
||||
#include "onboard.h"
|
||||
|
||||
|
@ -44,92 +44,6 @@ void mainboard_suspend_resume(void)
|
|||
outb(0xcb, 0xb2);
|
||||
}
|
||||
|
||||
#if CONFIG_VGA_ROM_RUN
|
||||
static int int15_handler(void)
|
||||
{
|
||||
int res = 0;
|
||||
|
||||
printk(BIOS_DEBUG, "%s: AX=%04x BX=%04x CX=%04x DX=%04x\n",
|
||||
__func__, X86_AX, X86_BX, X86_CX, X86_DX);
|
||||
|
||||
switch (X86_AX) {
|
||||
case 0x5f34:
|
||||
/*
|
||||
* Set Panel Fitting Hook:
|
||||
* bit 2 = Graphics Stretching
|
||||
* bit 1 = Text Stretching
|
||||
* bit 0 = Centering (do not set with bit1 or bit2)
|
||||
* 0 = video bios default
|
||||
*/
|
||||
X86_AX = 0x005f;
|
||||
X86_CX = 0x0001;
|
||||
res = 1;
|
||||
break;
|
||||
case 0x5f35:
|
||||
/*
|
||||
* Boot Display Device Hook:
|
||||
* bit 0 = CRT
|
||||
* bit 1 = TV (eDP) *
|
||||
* bit 2 = EFP *
|
||||
* bit 3 = LFP
|
||||
* bit 4 = CRT2
|
||||
* bit 5 = TV2 (eDP) *
|
||||
* bit 6 = EFP2 *
|
||||
* bit 7 = LFP2
|
||||
*/
|
||||
X86_AX = 0x005f;
|
||||
X86_CX = 0x0000;
|
||||
res = 1;
|
||||
break;
|
||||
case 0x5f51:
|
||||
/*
|
||||
* Hook to select active LFP configuration:
|
||||
* 00h = No LVDS, VBIOS does not enable LVDS
|
||||
* 01h = Int-LVDS, LFP driven by integrated LVDS decoder
|
||||
* 02h = SVDO-LVDS, LFP driven by SVDO decoder
|
||||
* 03h = eDP, LFP Driven by Int-DisplayPort encoder
|
||||
*/
|
||||
X86_AX = 0x005f;
|
||||
X86_CX = 0x0003;
|
||||
res = 1;
|
||||
break;
|
||||
case 0x5f70:
|
||||
switch ((X86_CX >> 8) & 0xff) {
|
||||
case 0:
|
||||
/* Get Mux */
|
||||
X86_AX = 0x005f;
|
||||
X86_CX = 0x0000;
|
||||
res = 1;
|
||||
break;
|
||||
case 1:
|
||||
/* Set Mux */
|
||||
X86_AX = 0x005f;
|
||||
X86_CX = 0x0000;
|
||||
res = 1;
|
||||
break;
|
||||
case 2:
|
||||
/* Get SG/Non-SG mode */
|
||||
X86_AX = 0x005f;
|
||||
X86_CX = 0x0000;
|
||||
res = 1;
|
||||
break;
|
||||
default:
|
||||
/* Interrupt was not handled */
|
||||
printk(BIOS_DEBUG,
|
||||
"Unknown INT15 5f70 function: 0x%02x\n",
|
||||
((X86_CX >> 8) & 0xff));
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
printk(BIOS_DEBUG, "Unknown INT15 function %04x!\n", X86_AX);
|
||||
break;
|
||||
}
|
||||
return res;
|
||||
}
|
||||
#endif /* CONFIG_VGA_ROM_RUN */
|
||||
|
||||
/* Audio Setup */
|
||||
|
||||
static void verb_setup(void)
|
||||
|
@ -152,10 +66,7 @@ static void mainboard_init(device_t dev)
|
|||
static void mainboard_enable(device_t dev)
|
||||
{
|
||||
dev->ops->init = mainboard_init;
|
||||
#if CONFIG_VGA_ROM_RUN
|
||||
/* Install custom int15 handler for VGA OPROM */
|
||||
mainboard_interrupt_handlers(0x15, &int15_handler);
|
||||
#endif
|
||||
install_intel_vga_int15_handler(GMA_INT15_ACTIVE_LFP_EDP, GMA_INT15_PANEL_FIT_CENTERING, GMA_INT15_BOOT_DISPLAY_DEFAULT, 0);
|
||||
verb_setup();
|
||||
}
|
||||
|
||||
|
|
|
@ -12,6 +12,7 @@ config BOARD_SPECIFIC_OPTIONS # dummy
|
|||
select HAVE_ACPI_RESUME
|
||||
select HAVE_SMI_HANDLER
|
||||
select MAINBOARD_HAS_CHROMEOS
|
||||
select INTEL_INT15
|
||||
|
||||
# Workaround for EC/KBC IRQ1.
|
||||
select SERIRQ_CONTINUOUS_MODE
|
||||
|
|
|
@ -24,9 +24,7 @@
|
|||
#include <device/pci_def.h>
|
||||
#include <device/pci_ops.h>
|
||||
#include <console/console.h>
|
||||
#if CONFIG_VGA_ROM_RUN
|
||||
#include <x86emu/x86emu.h>
|
||||
#endif
|
||||
#include <drivers/intel/gma/int15.h>
|
||||
#include <pc80/mc146818rtc.h>
|
||||
#include <arch/acpi.h>
|
||||
#include <arch/io.h>
|
||||
|
@ -50,91 +48,6 @@ void mainboard_suspend_resume(void)
|
|||
outb(0xe1, 0xb2);
|
||||
}
|
||||
|
||||
#if CONFIG_VGA_ROM_RUN
|
||||
static int int15_handler(void)
|
||||
{
|
||||
int res = 0;
|
||||
|
||||
printk(BIOS_DEBUG, "%s: INT15 function %04x!\n",
|
||||
__func__, X86_AX);
|
||||
|
||||
switch(X86_AX) {
|
||||
case 0x5f34:
|
||||
/*
|
||||
* Set Panel Fitting Hook:
|
||||
* bit 2 = Graphics Stretching
|
||||
* bit 1 = Text Stretching
|
||||
* bit 0 = Centering (do not set with bit1 or bit2)
|
||||
* 0 = video bios default
|
||||
*/
|
||||
X86_AX = 0x005f;
|
||||
X86_CL = 0x00; /* Use video bios default */
|
||||
res = 1;
|
||||
break;
|
||||
case 0x5f35:
|
||||
/*
|
||||
* Boot Display Device Hook:
|
||||
* bit 0 = CRT
|
||||
* bit 1 = TV (eDP)
|
||||
* bit 2 = EFP
|
||||
* bit 3 = LFP
|
||||
* bit 4 = CRT2
|
||||
* bit 5 = TV2 (eDP)
|
||||
* bit 6 = EFP2
|
||||
* bit 7 = LFP2
|
||||
*/
|
||||
X86_AX = 0x005f;
|
||||
X86_CX = 0x0000; /* Use video bios default */
|
||||
res = 1;
|
||||
break;
|
||||
case 0x5f51:
|
||||
/*
|
||||
* Hook to select active LFP configuration:
|
||||
* 00h = No LVDS, VBIOS does not enable LVDS
|
||||
* 01h = Int-LVDS, LFP driven by integrated LVDS decoder
|
||||
* 02h = SVDO-LVDS, LFP driven by SVDO decoder
|
||||
* 03h = eDP, LFP Driven by Int-DisplayPort encoder
|
||||
*/
|
||||
X86_AX = 0x005f;
|
||||
X86_CX = 0x0003; /* eDP */
|
||||
res = 1;
|
||||
break;
|
||||
case 0x5f70:
|
||||
switch (X86_CH) {
|
||||
case 0:
|
||||
/* Get Mux */
|
||||
X86_AX = 0x005f;
|
||||
X86_CX = 0x0000;
|
||||
res = 1;
|
||||
break;
|
||||
case 1:
|
||||
/* Set Mux */
|
||||
X86_AX = 0x005f;
|
||||
X86_CX = 0x0000;
|
||||
res = 1;
|
||||
break;
|
||||
case 2:
|
||||
/* Get SG/Non-SG mode */
|
||||
X86_AX = 0x005f;
|
||||
X86_CX = 0x0000;
|
||||
res = 1;
|
||||
break;
|
||||
default:
|
||||
/* Interrupt was not handled */
|
||||
printk(BIOS_DEBUG, "Unknown INT15 5f70 function: 0x%02x\n",
|
||||
X86_CH);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
printk(BIOS_DEBUG, "Unknown INT15 function %04x!\n", X86_AX);
|
||||
break;
|
||||
}
|
||||
return res;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Audio Setup */
|
||||
|
||||
static void verb_setup(void)
|
||||
|
@ -187,10 +100,7 @@ static void mainboard_enable(device_t dev)
|
|||
{
|
||||
dev->ops->init = mainboard_init;
|
||||
dev->ops->get_smbios_data = parrot_onboard_smbios_data;
|
||||
#if CONFIG_VGA_ROM_RUN
|
||||
/* Install custom int15 handler for VGA OPROM */
|
||||
mainboard_interrupt_handlers(0x15, &int15_handler);
|
||||
#endif
|
||||
install_intel_vga_int15_handler(GMA_INT15_ACTIVE_LFP_EDP, GMA_INT15_PANEL_FIT_DEFAULT, GMA_INT15_BOOT_DISPLAY_DEFAULT, 0);
|
||||
verb_setup();
|
||||
}
|
||||
|
||||
|
|
|
@ -21,6 +21,7 @@ config BOARD_SPECIFIC_OPTIONS # dummy
|
|||
select MAINBOARD_HAS_NATIVE_VGA_INIT
|
||||
select INTEL_DP
|
||||
select INTEL_DDI
|
||||
select INTEL_INT15
|
||||
|
||||
config VBOOT_RAMSTAGE_INDEX
|
||||
hex
|
||||
|
|
|
@ -26,9 +26,7 @@
|
|||
#include <device/pci_def.h>
|
||||
#include <device/pci_ops.h>
|
||||
#include <console/console.h>
|
||||
#if CONFIG_VGA_ROM_RUN
|
||||
#include <x86emu/x86emu.h>
|
||||
#endif
|
||||
#include <drivers/intel/gma/int15.h>
|
||||
#include <pc80/mc146818rtc.h>
|
||||
#include <arch/acpi.h>
|
||||
#include <arch/io.h>
|
||||
|
@ -46,92 +44,6 @@ void mainboard_suspend_resume(void)
|
|||
outb(0xcb, 0xb2);
|
||||
}
|
||||
|
||||
#if CONFIG_VGA_ROM_RUN
|
||||
static int int15_handler(void)
|
||||
{
|
||||
int res = 0;
|
||||
|
||||
printk(BIOS_DEBUG, "%s: AX=%04x BX=%04x CX=%04x DX=%04x\n",
|
||||
__func__, X86_AX, X86_BX, X86_CX, X86_DX);
|
||||
|
||||
switch (X86_AX) {
|
||||
case 0x5f34:
|
||||
/*
|
||||
* Set Panel Fitting Hook:
|
||||
* bit 2 = Graphics Stretching
|
||||
* bit 1 = Text Stretching
|
||||
* bit 0 = Centering (do not set with bit1 or bit2)
|
||||
* 0 = video bios default
|
||||
*/
|
||||
X86_AX = 0x005f;
|
||||
X86_CX = 0x0001;
|
||||
res = 1;
|
||||
break;
|
||||
case 0x5f35:
|
||||
/*
|
||||
* Boot Display Device Hook:
|
||||
* bit 0 = CRT
|
||||
* bit 1 = TV (eDP) *
|
||||
* bit 2 = EFP *
|
||||
* bit 3 = LFP
|
||||
* bit 4 = CRT2
|
||||
* bit 5 = TV2 (eDP) *
|
||||
* bit 6 = EFP2 *
|
||||
* bit 7 = LFP2
|
||||
*/
|
||||
X86_AX = 0x005f;
|
||||
X86_CX = 0x0000;
|
||||
res = 1;
|
||||
break;
|
||||
case 0x5f51:
|
||||
/*
|
||||
* Hook to select active LFP configuration:
|
||||
* 00h = No LVDS, VBIOS does not enable LVDS
|
||||
* 01h = Int-LVDS, LFP driven by integrated LVDS decoder
|
||||
* 02h = SVDO-LVDS, LFP driven by SVDO decoder
|
||||
* 03h = eDP, LFP Driven by Int-DisplayPort encoder
|
||||
*/
|
||||
X86_AX = 0x005f;
|
||||
X86_CX = 0x0003;
|
||||
res = 1;
|
||||
break;
|
||||
case 0x5f70:
|
||||
switch ((X86_CX >> 8) & 0xff) {
|
||||
case 0:
|
||||
/* Get Mux */
|
||||
X86_AX = 0x005f;
|
||||
X86_CX = 0x0000;
|
||||
res = 1;
|
||||
break;
|
||||
case 1:
|
||||
/* Set Mux */
|
||||
X86_AX = 0x005f;
|
||||
X86_CX = 0x0000;
|
||||
res = 1;
|
||||
break;
|
||||
case 2:
|
||||
/* Get SG/Non-SG mode */
|
||||
X86_AX = 0x005f;
|
||||
X86_CX = 0x0000;
|
||||
res = 1;
|
||||
break;
|
||||
default:
|
||||
/* Interrupt was not handled */
|
||||
printk(BIOS_DEBUG,
|
||||
"Unknown INT15 5f70 function: 0x%02x\n",
|
||||
((X86_CX >> 8) & 0xff));
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
printk(BIOS_DEBUG, "Unknown INT15 function %04x!\n", X86_AX);
|
||||
break;
|
||||
}
|
||||
return res;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Audio Setup */
|
||||
|
||||
static void verb_setup(void)
|
||||
|
@ -190,10 +102,7 @@ static void mainboard_enable(device_t dev)
|
|||
{
|
||||
dev->ops->init = mainboard_init;
|
||||
dev->ops->get_smbios_data = mainboard_smbios_data;
|
||||
#if CONFIG_VGA_ROM_RUN
|
||||
/* Install custom int15 handler for VGA OPROM */
|
||||
mainboard_interrupt_handlers(0x15, &int15_handler);
|
||||
#endif
|
||||
install_intel_vga_int15_handler(GMA_INT15_ACTIVE_LFP_EDP, GMA_INT15_PANEL_FIT_CENTERING, GMA_INT15_BOOT_DISPLAY_DEFAULT, 0);
|
||||
verb_setup();
|
||||
}
|
||||
|
||||
|
|
|
@ -19,6 +19,7 @@ config BOARD_SPECIFIC_OPTIONS # dummy
|
|||
select EXTERNAL_MRC_BLOB
|
||||
select MONOTONIC_TIMER_MSR
|
||||
select MAINBOARD_HAS_NATIVE_VGA_INIT
|
||||
select INTEL_INT15
|
||||
|
||||
config VBOOT_RAMSTAGE_INDEX
|
||||
hex
|
||||
|
|
|
@ -26,9 +26,7 @@
|
|||
#include <device/pci_def.h>
|
||||
#include <device/pci_ops.h>
|
||||
#include <console/console.h>
|
||||
#if CONFIG_VGA_ROM_RUN
|
||||
#include <x86emu/x86emu.h>
|
||||
#endif
|
||||
#include <drivers/intel/gma/int15.h>
|
||||
#include <pc80/mc146818rtc.h>
|
||||
#include <arch/acpi.h>
|
||||
#include <arch/io.h>
|
||||
|
@ -44,92 +42,6 @@ void mainboard_suspend_resume(void)
|
|||
outb(0xcb, 0xb2);
|
||||
}
|
||||
|
||||
#if CONFIG_VGA_ROM_RUN
|
||||
static int int15_handler(void)
|
||||
{
|
||||
int res = 0;
|
||||
|
||||
printk(BIOS_DEBUG, "%s: AX=%04x BX=%04x CX=%04x DX=%04x\n",
|
||||
__func__, X86_AX, X86_BX, X86_CX, X86_DX);
|
||||
|
||||
switch (X86_AX) {
|
||||
case 0x5f34:
|
||||
/*
|
||||
* Set Panel Fitting Hook:
|
||||
* bit 2 = Graphics Stretching
|
||||
* bit 1 = Text Stretching
|
||||
* bit 0 = Centering (do not set with bit1 or bit2)
|
||||
* 0 = video bios default
|
||||
*/
|
||||
X86_AX = 0x005f;
|
||||
X86_CX = 0x0001;
|
||||
res = 1;
|
||||
break;
|
||||
case 0x5f35:
|
||||
/*
|
||||
* Boot Display Device Hook:
|
||||
* bit 0 = CRT
|
||||
* bit 1 = TV (eDP) *
|
||||
* bit 2 = EFP *
|
||||
* bit 3 = LFP
|
||||
* bit 4 = CRT2
|
||||
* bit 5 = TV2 (eDP) *
|
||||
* bit 6 = EFP2 *
|
||||
* bit 7 = LFP2
|
||||
*/
|
||||
X86_AX = 0x005f;
|
||||
X86_CX = 0x0000;
|
||||
res = 1;
|
||||
break;
|
||||
case 0x5f51:
|
||||
/*
|
||||
* Hook to select active LFP configuration:
|
||||
* 00h = No LVDS, VBIOS does not enable LVDS
|
||||
* 01h = Int-LVDS, LFP driven by integrated LVDS decoder
|
||||
* 02h = SVDO-LVDS, LFP driven by SVDO decoder
|
||||
* 03h = eDP, LFP Driven by Int-DisplayPort encoder
|
||||
*/
|
||||
X86_AX = 0x005f;
|
||||
X86_CX = 0x0003;
|
||||
res = 1;
|
||||
break;
|
||||
case 0x5f70:
|
||||
switch ((X86_CX >> 8) & 0xff) {
|
||||
case 0:
|
||||
/* Get Mux */
|
||||
X86_AX = 0x005f;
|
||||
X86_CX = 0x0000;
|
||||
res = 1;
|
||||
break;
|
||||
case 1:
|
||||
/* Set Mux */
|
||||
X86_AX = 0x005f;
|
||||
X86_CX = 0x0000;
|
||||
res = 1;
|
||||
break;
|
||||
case 2:
|
||||
/* Get SG/Non-SG mode */
|
||||
X86_AX = 0x005f;
|
||||
X86_CX = 0x0000;
|
||||
res = 1;
|
||||
break;
|
||||
default:
|
||||
/* Interrupt was not handled */
|
||||
printk(BIOS_DEBUG,
|
||||
"Unknown INT15 5f70 function: 0x%02x\n",
|
||||
((X86_CX >> 8) & 0xff));
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
printk(BIOS_DEBUG, "Unknown INT15 function %04x!\n", X86_AX);
|
||||
break;
|
||||
}
|
||||
return res;
|
||||
}
|
||||
#endif
|
||||
|
||||
static void mainboard_init(device_t dev)
|
||||
{
|
||||
mainboard_ec_init();
|
||||
|
@ -168,10 +80,7 @@ static void mainboard_enable(device_t dev)
|
|||
{
|
||||
dev->ops->init = mainboard_init;
|
||||
dev->ops->get_smbios_data = mainboard_smbios_data;
|
||||
#if CONFIG_VGA_ROM_RUN
|
||||
/* Install custom int15 handler for VGA OPROM */
|
||||
mainboard_interrupt_handlers(0x15, &int15_handler);
|
||||
#endif
|
||||
install_intel_vga_int15_handler(GMA_INT15_ACTIVE_LFP_EDP, GMA_INT15_PANEL_FIT_CENTERING, GMA_INT15_BOOT_DISPLAY_DEFAULT, 0);
|
||||
}
|
||||
|
||||
struct chip_operations mainboard_ops = {
|
||||
|
|
|
@ -22,6 +22,7 @@ config BOARD_SPECIFIC_OPTIONS # dummy
|
|||
select MAINBOARD_DO_NATIVE_VGA_INIT
|
||||
select INTEL_DP
|
||||
select INTEL_DDI
|
||||
select INTEL_INT15
|
||||
|
||||
config VBOOT_RAMSTAGE_INDEX
|
||||
hex
|
||||
|
|
|
@ -26,9 +26,7 @@
|
|||
#include <device/pci_def.h>
|
||||
#include <device/pci_ops.h>
|
||||
#include <console/console.h>
|
||||
#if CONFIG_VGA_ROM_RUN
|
||||
#include <x86emu/x86emu.h>
|
||||
#endif
|
||||
#include <drivers/intel/gma/int15.h>
|
||||
#include <pc80/mc146818rtc.h>
|
||||
#include <arch/acpi.h>
|
||||
#include <arch/io.h>
|
||||
|
@ -46,92 +44,6 @@ void mainboard_suspend_resume(void)
|
|||
outb(0xcb, 0xb2);
|
||||
}
|
||||
|
||||
#if CONFIG_VGA_ROM_RUN
|
||||
static int int15_handler(void)
|
||||
{
|
||||
int res = 0;
|
||||
|
||||
printk(BIOS_DEBUG, "%s: AX=%04x BX=%04x CX=%04x DX=%04x\n",
|
||||
__func__, X86_AX, X86_BX, X86_CX, X86_DX);
|
||||
|
||||
switch (X86_AX) {
|
||||
case 0x5f34:
|
||||
/*
|
||||
* Set Panel Fitting Hook:
|
||||
* bit 2 = Graphics Stretching
|
||||
* bit 1 = Text Stretching
|
||||
* bit 0 = Centering (do not set with bit1 or bit2)
|
||||
* 0 = video bios default
|
||||
*/
|
||||
X86_AX = 0x005f;
|
||||
X86_CX = 0x0001;
|
||||
res = 1;
|
||||
break;
|
||||
case 0x5f35:
|
||||
/*
|
||||
* Boot Display Device Hook:
|
||||
* bit 0 = CRT
|
||||
* bit 1 = TV (eDP) *
|
||||
* bit 2 = EFP *
|
||||
* bit 3 = LFP
|
||||
* bit 4 = CRT2
|
||||
* bit 5 = TV2 (eDP) *
|
||||
* bit 6 = EFP2 *
|
||||
* bit 7 = LFP2
|
||||
*/
|
||||
X86_AX = 0x005f;
|
||||
X86_CX = 0x0000;
|
||||
res = 1;
|
||||
break;
|
||||
case 0x5f51:
|
||||
/*
|
||||
* Hook to select active LFP configuration:
|
||||
* 00h = No LVDS, VBIOS does not enable LVDS
|
||||
* 01h = Int-LVDS, LFP driven by integrated LVDS decoder
|
||||
* 02h = SVDO-LVDS, LFP driven by SVDO decoder
|
||||
* 03h = eDP, LFP Driven by Int-DisplayPort encoder
|
||||
*/
|
||||
X86_AX = 0x005f;
|
||||
X86_CX = 0x0003;
|
||||
res = 1;
|
||||
break;
|
||||
case 0x5f70:
|
||||
switch ((X86_CX >> 8) & 0xff) {
|
||||
case 0:
|
||||
/* Get Mux */
|
||||
X86_AX = 0x005f;
|
||||
X86_CX = 0x0000;
|
||||
res = 1;
|
||||
break;
|
||||
case 1:
|
||||
/* Set Mux */
|
||||
X86_AX = 0x005f;
|
||||
X86_CX = 0x0000;
|
||||
res = 1;
|
||||
break;
|
||||
case 2:
|
||||
/* Get SG/Non-SG mode */
|
||||
X86_AX = 0x005f;
|
||||
X86_CX = 0x0000;
|
||||
res = 1;
|
||||
break;
|
||||
default:
|
||||
/* Interrupt was not handled */
|
||||
printk(BIOS_DEBUG,
|
||||
"Unknown INT15 5f70 function: 0x%02x\n",
|
||||
((X86_CX >> 8) & 0xff));
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
printk(BIOS_DEBUG, "Unknown INT15 function %04x!\n", X86_AX);
|
||||
break;
|
||||
}
|
||||
return res;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Audio Setup */
|
||||
|
||||
static void verb_setup(void)
|
||||
|
@ -190,10 +102,7 @@ static void mainboard_enable(device_t dev)
|
|||
{
|
||||
dev->ops->init = mainboard_init;
|
||||
dev->ops->get_smbios_data = mainboard_smbios_data;
|
||||
#if CONFIG_VGA_ROM_RUN
|
||||
/* Install custom int15 handler for VGA OPROM */
|
||||
mainboard_interrupt_handlers(0x15, &int15_handler);
|
||||
#endif
|
||||
install_intel_vga_int15_handler(GMA_INT15_ACTIVE_LFP_EDP, GMA_INT15_PANEL_FIT_CENTERING, GMA_INT15_BOOT_DISPLAY_DEFAULT, 0);
|
||||
verb_setup();
|
||||
}
|
||||
|
||||
|
|
|
@ -13,6 +13,7 @@ config BOARD_SPECIFIC_OPTIONS # dummy
|
|||
select HAVE_ACPI_RESUME
|
||||
select HAVE_SMI_HANDLER
|
||||
select MAINBOARD_HAS_CHROMEOS
|
||||
select INTEL_INT15
|
||||
|
||||
config MAINBOARD_DIR
|
||||
string
|
||||
|
|
|
@ -24,9 +24,7 @@
|
|||
#include <device/pci_def.h>
|
||||
#include <device/pci_ops.h>
|
||||
#include <console/console.h>
|
||||
#if CONFIG_VGA_ROM_RUN
|
||||
#include <x86emu/x86emu.h>
|
||||
#endif
|
||||
#include <drivers/intel/gma/int15.h>
|
||||
#include <pc80/mc146818rtc.h>
|
||||
#include <arch/acpi.h>
|
||||
#include <arch/io.h>
|
||||
|
@ -50,91 +48,6 @@ void mainboard_suspend_resume(void)
|
|||
ec_write_cmd(EC_CMD_NOTIFY_ACPI_ENTER);
|
||||
}
|
||||
|
||||
#if CONFIG_VGA_ROM_RUN
|
||||
static int int15_handler(void)
|
||||
{
|
||||
int res = 0;
|
||||
|
||||
printk(BIOS_DEBUG, "%s: INT15 function %04x!\n",
|
||||
__func__, X86_AX);
|
||||
|
||||
switch(X86_AX) {
|
||||
case 0x5f34:
|
||||
/*
|
||||
* Set Panel Fitting Hook:
|
||||
* bit 2 = Graphics Stretching
|
||||
* bit 1 = Text Stretching
|
||||
* bit 0 = Centering (do not set with bit1 or bit2)
|
||||
* 0 = video bios default
|
||||
*/
|
||||
X86_AX = 0x005f;
|
||||
X86_CL = 0x00; /* Use video bios default */
|
||||
res = 1;
|
||||
break;
|
||||
case 0x5f35:
|
||||
/*
|
||||
* Boot Display Device Hook:
|
||||
* bit 0 = CRT
|
||||
* bit 1 = TV (eDP)
|
||||
* bit 2 = EFP
|
||||
* bit 3 = LFP
|
||||
* bit 4 = CRT2
|
||||
* bit 5 = TV2 (eDP)
|
||||
* bit 6 = EFP2
|
||||
* bit 7 = LFP2
|
||||
*/
|
||||
X86_AX = 0x005f;
|
||||
X86_CX = 0x0000; /* Use video bios default */
|
||||
res = 1;
|
||||
break;
|
||||
case 0x5f51:
|
||||
/*
|
||||
* Hook to select active LFP configuration:
|
||||
* 00h = No LVDS, VBIOS does not enable LVDS
|
||||
* 01h = Int-LVDS, LFP driven by integrated LVDS decoder
|
||||
* 02h = SVDO-LVDS, LFP driven by SVDO decoder
|
||||
* 03h = eDP, LFP Driven by Int-DisplayPort encoder
|
||||
*/
|
||||
X86_AX = 0x005f;
|
||||
X86_CX = 0x0001;
|
||||
res = 1;
|
||||
break;
|
||||
case 0x5f70:
|
||||
switch (X86_CH) {
|
||||
case 0:
|
||||
/* Get Mux */
|
||||
X86_AX = 0x005f;
|
||||
X86_CX = 0x0000;
|
||||
res = 1;
|
||||
break;
|
||||
case 1:
|
||||
/* Set Mux */
|
||||
X86_AX = 0x005f;
|
||||
X86_CX = 0x0000;
|
||||
res = 1;
|
||||
break;
|
||||
case 2:
|
||||
/* Get SG/Non-SG mode */
|
||||
X86_AX = 0x005f;
|
||||
X86_CX = 0x0000;
|
||||
res = 1;
|
||||
break;
|
||||
default:
|
||||
/* Interrupt was not handled */
|
||||
printk(BIOS_DEBUG, "Unknown INT15 5f70 function: 0x%02x\n",
|
||||
X86_CH);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
printk(BIOS_DEBUG, "Unknown INT15 function %04x!\n", X86_AX);
|
||||
break;
|
||||
}
|
||||
return res;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Audio Setup */
|
||||
|
||||
static void verb_setup(void)
|
||||
|
@ -170,10 +83,7 @@ static void mainboard_init(device_t dev)
|
|||
static void mainboard_enable(device_t dev)
|
||||
{
|
||||
dev->ops->init = mainboard_init;
|
||||
#if CONFIG_VGA_ROM_RUN
|
||||
/* Install custom int15 handler for VGA OPROM */
|
||||
mainboard_interrupt_handlers(0x15, &int15_handler);
|
||||
#endif
|
||||
install_intel_vga_int15_handler(GMA_INT15_ACTIVE_LFP_INT_LVDS, GMA_INT15_PANEL_FIT_DEFAULT, GMA_INT15_BOOT_DISPLAY_DEFAULT, 0);
|
||||
verb_setup();
|
||||
}
|
||||
|
||||
|
|
|
@ -15,6 +15,7 @@ config BOARD_SPECIFIC_OPTIONS # dummy
|
|||
select HAVE_ACPI_RESUME
|
||||
select BOARD_ROMSIZE_KB_512
|
||||
select CHANNEL_XOR_RANDOMIZATION
|
||||
select INTEL_INT15
|
||||
|
||||
config MAINBOARD_DIR
|
||||
string
|
||||
|
|
|
@ -20,51 +20,13 @@
|
|||
#include <types.h>
|
||||
#include <device/device.h>
|
||||
#include <console/console.h>
|
||||
#if CONFIG_VGA_ROM_RUN
|
||||
#include <x86emu/x86emu.h>
|
||||
#endif
|
||||
#include <drivers/intel/gma/int15.h>
|
||||
#include <pc80/mc146818rtc.h>
|
||||
#include <arch/io.h>
|
||||
#include <arch/interrupt.h>
|
||||
#include <device/azalia_device.h>
|
||||
#include "superio_hwm.h"
|
||||
|
||||
#if CONFIG_VGA_ROM_RUN
|
||||
static int int15_handler(void)
|
||||
{
|
||||
#define BOOT_DISPLAY_DEFAULT 0
|
||||
#define BOOT_DISPLAY_CRT (1 << 0)
|
||||
#define BOOT_DISPLAY_TV (1 << 1)
|
||||
#define BOOT_DISPLAY_EFP (1 << 2)
|
||||
#define BOOT_DISPLAY_LCD (1 << 3)
|
||||
#define BOOT_DISPLAY_CRT2 (1 << 4)
|
||||
#define BOOT_DISPLAY_TV2 (1 << 5)
|
||||
#define BOOT_DISPLAY_EFP2 (1 << 6)
|
||||
#define BOOT_DISPLAY_LCD2 (1 << 7)
|
||||
|
||||
printk(BIOS_DEBUG, "%s: AX=%04x BX=%04x CX=%04x DX=%04x\n",
|
||||
__func__, X86_AX, X86_BX, X86_CX, X86_DX);
|
||||
|
||||
switch (X86_AX) {
|
||||
case 0x5f35: /* Boot Display */
|
||||
X86_AX = 0x005f; // Success
|
||||
X86_CL = BOOT_DISPLAY_DEFAULT;
|
||||
break;
|
||||
case 0x5f40: /* Boot Panel Type */
|
||||
// M.x86.R_AX = 0x015f; // Supported but failed
|
||||
X86_AX = 0x005f; // Success
|
||||
X86_CL = 3; // Display ID
|
||||
break;
|
||||
default:
|
||||
/* Interrupt was not handled */
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Interrupt handled */
|
||||
return 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Audio Setup */
|
||||
|
||||
static void verb_setup(void)
|
||||
|
@ -79,10 +41,7 @@ static void verb_setup(void)
|
|||
|
||||
static void mainboard_enable(device_t dev)
|
||||
{
|
||||
#if CONFIG_VGA_ROM_RUN
|
||||
/* Install custom int15 handler for VGA OPROM */
|
||||
mainboard_interrupt_handlers(0x15, &int15_handler);
|
||||
#endif
|
||||
install_intel_vga_int15_handler(GMA_INT15_ACTIVE_LFP_INT_LVDS, GMA_INT15_PANEL_FIT_DEFAULT, GMA_INT15_BOOT_DISPLAY_DEFAULT, 3);
|
||||
verb_setup();
|
||||
hwm_setup();
|
||||
}
|
||||
|
|
|
@ -12,6 +12,7 @@ config BOARD_SPECIFIC_OPTIONS # dummy
|
|||
select HAVE_SMI_HANDLER
|
||||
select MAINBOARD_HAS_CHROMEOS
|
||||
select MONOTONIC_TIMER_MSR
|
||||
select INTEL_INT15
|
||||
|
||||
config MAINBOARD_DIR
|
||||
string
|
||||
|
|
|
@ -25,9 +25,7 @@
|
|||
#include <device/pci_def.h>
|
||||
#include <device/pci_ops.h>
|
||||
#include <console/console.h>
|
||||
#if CONFIG_VGA_ROM_RUN
|
||||
#include <x86emu/x86emu.h>
|
||||
#endif
|
||||
#include <drivers/intel/gma/int15.h>
|
||||
#include <pc80/mc146818rtc.h>
|
||||
#include <arch/acpi.h>
|
||||
#include <arch/io.h>
|
||||
|
@ -43,92 +41,6 @@ void mainboard_suspend_resume(void)
|
|||
outb(0xcb, 0xb2);
|
||||
}
|
||||
|
||||
#if CONFIG_VGA_ROM_RUN
|
||||
static int int15_handler(void)
|
||||
{
|
||||
int res = 0;
|
||||
|
||||
printk(BIOS_DEBUG, "%s: AX=%04x BX=%04x CX=%04x DX=%04x\n",
|
||||
__func__, X86_AX, X86_BX, X86_CX, X86_DX);
|
||||
|
||||
switch (X86_AX) {
|
||||
case 0x5f34:
|
||||
/*
|
||||
* Set Panel Fitting Hook:
|
||||
* bit 2 = Graphics Stretching
|
||||
* bit 1 = Text Stretching
|
||||
* bit 0 = Centering (do not set with bit1 or bit2)
|
||||
* 0 = video bios default
|
||||
*/
|
||||
X86_AX = 0x005f;
|
||||
X86_CX = 0x0001;
|
||||
res = 1;
|
||||
break;
|
||||
case 0x5f35:
|
||||
/*
|
||||
* Boot Display Device Hook:
|
||||
* bit 0 = CRT
|
||||
* bit 1 = TV (eDP) *
|
||||
* bit 2 = EFP *
|
||||
* bit 3 = LFP
|
||||
* bit 4 = CRT2
|
||||
* bit 5 = TV2 (eDP) *
|
||||
* bit 6 = EFP2 *
|
||||
* bit 7 = LFP2
|
||||
*/
|
||||
X86_AX = 0x005f;
|
||||
X86_CX = 0x0000;
|
||||
res = 1;
|
||||
break;
|
||||
case 0x5f51:
|
||||
/*
|
||||
* Hook to select active LFP configuration:
|
||||
* 00h = No LVDS, VBIOS does not enable LVDS
|
||||
* 01h = Int-LVDS, LFP driven by integrated LVDS decoder
|
||||
* 02h = SVDO-LVDS, LFP driven by SVDO decoder
|
||||
* 03h = eDP, LFP Driven by Int-DisplayPort encoder
|
||||
*/
|
||||
X86_AX = 0x005f;
|
||||
X86_CX = 0x0003;
|
||||
res = 1;
|
||||
break;
|
||||
case 0x5f70:
|
||||
switch ((X86_CX >> 8) & 0xff) {
|
||||
case 0:
|
||||
/* Get Mux */
|
||||
X86_AX = 0x005f;
|
||||
X86_CX = 0x0000;
|
||||
res = 1;
|
||||
break;
|
||||
case 1:
|
||||
/* Set Mux */
|
||||
X86_AX = 0x005f;
|
||||
X86_CX = 0x0000;
|
||||
res = 1;
|
||||
break;
|
||||
case 2:
|
||||
/* Get SG/Non-SG mode */
|
||||
X86_AX = 0x005f;
|
||||
X86_CX = 0x0000;
|
||||
res = 1;
|
||||
break;
|
||||
default:
|
||||
/* Interrupt was not handled */
|
||||
printk(BIOS_DEBUG,
|
||||
"Unknown INT15 5f70 function: 0x%02x\n",
|
||||
((X86_CX >> 8) & 0xff));
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
printk(BIOS_DEBUG, "Unknown INT15 function %04x!\n", X86_AX);
|
||||
break;
|
||||
}
|
||||
return res;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Audio Setup */
|
||||
|
||||
static void verb_setup(void)
|
||||
|
@ -142,10 +54,7 @@ static void verb_setup(void)
|
|||
|
||||
static void mainboard_enable(device_t dev)
|
||||
{
|
||||
#if CONFIG_VGA_ROM_RUN
|
||||
/* Install custom int15 handler for VGA OPROM */
|
||||
mainboard_interrupt_handlers(0x15, &int15_handler);
|
||||
#endif
|
||||
install_intel_vga_int15_handler(GMA_INT15_ACTIVE_LFP_EDP, GMA_INT15_PANEL_FIT_CENTERING, GMA_INT15_BOOT_DISPLAY_DEFAULT, 0);
|
||||
verb_setup();
|
||||
}
|
||||
|
||||
|
|
|
@ -13,6 +13,7 @@ config BOARD_SPECIFIC_OPTIONS # dummy
|
|||
select ENABLE_VMX
|
||||
select EARLY_CBMEM_INIT
|
||||
select BROKEN_CAR_MIGRATE
|
||||
select INTEL_INT15
|
||||
select VGA
|
||||
|
||||
config MAINBOARD_DIR
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
#include <device/pci_def.h>
|
||||
#include <device/pci_ops.h>
|
||||
#include <console/console.h>
|
||||
#include <x86emu/x86emu.h>
|
||||
#include <drivers/intel/gma/int15.h>
|
||||
#include <pc80/mc146818rtc.h>
|
||||
#include <arch/acpi.h>
|
||||
#include <arch/io.h>
|
||||
|
@ -43,104 +43,6 @@ void mainboard_suspend_resume(void)
|
|||
}
|
||||
#endif
|
||||
|
||||
#if CONFIG_VGA_ROM_RUN
|
||||
static int int15_handler(void)
|
||||
{
|
||||
int res=0;
|
||||
|
||||
printk(BIOS_DEBUG, "%s: AX=%04x BX=%04x CX=%04x DX=%04x\n",
|
||||
__func__, X86_AX, X86_BX, X86_CX, X86_DX);
|
||||
|
||||
switch(X86_EAX & 0xffff) {
|
||||
case 0x5f34:
|
||||
/*
|
||||
* Set Panel Fitting Hook:
|
||||
* bit 2 = Graphics Stretching
|
||||
* bit 1 = Text Stretching
|
||||
* bit 0 = Centering (do not set with bit1 or bit2)
|
||||
* 0 = video bios default
|
||||
*/
|
||||
X86_EAX &= 0xffff0000;
|
||||
X86_EAX |= 0x005f;
|
||||
X86_ECX &= 0xffffff00;
|
||||
X86_ECX |= 0x01;
|
||||
res = 1;
|
||||
break;
|
||||
case 0x5f35:
|
||||
/*
|
||||
* Boot Display Device Hook:
|
||||
* bit 0 = CRT
|
||||
* bit 1 = TV (eDP) *
|
||||
* bit 2 = EFP *
|
||||
* bit 3 = LFP
|
||||
* bit 4 = CRT2
|
||||
* bit 5 = TV2 (eDP) *
|
||||
* bit 6 = EFP2 *
|
||||
* bit 7 = LFP2
|
||||
*/
|
||||
X86_EAX &= 0xffff0000;
|
||||
X86_EAX |= 0x005f;
|
||||
X86_ECX &= 0xffff0000;
|
||||
X86_ECX |= 0x0000;
|
||||
res = 1;
|
||||
break;
|
||||
case 0x5f51:
|
||||
/*
|
||||
* Hook to select active LFP configuration:
|
||||
* 00h = No LVDS, VBIOS does not enable LVDS
|
||||
* 01h = Int-LVDS, LFP driven by integrated LVDS decoder
|
||||
* 02h = SVDO-LVDS, LFP driven by SVDO decoder
|
||||
* 03h = eDP, LFP Driven by Int-DisplayPort encoder
|
||||
*/
|
||||
X86_EAX &= 0xffff0000;
|
||||
X86_EAX |= 0x005f;
|
||||
X86_ECX &= 0xffff0000;
|
||||
X86_ECX |= 0x0003;
|
||||
res = 1;
|
||||
break;
|
||||
case 0x5f70:
|
||||
switch ((X86_ECX >> 8) & 0xff) {
|
||||
case 0:
|
||||
/* Get Mux */
|
||||
X86_EAX &= 0xffff0000;
|
||||
X86_EAX |= 0x005f;
|
||||
X86_ECX &= 0xffff0000;
|
||||
X86_ECX |= 0x0000;
|
||||
res = 1;
|
||||
break;
|
||||
case 1:
|
||||
/* Set Mux */
|
||||
X86_EAX &= 0xffff0000;
|
||||
X86_EAX |= 0x005f;
|
||||
X86_ECX &= 0xffff0000;
|
||||
X86_ECX |= 0x0000;
|
||||
res = 1;
|
||||
break;
|
||||
case 2:
|
||||
/* Get SG/Non-SG mode */
|
||||
X86_EAX &= 0xffff0000;
|
||||
X86_EAX |= 0x005f;
|
||||
X86_ECX &= 0xffff0000;
|
||||
X86_ECX |= 0x0000;
|
||||
res = 1;
|
||||
break;
|
||||
default:
|
||||
/* FIXME: Interrupt was not handled, but return success? */
|
||||
printk(BIOS_DEBUG, "Unknown INT15 5f70 function: 0x%02x\n",
|
||||
((X86_ECX >> 8) & 0xff));
|
||||
return 1;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
printk(BIOS_DEBUG, "Unknown INT15 function %04x!\n",
|
||||
X86_EAX & 0xffff);
|
||||
break;
|
||||
}
|
||||
return res;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Audio Setup */
|
||||
|
||||
static void verb_setup(void)
|
||||
|
@ -154,10 +56,7 @@ static void verb_setup(void)
|
|||
|
||||
static void mainboard_enable(device_t dev)
|
||||
{
|
||||
#if CONFIG_PCI_OPTION_ROM_RUN_YABEL || CONFIG_PCI_OPTION_ROM_RUN_REALMODE
|
||||
/* Install custom int15 handler for VGA OPROM */
|
||||
mainboard_interrupt_handlers(0x15, &int15_handler);
|
||||
#endif
|
||||
install_intel_vga_int15_handler(GMA_INT15_ACTIVE_LFP_EDP, GMA_INT15_PANEL_FIT_CENTERING, GMA_INT15_BOOT_DISPLAY_DEFAULT, 0);
|
||||
verb_setup();
|
||||
}
|
||||
|
||||
|
|
|
@ -10,6 +10,7 @@ config BOARD_SPECIFIC_OPTIONS # dummy
|
|||
select HAVE_ACPI_TABLES
|
||||
select HAVE_OPTION_TABLE
|
||||
select HAVE_ACPI_RESUME
|
||||
select INTEL_INT15
|
||||
#select MAINBOARD_HAS_CHROMEOS
|
||||
|
||||
config MAINBOARD_DIR
|
||||
|
|
|
@ -25,9 +25,7 @@
|
|||
#include <device/pci_def.h>
|
||||
#include <device/pci_ops.h>
|
||||
#include <console/console.h>
|
||||
#if CONFIG_VGA_ROM_RUN
|
||||
#include <x86emu/x86emu.h>
|
||||
#endif
|
||||
#include <drivers/intel/gma/int15.h>
|
||||
#include <pc80/mc146818rtc.h>
|
||||
#include <arch/acpi.h>
|
||||
#include <arch/io.h>
|
||||
|
@ -43,104 +41,6 @@ void mainboard_suspend_resume(void)
|
|||
outb(0xcb, 0xb2);
|
||||
}
|
||||
|
||||
#if CONFIG_VGA_ROM_RUN
|
||||
static int int15_handler(void)
|
||||
{
|
||||
int res=0;
|
||||
|
||||
printk(BIOS_DEBUG, "%s: AX=%04x BX=%04x CX=%04x DX=%04x\n",
|
||||
__func__, X86_AX, X86_BX, X86_CX, X86_DX);
|
||||
|
||||
switch(X86_EAX & 0xffff) {
|
||||
case 0x5f34:
|
||||
/*
|
||||
* Set Panel Fitting Hook:
|
||||
* bit 2 = Graphics Stretching
|
||||
* bit 1 = Text Stretching
|
||||
* bit 0 = Centering (do not set with bit1 or bit2)
|
||||
* 0 = video bios default
|
||||
*/
|
||||
X86_EAX &= 0xffff0000;
|
||||
X86_EAX |= 0x005f;
|
||||
X86_ECX &= 0xffffff00;
|
||||
X86_ECX |= 0x01;
|
||||
res = 1;
|
||||
break;
|
||||
case 0x5f35:
|
||||
/*
|
||||
* Boot Display Device Hook:
|
||||
* bit 0 = CRT
|
||||
* bit 1 = TV (eDP) *
|
||||
* bit 2 = EFP *
|
||||
* bit 3 = LFP
|
||||
* bit 4 = CRT2
|
||||
* bit 5 = TV2 (eDP) *
|
||||
* bit 6 = EFP2 *
|
||||
* bit 7 = LFP2
|
||||
*/
|
||||
X86_EAX &= 0xffff0000;
|
||||
X86_EAX |= 0x005f;
|
||||
X86_ECX &= 0xffff0000;
|
||||
X86_ECX |= 0x0000;
|
||||
res = 1;
|
||||
break;
|
||||
case 0x5f51:
|
||||
/*
|
||||
* Hook to select active LFP configuration:
|
||||
* 00h = No LVDS, VBIOS does not enable LVDS
|
||||
* 01h = Int-LVDS, LFP driven by integrated LVDS decoder
|
||||
* 02h = SVDO-LVDS, LFP driven by SVDO decoder
|
||||
* 03h = eDP, LFP Driven by Int-DisplayPort encoder
|
||||
*/
|
||||
X86_EAX &= 0xffff0000;
|
||||
X86_EAX |= 0x005f;
|
||||
X86_ECX &= 0xffff0000;
|
||||
X86_ECX |= 0x0003;
|
||||
res = 1;
|
||||
break;
|
||||
case 0x5f70:
|
||||
switch ((X86_ECX >> 8) & 0xff) {
|
||||
case 0:
|
||||
/* Get Mux */
|
||||
X86_EAX &= 0xffff0000;
|
||||
X86_EAX |= 0x005f;
|
||||
X86_ECX &= 0xffff0000;
|
||||
X86_ECX |= 0x0000;
|
||||
res = 1;
|
||||
break;
|
||||
case 1:
|
||||
/* Set Mux */
|
||||
X86_EAX &= 0xffff0000;
|
||||
X86_EAX |= 0x005f;
|
||||
X86_ECX &= 0xffff0000;
|
||||
X86_ECX |= 0x0000;
|
||||
res = 1;
|
||||
break;
|
||||
case 2:
|
||||
/* Get SG/Non-SG mode */
|
||||
X86_EAX &= 0xffff0000;
|
||||
X86_EAX |= 0x005f;
|
||||
X86_ECX &= 0xffff0000;
|
||||
X86_ECX |= 0x0000;
|
||||
res = 1;
|
||||
break;
|
||||
default:
|
||||
/* FIXME: Interrupt was not handled, but return success? */
|
||||
printk(BIOS_DEBUG, "Unknown INT15 5f70 function: 0x%02x\n",
|
||||
((X86_ECX >> 8) & 0xff));
|
||||
return 1;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
printk(BIOS_DEBUG, "Unknown INT15 function %04x!\n",
|
||||
X86_EAX & 0xffff);
|
||||
break;
|
||||
}
|
||||
return res;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Audio Setup */
|
||||
|
||||
static void verb_setup(void)
|
||||
|
@ -154,10 +54,7 @@ static void verb_setup(void)
|
|||
|
||||
static void mainboard_enable(device_t dev)
|
||||
{
|
||||
#if CONFIG_VGA_ROM_RUN
|
||||
/* Install custom int15 handler for VGA OPROM */
|
||||
mainboard_interrupt_handlers(0x15, &int15_handler);
|
||||
#endif
|
||||
install_intel_vga_int15_handler(GMA_INT15_ACTIVE_LFP_EDP, GMA_INT15_PANEL_FIT_CENTERING, GMA_INT15_BOOT_DISPLAY_DEFAULT, 0);
|
||||
verb_setup();
|
||||
}
|
||||
|
||||
|
|
|
@ -14,6 +14,7 @@ config BOARD_SPECIFIC_OPTIONS # dummy
|
|||
select MAINBOARD_HAS_CHROMEOS
|
||||
select MAINBOARD_HAS_NATIVE_VGA_INIT
|
||||
select MONOTONIC_TIMER_MSR
|
||||
select INTEL_INT15
|
||||
|
||||
config MAINBOARD_DIR
|
||||
string
|
||||
|
|
|
@ -25,9 +25,7 @@
|
|||
#include <device/pci_def.h>
|
||||
#include <device/pci_ops.h>
|
||||
#include <console/console.h>
|
||||
#if CONFIG_VGA_ROM_RUN
|
||||
#include <x86emu/x86emu.h>
|
||||
#endif
|
||||
#include <drivers/intel/gma/int15.h>
|
||||
#include <pc80/mc146818rtc.h>
|
||||
#include <arch/acpi.h>
|
||||
#include <arch/io.h>
|
||||
|
@ -43,92 +41,6 @@ void mainboard_suspend_resume(void)
|
|||
outb(0xcb, 0xb2);
|
||||
}
|
||||
|
||||
#if CONFIG_VGA_ROM_RUN
|
||||
static int int15_handler(void)
|
||||
{
|
||||
int res = 1;
|
||||
|
||||
printk(BIOS_DEBUG, "%s: AX=%04x BX=%04x CX=%04x DX=%04x\n",
|
||||
__func__, X86_AX, X86_BX, X86_CX, X86_DX);
|
||||
|
||||
switch (X86_AX) {
|
||||
case 0x5f34:
|
||||
/*
|
||||
* Set Panel Fitting Hook:
|
||||
* bit 2 = Graphics Stretching
|
||||
* bit 1 = Text Stretching
|
||||
* bit 0 = Centering (do not set with bit1 or bit2)
|
||||
* 0 = video bios default
|
||||
*/
|
||||
X86_AX = 0x005f;
|
||||
X86_CX = 0x0001;
|
||||
res = 1;
|
||||
break;
|
||||
case 0x5f35:
|
||||
/*
|
||||
* Boot Display Device Hook:
|
||||
* bit 0 = CRT
|
||||
* bit 1 = TV (eDP) *
|
||||
* bit 2 = EFP *
|
||||
* bit 3 = LFP
|
||||
* bit 4 = CRT2
|
||||
* bit 5 = TV2 (eDP) *
|
||||
* bit 6 = EFP2 *
|
||||
* bit 7 = LFP2
|
||||
*/
|
||||
X86_AX = 0x005f;
|
||||
X86_CX = 0x0000;
|
||||
res = 1;
|
||||
break;
|
||||
case 0x5f51:
|
||||
/*
|
||||
* Hook to select active LFP configuration:
|
||||
* 00h = No LVDS, VBIOS does not enable LVDS
|
||||
* 01h = Int-LVDS, LFP driven by integrated LVDS decoder
|
||||
* 02h = SVDO-LVDS, LFP driven by SVDO decoder
|
||||
* 03h = eDP, LFP Driven by Int-DisplayPort encoder
|
||||
*/
|
||||
X86_AX = 0x005f;
|
||||
X86_CX = 0x0003;
|
||||
res = 1;
|
||||
break;
|
||||
case 0x5f70:
|
||||
switch ((X86_CX >> 8) & 0xff) {
|
||||
case 0:
|
||||
/* Get Mux */
|
||||
X86_AX = 0x005f;
|
||||
X86_CX = 0x0000;
|
||||
res = 1;
|
||||
break;
|
||||
case 1:
|
||||
/* Set Mux */
|
||||
X86_AX = 0x005f;
|
||||
X86_CX = 0x0000;
|
||||
res = 1;
|
||||
break;
|
||||
case 2:
|
||||
/* Get SG/Non-SG mode */
|
||||
X86_AX = 0x005f;
|
||||
X86_CX = 0x0000;
|
||||
res = 1;
|
||||
break;
|
||||
default:
|
||||
/* Interrupt was not handled */
|
||||
printk(BIOS_DEBUG,
|
||||
"Unknown INT15 5f70 function: 0x%02x\n",
|
||||
((X86_CX >> 8) & 0xff));
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
printk(BIOS_DEBUG, "Unknown INT15 function %04x!\n", X86_AX);
|
||||
break;
|
||||
}
|
||||
return res;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Audio Setup */
|
||||
|
||||
static void verb_setup(void)
|
||||
|
@ -142,10 +54,7 @@ static void verb_setup(void)
|
|||
|
||||
static void mainboard_enable(device_t dev)
|
||||
{
|
||||
#if CONFIG_VGA_ROM_RUN
|
||||
/* Install custom int15 handler for VGA OPROM */
|
||||
mainboard_interrupt_handlers(0x15, &int15_handler);
|
||||
#endif
|
||||
install_intel_vga_int15_handler(GMA_INT15_ACTIVE_LFP_EDP, GMA_INT15_PANEL_FIT_CENTERING, GMA_INT15_BOOT_DISPLAY_DEFAULT, 0);
|
||||
verb_setup();
|
||||
}
|
||||
|
||||
|
|
|
@ -15,6 +15,7 @@ config BOARD_SPECIFIC_OPTIONS # dummy
|
|||
select HAVE_ACPI_RESUME
|
||||
select BOARD_ROMSIZE_KB_1024
|
||||
select CHANNEL_XOR_RANDOMIZATION
|
||||
select INTEL_INT15
|
||||
select OVERRIDE_CLOCK_DISABLE
|
||||
|
||||
config MAINBOARD_DIR
|
||||
|
|
|
@ -20,57 +20,12 @@
|
|||
#include <types.h>
|
||||
#include <device/device.h>
|
||||
#include <console/console.h>
|
||||
#if CONFIG_VGA_ROM_RUN
|
||||
#include <x86emu/x86emu.h>
|
||||
#endif
|
||||
#include <drivers/intel/gma/int15.h>
|
||||
#include <pc80/mc146818rtc.h>
|
||||
#include <arch/io.h>
|
||||
#include <arch/interrupt.h>
|
||||
#include <device/azalia_device.h>
|
||||
|
||||
#define BOOT_DISPLAY_DEFAULT 0
|
||||
#define BOOT_DISPLAY_CRT (1 << 0)
|
||||
#define BOOT_DISPLAY_TV (1 << 1)
|
||||
#define BOOT_DISPLAY_EFP (1 << 2)
|
||||
#define BOOT_DISPLAY_LCD (1 << 3)
|
||||
#define BOOT_DISPLAY_CRT2 (1 << 4)
|
||||
#define BOOT_DISPLAY_TV2 (1 << 5)
|
||||
#define BOOT_DISPLAY_EFP2 (1 << 6)
|
||||
#define BOOT_DISPLAY_LCD2 (1 << 7)
|
||||
|
||||
#if CONFIG_VGA_ROM_RUN
|
||||
static int int15_handler(void)
|
||||
{
|
||||
/* This int15 handler is Intel IGD. specific. Other chipsets need other
|
||||
* handlers. The right way to do this is to move this handler code into
|
||||
* the mainboard or northbridge code.
|
||||
* TODO: completely move to mainboards / chipsets.
|
||||
*/
|
||||
printk(BIOS_DEBUG, "%s: AX=%04x BX=%04x CX=%04x DX=%04x\n",
|
||||
__func__, X86_AX, X86_BX, X86_CX, X86_DX);
|
||||
|
||||
switch (X86_AX) {
|
||||
case 0x5f35: /* Boot Display */
|
||||
X86_AX = 0x005f; // Success
|
||||
X86_CL = BOOT_DISPLAY_CRT;
|
||||
break;
|
||||
case 0x5f40: /* Boot Panel Type */
|
||||
// X86_AX = 0x015f; // Supported but failed
|
||||
X86_AX = 0x005f; // Success
|
||||
X86_CL = 3; // Display ID
|
||||
printk(BIOS_DEBUG, "DISPLAY=%x\n", X86_CL);
|
||||
break;
|
||||
default:
|
||||
/* Interrupt was not handled */
|
||||
printk(BIOS_DEBUG, "Unknown INT15 function %04x!\n", X86_AX);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Interrupt handled */
|
||||
return 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Hardware Monitor */
|
||||
|
||||
static u16 hwm_base = 0xa00;
|
||||
|
@ -219,10 +174,7 @@ static void verb_setup(void)
|
|||
|
||||
static void mainboard_enable(device_t dev)
|
||||
{
|
||||
#if CONFIG_VGA_ROM_RUN
|
||||
/* Install custom int15 handler for VGA OPROM */
|
||||
mainboard_interrupt_handlers(0x15, &int15_handler);
|
||||
#endif
|
||||
install_intel_vga_int15_handler(GMA_INT15_ACTIVE_LFP_INT_LVDS, GMA_INT15_PANEL_FIT_DEFAULT, GMA_INT15_BOOT_DISPLAY_DEFAULT, 3);
|
||||
verb_setup();
|
||||
hwm_setup();
|
||||
}
|
||||
|
|
|
@ -13,6 +13,7 @@ config BOARD_SPECIFIC_OPTIONS # dummy
|
|||
select HAVE_CMOS_DEFAULT
|
||||
select HAVE_ACPI_RESUME
|
||||
select HAVE_SMI_HANDLER
|
||||
select INTEL_INT15
|
||||
|
||||
# Workaround for EC/KBC IRQ1.
|
||||
select SERIRQ_CONTINUOUS_MODE
|
||||
|
|
|
@ -25,9 +25,7 @@
|
|||
#include <device/pci_def.h>
|
||||
#include <device/pci_ops.h>
|
||||
#include <console/console.h>
|
||||
#if CONFIG_VGA_ROM_RUN
|
||||
#include <x86emu/x86emu.h>
|
||||
#endif
|
||||
#include <drivers/intel/gma/int15.h>
|
||||
#include <pc80/mc146818rtc.h>
|
||||
#include <arch/acpi.h>
|
||||
#include <arch/io.h>
|
||||
|
@ -48,91 +46,6 @@ void mainboard_suspend_resume(void)
|
|||
outb(0xcb, 0xb2);
|
||||
}
|
||||
|
||||
#if CONFIG_VGA_ROM_RUN
|
||||
static int int15_handler(void)
|
||||
{
|
||||
int res = 0;
|
||||
|
||||
printk(BIOS_DEBUG, "%s: INT15 function %04x!\n",
|
||||
__func__, X86_AX);
|
||||
|
||||
switch (X86_AX) {
|
||||
case 0x5f34:
|
||||
/*
|
||||
* Set Panel Fitting Hook:
|
||||
* bit 2 = Graphics Stretching
|
||||
* bit 1 = Text Stretching
|
||||
* bit 0 = Centering (do not set with bit1 or bit2)
|
||||
* 0 = video bios default
|
||||
*/
|
||||
X86_AX = 0x005f;
|
||||
X86_CL = 0x00; /* Use video bios default */
|
||||
res = 1;
|
||||
break;
|
||||
case 0x5f35:
|
||||
/*
|
||||
* Boot Display Device Hook:
|
||||
* bit 0 = CRT
|
||||
* bit 1 = TV (eDP)
|
||||
* bit 2 = EFP
|
||||
* bit 3 = LFP
|
||||
* bit 4 = CRT2
|
||||
* bit 5 = TV2 (eDP)
|
||||
* bit 6 = EFP2
|
||||
* bit 7 = LFP2
|
||||
*/
|
||||
X86_AX = 0x005f;
|
||||
X86_CX = 0x0000; /* Use video bios default */
|
||||
res = 1;
|
||||
break;
|
||||
case 0x5f51:
|
||||
/*
|
||||
* Hook to select active LFP configuration:
|
||||
* 00h = No LVDS, VBIOS does not enable LVDS
|
||||
* 01h = Int-LVDS, LFP driven by integrated LVDS decoder
|
||||
* 02h = SVDO-LVDS, LFP driven by SVDO decoder
|
||||
* 03h = eDP, LFP Driven by Int-DisplayPort encoder
|
||||
*/
|
||||
X86_AX = 0x005f;
|
||||
X86_CX = 0x0001; /* Int-LVDS */
|
||||
res = 1;
|
||||
break;
|
||||
case 0x5f70:
|
||||
switch (X86_CH) {
|
||||
case 0:
|
||||
/* Get Mux */
|
||||
X86_AX = 0x005f;
|
||||
X86_CX = 0x0000;
|
||||
res = 1;
|
||||
break;
|
||||
case 1:
|
||||
/* Set Mux */
|
||||
X86_AX = 0x005f;
|
||||
X86_CX = 0x0000;
|
||||
res = 1;
|
||||
break;
|
||||
case 2:
|
||||
/* Get SG/Non-SG mode */
|
||||
X86_AX = 0x005f;
|
||||
X86_CX = 0x0000;
|
||||
res = 1;
|
||||
break;
|
||||
default:
|
||||
/* Interrupt was not handled */
|
||||
printk(BIOS_DEBUG, "Unknown INT15 5f70 function: 0x%02x\n",
|
||||
X86_CH);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
printk(BIOS_DEBUG, "Unknown INT15 function %04x!\n", X86_AX);
|
||||
break;
|
||||
}
|
||||
return res;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Audio Setup */
|
||||
|
||||
static void verb_setup(void)
|
||||
|
@ -166,10 +79,7 @@ enumerate_buses(). */
|
|||
static void mainboard_enable(device_t dev)
|
||||
{
|
||||
dev->ops->init = mainboard_init;
|
||||
#if CONFIG_VGA_ROM_RUN
|
||||
/* Install custom int15 handler for VGA OPROM */
|
||||
mainboard_interrupt_handlers(0x15, &int15_handler);
|
||||
#endif
|
||||
install_intel_vga_int15_handler(GMA_INT15_ACTIVE_LFP_INT_LVDS, GMA_INT15_PANEL_FIT_DEFAULT, GMA_INT15_BOOT_DISPLAY_DEFAULT, 0);
|
||||
verb_setup();
|
||||
}
|
||||
|
||||
|
|
|
@ -13,6 +13,7 @@ config BOARD_SPECIFIC_OPTIONS # dummy
|
|||
select HAVE_CMOS_DEFAULT
|
||||
select HAVE_ACPI_RESUME
|
||||
select HAVE_SMI_HANDLER
|
||||
select INTEL_INT15
|
||||
|
||||
# Workaround for EC/KBC IRQ1.
|
||||
select SERIRQ_CONTINUOUS_MODE
|
||||
|
|
|
@ -25,9 +25,7 @@
|
|||
#include <device/pci_def.h>
|
||||
#include <device/pci_ops.h>
|
||||
#include <console/console.h>
|
||||
#if CONFIG_VGA_ROM_RUN
|
||||
#include <x86emu/x86emu.h>
|
||||
#endif
|
||||
#include <drivers/intel/gma/int15.h>
|
||||
#include <pc80/mc146818rtc.h>
|
||||
#include <arch/acpi.h>
|
||||
#include <arch/io.h>
|
||||
|
@ -48,91 +46,6 @@ void mainboard_suspend_resume(void)
|
|||
outb(0xcb, 0xb2);
|
||||
}
|
||||
|
||||
#if CONFIG_VGA_ROM_RUN
|
||||
static int int15_handler(void)
|
||||
{
|
||||
int res = 0;
|
||||
|
||||
printk(BIOS_DEBUG, "%s: INT15 function %04x!\n",
|
||||
__func__, X86_AX);
|
||||
|
||||
switch (X86_AX) {
|
||||
case 0x5f34:
|
||||
/*
|
||||
* Set Panel Fitting Hook:
|
||||
* bit 2 = Graphics Stretching
|
||||
* bit 1 = Text Stretching
|
||||
* bit 0 = Centering (do not set with bit1 or bit2)
|
||||
* 0 = video bios default
|
||||
*/
|
||||
X86_AX = 0x005f;
|
||||
X86_CL = 0x00; /* Use video bios default */
|
||||
res = 1;
|
||||
break;
|
||||
case 0x5f35:
|
||||
/*
|
||||
* Boot Display Device Hook:
|
||||
* bit 0 = CRT
|
||||
* bit 1 = TV (eDP)
|
||||
* bit 2 = EFP
|
||||
* bit 3 = LFP
|
||||
* bit 4 = CRT2
|
||||
* bit 5 = TV2 (eDP)
|
||||
* bit 6 = EFP2
|
||||
* bit 7 = LFP2
|
||||
*/
|
||||
X86_AX = 0x005f;
|
||||
X86_CX = 0x0000; /* Use video bios default */
|
||||
res = 1;
|
||||
break;
|
||||
case 0x5f51:
|
||||
/*
|
||||
* Hook to select active LFP configuration:
|
||||
* 00h = No LVDS, VBIOS does not enable LVDS
|
||||
* 01h = Int-LVDS, LFP driven by integrated LVDS decoder
|
||||
* 02h = SVDO-LVDS, LFP driven by SVDO decoder
|
||||
* 03h = eDP, LFP Driven by Int-DisplayPort encoder
|
||||
*/
|
||||
X86_AX = 0x005f;
|
||||
X86_CX = 0x0001; /* Int-LVDS */
|
||||
res = 1;
|
||||
break;
|
||||
case 0x5f70:
|
||||
switch (X86_CH) {
|
||||
case 0:
|
||||
/* Get Mux */
|
||||
X86_AX = 0x005f;
|
||||
X86_CX = 0x0000;
|
||||
res = 1;
|
||||
break;
|
||||
case 1:
|
||||
/* Set Mux */
|
||||
X86_AX = 0x005f;
|
||||
X86_CX = 0x0000;
|
||||
res = 1;
|
||||
break;
|
||||
case 2:
|
||||
/* Get SG/Non-SG mode */
|
||||
X86_AX = 0x005f;
|
||||
X86_CX = 0x0000;
|
||||
res = 1;
|
||||
break;
|
||||
default:
|
||||
/* Interrupt was not handled */
|
||||
printk(BIOS_DEBUG, "Unknown INT15 5f70 function: 0x%02x\n",
|
||||
X86_CH);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
printk(BIOS_DEBUG, "Unknown INT15 function %04x!\n", X86_AX);
|
||||
break;
|
||||
}
|
||||
return res;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Audio Setup */
|
||||
|
||||
static void verb_setup(void)
|
||||
|
@ -171,10 +84,7 @@ static void mainboard_enable(device_t dev)
|
|||
{
|
||||
dev->ops->init = mainboard_init;
|
||||
|
||||
#if CONFIG_VGA_ROM_RUN
|
||||
/* Install custom int15 handler for VGA OPROM */
|
||||
mainboard_interrupt_handlers(0x15, &int15_handler);
|
||||
#endif
|
||||
install_intel_vga_int15_handler(GMA_INT15_ACTIVE_LFP_INT_LVDS, GMA_INT15_PANEL_FIT_DEFAULT, GMA_INT15_BOOT_DISPLAY_DEFAULT, 0);
|
||||
verb_setup();
|
||||
}
|
||||
|
||||
|
|
|
@ -13,6 +13,7 @@ config BOARD_SPECIFIC_OPTIONS # dummy
|
|||
select EC_LENOVO_H8
|
||||
select DRIVERS_ICS_954309
|
||||
select HAVE_OPTION_TABLE
|
||||
select INTEL_INT15
|
||||
select HAVE_PIRQ_TABLE
|
||||
select HAVE_MP_TABLE
|
||||
select BOARD_ROMSIZE_KB_2048
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
#include <arch/interrupt.h>
|
||||
#include <smbios.h>
|
||||
#include <build.h>
|
||||
#include <x86emu/x86emu.h>
|
||||
#include <drivers/intel/gma/int15.h>
|
||||
#define PANEL INT15_5F35_CL_DISPLAY_DEFAULT
|
||||
|
||||
static acpi_cstate_t cst_entries[] = {
|
||||
|
@ -46,37 +46,6 @@ static acpi_cstate_t cst_entries[] = {
|
|||
{ 2, 17, 250, { 0x01, 8, 0, { 0 }, DEFAULT_PMBASE + LV3, 0 } },
|
||||
};
|
||||
|
||||
#if CONFIG_PCI_OPTION_ROM_RUN_YABEL || CONFIG_PCI_OPTION_ROM_RUN_REALMODE
|
||||
static int int15_handler(void)
|
||||
{
|
||||
/* The right way to do this is to move this handler code into
|
||||
* the mainboard or northbridge code.
|
||||
* TODO: completely move to mainboards / chipsets.
|
||||
*/
|
||||
printk(BIOS_DEBUG, "%s: AX=%04x BX=%04x CX=%04x DX=%04x\n",
|
||||
__func__, X86_AX, X86_BX, X86_CX, X86_DX);
|
||||
|
||||
switch (X86_AX) {
|
||||
case 0x5f35: /* Boot Display */
|
||||
X86_AX = 0x005f; // Success
|
||||
X86_CL = PANEL;
|
||||
break;
|
||||
case 0x5f40: /* Boot Panel Type */
|
||||
X86_AX = 0x005f; // Success
|
||||
X86_CL = 3;
|
||||
printk(BIOS_DEBUG, "DISPLAY=%x\n", X86_CL);
|
||||
break;
|
||||
default:
|
||||
/* Interrupt was not handled */
|
||||
printk(BIOS_DEBUG, "Unknown INT15 function %04x!\n", X86_AX);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Interrupt handled */
|
||||
return 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
int get_cst_entries(acpi_cstate_t **entries)
|
||||
{
|
||||
*entries = cst_entries;
|
||||
|
@ -97,10 +66,7 @@ static void mainboard_init(device_t dev)
|
|||
struct southbridge_intel_i82801gx_config *config;
|
||||
device_t dev0, idedev;
|
||||
|
||||
#if CONFIG_PCI_OPTION_ROM_RUN_YABEL || CONFIG_PCI_OPTION_ROM_RUN_REALMODE
|
||||
/* Install custom int15 handler for VGA OPROM */
|
||||
mainboard_interrupt_handlers(0x15, &int15_handler);
|
||||
#endif
|
||||
install_intel_vga_int15_handler(GMA_INT15_ACTIVE_LFP_INT_LVDS, GMA_INT15_PANEL_FIT_DEFAULT, PANEL, 3);
|
||||
|
||||
/* If we're resuming from suspend, blink suspend LED */
|
||||
dev0 = dev_find_slot(0, PCI_DEVFN(0,0));
|
||||
|
|
|
@ -19,6 +19,7 @@ config BOARD_SPECIFIC_OPTIONS # dummy
|
|||
select HAVE_ACPI_RESUME
|
||||
select MAINBOARD_HAS_NATIVE_VGA_INIT
|
||||
select MAINBOARD_HAS_NATIVE_VGA_INIT_TEXTMODECFG
|
||||
select INTEL_INT15
|
||||
|
||||
config MAINBOARD_DIR
|
||||
string
|
||||
|
|
|
@ -23,10 +23,7 @@
|
|||
//#include <pc80/mc146818rtc.h>
|
||||
#include <device/device.h>
|
||||
#include <console/console.h>
|
||||
#if CONFIG_VGA_ROM_RUN
|
||||
#include <arch/interrupt.h>
|
||||
#include <x86emu/x86emu.h>
|
||||
#endif
|
||||
#include <drivers/intel/gma/int15.h>
|
||||
#include <pc80/keyboard.h>
|
||||
#include <ec/acpi/ec.h>
|
||||
#include <smbios.h>
|
||||
|
@ -44,70 +41,6 @@
|
|||
the overloaded weak function in there. */
|
||||
#endif
|
||||
|
||||
|
||||
#if CONFIG_VGA_ROM_RUN
|
||||
static int int15_handler(void)
|
||||
{
|
||||
enum {
|
||||
BOOT_DISPLAY_DEFAULT = 0,
|
||||
BOOT_DISPLAY_CRT = (1 << 0),
|
||||
BOOT_DISPLAY_TV = (1 << 1),
|
||||
BOOT_DISPLAY_EFP = (1 << 2),
|
||||
BOOT_DISPLAY_LFP = (1 << 3),
|
||||
BOOT_DISPLAY_CRT2 = (1 << 4),
|
||||
BOOT_DISPLAY_TV2 = (1 << 5),
|
||||
BOOT_DISPLAY_EFP2 = (1 << 6),
|
||||
BOOT_DISPLAY_LFP2 = (1 << 7),
|
||||
};
|
||||
enum {
|
||||
PANEL_FIT_DEFAULT = 0,
|
||||
PANEL_FIT_CENTERING = (1 << 0),
|
||||
PANEL_FIT_TXT_STRETCH = (1 << 1),
|
||||
PANEL_FIT_GFX_STRETCH = (1 << 2),
|
||||
};
|
||||
|
||||
switch (X86_AX) {
|
||||
case 0x5f34:
|
||||
/* Set Panel Fitting Hook */
|
||||
X86_AX = 0x005f;
|
||||
X86_CX = PANEL_FIT_CENTERING;
|
||||
break;
|
||||
case 0x5f35:
|
||||
/* Boot Display Device Hook */
|
||||
X86_AX = 0x005f;
|
||||
X86_CX = BOOT_DISPLAY_DEFAULT; /* Select automatically. */
|
||||
break;
|
||||
case 0x5f40:
|
||||
/* Boot Panel Type Hook */
|
||||
/* Contrary to what EMGD's user's guide says,
|
||||
this _alters_ the behavior of the Video BIOS. */
|
||||
/* LCD panel type is SIO GPIO40-43.
|
||||
It's controlled by a DIP switch but was always
|
||||
set to 4 while only values of 5 and 6 worked. */
|
||||
X86_AX = 0x005f;
|
||||
X86_CX = 0x2;
|
||||
break;
|
||||
case 0x5f70:
|
||||
/* Sandybridge boards return 0 here. */
|
||||
case 0x5f14:
|
||||
case 0x5f21:
|
||||
case 0x5f22:
|
||||
case 0x5f49:
|
||||
/* No documentation found. */
|
||||
default:
|
||||
/* Interrupt was not handled. */
|
||||
printk(BIOS_DEBUG,
|
||||
"%s: AX=%04x BX=%04x CX=%04x DX=%04x\n", __func__,
|
||||
X86_AX, X86_BX, X86_CX, X86_DX);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Interrupt handled. */
|
||||
return 1;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
static void verb_setup(void)
|
||||
{
|
||||
cim_verb_data = mainboard_cim_verb_data;
|
||||
|
@ -136,10 +69,7 @@ static void mainboard_init(device_t dev)
|
|||
static void mainboard_enable(device_t dev)
|
||||
{
|
||||
verb_setup();
|
||||
#if CONFIG_VGA_ROM_RUN
|
||||
/* Install custom int15 handler for VGA OPROM */
|
||||
mainboard_interrupt_handlers(0x15, &int15_handler);
|
||||
#endif
|
||||
install_intel_vga_int15_handler(GMA_INT15_ACTIVE_LFP_INT_LVDS, GMA_INT15_PANEL_FIT_CENTERING, GMA_INT15_BOOT_DISPLAY_DEFAULT, 2);
|
||||
|
||||
dev->ops->init = mainboard_init;
|
||||
}
|
||||
|
|
|
@ -13,6 +13,7 @@ config BOARD_SPECIFIC_OPTIONS # dummy
|
|||
select HAVE_MP_TABLE
|
||||
select BOARD_ROMSIZE_KB_8192
|
||||
select HAVE_ACPI_TABLES
|
||||
select INTEL_INT15
|
||||
select HAVE_ACPI_RESUME
|
||||
select MAINBOARD_HAS_NATIVE_VGA_INIT
|
||||
select MAINBOARD_HAS_NATIVE_VGA_INIT_TEXTMODECFG
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
#include "dock.h"
|
||||
#include "hda_verb.h"
|
||||
#include <arch/x86/include/arch/acpigen.h>
|
||||
#include <x86emu/regs.h>
|
||||
#include <drivers/intel/gma/int15.h>
|
||||
#include <arch/interrupt.h>
|
||||
#include <pc80/keyboard.h>
|
||||
#include <cpu/x86/lapic.h>
|
||||
|
@ -61,34 +61,6 @@ int get_cst_entries(acpi_cstate_t ** entries)
|
|||
return ARRAY_SIZE(cst_entries);
|
||||
}
|
||||
|
||||
#if CONFIG_PCI_OPTION_ROM_RUN_YABEL || CONFIG_PCI_OPTION_ROM_RUN_REALMODE
|
||||
|
||||
static int int15_handler(void)
|
||||
{
|
||||
switch ((X86_EAX & 0xffff)) {
|
||||
/* Get boot display. */
|
||||
case 0x5f35:
|
||||
X86_EAX = 0x5f;
|
||||
/* The flags are:
|
||||
1 - VGA
|
||||
4 - DisplayPort
|
||||
8 - LCD
|
||||
*/
|
||||
X86_ECX = 0x8;
|
||||
|
||||
return 1;
|
||||
case 0x5f40:
|
||||
X86_EAX = 0x5f;
|
||||
X86_ECX = 0x2;
|
||||
return 1;
|
||||
default:
|
||||
printk(BIOS_WARNING, "Unknown INT15 function %04x!\n",
|
||||
X86_EAX & 0xffff);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
const char *smbios_mainboard_bios_version(void)
|
||||
{
|
||||
/* Satisfy thinkpad_acpi. */
|
||||
|
@ -172,10 +144,7 @@ static void mainboard_enable(device_t dev)
|
|||
if (dev0 && pci_read_config32(dev0, SKPAD) == SKPAD_ACPI_S3_MAGIC)
|
||||
ec_write(0x0c, 0xc7);
|
||||
|
||||
#if CONFIG_PCI_OPTION_ROM_RUN_YABEL || CONFIG_PCI_OPTION_ROM_RUN_REALMODE
|
||||
/* Install custom int15 handler for VGA OPROM */
|
||||
mainboard_interrupt_handlers(0x15, &int15_handler);
|
||||
#endif
|
||||
install_intel_vga_int15_handler(GMA_INT15_ACTIVE_LFP_INT_LVDS, GMA_INT15_PANEL_FIT_DEFAULT, GMA_INT15_BOOT_DISPLAY_LFP, 2);
|
||||
|
||||
verb_setup();
|
||||
}
|
||||
|
|
|
@ -13,6 +13,7 @@ config BOARD_SPECIFIC_OPTIONS # dummy
|
|||
select HAVE_CMOS_DEFAULT
|
||||
select HAVE_ACPI_RESUME
|
||||
select HAVE_SMI_HANDLER
|
||||
select INTEL_INT15
|
||||
select EARLY_CBMEM_INIT
|
||||
select VGA
|
||||
select INTEL_EDID
|
||||
|
|
|
@ -25,9 +25,7 @@
|
|||
#include <device/pci_def.h>
|
||||
#include <device/pci_ops.h>
|
||||
#include <console/console.h>
|
||||
#if CONFIG_VGA_ROM_RUN
|
||||
#include <x86emu/x86emu.h>
|
||||
#endif
|
||||
#include <drivers/intel/gma/int15.h>
|
||||
#include <pc80/mc146818rtc.h>
|
||||
#include <arch/acpi.h>
|
||||
#include <arch/io.h>
|
||||
|
@ -49,91 +47,6 @@ void mainboard_suspend_resume(void)
|
|||
outb(0xcb, 0xb2);
|
||||
}
|
||||
|
||||
#if CONFIG_VGA_ROM_RUN
|
||||
static int int15_handler(void)
|
||||
{
|
||||
int res = 0;
|
||||
|
||||
printk(BIOS_DEBUG, "%s: INT15 function %04x!\n",
|
||||
__func__, X86_AX);
|
||||
|
||||
switch (X86_AX) {
|
||||
case 0x5f34:
|
||||
/*
|
||||
* Set Panel Fitting Hook:
|
||||
* bit 2 = Graphics Stretching
|
||||
* bit 1 = Text Stretching
|
||||
* bit 0 = Centering (do not set with bit1 or bit2)
|
||||
* 0 = video bios default
|
||||
*/
|
||||
X86_AX = 0x005f;
|
||||
X86_CL = 0x00; /* Use video bios default */
|
||||
res = 1;
|
||||
break;
|
||||
case 0x5f35:
|
||||
/*
|
||||
* Boot Display Device Hook:
|
||||
* bit 0 = CRT
|
||||
* bit 1 = TV (eDP)
|
||||
* bit 2 = EFP
|
||||
* bit 3 = LFP
|
||||
* bit 4 = CRT2
|
||||
* bit 5 = TV2 (eDP)
|
||||
* bit 6 = EFP2
|
||||
* bit 7 = LFP2
|
||||
*/
|
||||
X86_AX = 0x005f;
|
||||
X86_CX = 0x0000; /* Use video bios default */
|
||||
res = 1;
|
||||
break;
|
||||
case 0x5f51:
|
||||
/*
|
||||
* Hook to select active LFP configuration:
|
||||
* 00h = No LVDS, VBIOS does not enable LVDS
|
||||
* 01h = Int-LVDS, LFP driven by integrated LVDS decoder
|
||||
* 02h = SVDO-LVDS, LFP driven by SVDO decoder
|
||||
* 03h = eDP, LFP Driven by Int-DisplayPort encoder
|
||||
*/
|
||||
X86_AX = 0x005f;
|
||||
X86_CX = 0x0001; /* Int-LVDS */
|
||||
res = 1;
|
||||
break;
|
||||
case 0x5f70:
|
||||
switch (X86_CH) {
|
||||
case 0:
|
||||
/* Get Mux */
|
||||
X86_AX = 0x005f;
|
||||
X86_CX = 0x0000;
|
||||
res = 1;
|
||||
break;
|
||||
case 1:
|
||||
/* Set Mux */
|
||||
X86_AX = 0x005f;
|
||||
X86_CX = 0x0000;
|
||||
res = 1;
|
||||
break;
|
||||
case 2:
|
||||
/* Get SG/Non-SG mode */
|
||||
X86_AX = 0x005f;
|
||||
X86_CX = 0x0000;
|
||||
res = 1;
|
||||
break;
|
||||
default:
|
||||
/* Interrupt was not handled */
|
||||
printk(BIOS_DEBUG, "Unknown INT15 5f70 function: 0x%02x\n",
|
||||
X86_CH);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
printk(BIOS_DEBUG, "Unknown INT15 function %04x!\n", X86_AX);
|
||||
break;
|
||||
}
|
||||
return res;
|
||||
}
|
||||
#endif
|
||||
|
||||
const char *smbios_mainboard_bios_version(void)
|
||||
{
|
||||
/* Satisfy thinkpad_acpi. */
|
||||
|
@ -181,10 +94,7 @@ static void mainboard_enable(device_t dev)
|
|||
{
|
||||
dev->ops->init = mainboard_init;
|
||||
|
||||
#if CONFIG_VGA_ROM_RUN
|
||||
/* Install custom int15 handler for VGA OPROM */
|
||||
mainboard_interrupt_handlers(0x15, &int15_handler);
|
||||
#endif
|
||||
install_intel_vga_int15_handler(GMA_INT15_ACTIVE_LFP_INT_LVDS, GMA_INT15_PANEL_FIT_DEFAULT, GMA_INT15_BOOT_DISPLAY_DEFAULT, 0);
|
||||
verb_setup();
|
||||
}
|
||||
|
||||
|
|
|
@ -13,6 +13,7 @@ config BOARD_SPECIFIC_OPTIONS # dummy
|
|||
select HAVE_CMOS_DEFAULT
|
||||
select HAVE_ACPI_RESUME
|
||||
select HAVE_SMI_HANDLER
|
||||
select INTEL_INT15
|
||||
select EARLY_CBMEM_INIT
|
||||
select VGA
|
||||
select INTEL_EDID
|
||||
|
|
|
@ -25,9 +25,7 @@
|
|||
#include <device/pci_def.h>
|
||||
#include <device/pci_ops.h>
|
||||
#include <console/console.h>
|
||||
#if CONFIG_VGA_ROM_RUN
|
||||
#include <x86emu/x86emu.h>
|
||||
#endif
|
||||
#include <drivers/intel/gma/int15.h>
|
||||
#include <pc80/mc146818rtc.h>
|
||||
#include <arch/acpi.h>
|
||||
#include <arch/io.h>
|
||||
|
@ -49,91 +47,6 @@ void mainboard_suspend_resume(void)
|
|||
outb(0xcb, 0xb2);
|
||||
}
|
||||
|
||||
#if CONFIG_VGA_ROM_RUN
|
||||
static int int15_handler(void)
|
||||
{
|
||||
int res = 0;
|
||||
|
||||
printk(BIOS_DEBUG, "%s: INT15 function %04x!\n",
|
||||
__func__, X86_AX);
|
||||
|
||||
switch (X86_AX) {
|
||||
case 0x5f34:
|
||||
/*
|
||||
* Set Panel Fitting Hook:
|
||||
* bit 2 = Graphics Stretching
|
||||
* bit 1 = Text Stretching
|
||||
* bit 0 = Centering (do not set with bit1 or bit2)
|
||||
* 0 = video bios default
|
||||
*/
|
||||
X86_AX = 0x005f;
|
||||
X86_CL = 0x00; /* Use video bios default */
|
||||
res = 1;
|
||||
break;
|
||||
case 0x5f35:
|
||||
/*
|
||||
* Boot Display Device Hook:
|
||||
* bit 0 = CRT
|
||||
* bit 1 = TV (eDP)
|
||||
* bit 2 = EFP
|
||||
* bit 3 = LFP
|
||||
* bit 4 = CRT2
|
||||
* bit 5 = TV2 (eDP)
|
||||
* bit 6 = EFP2
|
||||
* bit 7 = LFP2
|
||||
*/
|
||||
X86_AX = 0x005f;
|
||||
X86_CX = 0x0000; /* Use video bios default */
|
||||
res = 1;
|
||||
break;
|
||||
case 0x5f51:
|
||||
/*
|
||||
* Hook to select active LFP configuration:
|
||||
* 00h = No LVDS, VBIOS does not enable LVDS
|
||||
* 01h = Int-LVDS, LFP driven by integrated LVDS decoder
|
||||
* 02h = SVDO-LVDS, LFP driven by SVDO decoder
|
||||
* 03h = eDP, LFP Driven by Int-DisplayPort encoder
|
||||
*/
|
||||
X86_AX = 0x005f;
|
||||
X86_CX = 0x0001; /* Int-LVDS */
|
||||
res = 1;
|
||||
break;
|
||||
case 0x5f70:
|
||||
switch (X86_CH) {
|
||||
case 0:
|
||||
/* Get Mux */
|
||||
X86_AX = 0x005f;
|
||||
X86_CX = 0x0000;
|
||||
res = 1;
|
||||
break;
|
||||
case 1:
|
||||
/* Set Mux */
|
||||
X86_AX = 0x005f;
|
||||
X86_CX = 0x0000;
|
||||
res = 1;
|
||||
break;
|
||||
case 2:
|
||||
/* Get SG/Non-SG mode */
|
||||
X86_AX = 0x005f;
|
||||
X86_CX = 0x0000;
|
||||
res = 1;
|
||||
break;
|
||||
default:
|
||||
/* Interrupt was not handled */
|
||||
printk(BIOS_DEBUG, "Unknown INT15 5f70 function: 0x%02x\n",
|
||||
X86_CH);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
printk(BIOS_DEBUG, "Unknown INT15 function %04x!\n", X86_AX);
|
||||
break;
|
||||
}
|
||||
return res;
|
||||
}
|
||||
#endif
|
||||
|
||||
const char *smbios_mainboard_bios_version(void)
|
||||
{
|
||||
/* Satisfy thinkpad_acpi. */
|
||||
|
@ -181,10 +94,7 @@ static void mainboard_enable(device_t dev)
|
|||
{
|
||||
dev->ops->init = mainboard_init;
|
||||
|
||||
#if CONFIG_VGA_ROM_RUN
|
||||
/* Install custom int15 handler for VGA OPROM */
|
||||
mainboard_interrupt_handlers(0x15, &int15_handler);
|
||||
#endif
|
||||
install_intel_vga_int15_handler(GMA_INT15_ACTIVE_LFP_INT_LVDS, GMA_INT15_PANEL_FIT_DEFAULT, GMA_INT15_BOOT_DISPLAY_DEFAULT, 0);
|
||||
verb_setup();
|
||||
}
|
||||
|
||||
|
|
|
@ -13,6 +13,7 @@ config BOARD_SPECIFIC_OPTIONS # dummy
|
|||
select EC_LENOVO_H8
|
||||
select DRIVERS_ICS_954309
|
||||
select HAVE_OPTION_TABLE
|
||||
select INTEL_INT15
|
||||
select HAVE_CMOS_DEFAULT
|
||||
select HAVE_PIRQ_TABLE
|
||||
select HAVE_MP_TABLE
|
||||
|
|
|
@ -39,7 +39,8 @@
|
|||
#include <arch/x86/include/arch/acpigen.h>
|
||||
#include <smbios.h>
|
||||
#include <build.h>
|
||||
#include <x86emu/x86emu.h>
|
||||
#include <drivers/intel/gma/int15.h>
|
||||
|
||||
#define PANEL INT15_5F35_CL_DISPLAY_DEFAULT
|
||||
|
||||
static acpi_cstate_t cst_entries[] = {
|
||||
|
@ -48,37 +49,6 @@ static acpi_cstate_t cst_entries[] = {
|
|||
{ 2, 17, 250, { 0x01, 8, 0, { 0 }, DEFAULT_PMBASE + LV3, 0 } },
|
||||
};
|
||||
|
||||
#if CONFIG_PCI_OPTION_ROM_RUN_YABEL || CONFIG_PCI_OPTION_ROM_RUN_REALMODE
|
||||
static int int15_handler(void)
|
||||
{
|
||||
/* The right way to do this is to move this handler code into
|
||||
* the mainboard or northbridge code.
|
||||
* TODO: completely move to mainboards / chipsets.
|
||||
*/
|
||||
printk(BIOS_DEBUG, "%s: AX=%04x BX=%04x CX=%04x DX=%04x\n",
|
||||
__func__, X86_AX, X86_BX, X86_CX, X86_DX);
|
||||
|
||||
switch (X86_AX) {
|
||||
case 0x5f35: /* Boot Display */
|
||||
X86_AX = 0x005f; // Success
|
||||
X86_CL = PANEL;
|
||||
break;
|
||||
case 0x5f40: /* Boot Panel Type */
|
||||
X86_AX = 0x005f; // Success
|
||||
X86_CL = 3;
|
||||
printk(BIOS_DEBUG, "DISPLAY=%x\n", X86_CL);
|
||||
break;
|
||||
default:
|
||||
/* Interrupt was not handled */
|
||||
printk(BIOS_DEBUG, "Unknown INT15 function %04x!\n", X86_AX);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Interrupt handled */
|
||||
return 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
int get_cst_entries(acpi_cstate_t **entries)
|
||||
{
|
||||
*entries = cst_entries;
|
||||
|
@ -96,10 +66,7 @@ static void mainboard_init(device_t dev)
|
|||
ec_write(0x0c, 0x88);
|
||||
}
|
||||
|
||||
#if CONFIG_PCI_OPTION_ROM_RUN_YABEL || CONFIG_PCI_OPTION_ROM_RUN_REALMODE
|
||||
/* Install custom int15 handler for VGA OPROM */
|
||||
mainboard_interrupt_handlers(0x15, &int15_handler);
|
||||
#endif
|
||||
install_intel_vga_int15_handler(GMA_INT15_ACTIVE_LFP_INT_LVDS, GMA_INT15_PANEL_FIT_DEFAULT, PANEL, 3);
|
||||
|
||||
/* If we're resuming from suspend, blink suspend LED */
|
||||
dev0 = dev_find_slot(0, PCI_DEVFN(0,0));
|
||||
|
|
|
@ -13,6 +13,7 @@ config BOARD_SPECIFIC_OPTIONS # dummy
|
|||
select HAVE_ACPI_TABLES
|
||||
select HAVE_ACPI_RESUME
|
||||
select MAINBOARD_HAS_NATIVE_VGA_INIT
|
||||
select INTEL_INT15
|
||||
select EC_ACPI
|
||||
select MAINBOARD_HAS_NATIVE_VGA_INIT_TEXTMODECFG
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
#include <pc80/mc146818rtc.h>
|
||||
#include <arch/x86/include/arch/acpigen.h>
|
||||
#if CONFIG_PCI_OPTION_ROM_RUN_YABEL || CONFIG_PCI_OPTION_ROM_RUN_REALMODE
|
||||
#include <x86emu/regs.h>
|
||||
#include <drivers/intel/gma/int15.h>
|
||||
#include <arch/interrupt.h>
|
||||
#endif
|
||||
#include <pc80/keyboard.h>
|
||||
|
@ -58,34 +58,6 @@ int get_cst_entries(acpi_cstate_t ** entries)
|
|||
return ARRAY_SIZE(cst_entries);
|
||||
}
|
||||
|
||||
#if CONFIG_PCI_OPTION_ROM_RUN_YABEL || CONFIG_PCI_OPTION_ROM_RUN_REALMODE
|
||||
|
||||
static int int15_handler(void)
|
||||
{
|
||||
switch ((X86_EAX & 0xffff)) {
|
||||
/* Get boot display. */
|
||||
case 0x5f35:
|
||||
X86_EAX = 0x5f;
|
||||
/* The flags are:
|
||||
1 - VGA
|
||||
4 - DisplayPort
|
||||
8 - LCD
|
||||
*/
|
||||
X86_ECX = 0x8;
|
||||
|
||||
return 1;
|
||||
case 0x5f40:
|
||||
X86_EAX = 0x5f;
|
||||
X86_ECX = 0x2;
|
||||
return 1;
|
||||
default:
|
||||
printk(BIOS_WARNING, "Unknown INT15 function %04x!\n",
|
||||
X86_EAX & 0xffff);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Audio Setup */
|
||||
|
||||
static void verb_setup(void)
|
||||
|
@ -160,10 +132,7 @@ static void mainboard_enable(device_t dev)
|
|||
pci_write_config8(dev_find_slot(0, PCI_DEVFN(0x1f, 0)), GPIO_CNTL,
|
||||
0x10);
|
||||
|
||||
#if CONFIG_PCI_OPTION_ROM_RUN_YABEL || CONFIG_PCI_OPTION_ROM_RUN_REALMODE
|
||||
/* Install custom int15 handler for VGA OPROM */
|
||||
mainboard_interrupt_handlers(0x15, &int15_handler);
|
||||
#endif
|
||||
install_intel_vga_int15_handler(GMA_INT15_ACTIVE_LFP_INT_LVDS, GMA_INT15_PANEL_FIT_DEFAULT, GMA_INT15_BOOT_DISPLAY_LFP, 2);
|
||||
|
||||
/* This sneaked in here, because EasyNote has no SuperIO chip.
|
||||
*/
|
||||
|
|
|
@ -17,6 +17,7 @@ config BOARD_SPECIFIC_OPTIONS # dummy
|
|||
select HAVE_ACPI_RESUME
|
||||
select BOARD_ROMSIZE_KB_1024
|
||||
select CHANNEL_XOR_RANDOMIZATION
|
||||
select INTEL_INT15
|
||||
|
||||
config MAINBOARD_DIR
|
||||
string
|
||||
|
|
|
@ -24,9 +24,7 @@
|
|||
#include <arch/io.h>
|
||||
#include <arch/interrupt.h>
|
||||
#include <delay.h>
|
||||
#if CONFIG_VGA_ROM_RUN
|
||||
#include <x86emu/x86emu.h>
|
||||
#endif
|
||||
#include <drivers/intel/gma/int15.h>
|
||||
|
||||
#include <ec/acpi/ec.h>
|
||||
#include "m3885.h"
|
||||
|
@ -50,54 +48,6 @@ static void backlight_enable(void)
|
|||
printk(BIOS_DEBUG, "Display I/O: 0x%02x\n", inb(0x60f));
|
||||
}
|
||||
|
||||
#define BOOT_DISPLAY_DEFAULT 0
|
||||
#define BOOT_DISPLAY_CRT (1 << 0)
|
||||
#define BOOT_DISPLAY_TV (1 << 1)
|
||||
#define BOOT_DISPLAY_EFP (1 << 2)
|
||||
#define BOOT_DISPLAY_LCD (1 << 3)
|
||||
#define BOOT_DISPLAY_CRT2 (1 << 4)
|
||||
#define BOOT_DISPLAY_TV2 (1 << 5)
|
||||
#define BOOT_DISPLAY_EFP2 (1 << 6)
|
||||
#define BOOT_DISPLAY_LCD2 (1 << 7)
|
||||
|
||||
#if CONFIG_VGA_ROM_RUN
|
||||
static int int15_handler(void)
|
||||
{
|
||||
/* This int15 handler is Intel IGD. specific. Other chipsets need other
|
||||
* handlers. The right way to do this is to move this handler code into
|
||||
* the mainboard or northbridge code.
|
||||
* TODO: completely move to mainboards / chipsets.
|
||||
*/
|
||||
u8 display_id;
|
||||
|
||||
printk(BIOS_DEBUG, "%s: AX=%04x BX=%04x CX=%04x DX=%04x\n",
|
||||
__func__, X86_AX, X86_BX, X86_CX, X86_DX);
|
||||
|
||||
switch (X86_AX) {
|
||||
case 0x5f35: /* Boot Display */
|
||||
X86_AX = 0x005f; // Success
|
||||
X86_CL = BOOT_DISPLAY_DEFAULT;
|
||||
break;
|
||||
case 0x5f40: /* Boot Panel Type */
|
||||
/* LCD panel type is SIO GPIO40-43 */
|
||||
// display_id = inb(0x60f) & 0x0f;
|
||||
display_id = 3;
|
||||
// M.x86.R_AX = 0x015f; // Supported but failed
|
||||
X86_AX = 0x005f; // Success
|
||||
X86_CL = display_id;
|
||||
printk(BIOS_DEBUG, "DISPLAY=%x\n", X86_CL);
|
||||
break;
|
||||
default:
|
||||
/* Interrupt was not handled */
|
||||
printk(BIOS_DEBUG, "Unknown INT15 function %04x!\n", X86_AX);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Interrupt handled */
|
||||
return 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if DUMP_RUNTIME_REGISTERS
|
||||
static void dump_runtime_registers(void)
|
||||
{
|
||||
|
@ -124,10 +74,10 @@ static void mainboard_enable(device_t dev)
|
|||
/* Disable Dummy DCC -> GP45 = 1 */
|
||||
outb(inb(0x60f) | (1 << 5), 0x60f);
|
||||
|
||||
#if CONFIG_VGA_ROM_RUN
|
||||
/* Install custom int15 handler for VGA OPROM */
|
||||
mainboard_interrupt_handlers(0x15, &int15_handler);
|
||||
#endif
|
||||
/* LCD panel type is SIO GPIO40-43 */
|
||||
// display_id = inb(0x60f) & 0x0f;
|
||||
install_intel_vga_int15_handler(GMA_INT15_ACTIVE_LFP_INT_LVDS, GMA_INT15_PANEL_FIT_DEFAULT, GMA_INT15_BOOT_DISPLAY_DEFAULT, 3);
|
||||
|
||||
#if DUMP_RUNTIME_REGISTERS
|
||||
dump_runtime_registers();
|
||||
#endif
|
||||
|
|
|
@ -13,6 +13,7 @@ config BOARD_SPECIFIC_OPTIONS # dummy
|
|||
select HAVE_ACPI_TABLES
|
||||
select EC_ACPI
|
||||
select HAVE_OPTION_TABLE
|
||||
select INTEL_INT15
|
||||
|
||||
config MAINBOARD_DIR
|
||||
string
|
||||
|
|
|
@ -23,10 +23,7 @@
|
|||
//#include <pc80/mc146818rtc.h>
|
||||
#include <device/device.h>
|
||||
#include <console/console.h>
|
||||
#if CONFIG_VGA_ROM_RUN
|
||||
#include <arch/interrupt.h>
|
||||
#include <x86emu/x86emu.h>
|
||||
#endif
|
||||
#include <drivers/intel/gma/int15.h>
|
||||
#include <pc80/keyboard.h>
|
||||
#include <ec/acpi/ec.h>
|
||||
#include <device/azalia_device.h>
|
||||
|
@ -37,70 +34,6 @@
|
|||
the overloaded weak function in there. */
|
||||
#endif
|
||||
|
||||
|
||||
#if CONFIG_VGA_ROM_RUN
|
||||
static int int15_handler(void)
|
||||
{
|
||||
enum {
|
||||
BOOT_DISPLAY_DEFAULT = 0,
|
||||
BOOT_DISPLAY_CRT = (1 << 0),
|
||||
BOOT_DISPLAY_TV = (1 << 1),
|
||||
BOOT_DISPLAY_EFP = (1 << 2),
|
||||
BOOT_DISPLAY_LFP = (1 << 3),
|
||||
BOOT_DISPLAY_CRT2 = (1 << 4),
|
||||
BOOT_DISPLAY_TV2 = (1 << 5),
|
||||
BOOT_DISPLAY_EFP2 = (1 << 6),
|
||||
BOOT_DISPLAY_LFP2 = (1 << 7),
|
||||
};
|
||||
enum {
|
||||
PANEL_FIT_DEFAULT = 0,
|
||||
PANEL_FIT_CENTERING = (1 << 0),
|
||||
PANEL_FIT_TXT_STRETCH = (1 << 1),
|
||||
PANEL_FIT_GFX_STRETCH = (1 << 2),
|
||||
};
|
||||
|
||||
switch (X86_AX) {
|
||||
case 0x5f34:
|
||||
/* Set Panel Fitting Hook */
|
||||
X86_AX = 0x005f;
|
||||
X86_CX = PANEL_FIT_CENTERING;
|
||||
break;
|
||||
case 0x5f35:
|
||||
/* Boot Display Device Hook */
|
||||
X86_AX = 0x005f;
|
||||
X86_CX = BOOT_DISPLAY_DEFAULT; /* Select automatically. */
|
||||
break;
|
||||
case 0x5f40:
|
||||
/* Boot Panel Type Hook */
|
||||
/* Contrary to what EMGD's user's guide says,
|
||||
this _alters_ the behavior of the Video BIOS. */
|
||||
/* LCD panel type is SIO GPIO40-43.
|
||||
It's controlled by a DIP switch but was always
|
||||
set to 4 while only values of 5 and 6 worked. */
|
||||
X86_AX = 0x005f;
|
||||
X86_CX = (inb(0x60f) & 0x0f) + 1;
|
||||
break;
|
||||
case 0x5f70:
|
||||
/* Sandybridge boards return 0 here. */
|
||||
case 0x5f14:
|
||||
case 0x5f21:
|
||||
case 0x5f22:
|
||||
case 0x5f49:
|
||||
/* No documentation found. */
|
||||
default:
|
||||
/* Interrupt was not handled. */
|
||||
printk(BIOS_DEBUG,
|
||||
"%s: AX=%04x BX=%04x CX=%04x DX=%04x\n", __func__,
|
||||
X86_AX, X86_BX, X86_CX, X86_DX);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Interrupt handled. */
|
||||
return 1;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
static void verb_setup(void)
|
||||
{
|
||||
cim_verb_data = mainboard_cim_verb_data;
|
||||
|
@ -127,10 +60,10 @@ static void mainboard_enable(device_t dev)
|
|||
{
|
||||
ec_setup();
|
||||
verb_setup();
|
||||
#if CONFIG_VGA_ROM_RUN
|
||||
/* Install custom int15 handler for VGA OPROM */
|
||||
mainboard_interrupt_handlers(0x15, &int15_handler);
|
||||
#endif
|
||||
/* LCD panel type is SIO GPIO40-43.
|
||||
It's controlled by a DIP switch but was always
|
||||
set to 4 while only values of 5 and 6 worked. */
|
||||
install_intel_vga_int15_handler(GMA_INT15_ACTIVE_LFP_INT_LVDS, GMA_INT15_PANEL_FIT_CENTERING, GMA_INT15_BOOT_DISPLAY_DEFAULT, (inb(0x60f) & 0x0f) + 1);
|
||||
|
||||
/* We have no driver for the embedded controller since the firmware
|
||||
does most of the job. Hence, initialize keyboards here. */
|
||||
|
|
|
@ -13,6 +13,7 @@ config BOARD_SPECIFIC_OPTIONS # dummy
|
|||
select SOUTHBRIDGE_INTEL_BD82X6X
|
||||
select SUPERIO_SMSC_MEC1308
|
||||
select DRIVERS_GENERIC_IOAPIC
|
||||
select INTEL_INT15
|
||||
select HAVE_MRC
|
||||
|
||||
config MAINBOARD_DIR
|
||||
|
|
|
@ -24,9 +24,7 @@
|
|||
#include <device/pci_def.h>
|
||||
#include <device/pci_ops.h>
|
||||
#include <console/console.h>
|
||||
#if CONFIG_VGA_ROM_RUN
|
||||
#include <x86emu/x86emu.h>
|
||||
#endif
|
||||
#include <drivers/intel/gma/int15.h>
|
||||
#include <pc80/mc146818rtc.h>
|
||||
#include <arch/acpi.h>
|
||||
#include <arch/io.h>
|
||||
|
@ -50,91 +48,6 @@ void mainboard_suspend_resume(void)
|
|||
send_ec_command(EC_ACPI_ENABLE);
|
||||
}
|
||||
|
||||
#if CONFIG_VGA_ROM_RUN
|
||||
static int int15_handler(void)
|
||||
{
|
||||
int res=0;
|
||||
|
||||
printk(BIOS_DEBUG, "%s: INT15 function %04x!\n",
|
||||
__func__, X86_AX);
|
||||
|
||||
switch(X86_AX) {
|
||||
case 0x5f34:
|
||||
/*
|
||||
* Set Panel Fitting Hook:
|
||||
* bit 2 = Graphics Stretching
|
||||
* bit 1 = Text Stretching
|
||||
* bit 0 = Centering (do not set with bit1 or bit2)
|
||||
* 0 = video bios default
|
||||
*/
|
||||
X86_AX = 0x005f;
|
||||
X86_CL = 0x00;
|
||||
res = 1;
|
||||
break;
|
||||
case 0x5f35:
|
||||
/*
|
||||
* Boot Display Device Hook:
|
||||
* bit 0 = CRT
|
||||
* bit 1 = TV
|
||||
* bit 2 = EFP *
|
||||
* bit 3 = LFP
|
||||
* bit 4 = CRT2
|
||||
* bit 5 = TV2
|
||||
* bit 6 = EFP2 *
|
||||
* bit 7 = LFP2
|
||||
*/
|
||||
X86_AX = 0x005f;
|
||||
X86_CX = 0x0000;
|
||||
res = 1;
|
||||
break;
|
||||
case 0x5f51:
|
||||
/*
|
||||
* Hook to select active LFP configuration:
|
||||
* 00h = No LVDS, VBIOS does not enable LVDS
|
||||
* 01h = Int-LVDS, LFP driven by integrated LVDS decoder
|
||||
* 02h = SVDO-LVDS, LFP driven by SVDO decoder
|
||||
* 03h = eDP, LFP Driven by Int-DisplayPort encoder
|
||||
*/
|
||||
X86_AX = 0x005f;
|
||||
X86_CX = 0x0001;
|
||||
res = 1;
|
||||
break;
|
||||
case 0x5f70:
|
||||
switch (X86_CH) {
|
||||
case 0:
|
||||
/* Get Mux */
|
||||
X86_AX = 0x005f;
|
||||
X86_CX = 0x0000;
|
||||
res = 1;
|
||||
break;
|
||||
case 1:
|
||||
/* Set Mux */
|
||||
X86_EAX = 0x005f;
|
||||
X86_ECX = 0x0000;
|
||||
res = 1;
|
||||
break;
|
||||
case 2:
|
||||
/* Get SG/Non-SG mode */
|
||||
X86_AX = 0x005f;
|
||||
X86_CX = 0x0000;
|
||||
res = 1;
|
||||
break;
|
||||
default:
|
||||
/* FIXME: Interrupt was not handled, but return success? */
|
||||
printk(BIOS_DEBUG, "Unknown INT15 5f70 function: 0x%02x\n",
|
||||
X86_CH);
|
||||
return 1;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
printk(BIOS_DEBUG, "Unknown INT15 function %04x!\n", X86_AX);
|
||||
break;
|
||||
}
|
||||
return res;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Audio Setup */
|
||||
|
||||
static void verb_setup(void)
|
||||
|
@ -202,10 +115,7 @@ static void mainboard_enable(device_t dev)
|
|||
{
|
||||
dev->ops->init = mainboard_init;
|
||||
dev->ops->get_smbios_data = lumpy_onboard_smbios_data;
|
||||
#if CONFIG_VGA_ROM_RUN
|
||||
/* Install custom int15 handler for VGA OPROM */
|
||||
mainboard_interrupt_handlers(0x15, &int15_handler);
|
||||
#endif
|
||||
install_intel_vga_int15_handler(GMA_INT15_ACTIVE_LFP_INT_LVDS, GMA_INT15_PANEL_FIT_DEFAULT, GMA_INT15_BOOT_DISPLAY_DEFAULT, 0);
|
||||
verb_setup();
|
||||
}
|
||||
|
||||
|
|
|
@ -13,6 +13,7 @@ config BOARD_SPECIFIC_OPTIONS # dummy
|
|||
select SUPERIO_ITE_IT8772F
|
||||
select HAVE_MRC
|
||||
|
||||
select INTEL_INT15
|
||||
config MAINBOARD_DIR
|
||||
string
|
||||
default samsung/stumpy
|
||||
|
|
|
@ -25,9 +25,7 @@
|
|||
#include <device/pci_def.h>
|
||||
#include <device/pci_ops.h>
|
||||
#include <console/console.h>
|
||||
#if CONFIG_VGA_ROM_RUN
|
||||
#include <x86emu/x86emu.h>
|
||||
#endif
|
||||
#include <drivers/intel/gma/int15.h>
|
||||
#include <pc80/mc146818rtc.h>
|
||||
#include <arch/acpi.h>
|
||||
#include <arch/io.h>
|
||||
|
@ -43,91 +41,6 @@ void mainboard_suspend_resume(void)
|
|||
outb(0xcb, 0xb2);
|
||||
}
|
||||
|
||||
#if CONFIG_VGA_ROM_RUN
|
||||
static int int15_handler(void)
|
||||
{
|
||||
int res=0;
|
||||
|
||||
printk(BIOS_DEBUG, "%s: INT15 function %04x!\n",
|
||||
__func__, X86_AX);
|
||||
|
||||
switch(X86_AX) {
|
||||
case 0x5f34:
|
||||
/*
|
||||
* Set Panel Fitting Hook:
|
||||
* bit 2 = Graphics Stretching
|
||||
* bit 1 = Text Stretching
|
||||
* bit 0 = Centering (do not set with bit1 or bit2)
|
||||
* 0 = video bios default
|
||||
*/
|
||||
X86_AX = 0x005f;
|
||||
X86_CL = 0x01;
|
||||
res = 1;
|
||||
break;
|
||||
case 0x5f35:
|
||||
/*
|
||||
* Boot Display Device Hook:
|
||||
* bit 0 = CRT
|
||||
* bit 1 = TV (eDP) *
|
||||
* bit 2 = EFP *
|
||||
* bit 3 = LFP
|
||||
* bit 4 = CRT2
|
||||
* bit 5 = TV2 (eDP) *
|
||||
* bit 6 = EFP2 *
|
||||
* bit 7 = LFP2
|
||||
*/
|
||||
X86_AX = 0x005f;
|
||||
X86_CX = 0x0000;
|
||||
res = 1;
|
||||
break;
|
||||
case 0x5f51:
|
||||
/*
|
||||
* Hook to select active LFP configuration:
|
||||
* 00h = No LVDS, VBIOS does not enable LVDS
|
||||
* 01h = Int-LVDS, LFP driven by integrated LVDS decoder
|
||||
* 02h = SVDO-LVDS, LFP driven by SVDO decoder
|
||||
* 03h = eDP, LFP Driven by Int-DisplayPort encoder
|
||||
*/
|
||||
X86_AX = 0x005f;
|
||||
X86_CX = 0x0003;
|
||||
res = 1;
|
||||
break;
|
||||
case 0x5f70:
|
||||
switch (X86_CH) {
|
||||
case 0:
|
||||
/* Get Mux */
|
||||
X86_AX = 0x005f;
|
||||
X86_CX = 0x0000;
|
||||
res = 1;
|
||||
break;
|
||||
case 1:
|
||||
/* Set Mux */
|
||||
X86_AX = 0x005f;
|
||||
X86_CX = 0x0000;
|
||||
res = 1;
|
||||
break;
|
||||
case 2:
|
||||
/* Get SG/Non-SG mode */
|
||||
X86_AX = 0x005f;
|
||||
X86_CX = 0x0000;
|
||||
res = 1;
|
||||
break;
|
||||
default:
|
||||
/* FIXME: Interrupt was not handled, but return sucess? */
|
||||
printk(BIOS_DEBUG, "Unknown INT15 5f70 function: 0x%02x\n",
|
||||
X86_CH);
|
||||
return 1;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
printk(BIOS_DEBUG, "Unknown INT15 function %04x!\n", X86_AX);
|
||||
break;
|
||||
}
|
||||
return res;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Audio Setup */
|
||||
|
||||
static void verb_setup(void)
|
||||
|
@ -143,10 +56,7 @@ static void verb_setup(void)
|
|||
|
||||
static void mainboard_enable(device_t dev)
|
||||
{
|
||||
#if CONFIG_VGA_ROM_RUN
|
||||
/* Install custom int15 handler for VGA OPROM */
|
||||
mainboard_interrupt_handlers(0x15, &int15_handler);
|
||||
#endif
|
||||
install_intel_vga_int15_handler(GMA_INT15_ACTIVE_LFP_EDP, GMA_INT15_PANEL_FIT_CENTERING, GMA_INT15_BOOT_DISPLAY_DEFAULT, 0);
|
||||
verb_setup();
|
||||
}
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@ config BOARD_SPECIFIC_OPTIONS # dummy
|
|||
select HAVE_PIRQ_TABLE
|
||||
select UDELAY_TSC
|
||||
select BOARD_ROMSIZE_KB_512
|
||||
select INTEL_INT15
|
||||
|
||||
config MAINBOARD_DIR
|
||||
string
|
||||
|
|
|
@ -21,9 +21,7 @@
|
|||
#include <console/console.h>
|
||||
#include <device/device.h>
|
||||
#include <delay.h>
|
||||
#if CONFIG_VGA_ROM_RUN
|
||||
#include <x86emu/x86emu.h>
|
||||
#endif
|
||||
#include <drivers/intel/gma/int15.h>
|
||||
#include <arch/io.h>
|
||||
#include <arch/interrupt.h>
|
||||
|
||||
|
@ -86,53 +84,6 @@ static void flash_gpios(void)
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
#if CONFIG_VGA_ROM_RUN
|
||||
static int int15_handler(void)
|
||||
{
|
||||
#define BOOT_DISPLAY_DEFAULT 0
|
||||
#define BOOT_DISPLAY_CRT (1 << 0)
|
||||
#define BOOT_DISPLAY_TV (1 << 1)
|
||||
#define BOOT_DISPLAY_EFP (1 << 2)
|
||||
#define BOOT_DISPLAY_LCD (1 << 3)
|
||||
#define BOOT_DISPLAY_CRT2 (1 << 4)
|
||||
#define BOOT_DISPLAY_TV2 (1 << 5)
|
||||
#define BOOT_DISPLAY_EFP2 (1 << 6)
|
||||
#define BOOT_DISPLAY_LCD2 (1 << 7)
|
||||
|
||||
printk(BIOS_DEBUG, "%s: AX=%04x BX=%04x CX=%04x DX=%04x\n",
|
||||
__func__, X86_AX, X86_BX, X86_CX, X86_DX);
|
||||
|
||||
switch (X86_AX) {
|
||||
case 0x5f35: /* Boot Display */
|
||||
X86_AX = 0x005f; // Success
|
||||
//M.x86.R_CL = BOOT_DISPLAY_TV2;
|
||||
X86_CL = BOOT_DISPLAY_DEFAULT;
|
||||
break;
|
||||
case 0x5f36: /* Boot TV Format Hook */
|
||||
printk(BIOS_DEBUG, "Boot TV Format Hook. TODO\n");
|
||||
/* Interrupt was not handled */
|
||||
return 0;
|
||||
case 0x5f31: /* Post Completion Hook */
|
||||
case 0x5f33: /* Hook After Mode Set */
|
||||
case 0x5f34: /* Set Panel Fitting Hook */
|
||||
case 0x5f38: /* Hook Before Mode Set */
|
||||
case 0x5f45: /* Hook Before VESA VBE/DDC */
|
||||
case 0x5f46: /* Hook Before VESA VBE/PM */
|
||||
case 0x5f47: /* Notif Display Switch Hook */
|
||||
case 0x5f65: /* Local Memory Initialization Hook */
|
||||
/* Interrupt was not handled */
|
||||
return 0;
|
||||
default:
|
||||
/* Interrupt was not handled */
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Interrupt handled */
|
||||
return 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
static void mainboard_init(device_t dev)
|
||||
{
|
||||
parport_gpios();
|
||||
|
@ -142,10 +93,7 @@ static void mainboard_init(device_t dev)
|
|||
static void mainboard_enable(device_t dev)
|
||||
{
|
||||
dev->ops->init = mainboard_init;
|
||||
#if CONFIG_VGA_ROM_RUN
|
||||
/* Install custom int15 handler for VGA OPROM */
|
||||
mainboard_interrupt_handlers(0x15, &int15_handler);
|
||||
#endif
|
||||
install_intel_vga_int15_handler(GMA_INT15_ACTIVE_LFP_INT_LVDS, GMA_INT15_PANEL_FIT_DEFAULT, GMA_INT15_BOOT_DISPLAY_DEFAULT, 0);
|
||||
}
|
||||
|
||||
struct chip_operations mainboard_ops = {
|
||||
|
|
Loading…
Reference in New Issue