]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
efi_loader: definition of efi_virtual_address_map()
authorHeinrich Schuchardt <xypron.glpk@gmx.de>
Sat, 27 Jul 2019 18:28:47 +0000 (20:28 +0200)
committerHeinrich Schuchardt <xypron.glpk@gmx.de>
Tue, 30 Jul 2019 19:36:22 +0000 (21:36 +0200)
Use efi_uintn_t where the UEFI spec uses UINTN. Use efi_uintn_t also for
the result of the division of two efi_uintn_t.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
include/efi_api.h
lib/efi_loader/efi_runtime.c

index d4f32dbdc818f03f0b27447cdb1ee18da4a13e40..e5634dc6a05c90f468e5a344fa8628a4ca0189b8 100644 (file)
@@ -238,8 +238,8 @@ struct efi_runtime_services {
        efi_status_t (EFIAPI *set_wakeup_time)(char enabled,
                        struct efi_time *time);
        efi_status_t (EFIAPI *set_virtual_address_map)(
-                       unsigned long memory_map_size,
-                       unsigned long descriptor_size,
+                       efi_uintn_t memory_map_size,
+                       efi_uintn_t descriptor_size,
                        uint32_t descriptor_version,
                        struct efi_mem_desc *virtmap);
        efi_status_t (EFIAPI *convert_pointer)(
index 8b56ab0207cebaa50b5eafea4cc66e904f0d455f..a8f0b5eae3b06eae33da68f043d3911535139951 100644 (file)
@@ -427,8 +427,8 @@ void efi_runtime_detach(void)
  * Return:             status code EFI_UNSUPPORTED
  */
 static __efi_runtime efi_status_t EFIAPI efi_set_virtual_address_map_runtime(
-                       unsigned long memory_map_size,
-                       unsigned long descriptor_size,
+                       efi_uintn_t memory_map_size,
+                       efi_uintn_t descriptor_size,
                        uint32_t descriptor_version,
                        struct efi_mem_desc *virtmap)
 {
@@ -571,17 +571,17 @@ void efi_runtime_relocate(ulong offset, struct efi_mem_desc *map)
  * Return:             status code
  */
 static efi_status_t EFIAPI efi_set_virtual_address_map(
-                       unsigned long memory_map_size,
-                       unsigned long descriptor_size,
+                       efi_uintn_t memory_map_size,
+                       efi_uintn_t descriptor_size,
                        uint32_t descriptor_version,
                        struct efi_mem_desc *virtmap)
 {
-       int n = memory_map_size / descriptor_size;
-       int i;
+       efi_uintn_t n = memory_map_size / descriptor_size;
+       efi_uintn_t i;
        int rt_code_sections = 0;
        struct efi_event *event;
 
-       EFI_ENTRY("%lx %lx %x %p", memory_map_size, descriptor_size,
+       EFI_ENTRY("%zx %zx %x %p", memory_map_size, descriptor_size,
                  descriptor_version, virtmap);
 
        /*