[SeaBIOS] [PATCH] memory: reserve more space for ZoneHigh

Gerd Hoffmann posted 1 patch 5 months, 1 week ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/seabios tags/patchew/20220422115556.2781428-1-kraxel@redhat.com
src/config.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[SeaBIOS] [PATCH] memory: reserve more space for ZoneHigh
Posted by Gerd Hoffmann 5 months, 1 week ago
Bump BUILD_MAX_HIGHTABLE from 256k to 1M to avoid running
out of memory with very large smbios tables.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 src/config.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/config.h b/src/config.h
index 93c8dbc2d530..f4b19898a1f0 100644
--- a/src/config.h
+++ b/src/config.h
@@ -17,7 +17,7 @@
 // Maximum number of map entries in the e820 map
 #define BUILD_MAX_E820 32
 // Space to reserve in high-memory for tables
-#define BUILD_MAX_HIGHTABLE (256*1024)
+#define BUILD_MAX_HIGHTABLE (1024*1024)
 // Largest supported externaly facing drive id
 #define BUILD_MAX_EXTDRIVE 16
 // Number of bytes the smbios may be and still live in the f-segment
-- 
2.35.1

_______________________________________________
SeaBIOS mailing list -- seabios@seabios.org
To unsubscribe send an email to seabios-leave@seabios.org
[SeaBIOS] Re: [PATCH] memory: reserve more space for ZoneHigh
Posted by Kevin O'Connor 5 months, 1 week ago
On Fri, Apr 22, 2022 at 01:55:56PM +0200, Gerd Hoffmann wrote:
> Bump BUILD_MAX_HIGHTABLE from 256k to 1M to avoid running
> out of memory with very large smbios tables.
> 
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> ---
>  src/config.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/config.h b/src/config.h
> index 93c8dbc2d530..f4b19898a1f0 100644
> --- a/src/config.h
> +++ b/src/config.h
> @@ -17,7 +17,7 @@
>  // Maximum number of map entries in the e820 map
>  #define BUILD_MAX_E820 32
>  // Space to reserve in high-memory for tables
> -#define BUILD_MAX_HIGHTABLE (256*1024)
> +#define BUILD_MAX_HIGHTABLE (1024*1024)

Alas, I think this would break things if QEMU were started with
exactly 2M of ram.

Maybe an alternative would be to increase it to 512K of ram.

Another possibility might be to check if there is at least 16M of ram
and set aside 4M in that case (and continue to use 256K for low-mem
machines).

Cheers,
-Kevin
_______________________________________________
SeaBIOS mailing list -- seabios@seabios.org
To unsubscribe send an email to seabios-leave@seabios.org