#ifndef CORE_H
#define CORE_H
+#include <klibc/compiler.h>
#include <com32.h>
extern char core_xfer_buf[65536];
void call16(void (*)(void), const com32sys_t *, com32sys_t *);
+#define __lowmem __attribute((nocommon,section(".lowmem")))
+
#endif /* CORE_H */
; The code to decompress the PM code and initialize other segments.
;
extern _lzo1x_decompress_asm_fast
- extern __uibss_auxseg_dwords
section .textnr
bits 32
mov edi,__bss16_start
mov ecx,__bss16_dwords
rep stosd
- mov edi,__uibss_start
- mov ecx,__uibss_auxseg_dwords
+ mov edi,__high_clear_start ; .uibss, .auxseg, .lowmem
+ mov ecx,__high_clear_dwords
rep stosd
ret
SECINFO replacestub
SECINFO pm_code
+ SECINFO high_clear
+
extern __bss_start, __bss_end, __bss_len, __bss_dwords
extern free_high_memory
. = ALIGN(16);
__pm_code_lma = .;
+ __high_clear_start = .;
+
. = ALIGN(512);
.adv (NOLOAD) : {
__adv_start = .;
__auxseg_len = __auxseg_end - __auxseg_start;
__auxseg_dwords = (__auxseg_len + 3) >> 2;
aux_seg = __auxseg_start >> 4;
-
- __uibss_auxseg_len = __auxseg_end - __uibss_start;
- __uibss_auxseg_dwords = (__uibss_auxseg_len + 3) >> 2;
+
+ /*
+ * Used to allocate lowmem buffers from 32-bit code
+ */
+ .lowmem (NOLOAD) : {
+ __lowmem_start = .;
+ *(.lowmem)
+ __lowmem_end = .;
+ }
+ __lowmem_len = __lowmem_end - __lowmem_start;
+ __lowmem_dwords = (__lowmem_len + 3) >> 2;
+
+ __high_clear_end = .;
+
+ __high_clear_len = __high_clear_end - __high_clear_start;
+ __high_clear_dwords = (__high_clear_len + 3) >> 2;
/*
* 32-bit code. This is a hack for the moment due to the