Rev 913 | Rev 950 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 913 | Rev 933 | ||
---|---|---|---|
Line 36... | Line 36... | ||
36 | #define KERNEL_END &_binary_____________kernel_kernel_bin_end |
36 | #define KERNEL_END &_binary_____________kernel_kernel_bin_end |
37 | #define KERNEL_SIZE ((unsigned int) KERNEL_END - (unsigned int) KERNEL_START) |
37 | #define KERNEL_SIZE ((unsigned int) KERNEL_END - (unsigned int) KERNEL_START) |
38 | 38 | ||
39 | void bootstrap(void) |
39 | void bootstrap(void) |
40 | { |
40 | { |
41 | printf("\nHelenOS PPC Bootloader\nKernel size %d bytes, load address %L\n", KERNEL_SIZE, KERNEL_LOAD_ADDRESS); |
41 | printf("\nHelenOS PPC Bootloader\nLoaded at %L\nKernel size %d bytes, load address %L\n", &start, KERNEL_SIZE, KERNEL_LOAD_ADDRESS); |
42 | 42 | ||
43 | void *addr = ofw_claim((void *) KERNEL_LOAD_ADDRESS, KERNEL_SIZE, 1); |
43 | void *addr = ofw_claim((void *) KERNEL_LOAD_ADDRESS, KERNEL_SIZE, 1); |
44 | if (addr == NULL) { |
44 | if (addr == NULL) { |
45 | printf("Error: Unable to claim memory"); |
45 | printf("Error: Unable to claim memory"); |
46 | halt(); |
46 | halt(); |
47 | } |
47 | } |
- | 48 | printf("Claimed memory at %L\n", addr); |
|
48 | memcpy(addr, KERNEL_START, KERNEL_SIZE); |
49 | memcpy(addr, KERNEL_START, KERNEL_SIZE); |
49 | 50 | ||
50 | printf("Booting the kernel...\n"); |
51 | printf("Booting the kernel...\n"); |
51 | jump_to_kernel(addr); |
52 | jump_to_kernel(addr); |
52 | } |
53 | } |