[SeaBIOS] [PATCH] vgabios: Fix PMM allocation request size.

Kevin O'Connor kevin at koconnor.net
Tue Feb 18 19:53:08 CET 2014


The size of a PMM memory request is in "paragraphs" so the size needs
to be divided by 16.  Fix the request so only the desired 512 bytes is
allocated instead of 8K.

Signed-off-by: Kevin O'Connor <kevin at koconnor.net>
---
 vgasrc/vgainit.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/vgasrc/vgainit.c b/vgasrc/vgainit.c
index 87bc75c..33b8eb9 100644
--- a/vgasrc/vgainit.c
+++ b/vgasrc/vgainit.c
@@ -75,7 +75,7 @@ allocate_extra_stack(void)
             "pushl %0\n"
             "pushw $(8|1)\n"            // Permanent low memory request
             "pushl $0xffffffff\n"       // Anonymous handle
-            "pushl $" __stringify(CONFIG_VGA_EXTRA_STACK_SIZE) "\n"
+            "pushl $" __stringify(CONFIG_VGA_EXTRA_STACK_SIZE/16) "\n"
             "pushw $0x00\n"             // PMM allocation request
             "lcallw *12(%%esp)\n"
             "addl $16, %%esp\n"
-- 
1.8.5.3




More information about the SeaBIOS mailing list