Rev 1790 | Rev 1822 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1790 | Rev 1792 | ||
---|---|---|---|
Line 38... | Line 38... | ||
38 | /* |
38 | /* |
39 | * Here is where the kernel is passed control |
39 | * Here is where the kernel is passed control |
40 | * from the boot loader. |
40 | * from the boot loader. |
41 | * |
41 | * |
42 | * The registers are expected to be in this state: |
42 | * The registers are expected to be in this state: |
43 | * %o0 bootinfo structure address |
43 | * - %o0 bootinfo structure address |
44 | * %o1 bootinfo structure size |
44 | * - %o1 bootinfo structure size |
- | 45 | * |
|
- | 46 | * Moreover, we depend on boot having established the |
|
- | 47 | * following environment: |
|
- | 48 | * - TLBs are on |
|
- | 49 | * - identity mapping for the kernel image |
|
- | 50 | * - identity mapping for memory stack |
|
45 | */ |
51 | */ |
46 | 52 | ||
47 | .global kernel_image_start |
53 | .global kernel_image_start |
48 | kernel_image_start: |
54 | kernel_image_start: |
49 | flushw ! flush all but the active register window |
55 | flushw ! flush all but the active register window |
Line 63... | Line 69... | ||
63 | mov %o0, %o1 |
69 | mov %o0, %o1 |
64 | set bootinfo, %o0 |
70 | set bootinfo, %o0 |
65 | call memcpy |
71 | call memcpy |
66 | nop |
72 | nop |
67 | 73 | ||
- | 74 | /* |
|
- | 75 | * Take over control of identity mapping. |
|
- | 76 | * Take over control of trap table. |
|
- | 77 | * |
|
- | 78 | * After this call, the kernel is entirely self-sufficient |
|
- | 79 | * and independent on OpenFirmware. |
|
- | 80 | */ |
|
- | 81 | set kernel_image_start, %o0 |
|
- | 82 | call take_over_tlb_and_tt |
|
- | 83 | nop |
|
- | 84 | ||
68 | wrpr %r0, 0, %pil |
85 | wrpr %r0, 0, %pil |
69 | 86 | ||
70 | call main_bsp |
87 | call main_bsp |
71 | nop |
88 | nop |
72 | 89 |