summaryrefslogtreecommitdiff
path: root/parseconfig.inc
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2008-02-15 22:51:46 -0800
committerH. Peter Anvin <hpa@zytor.com>2008-02-15 22:54:28 -0800
commitc9cddae667ebea9bdeba68db49c0e3230e85f9d4 (patch)
tree2b9662f35bafc8f9197269d6ff0101bd601ffa06 /parseconfig.inc
parent8404cd587d44f412819ce09adfb5f62b9b5e05e7 (diff)
downloadsyslinux-3.62-pre7.tar.gz
Put virtual kernels (CLI labels) in high memorysyslinux-3.62-pre7
Support putting virtual kernels in high memory instead of using a dedicated segment for it. This both reduces the low memory footprint by 64K, and allows for functionally unlimited labels (tested with over a hundred thousand.)
Diffstat (limited to 'parseconfig.inc')
-rw-r--r--parseconfig.inc26
1 files changed, 11 insertions, 15 deletions
diff --git a/parseconfig.inc b/parseconfig.inc
index 739a884b..90c1f3c9 100644
--- a/parseconfig.inc
+++ b/parseconfig.inc
@@ -399,23 +399,12 @@ commit_vk:
xor ax,ax
rep stosb
- ; Pack temporarily into trackbuf
+ ; Pack into high memory
mov si,VKernelBuf
- mov di,trackbuf
+ mov edi,[VKernelEnd]
mov cx,vk_size
call rllpack
- ; Now DX = number of bytes
- mov di,[VKernelBytes]
- mov cx,dx
- add dx,di
- jc .overflow ; If > 1 segment
- mov [VKernelBytes],dx
- mov si,trackbuf
- push es
- push word vk_seg
- pop es
- rep movsb
- pop es
+ mov [VKernelEnd],edi
ret
.overflow:
mov si,vk_overflow_msg
@@ -426,6 +415,14 @@ commit_vk:
vk_overflow_msg db 'Out of memory parsing config file', CR, LF, 0
SerialNotice db 1 ; Only print this once
+ section .bss
+ alignb 4
+VKernelEnd resd 1 ; Lowest high memory address used
+
+ ; This symbol should be used by loaders to indicate
+ ; the highest address *they* are allowed to use.
+HighMemRsvd equ VKernelEnd
+ ; by vkernels
section .config
align 4, db 0
KbdTimeout dd 0 ; Keyboard timeout (if any)
@@ -440,7 +437,6 @@ AllowImplicit dw 1 ; Allow implicit kernels
AllowOptions dw 1 ; User-specified options allowed
IncludeLevel dw 1 ; Nesting level
SerialPort dw 0 ; Serial port base (or 0 for no serial port)
-VKernelBytes dw 0 ; Number of bytes used by vkernels
VKernel db 0 ; Have we seen any "label" statements?
%if IS_PXELINUX