Rev 1977 | Rev 1979 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1977 | Rev 1978 | ||
---|---|---|---|
Line 44... | Line 44... | ||
44 | { |
44 | { |
45 | printf("HelenOS SPARC64 Bootloader\n"); |
45 | printf("HelenOS SPARC64 Bootloader\n"); |
46 | 46 | ||
47 | init_components(components); |
47 | init_components(components); |
48 | 48 | ||
- | 49 | if (!ofw_get_physmem_start(&bootinfo.physmem_start)) { |
|
- | 50 | printf("Error: unable to get start of physical memory.\n"); |
|
- | 51 | halt(); |
|
- | 52 | } |
|
- | 53 | ||
49 | if (!ofw_memmap(&bootinfo.memmap)) { |
54 | if (!ofw_memmap(&bootinfo.memmap)) { |
50 | printf("Error: unable to get memory map, halting.\n"); |
55 | printf("Error: unable to get memory map, halting.\n"); |
51 | halt(); |
56 | halt(); |
52 | } |
57 | } |
53 | 58 | ||
Line 55... | Line 60... | ||
55 | printf("Error: no memory detected, halting.\n"); |
60 | printf("Error: no memory detected, halting.\n"); |
56 | halt(); |
61 | halt(); |
57 | } |
62 | } |
58 | 63 | ||
59 | printf("\nSystem info\n"); |
64 | printf("\nSystem info\n"); |
60 | printf(" memory: %dM\n", bootinfo.memmap.total>>20); |
65 | printf(" memory: %dM starting at %P\n", |
- | 66 | bootinfo.memmap.total >> 20, bootinfo.physmem_start); |
|
61 | 67 | ||
62 | printf("\nMemory statistics\n"); |
68 | printf("\nMemory statistics\n"); |
63 | printf(" kernel entry point at %P\n", KERNEL_VIRTUAL_ADDRESS); |
69 | printf(" kernel entry point at %P\n", KERNEL_VIRTUAL_ADDRESS); |
64 | printf(" %P: boot info structure\n", &bootinfo); |
70 | printf(" %P: boot info structure\n", &bootinfo); |
65 | 71 | ||
66 | unsigned int i; |
72 | unsigned int i; |
67 | for (i = 0; i < COMPONENTS; i++) |
73 | for (i = 0; i < COMPONENTS; i++) |
68 | printf(" %P: %s image (size %d bytes)\n", components[i].start, components[i].name, components[i].size); |
74 | printf(" %P: %s image (size %d bytes)\n", components[i].start, |
- | 75 | components[i].name, components[i].size); |
|
69 | 76 | ||
70 | void * base = (void *) KERNEL_VIRTUAL_ADDRESS; |
77 | void * base = (void *) KERNEL_VIRTUAL_ADDRESS; |
71 | unsigned int top = 0; |
78 | unsigned int top = 0; |
72 | 79 | ||
73 | printf("\nCopying components\n"); |
80 | printf("\nCopying components\n"); |
Line 91... | Line 98... | ||
91 | bootinfo.ofw_root = ofw_tree_build(); |
98 | bootinfo.ofw_root = ofw_tree_build(); |
92 | printf("done.\n"); |
99 | printf("done.\n"); |
93 | 100 | ||
94 | printf("\nChecking for secondary processors..."); |
101 | printf("\nChecking for secondary processors..."); |
95 | if (!ofw_cpu()) |
102 | if (!ofw_cpu()) |
96 | printf("Error: unable to get cpu properties\n"); |
103 | printf("Error: unable to get CPU properties\n"); |
97 | printf("done.\n"); |
104 | printf("done.\n"); |
98 | 105 | ||
99 | printf("\nBooting the kernel...\n"); |
106 | printf("\nBooting the kernel...\n"); |
100 | jump_to_kernel((void *) KERNEL_VIRTUAL_ADDRESS, 1, &bootinfo, sizeof(bootinfo)); |
107 | jump_to_kernel((void *) KERNEL_VIRTUAL_ADDRESS, |
- | 108 | bootinfo.physmem_start | BSP_PROCESSOR, &bootinfo, sizeof(bootinfo)); |
|
101 | } |
109 | } |