Skip to content

Commit e0128b1

Browse files
zhenggenjren1
authored andcommitted
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>
1 parent 88b79c9 commit e0128b1

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

hypervisor/bsp/uefi/efi/malloc.c

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,10 @@ memory_map(EFI_MEMORY_DESCRIPTOR **map_buf, UINTN *map_size,
100100
* @addr: a pointer to the allocated address on success
101101
*
102102
* If we cannot satisfy @align we return 0.
103+
*
104+
* FIXME: This function cannot guarantee to return address under 4G,
105+
* and the hypervisor cannot handle params, which address is above 4G,
106+
* delivered from efi stub.
103107
*/
104108
EFI_STATUS emalloc(UINTN size, UINTN align, EFI_PHYSICAL_ADDRESS *addr)
105109
{
@@ -160,7 +164,12 @@ EFI_STATUS emalloc(UINTN size, UINTN align, EFI_PHYSICAL_ADDRESS *addr)
160164
return err;
161165
}
162166

163-
EFI_STATUS __emalloc(UINTN size, UINTN align, EFI_PHYSICAL_ADDRESS *addr, EFI_MEMORY_TYPE mem_type)
167+
/* FIXME: This function cannot guarantee to return address under 4G,
168+
* and the hypervisor cannot handle params, which address is above 4G,
169+
* delivered from efi stub.
170+
*/
171+
EFI_STATUS __emalloc(UINTN size, UINTN align, EFI_PHYSICAL_ADDRESS *addr,
172+
EFI_MEMORY_TYPE mem_type)
164173
{
165174
UINTN map_size, map_key, desc_size;
166175
EFI_MEMORY_DESCRIPTOR *map_buf;

0 commit comments

Comments
 (0)