summaryrefslogtreecommitdiff
path: root/core/init.inc
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2009-05-24 19:09:32 -0700
committerH. Peter Anvin <hpa@zytor.com>2009-05-24 19:09:32 -0700
commit476a17a03b9729d4455e7f5516a4bc4c38b83efd (patch)
tree231831ac6077c0fe3a3146efded33856123be16b /core/init.inc
parent73ab2bf37fb8ebf91fa55e9ece4031840335382d (diff)
downloadsyslinux-476a17a03b9729d4455e7f5516a4bc4c38b83efd.tar.gz
core: load the PM code at 1 MB, COM32R code follows
Load our own (core) PM code at 1 MB; when loading a COM32R module let it follow our own PM code. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'core/init.inc')
-rw-r--r--core/init.inc11
1 files changed, 2 insertions, 9 deletions
diff --git a/core/init.inc b/core/init.inc
index 5f90b0b0..809fa8ee 100644
--- a/core/init.inc
+++ b/core/init.inc
@@ -57,9 +57,7 @@ common_init:
call adjust_screen
;
-; The code to decompress the PM code. We copy it temporarily to 1 MB;
-; we will probably eventually actually simply run the PM code out of
-; high memory, at which point the extra copy can be dropped.
+; The code to decompress the PM code and initialize other segments.
;
extern _lzo1x_decompress_asm_fast
extern __uibss_auxseg_dwords
@@ -67,16 +65,11 @@ common_init:
section .textnr
bits 32
pm_decompress:
- mov esi,__pm_code_lma
- mov edi,0x100000
- mov ecx,[lzo_data_size]
- call pm_bcopy
-
push 0 ; Space for decompressed size
push esp ; Pointer to previous word
push __pm_code_start ; Target address
push dword [lzo_data_size] ; Compressed size
- push dword 0x100000
+ push dword __pm_code_lma
call _lzo1x_decompress_asm_fast
add esp,16
pop RM_EAX ; Decompressed size