From 6b2e2742b0ef8b3fb28f008e5f2d63fba8006e68 Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Sun, 31 May 2009 22:24:42 -0700 Subject: [PATCH] core: create an ersatz __com32 structure as expected by libcom32 To make it easier to mix libcom32 code into the core, create a __com32 structure to make the system call functions work correctly. Signed-off-by: H. Peter Anvin --- core/com32.inc | 15 +++++++++++++++ core/highmem.inc | 2 +- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/core/com32.inc b/core/com32.inc index 1f14125..3fa2d31 100644 --- a/core/com32.inc +++ b/core/com32.inc @@ -113,3 +113,18 @@ not_com32r: section .data16 not_com32r_msg db ': not a COM32R image', CR, LF, 0 + + ; Ersatz com32 invocation structure, to make libcom32 + ; code run the same if linked to the core. This is in + ; the .data16 segment so HighMemSize can live here. + global __com32 + alignz 4 +__com32: + dd 7 ; Argument count + dd 0 ; No command line + dd core_intcall ; Intcall entry point + dd core_xfer_buf ; Bounce buffer address + dd 1 << 16 ; 64K bounce buffer + dd core_farcall ; Farcall entry point + dd core_cfarcall ; Cfarcall entry point +HighMemSize dd 0 ; End of memory pointer (bytes) diff --git a/core/highmem.inc b/core/highmem.inc index 0c037cb..ea386ff 100644 --- a/core/highmem.inc +++ b/core/highmem.inc @@ -155,4 +155,4 @@ got_highmem: E820Buf resd 5 ; INT 15:E820 data buffer E820Mem resd 1 ; Memory detected by E820 E820Max resd 1 ; Is E820 memory capped? -HighMemSize resd 1 ; End of memory pointer (bytes) +; HighMemSize is defined in com32.inc -- 2.7.4