on the SCC, the kernel determines the virtual address for the initrd

This commit is contained in:
Stefan Lankes 2011-08-10 03:25:22 -07:00
parent 023282e776
commit 1583f886b8

View file

@ -730,12 +730,6 @@ int arch_paging_init(void)
// map SCC's bootinfo
map_region(SCC_BOOTINFO, SCC_BOOTINFO, 1, MAP_KERNEL_SPACE);
// map the initial ramdisk
npages = bootinfo->size >> PAGE_SHIFT;
if (bootinfo->size & (PAGE_SIZE-1))
npages++;
map_region(bootinfo->addr, bootinfo->addr, npages, MAP_KERNEL_SPACE);
// map SCC's configuration registers
viraddr = map_region(CRB_X0_Y0, CRB_X0_Y0, (CRB_OWN-CRB_X0_Y0+16*1024*1024) >> PAGE_SHIFT, MAP_KERNEL_SPACE|MAP_NO_CACHE);
kprintf("Map configuration registers at 0x%x\n", viraddr);
@ -756,6 +750,15 @@ int arch_paging_init(void)
write_cr0(i);
paging_enabled = 1;
#ifdef CONFIG_ROCKCREEK
// map the initial ramdisk
npages = bootinfo->size >> PAGE_SHIFT;
if (bootinfo->size & (PAGE_SIZE-1))
npages++;
bootinfo->addr = map_region(0, bootinfo->addr, npages, MAP_KERNEL_SPACE);
kprintf("Map initrd at 0x%x (size %u bytes)\n", bootinfo->addr, bootinfo->size);
#endif
/*
* we turned on paging
* => now, we are able to register our task for Task State Switching