From 57f70a10dd3743ea96026597bfa9bcde1acbe0ef Mon Sep 17 00:00:00 2001 From: Arthur Heymans Date: Thu, 20 Dec 2018 10:27:19 +0100 Subject: cpu/amd/geode_lx: Drop support These chips are still using LATE_CBMEM which was agreed upon to be removed after release 4.7. It is now more than 1 year later and they still linger around. The work and review to bring this code up to date can happen on the 4.9 branch and then squashed together and merged back into mainline when done. Change-Id: I11290a5e92397b9b7e7e5a19b029278e728671a3 Signed-off-by: Arthur Heymans Reviewed-on: https://review.coreboot.org/c/30326 Tested-by: build bot (Jenkins) Reviewed-by: HAOUAS Elyes Reviewed-by: Nico Huber --- src/device/oprom/realmode/x86.c | 76 ----------------------------------------- 1 file changed, 76 deletions(-) (limited to 'src/device/oprom') 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. */ -- cgit v1.2.3