aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Fleming <matt.fleming@intel.com>2011-08-18 20:26:38 +0100
committerMatt Fleming <matt.fleming@intel.com>2011-08-18 20:55:56 +0100
commit0f35b59014871a5a6e7f1db4915403fd6c40a0fe (patch)
treee01183ab1cae03f347e1e9f86f1eff91900a7615
parentace0e7400fdf63d543155fca6391f9e8008cd050 (diff)
downloadefilinux-0f35b59014871a5a6e7f1db4915403fd6c40a0fe.tar.gz
bzimage: Only set efi_*_hi for x86-64
It doesn't make sense to set efi_systab_hi or efi_memmap_hi for i386 because the 32-bit addresses fit in efi_systab and efi_memmap. Also, shifting the systab and memmap pointers results in the following warnings, loaders/bzimage/bzimage.c:324:2: error: right shift count >= width of type loaders/bzimage/bzimage.c:325:2: error: right shift count >= width of type Signed-off-by: Matt Fleming <matt.fleming@intel.com>
-rw-r--r--loaders/bzimage/bzimage.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/loaders/bzimage/bzimage.c b/loaders/bzimage/bzimage.c
index 14324b0..5645584 100644
--- a/loaders/bzimage/bzimage.c
+++ b/loaders/bzimage/bzimage.c
@@ -321,8 +321,10 @@ again:
efi->efi_memdesc_version = desc_version;
efi->efi_memmap = (UINT32)(UINTN)map_buf;
efi->efi_memmap_size = map_size;
+#ifdef x86_64
efi->efi_systab_hi = (unsigned long)sys_table >> 32;
efi->efi_memmap_hi = (unsigned long)map_buf >> 32;
+#endif
memcpy((char *)&efi->efi_loader_signature,
EFI_LOADER_SIGNATURE, sizeof(UINT32));