hv: merge SBL and UEFI related stuff under bsp

This patch unifies the bsp interface between UEFI and SBL.

Tracked-On: #2708
Signed-off-by: Tw <wei.tan@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
Tw
2019-03-04 13:34:09 +08:00
committed by wenlingz
parent 23e85ff12a
commit 56d8b08b78
21 changed files with 295 additions and 181 deletions

View File

@@ -146,7 +146,7 @@ static struct acpi_table_rsdp *get_rsdp(void)
struct acpi_table_rsdp *rsdp = NULL;
uint16_t *addr;
rsdp = (struct acpi_table_rsdp *)bsp_get_rsdp();
rsdp = (struct acpi_table_rsdp *)firmware_get_rsdp();
if (rsdp == NULL) {
/* EBDA is addressed by the 16 bit pointer at 0x40E */
addr = (uint16_t *)hpa2hva(0x40eUL);

View File

@@ -9,19 +9,6 @@
#include <boot_context.h>
#include <uefi.h>
static void efi_spurious_handler(int32_t vector)
{
if (get_cpu_id() == BOOT_CPU_ID) {
struct acrn_vcpu *vcpu = per_cpu(vcpu, BOOT_CPU_ID);
if (vcpu != NULL) {
vlapic_set_intr(vcpu, vector, LAPIC_TRIG_EDGE);
} else {
pr_err("%s vcpu or vlapic is not ready, interrupt lost\n", __func__);
}
}
}
static int32_t uefi_sw_loader(struct acrn_vm *vm)
{
int32_t ret = 0;
@@ -56,7 +43,6 @@ static int32_t uefi_sw_loader(struct acrn_vm *vm)
int32_t init_vm_boot_info(__unused struct acrn_vm *vm)
{
vm_sw_loader = uefi_sw_loader;
spurious_handler = (spurious_handler_t)efi_spurious_handler;
return 0;
}