Changes in boot/arch/ppc32/loader/asm.S [e731b0d:7b187ef] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
boot/arch/ppc32/loader/asm.S
re731b0d r7b187ef 29 29 #include "asm.h" 30 30 #include "regname.h" 31 #include "ofwarch.h"32 31 33 32 .macro SMC_COHERENCY addr … … 46 45 47 46 .macro TLB_FLUSH reg 48 li \reg, 0 49 sync 50 51 .rept 64 52 tlbie \reg 53 addi \reg, \reg, 0x1000 54 .endr 55 56 eieio 57 tlbsync 58 sync 47 tlbie \reg 48 addi \reg, \reg, 0x1000 59 49 .endm 60 50 … … 64 54 .global memcpy 65 55 .global jump_to_kernel 66 .global balloc_base67 56 68 57 halt: … … 73 62 addi r6, r3, -4 74 63 addi r4, r4, -4 75 beq 64 beq 2f 76 65 77 66 andi. r0, r6, 3 … … 80 69 81 70 1: 82 lwz r7, 4(r4) 83 lwzu r8, 8(r4) 84 stw r7, 4(r6) 85 stwu r8, 8(r6) 86 bdnz 1b 87 88 andi. r5, r5, 7 71 72 lwz r7, 4(r4) 73 lwzu r8, 8(r4) 74 stw r7, 4(r6) 75 stwu r8, 8(r6) 76 bdnz 1b 77 78 andi. r5, r5, 7 89 79 90 80 2: 91 cmplwi 0, r5, 4 92 blt 3f 93 94 lwzu r0, 4(r4) 95 addi r5, r5, -4 96 stwu r0, 4(r6) 81 82 cmplwi 0, r5, 4 83 blt 3f 84 85 lwzu r0, 4(r4) 86 addi r5, r5, -4 87 stwu r0, 4(r6) 97 88 98 89 3: 99 cmpwi 0, r5, 0 100 beqlr 101 mtctr r5 102 addi r4, r4, 3 103 addi r6, r6, 3 90 91 cmpwi 0, r5, 0 92 beqlr 93 mtctr r5 94 addi r4, r4, 3 95 addi r6, r6, 3 104 96 105 97 4: 106 lbzu r0, 1(r4) 107 stbu r0, 1(r6) 108 bdnz 4b 109 blr 98 99 lbzu r0, 1(r4) 100 stbu r0, 1(r6) 101 bdnz 4b 102 blr 110 103 111 104 5: 112 subfic r0, r0, 4 113 mtctr r0 105 106 subfic r0, r0, 4 107 mtctr r0 114 108 115 109 6: 116 lbz r7, 4(r4) 117 addi r4, r4, 1 118 stb r7, 4(r6) 119 addi r6, r6, 1 120 bdnz 6b 121 subf r5, r0, r5 122 rlwinm. r7, r5, 32-3, 3, 31 123 beq 2b 124 mtctr r7 125 b 1b 110 111 lbz r7, 4(r4) 112 addi r4, r4, 1 113 stb r7, 4(r6) 114 addi r6, r6, 1 115 bdnz 6b 116 subf r5, r0, r5 117 rlwinm. r7, r5, 32-3, 3, 31 118 beq 2b 119 mtctr r7 120 b 1b 121 126 122 127 123 jump_to_kernel: … … 132 128 # r6 = bytes to copy 133 129 # r7 = real_mode (pa) 130 # r8 = framebuffer (pa) 131 # r9 = scanline 134 132 135 133 # disable interrupts … … 155 153 rfi 156 154 157 .align PAGE_WIDTH158 balloc_base:159 .fill BALLOC_MAX_SIZE160 161 155 .section REALMODE, "ax" 162 163 156 .align PAGE_WIDTH 164 157 .global real_mode 158 165 159 real_mode: 166 160 167 161 # copy kernel to proper location 168 162 # 169 # r3 = bootinfo (pa)170 # r4 = bootinfo_size171 163 # r5 = trans (pa) 172 164 # r6 = bytes to copy 165 # r8 = framebuffer (pa) 166 # r9 = scanline 173 167 174 168 li r31, PAGE_SIZE >> 2 … … 349 343 # flush TLB 350 344 351 TLB_FLUSH r31 345 li r31, 0 346 sync 347 348 TLB_FLUSH r31 349 TLB_FLUSH r31 350 TLB_FLUSH r31 351 TLB_FLUSH r31 352 TLB_FLUSH r31 353 TLB_FLUSH r31 354 TLB_FLUSH r31 355 TLB_FLUSH r31 356 357 TLB_FLUSH r31 358 TLB_FLUSH r31 359 TLB_FLUSH r31 360 TLB_FLUSH r31 361 TLB_FLUSH r31 362 TLB_FLUSH r31 363 TLB_FLUSH r31 364 TLB_FLUSH r31 365 366 TLB_FLUSH r31 367 TLB_FLUSH r31 368 TLB_FLUSH r31 369 TLB_FLUSH r31 370 TLB_FLUSH r31 371 TLB_FLUSH r31 372 TLB_FLUSH r31 373 TLB_FLUSH r31 374 375 TLB_FLUSH r31 376 TLB_FLUSH r31 377 TLB_FLUSH r31 378 TLB_FLUSH r31 379 TLB_FLUSH r31 380 TLB_FLUSH r31 381 TLB_FLUSH r31 382 TLB_FLUSH r31 383 384 TLB_FLUSH r31 385 TLB_FLUSH r31 386 TLB_FLUSH r31 387 TLB_FLUSH r31 388 TLB_FLUSH r31 389 TLB_FLUSH r31 390 TLB_FLUSH r31 391 TLB_FLUSH r31 392 393 TLB_FLUSH r31 394 TLB_FLUSH r31 395 TLB_FLUSH r31 396 TLB_FLUSH r31 397 TLB_FLUSH r31 398 TLB_FLUSH r31 399 TLB_FLUSH r31 400 TLB_FLUSH r31 401 402 TLB_FLUSH r31 403 TLB_FLUSH r31 404 TLB_FLUSH r31 405 TLB_FLUSH r31 406 TLB_FLUSH r31 407 TLB_FLUSH r31 408 TLB_FLUSH r31 409 TLB_FLUSH r31 410 411 TLB_FLUSH r31 412 TLB_FLUSH r31 413 TLB_FLUSH r31 414 TLB_FLUSH r31 415 TLB_FLUSH r31 416 TLB_FLUSH r31 417 TLB_FLUSH r31 418 TLB_FLUSH r31 419 420 eieio 421 tlbsync 422 sync 352 423 353 424 # start the kernel 354 425 # 355 # pc = PA2KA(BOOT_OFFSET)426 # pc = KERNEL_START_ADDR 356 427 # r3 = bootinfo (pa) 357 # sprg0 = BOOT_OFFSET428 # sprg0 = KA2PA(KERNEL_START_ADDR) 358 429 # sprg3 = physical memory size 359 430 # sp = 0 (pa) 360 431 361 lis r31, PA2KA(BOOT_OFFSET)@ha 362 addi r31, r31, PA2KA(BOOT_OFFSET)@l 432 lis r31, KERNEL_START_ADDR@ha 433 addi r31, r31, KERNEL_START_ADDR@l 434 363 435 mtspr srr0, r31 364 436 365 lis r31, BOOT_OFFSET@ha 366 addi r31, r31, BOOT_OFFSET@l 437 subis r31, r31, 0x8000 367 438 mtsprg0 r31 368 439 … … 383 454 .global trans 384 455 trans: 385 .rept TRANS_SIZE 386 .int 0 387 .endr 456 .space (TRANS_SIZE * TRANS_ITEM_SIZE)
Note:
See TracChangeset
for help on using the changeset viewer.