From e0128b1173354a5a15c8053c9ac3ac77ae8431ce Mon Sep 17 00:00:00 2001 From: "Zheng, Gen" Date: Thu, 29 Mar 2018 10:22:04 +0800 Subject: [PATCH] UEFI: add FIXME comments to function emalloc() & __emalloc() Add a FIXME comment that the emalloc() & __emalloc cannot guarantee to return address under 4G, and the hypervisor cannot handle params, which address is above 4G, delivered from efi stub. Signed-off-by: Zheng, Gen --- hypervisor/bsp/uefi/efi/malloc.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/hypervisor/bsp/uefi/efi/malloc.c b/hypervisor/bsp/uefi/efi/malloc.c index 6e90bfd81..879f7d62c 100644 --- a/hypervisor/bsp/uefi/efi/malloc.c +++ b/hypervisor/bsp/uefi/efi/malloc.c @@ -100,6 +100,10 @@ failed: * @addr: a pointer to the allocated address on success * * If we cannot satisfy @align we return 0. + * + * FIXME: This function cannot guarantee to return address under 4G, + * and the hypervisor cannot handle params, which address is above 4G, + * delivered from efi stub. */ EFI_STATUS emalloc(UINTN size, UINTN align, EFI_PHYSICAL_ADDRESS *addr) { @@ -160,7 +164,12 @@ fail: return err; } -EFI_STATUS __emalloc(UINTN size, UINTN align, EFI_PHYSICAL_ADDRESS *addr, EFI_MEMORY_TYPE mem_type) +/* FIXME: This function cannot guarantee to return address under 4G, + * and the hypervisor cannot handle params, which address is above 4G, + * delivered from efi stub. + */ +EFI_STATUS __emalloc(UINTN size, UINTN align, EFI_PHYSICAL_ADDRESS *addr, + EFI_MEMORY_TYPE mem_type) { UINTN map_size, map_key, desc_size; EFI_MEMORY_DESCRIPTOR *map_buf;