[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Grub UEFI memory allocation patch
From: |
Bernon , Rémi |
Subject: |
Grub UEFI memory allocation patch |
Date: |
Sat, 3 Apr 2010 22:06:22 +0200 |
Hi,
I was trying for a few days to enable EFI boot on my laptop, and i've
encountered some issues with Grub2.
My motherboard is one of the modern Intel chipset motherboard, that
come with UEFI v2, and when i tried to boot using grub 1.98, compiled
with efi support, there was some memory allocation error message at
the kernel loading time, saying "cannot allocate protected mode page"
or something like that.
So, i looked into the grub source code, and found that it tries to
allocate memory at a hard coded memory address (0X10000), that was
already in use, for my computer.
I've also found parts of the code in loader/i386/linux.c that were
looking for free pages in the memory map, which is already done by the
EFI memory allocation function.
Actually, i've managed to make it working, by letting EFI find free
memory pages and allocate them, but i dont really know how important
this 0x10000 address is.
My fix works for me, but I think it may be connected to the fact I've
also build a relocatable kernel. I don't know enough about "kernel
loading" and bootloaders to determine if my fix will work well in all
situations or not, so maybe someone can tell me that.
Actually, i've still have an issue at shutdown time : the kernel (or
grub ?) crashes with an error message "Bad RIP value" and a full stack
trace with an EFI call, just when it is expected to power down. So, i
need to poweroff or reboot it manually, using the power switch. I
anyone have an idea from where the error comes, i'm interested.
Rémi
909_efi_allocations.diff
Description: Text Data
- Grub UEFI memory allocation patch,
Bernon , Rémi <=