Rev 885 | Rev 888 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 885 | Rev 887 | ||
---|---|---|---|
Line 28... | Line 28... | ||
28 | 28 | ||
29 | #include "main.h" |
29 | #include "main.h" |
30 | #include "printf.h" |
30 | #include "printf.h" |
31 | #include "ofw.h" |
31 | #include "ofw.h" |
32 | 32 | ||
- | 33 | #define KERNEL_LOAD_ADDRESS 0x800000 |
|
- | 34 | #define KERNEL_SIZE _binary_____________kernel_kernel_bin_size |
|
- | 35 | ||
33 | static void halt(void) |
36 | static void halt(void) |
34 | { |
37 | { |
35 | while (1); |
38 | while (1); |
36 | } |
39 | } |
37 | 40 | ||
38 | void bootstrap(void) |
41 | void bootstrap(void) |
39 | { |
42 | { |
40 | printf("\nHelenOS PPC Bootloader\nKernel size %d, load address %L\n", kernel_size, kernel_load_address); |
43 | printf("\nHelenOS PPC Bootloader\nKernel size %d, load address %L\n", KERNEL_SIZE, KERNEL_LOAD_ADDRESS); |
41 | 44 | ||
42 | void *addr = ofw_claim((void *) kernel_load_address, kernel_size, 1); |
45 | void *addr = ofw_claim((void *) KERNEL_LOAD_ADDRESS, KERNEL_SIZE, 1); |
43 | if (addr == NULL) { |
46 | if (addr == NULL) { |
44 | printf("Error: Unable to claim memory"); |
47 | printf("Error: Unable to claim memory"); |
45 | halt(); |
48 | halt(); |
46 | } |
49 | } |
47 | 50 |