On 18.06.22 14:13, Samuel Thibault wrote:
Hello,Juergen Gross, le sam. 18 juin 2022 12:48:16 +0200, a ecrit:@@ -124,7 +126,7 @@ void arch_mm_preinit(void *p) do_exit(); }- last_free_pfn = e820_get_maxpfn(ret);+ last_free_pfn = e820_get_maxpfn(ret - e820_initial_reserved_pfns);Mmm, but the reserved pfn could be in the middle of the e820 address space.
That doesn't matter. e820_get_maxpfn(n) will just return the pfn of the n-th RAM pfn it is finding in the E820 map. This should be the last pfn with allocated memory. Without subtracting the number of reserved pfns (which contain normally memory which is allocated for the guest, but not usable as RAM), Mini-OS tries to use RAM beyond its allocation, which fails. Juergen
OpenPGP_0xB0DE9DD628BF132F.asc
Description: OpenPGP public key
OpenPGP_signature
Description: OpenPGP digital signature
