Rev 3399 | Rev 3678 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3399 | Rev 3408 | ||
---|---|---|---|
Line 34... | Line 34... | ||
34 | #include <balloc.h> |
34 | #include <balloc.h> |
35 | #include <ofw.h> |
35 | #include <ofw.h> |
36 | #include <ofw_tree.h> |
36 | #include <ofw_tree.h> |
37 | #include "ofwarch.h" |
37 | #include "ofwarch.h" |
38 | #include <align.h> |
38 | #include <align.h> |
- | 39 | #include <string.h> |
|
39 | 40 | ||
40 | bootinfo_t bootinfo; |
41 | bootinfo_t bootinfo; |
41 | component_t components[COMPONENTS]; |
42 | component_t components[COMPONENTS]; |
42 | 43 | ||
43 | char *release = RELEASE; |
44 | char *release = RELEASE; |
Line 157... | Line 158... | ||
157 | * Claim and map the whole ramdisk as it may exceed the area |
158 | * Claim and map the whole ramdisk as it may exceed the area |
158 | * given to us by SILO. |
159 | * given to us by SILO. |
159 | */ |
160 | */ |
160 | (void) ofw_claim_phys(base + top, silo_ramdisk_size); |
161 | (void) ofw_claim_phys(base + top, silo_ramdisk_size); |
161 | (void) ofw_map(base + top, base + top, silo_ramdisk_size, -1); |
162 | (void) ofw_map(base + top, base + top, silo_ramdisk_size, -1); |
162 | /* |
- | |
163 | * FIXME If the source and destination overlap, it may be |
- | |
164 | * desirable to copy in reverse order, depending on how the two |
- | |
165 | * regions overlap. |
- | |
166 | */ |
- | |
167 | memcpy(base + top, (void *)((uintptr_t)silo_ramdisk_image), |
163 | memmove(base + top, (void *)((uintptr_t)silo_ramdisk_image), |
168 | silo_ramdisk_size); |
164 | silo_ramdisk_size); |
169 | printf("done.\n"); |
165 | printf("done.\n"); |
170 | top += silo_ramdisk_size; |
166 | top += silo_ramdisk_size; |
171 | } |
167 | } |
172 | skip_ramdisk: |
168 | skip_ramdisk: |