mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-22 17:27:53 +00:00
Revert "HV: Make AP trampoline code relocatable"
This reverts commit 31bf2befbf
.
This commit is contained in:
@@ -189,6 +189,12 @@ again:
|
||||
mmap[j].mm_type = E820_RAM;
|
||||
j++;
|
||||
|
||||
/* reserve secondary memory region(0x1000 ~ 0x10000) for hv */
|
||||
err = __emalloc(CONFIG_LOW_RAM_SIZE, CONFIG_LOW_RAM_START,
|
||||
&addr, EfiReservedMemoryType);
|
||||
if (err != EFI_SUCCESS)
|
||||
goto out;
|
||||
|
||||
mbi->mi_flags |= MULTIBOOT_INFO_HAS_MMAP | MULTIBOOT_INFO_HAS_CMDLINE;
|
||||
mbi->mi_mmap_length = j*sizeof(struct multiboot_mmap);
|
||||
|
||||
@@ -222,13 +228,6 @@ switch_to_guest_mode(EFI_HANDLE image)
|
||||
|
||||
efi_ctx = (struct efi_ctx *)(UINTN)addr;
|
||||
|
||||
/* reserve secondary memory region for hv */
|
||||
err = emalloc_for_low_mem(&addr, CONFIG_LOW_RAM_SIZE);
|
||||
if (err != EFI_SUCCESS)
|
||||
goto out;
|
||||
|
||||
efi_ctx->ap_trampoline_buf = (void *)addr;
|
||||
|
||||
config_table = sys_table->ConfigurationTable;
|
||||
|
||||
for (i = 0; i < sys_table->NumberOfTableEntries; i++) {
|
||||
|
@@ -96,7 +96,6 @@ struct e820_entry {
|
||||
struct efi_ctx {
|
||||
uint64_t rip;
|
||||
VOID *rsdp;
|
||||
VOID *ap_trampoline_buf;
|
||||
dt_addr_t gdt;
|
||||
dt_addr_t idt;
|
||||
uint16_t tr_sel;
|
||||
|
@@ -100,11 +100,6 @@ int sipi_from_efi_boot_service_exit(uint32_t dest, uint32_t mode, uint32_t vec)
|
||||
return 0;
|
||||
}
|
||||
|
||||
void *get_ap_trampoline_buf(void)
|
||||
{
|
||||
return efi_ctx->ap_trampoline_buf;
|
||||
}
|
||||
|
||||
void efi_deferred_wakeup_pcpu(int cpu_id)
|
||||
{
|
||||
uint32_t timeout;
|
||||
@@ -119,7 +114,7 @@ void efi_deferred_wakeup_pcpu(int cpu_id)
|
||||
expected_up = up_count + 1;
|
||||
|
||||
send_startup_ipi(INTR_CPU_STARTUP_USE_DEST,
|
||||
cpu_id, (uint64_t)get_ap_trampoline_buf());
|
||||
cpu_id, (uint64_t)cpu_secondary_reset);
|
||||
|
||||
timeout = CPU_UP_TIMEOUT * 1000;
|
||||
|
||||
|
Reference in New Issue
Block a user