David Holloway
Tue, 17 Jun 2008 01:58:07 -0700
URL: <http://savannah.gnu.org/bugs/?23615> Summary: EFI memory map size Project: GNU GRUB Submitted by: gwythaint Submitted on: Tuesday 06/17/2008 at 08:57 Category: Booting Severity: Major Priority: 5 - Normal Item Group: Software Error Status: None Privacy: Public Assigned to: None Originator Name: Originator Email: Open/Closed: Open Discussion Lock: Any Release: kern/efi/mm.c version 1.4 Reproducibility: Every Time Planned Release: _______________________________________________________ Details: grub_efi_get_memory_map() has two failure modes and one, GRUB_EFI_BUFFER_TOO_SMALL is not handled gracefully. The the problem occurs if a native EFI firmware requires more than MEMORY_MAP_SIZE; 4096 bytes in this case. By happenstance, the problem is mis-reported as "too little memory" when in fact, the memory map itself is not processor properly. It probably takes a seriously large server board such as the Intel NSW1U Network Server to report such a large memory map table. As an example, the NSW1U, American Megatrends bios version S5000.86B.10.00.0085 requires 7872 bytes. The following is a workaround for this class of symptom and a differential diagnostic message for the errors possible from grub_efi_get_memory_map(). Index: mm.c =================================================================== RCS file: /sources/grub/grub2/kern/efi/mm.c,v retrieving revision 1.4 diff -r1.4 mm.c 33c33 < #define MEMORY_MAP_SIZE 0x1000 --- > #define MEMORY_MAP_SIZE 0x2000 346a347 > int efi_status; 367c368,373 < if (grub_efi_get_memory_map (&map_size, memory_map, 0, &desc_size, 0) < 0) --- > efi_status = grub_efi_get_memory_map (&map_size, memory_map, 0, &desc_size, 0); > > if (efi_status == 0) > grub_fatal ("buffer too small: need %d bytes", map_size); > > if (efi_status == -1) _______________________________________________________ Reply to this item at: <http://savannah.gnu.org/bugs/?23615> _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/ _______________________________________________ Bug-grub mailing list Bug-grub@gnu.org http://lists.gnu.org/mailman/listinfo/bug-grub