Rev 3808 | Rev 3883 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3808 | Rev 3823 | ||
---|---|---|---|
Line 201... | Line 201... | ||
201 | /* |
201 | /* |
202 | * Claim and map the whole ramdisk as it may exceed the area |
202 | * Claim and map the whole ramdisk as it may exceed the area |
203 | * given to us by SILO. |
203 | * given to us by SILO. |
204 | */ |
204 | */ |
205 | (void) ofw_claim_phys(base + top, silo_ramdisk_size); |
205 | (void) ofw_claim_phys(base + top, silo_ramdisk_size); |
206 | (void) ofw_map(base + top, base + top, silo_ramdisk_size, -1); |
206 | (void) ofw_map(bootinfo.physmem_start + base + top, base + top, |
- | 207 | silo_ramdisk_size, -1); |
|
207 | memmove(base + top, (void *)((uintptr_t)silo_ramdisk_image), |
208 | memmove(base + top, (void *)((uintptr_t)silo_ramdisk_image), |
208 | silo_ramdisk_size); |
209 | silo_ramdisk_size); |
209 | printf("done.\n"); |
210 | printf("done.\n"); |
210 | top += silo_ramdisk_size; |
211 | top += silo_ramdisk_size; |
211 | } |
212 | } |
Line 251... | Line 252... | ||
251 | * Initialize the boot allocator. |
252 | * Initialize the boot allocator. |
252 | */ |
253 | */ |
253 | balloc_base = base + ALIGN_UP(top, PAGE_SIZE); |
254 | balloc_base = base + ALIGN_UP(top, PAGE_SIZE); |
254 | (void) ofw_claim_phys(bootinfo.physmem_start + balloc_base, |
255 | (void) ofw_claim_phys(bootinfo.physmem_start + balloc_base, |
255 | BALLOC_MAX_SIZE); |
256 | BALLOC_MAX_SIZE); |
256 | (void) ofw_map(balloc_base, balloc_base, BALLOC_MAX_SIZE, -1); |
257 | (void) ofw_map(bootinfo.physmem_start + balloc_base, balloc_base, |
- | 258 | BALLOC_MAX_SIZE, -1); |
|
257 | balloc_init(&bootinfo.ballocs, (uintptr_t)balloc_base); |
259 | balloc_init(&bootinfo.ballocs, (uintptr_t)balloc_base); |
258 | 260 | ||
259 | printf("\nCanonizing OpenFirmware device tree..."); |
261 | printf("\nCanonizing OpenFirmware device tree..."); |
260 | bootinfo.ofw_root = ofw_tree_build(); |
262 | bootinfo.ofw_root = ofw_tree_build(); |
261 | printf("done.\n"); |
263 | printf("done.\n"); |
Line 272... | Line 274... | ||
272 | printf("\nBooting the kernel...\n"); |
274 | printf("\nBooting the kernel...\n"); |
273 | jump_to_kernel((void *) KERNEL_VIRTUAL_ADDRESS, |
275 | jump_to_kernel((void *) KERNEL_VIRTUAL_ADDRESS, |
274 | bootinfo.physmem_start | BSP_PROCESSOR, &bootinfo, |
276 | bootinfo.physmem_start | BSP_PROCESSOR, &bootinfo, |
275 | sizeof(bootinfo)); |
277 | sizeof(bootinfo)); |
276 | } |
278 | } |
277 | - |