I had no problems with paging unless I tried to switch to a higher half kernel.
I want to implement as much as possible in C (I'm a poor assembly programmer) so I thought I should do it like this:
1. create a section starting at 0x100000 and link my init functions to it
2. the functions should then find some memory and do the final paging initialization
3. when everything is fine jump to the real kernel entry
Unfortunately GRUB throws an error message: error 28 selected item cannot fit into memory.
Here are some helpful information:
Code: Select all
c0105000 A __end
00100000 T _start
00100022 T early_init
c0100000 T init
0010001f t loop
00100010 t multiboot_entry
00100004 t multiboot_header
c0101000 B stack
00100000 T start
linker script:
Code: Select all
ENTRY(start)
OUTPUT_FORMAT(elf32-i386)
SECTIONS
{
. = 0x100000;
.early_init_text :
{
*(.early_init_text)
}
. = 0xC0100000;
.text :
{
*(.text)
. = ALIGN(0x1000);
}
.data ALIGN(0x1000) :
{
*(.data)
*(.rodata)
. = ALIGN(0x1000);
}
.bss :
{
*(.bss)
. = ALIGN(0x1000);
}
__end = .;
}

