Apparently RAM is added in the reverse order to tht expected - 3 is at 0x000
2 is at 0x4000 etc. Add them properly then add 0 so that init picks up the
initial 0xC000 bank for common and udata
void pagemap_init(void)
{
int i = /*FIXME*/ 16; /* in 16K banks */
- /* Add all the RAM, except 0,1,2 , which is the kernel data/bss, add 3
+ /* Add all the RAM, except 0,1,2,3 which is the kernel data/bss, add 0
last to become the common for init */
- while (i > 0)
+ while (i > 3)
pagemap_add(i--);
+ /* Init will pick this up correctly as its common */
+ pagemap_add(0);
}
void map_init(void)
;
map_kernel:
push af
- xor a
+ ld a, #3
out (0xFC), a
- inc a
+ dec a
out (0xFD), a
- inc a
+ dec a
out (0xFE), a
- inc a
- out (0xFF), a
+ ; and 0xFF is managed by task switches
pop af
ret
map_process_2: