From 6c5bf4a642f4e40ad16b58f4799a1977e2807d46 Mon Sep 17 00:00:00 2001 From: Fei Li Date: Thu, 14 Oct 2021 11:08:34 +0800 Subject: [PATCH] hv: enhance e820_alloc_memory could allocate memory than 4G Enhance e820_alloc_memory could allocate memory than 4G. Tracked-On: #5830 Signed-off-by: Fei Li --- hypervisor/arch/x86/e820.c | 2 +- hypervisor/include/arch/x86/asm/e820.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hypervisor/arch/x86/e820.c b/hypervisor/arch/x86/e820.c index 790735263..9d8d95a0b 100644 --- a/hypervisor/arch/x86/e820.c +++ b/hypervisor/arch/x86/e820.c @@ -34,7 +34,7 @@ static struct e820_entry hv_e820[E820_MAX_ENTRIES]; * @pre (size_arg & 0xFFFU) == 0U * @return base address of the memory region */ -uint64_t e820_alloc_memory(uint32_t size_arg, uint64_t max_addr) +uint64_t e820_alloc_memory(uint64_t size_arg, uint64_t max_addr) { int32_t i; uint64_t size = size_arg; diff --git a/hypervisor/include/arch/x86/asm/e820.h b/hypervisor/include/arch/x86/asm/e820.h index a4cac72af..50459c675 100644 --- a/hypervisor/include/arch/x86/asm/e820.h +++ b/hypervisor/include/arch/x86/asm/e820.h @@ -37,7 +37,7 @@ struct mem_range { /* HV read multiboot header to get e820 entries info and calc total RAM info */ void init_e820(void); -uint64_t e820_alloc_memory(uint32_t size_arg, uint64_t max_addr); +uint64_t e820_alloc_memory(uint64_t size_arg, uint64_t max_addr); /* get total number of the e820 entries */ uint32_t get_e820_entries_count(void);