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 <gen.zheng@intel.com>
This commit is contained in:
Zheng, Gen 2018-03-29 10:22:04 +08:00 committed by Jack Ren
parent 88b79c901b
commit e0128b1173
1 changed files with 10 additions and 1 deletions

View File

@ -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;