bug-grub
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #64471] grub efi memory allocation (efi/mm) does not work on every


From: Alexey Kuznetsov
Subject: [bug #64471] grub efi memory allocation (efi/mm) does not work on every machine
Date: Thu, 27 Jul 2023 14:45:41 -0400 (EDT)

Follow-up Comment #18, bug #64471 (project grub):


[comment #17 comment #17:]
> 
> [comment #16 commentaire #16 :]
> > 
> > [comment #15 comment #15:]
> > > Where do you check the page table?
> > 
> > I do not understand. Can you view the smartmem.patch?
> 
> Yes, I've seen it. And you need to check that memory above 4GiB is mapped at
all before you can use them. For this you need to read cr3 and parse page
mapping and if needed error out or add missing mapping.
> Additionally buffers for disk reads and other hardware-related tasks need to
be under 4 GiB.

You are saying that I'm missing something here. But I do not understand it.
I'm not using any low level functions which can allocate bad regions, I call
grub_efi_allocate_any_pages which using EFI allocate_pages method, which is
accepting maximum memory address as input argument and requested pages as
second option, so I did. I ask to allocate any pages from all pages range. And
do EFI to care about looking for usable address and return the allocated
address. So it works! Here is already grub function for filter_memory_map for
looking for appropriate ranges and checks and ONLY WHEN it failed, I ask EFI
to solve it for me from all possible ranges...

I already test smartmem patch for two machines: Desktop amd64 (intel) which
failed WITHOUT bigmem patch (4GB+ below and above ranges) and laptop amd64
(amd) which failed WITH bigmem patch (only <4GB works). Right now I'm testing
old laptop x32 (intel) with all my patches.


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?64471>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]