Changeset 6bbb1610 in mainline for arch/ppc64/loader/asm.S
- Timestamp:
- 2006-05-21T20:13:14Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 433a2aa
- Parents:
- 0ab829c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
arch/ppc64/loader/asm.S
r0ab829c r6bbb1610 107 107 # r4 = bootinfo_size 108 108 # r5 = trans (pa) 109 # r6 = kernel size 110 # r7 = framebuffer (pa) 111 # r8 = real_mode (pa) 112 113 mtspr srr0, r8 109 # r6 = bytes to copy 110 # r7 = real_mode (pa) 111 112 # disable interrupts 113 114 mfmsr r31 115 rlwinm r31, r31, 0, 17, 15 116 mtmsr r31 117 118 # set real_mode meeting point address 119 120 mtspr srr0, r7 114 121 115 122 # jumps to real_mode … … 125 132 rfid 126 133 127 .section REALMODE 134 .section REALMODE, "ax" 128 135 .align PAGE_WIDTH 129 136 .global real_mode … … 134 141 # 135 142 # r5 = trans (pa) 136 # r6 = kernel size 137 # r7 = framebuffer (pa) 143 # r6 = bytes to copy 138 144 139 145 li r31, PAGE_SIZE >> 2 … … 169 175 copy_end: 170 176 171 # in validatesegment registers177 # initially fill segment registers 172 178 173 179 li r31, 16 174 180 mtctr r31 175 181 li r31, 0 176 li r30, 0 182 li r30, 0x2000 177 183 178 184 seg_fill: 179 185 180 186 mtsrin r30, r31 187 addi r30, r30, 0x111 181 188 addis r31, r31, 0x1000 # move to next SR 182 189 183 190 bdnz seg_fill 184 191 185 # invalidate block address translation registers186 187 mtspr ibat0u, r30188 mtspr ibat0l, r30189 190 mtspr ibat1u, r30191 mtspr ibat1l, r30192 193 mtspr ibat2u, r30194 mtspr ibat2l, r30195 196 mtspr ibat3u, r30197 mtspr ibat3l, r30198 199 mtspr dbat0u, r30200 mtspr dbat0l, r30201 202 mtspr dbat1u, r30203 mtspr dbat1l, r30204 205 mtspr dbat2u, r30206 mtspr dbat2l, r30207 208 mtspr dbat3u, r30209 mtspr dbat3l, r30210 211 # create identity mapping212 213 # FIXME: map exactly the size of RAM214 215 lis r31, 0x8000216 ori r31, r31, 0x0ffe217 218 lis r30, 0x0000219 ori r30, r30, 0x0002220 221 mtspr ibat0u, r31222 mtspr ibat0l, r30223 224 mtspr dbat0u, r31225 mtspr dbat0l, r30226 227 # FIXME: temporal framebuffer mapping228 229 lis r31, 0xf000230 ori r31, r31, 0x0ffe231 232 mr r30, r7233 ori r30, r30, 0x0002234 235 mtspr dbat1u, r31236 mtspr dbat1l, r30237 238 192 tlbia 193 tlbsync 239 194 240 195 # start the kernel
Note:
See TracChangeset
for help on using the changeset viewer.