summaryrefslogtreecommitdiffstats
path: root/src/device/oprom/realmode
diff options
context:
space:
mode:
Diffstat (limited to 'src/device/oprom/realmode')
-rw-r--r--src/device/oprom/realmode/x86.c76
1 files changed, 0 insertions, 76 deletions
diff --git a/src/device/oprom/realmode/x86.c b/src/device/oprom/realmode/x86.c
index d9fac36b66f1..20c6ea980829 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.
*/