From f6aa0a70c5ef2c3609c9cdf0df30e3a09f683c27 Mon Sep 17 00:00:00 2001 From: Liang Yi Date: Mon, 18 Jan 2021 06:10:35 +0800 Subject: [PATCH] hv: modularization: remove get_rsdp_ptr() from multboot API. This function is a derivative of get_multiboot_info(). Tracked-On: #5661 Signed-off-by: Vijay Dhanraj Reviewed-by: Jason Chen CJ --- hypervisor/boot/acpi_base.c | 2 +- hypervisor/boot/include/multiboot.h | 1 - hypervisor/boot/multiboot/multiboot.c | 13 ------------- 3 files changed, 1 insertion(+), 15 deletions(-) diff --git a/hypervisor/boot/acpi_base.c b/hypervisor/boot/acpi_base.c index f4cb5b42f..c8f5195ac 100644 --- a/hypervisor/boot/acpi_base.c +++ b/hypervisor/boot/acpi_base.c @@ -70,7 +70,7 @@ static struct acpi_table_rsdp *get_rsdp(void) if (acpi_rsdp != NULL) { rsdp = acpi_rsdp; } else { - rsdp = (struct acpi_table_rsdp *)get_rsdp_ptr(); + rsdp = (struct acpi_table_rsdp *)(get_multiboot_info()->mi_acpi_rsdp_va); if (rsdp == NULL) { uint16_t *addr; diff --git a/hypervisor/boot/include/multiboot.h b/hypervisor/boot/include/multiboot.h index 019c5e6b2..4ddad0c25 100644 --- a/hypervisor/boot/include/multiboot.h +++ b/hypervisor/boot/include/multiboot.h @@ -87,7 +87,6 @@ struct acrn_multiboot_info *get_multiboot_info(void); int32_t sanitize_multiboot_info(void); void parse_hv_cmdline(void); -const void* get_rsdp_ptr(void); #endif /* ASSEMBLER */ diff --git a/hypervisor/boot/multiboot/multiboot.c b/hypervisor/boot/multiboot/multiboot.c index 67d047371..049f12a73 100644 --- a/hypervisor/boot/multiboot/multiboot.c +++ b/hypervisor/boot/multiboot/multiboot.c @@ -176,16 +176,3 @@ struct acrn_multiboot_info *get_multiboot_info(void) { return &acrn_mbi; } - -const void* get_rsdp_ptr(void) -{ - const void *rsdp_ptr; - - if (boot_from_multiboot2()) { - rsdp_ptr = acrn_mbi.mi_acpi_rsdp_va; - } else { - rsdp_ptr = NULL; - } - - return rsdp_ptr; -}