[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: |
Vladimir Serbinenko |
Subject: |
[bug #64471] grub efi memory allocation (efi/mm) does not work on every machine |
Date: |
Thu, 27 Jul 2023 15:37:52 -0400 (EDT) |
Follow-up Comment #19, bug #64471 (project grub):
[(Erreur - Introuvable)]
[comment #18 commentaire #18 :]
>
> [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!
Nope some firmwares correctly add available memory above 4GiB to memory map
but fail on either of 2 bugs:
* Their disk routines fail with memory above 4 GiB
* They don't map regions above 4 GiBs contrary to the spec
You need to avoid both bugs by:
(a) disk routines should use memory under 4GiB either always or after failing
(b) you need to check paging map.
Ideally neither would be necessary but due to firmware bugs they are
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?64471>
_______________________________________________
Message posté via Savannah
https://savannah.gnu.org/
- [bug #64471] grub efi memory allocation (efi/mm) does not work on every machine, (continued)
- [bug #64471] grub efi memory allocation (efi/mm) does not work on every machine, Alexey Kuznetsov, 2023/07/26
- [bug #64471] grub efi memory allocation (efi/mm) does not work on every machine, Alexey Kuznetsov, 2023/07/27
- [bug #64471] grub efi memory allocation (efi/mm) does not work on every machine, Alexey Kuznetsov, 2023/07/27
- [bug #64471] grub efi memory allocation (efi/mm) does not work on every machine, Alexey Kuznetsov, 2023/07/27
- [bug #64471] grub efi memory allocation (efi/mm) does not work on every machine, Alexey Kuznetsov, 2023/07/27
- [bug #64471] grub efi memory allocation (efi/mm) does not work on every machine, Alexey Kuznetsov, 2023/07/27
- [bug #64471] grub efi memory allocation (efi/mm) does not work on every machine, Vladimir Serbinenko, 2023/07/27
- [bug #64471] grub efi memory allocation (efi/mm) does not work on every machine, Alexey Kuznetsov, 2023/07/27
- [bug #64471] grub efi memory allocation (efi/mm) does not work on every machine, Vladimir Serbinenko, 2023/07/27
- [bug #64471] grub efi memory allocation (efi/mm) does not work on every machine, Alexey Kuznetsov, 2023/07/27
- [bug #64471] grub efi memory allocation (efi/mm) does not work on every machine,
Vladimir Serbinenko <=
- [bug #64471] grub efi memory allocation (efi/mm) does not work on every machine, Alexey Kuznetsov, 2023/07/27
- [bug #64471] grub efi memory allocation (efi/mm) does not work on every machine, Vladimir Serbinenko, 2023/07/27
- [bug #64471] grub efi memory allocation (efi/mm) does not work on every machine, Alexey Kuznetsov, 2023/07/27
- [bug #64471] grub efi memory allocation (efi/mm) does not work on every machine, Alexey Kuznetsov, 2023/07/28
- [bug #64471] grub efi memory allocation (efi/mm) does not work on every machine, Alexey Kuznetsov, 2023/07/28