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 <arthur@aheymans.xyz> Reviewed-on: https://review.coreboot.org/c/30326 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: HAOUAS Elyes <ehaouas@noos.fr> Reviewed-by: Nico Huber <nico.h@gmx.de>
This commit is contained in:
committed by
Patrick Georgi
parent
5ef8e6ebd1
commit
57f70a10dd
@@ -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.
|
||||
|
@@ -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.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user