summaryrefslogtreecommitdiff
path: root/src/device
diff options
context:
space:
mode:
Diffstat (limited to 'src/device')
-rw-r--r--src/device/Kconfig3
-rw-r--r--src/device/oprom/realmode/x86.c76
2 files changed, 1 insertions, 78 deletions
diff --git a/src/device/Kconfig b/src/device/Kconfig
index 66f57d96ca..85f1d65719 100644
--- a/src/device/Kconfig
+++ b/src/device/Kconfig
@@ -170,7 +170,7 @@ choice
prompt "Option ROM execution type"
default PCI_OPTION_ROM_RUN_YABEL if !ARCH_X86
default PCI_OPTION_ROM_RUN_REALMODE if ARCH_X86
- depends on VGA_ROM_RUN || GEODE_VSA
+ depends on VGA_ROM_RUN
config PCI_OPTION_ROM_RUN_REALMODE
prompt "Native mode"
@@ -185,7 +185,6 @@ config PCI_OPTION_ROM_RUN_REALMODE
config PCI_OPTION_ROM_RUN_YABEL
prompt "Secure mode"
bool
- depends on !GEODE_VSA
help
If you select this option, the x86emu CPU emulator will be used to
execute PCI Option ROMs.
diff --git a/src/device/oprom/realmode/x86.c b/src/device/oprom/realmode/x86.c
index d9fac36b66..20c6ea9808 100644
--- a/src/device/oprom/realmode/x86.c
+++ b/src/device/oprom/realmode/x86.c
@@ -355,82 +355,6 @@ void run_bios(struct device *dev, unsigned long addr)
#endif
}
-#if IS_ENABLED(CONFIG_GEODE_VSA)
-
-#define VSA2_BUFFER 0x60000
-#define VSA2_ENTRY_POINT 0x60020
-
-// TODO move to a header file.
-void do_vsmbios(void);
-
-/* VSA virtual register helper */
-static u32 VSA_vrRead(u16 classIndex)
-{
- u32 eax, ebx, ecx, edx;
- asm volatile (
- "movw $0x0AC1C, %%dx\n"
- "orl $0x0FC530000, %%eax\n"
- "outl %%eax, %%dx\n"
- "addb $2, %%dl\n"
- "inw %%dx, %%ax\n"
- : "=a" (eax), "=b"(ebx), "=c"(ecx), "=d"(edx)
- : "a"(classIndex)
- );
-
- return eax;
-}
-
-void do_vsmbios(void)
-{
- printk(BIOS_DEBUG, "Preparing for VSA...\n");
-
- /* Set up C interrupt handlers */
- setup_interrupt_handlers();
-
- /* Setting up realmode IDT */
- setup_realmode_idt();
-
- /* Make sure the code is placed. */
- setup_realmode_code();
-
- if ((uintptr_t)cbfs_boot_load_stage_by_name("vsa") !=
- VSA2_ENTRY_POINT) {
- printk(BIOS_ERR, "Failed to load VSA.\n");
- return;
- }
-
- unsigned char *buf = (unsigned char *)VSA2_BUFFER;
- printk(BIOS_DEBUG, "VSA: Buffer @%p *[0k]=%02x\n", buf, buf[0]);
- printk(BIOS_DEBUG, "VSA: Signature *[0x20-0x23] is %02x:%02x:%02x:%02x\n",
- buf[0x20], buf[0x21], buf[0x22], buf[0x23]);
-
- /* Check for code to emit POST code at start of VSA. */
- if ((buf[0x20] != 0xb0) || (buf[0x21] != 0x10) ||
- (buf[0x22] != 0xe6) || (buf[0x23] != 0x80)) {
- printk(BIOS_WARNING, "VSA: Signature incorrect. Install failed.\n");
- return;
- }
-
- printk(BIOS_DEBUG, "Calling VSA module...\n");
-
- /* ECX gets SMM, EDX gets SYSMEM */
- realmode_call(VSA2_ENTRY_POINT, 0x0, 0x0, MSR_GLIU0_SMM,
- MSR_GLIU0_SYSMEM, 0x0, 0x0);
-
- printk(BIOS_DEBUG, "... VSA module returned.\n");
-
- /* Restart timer 1 */
- outb(0x56, 0x43);
- outb(0x12, 0x41);
-
- /* Check that VSA is running OK */
- if (VSA_vrRead(SIGNATURE) == VSA2_SIGNATURE)
- printk(BIOS_DEBUG, "VSM: VSA2 VR signature verified.\n");
- else
- printk(BIOS_ERR, "VSM: VSA2 VR signature not valid. Install failed.\n");
-}
-#endif
-
/* interrupt_handler() is called from assembler code only,
* so there is no use in putting the prototype into a header file.
*/