.unpaged_text ALIGN(4096) : { unpaged_*.o(.text) }
.unpaged_data ALIGN(4096) : { unpaged_*.o(.data .rodata*) }
- __k_unpaged__kern_unpaged__edata = .;
- __k_unpaged__edata = .;
+ __k_unpaged__kern_unpaged_edata = .;
+
.unpaged_bss ALIGN(4096) : { unpaged_*.o(.bss COMMON) }
__k_unpaged__kern_unpaged_end = .;
- __k_unpaged__end = .;
. += _kern_offset;
.data ALIGN(4096) : AT(ADDR(.data) - _kern_offset) { *(.data .rodata* ) }
. = ALIGN(4096);
_edata = .;
+ __k_unpaged__edata = . - _kern_offset;
.bss ALIGN(4096) : AT(ADDR(.bss) - _kern_offset) { *(.bss* COMMON)
__k_unpaged__kern_size = . - _kern_vir_base;
_kern_size = __k_unpaged__kern_size;
+
. += 4096;
}
_end = .;
+ __k_unpaged__end = . - _kern_offset;
/DISCARD/ :
{
/* Kernel may use memory */
int kernel_may_alloc = 1;
+/* kernel bss */
extern u32_t _edata;
extern u32_t _end;
+/* kernel unpaged bss */
+extern char _kern_unpaged_edata;
+extern char _kern_unpaged_end;
+
/**
*
* The following function combines a few things together
/* Clear BSS */
memset(&_edata, 0, (u32_t)&_end - (u32_t)&_edata);
+ memset(&_kern_unpaged_edata, 0, (u32_t)&_kern_unpaged_end - (u32_t)&_kern_unpaged_edata);
/* we get called in a c like fashion where the first arg
* is the program name (load address) and the rest are
struct boot_image *ip; /* boot image pointer */
register struct proc *rp; /* process pointer */
register int i, j;
+ static int bss_test;
+
+ /* bss sanity check */
+ assert(bss_test == 0);
+ bss_test = 1;
/* save a global copy of the boot parameters */
memcpy(&kinfo, local_cbi, sizeof(kinfo));