Rev 1007 | Rev 1132 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1007 | Rev 1057 | ||
---|---|---|---|
Line 41... | Line 41... | ||
41 | addi sp, sp, end_stack@l |
41 | addi sp, sp, end_stack@l |
42 | 42 | ||
43 | # r10 contains physical address to memmap_t |
43 | # r10 contains physical address to memmap_t |
44 | # from boot loader |
44 | # from boot loader |
45 | 45 | ||
46 | lis r4, 0x80000000@ha |
46 | lis r31, 0x80000000@ha |
47 | addi r4, r4, 0x80000000@l |
47 | addi r31, r31, 0x80000000@l |
48 | 48 | ||
49 | add r10, r10, r4 |
49 | add r3, r3, r31 |
50 | 50 | ||
51 | lis r4, memmap@ha |
51 | lis r31, memmap@ha |
52 | addi r4, r4, memmap@l # r4 = memmap |
52 | addi r31, r31, memmap@l # r31 = memmap |
53 | 53 | ||
54 | lwz r5, 0(r10) # memmap->total |
54 | lwz r30, 0(r3) # memmap->total |
55 | stw r5, 0(r4) |
55 | stw r30, 0(r31) |
56 | 56 | ||
57 | lwzu r5, 4(r10) # memmap->count |
57 | lwzu r30, 4(r3) # memmap->count |
58 | stwu r5, 4(r4) |
58 | stwu r30, 4(r31) |
59 | 59 | ||
60 | cmpwi r5, 0 |
60 | cmpwi r30, 0 |
61 | beq memmap_end |
61 | beq memmap_end |
62 | 62 | ||
63 | mtctr r5 |
63 | mtctr r30 |
64 | memmap_loop: |
64 | memmap_loop: |
65 | 65 | ||
66 | lwzu r5, 4(r10) # memmap->zones[i].start |
66 | lwzu r30, 4(r3) # memmap->zones[i].start |
67 | stwu r5, 4(r4) |
67 | stwu r30, 4(r31) |
68 | 68 | ||
69 | lwzu r5, 4(r10) # memmap->zones[i].size |
69 | lwzu r30, 4(r3) # memmap->zones[i].size |
70 | stwu r5, 4(r4) |
70 | stwu r30, 4(r31) |
71 | 71 | ||
72 | bdnz memmap_loop |
72 | bdnz memmap_loop |
73 | memmap_end: |
73 | memmap_end: |
74 | 74 | ||
75 | b main_bsp |
75 | b main_bsp |