1/* $FreeBSD: head/sys/powerpc/aim/trap_subr64.S 218824 2011-02-18 21:44:53Z nwhitehorn $ */ |
2/* $NetBSD: trap_subr.S,v 1.20 2002/04/22 23:20:08 kleink Exp $ */ 3 4/*- 5 * Copyright (C) 1995, 1996 Wolfgang Solfrank. 6 * Copyright (C) 1995, 1996 TooLs GmbH. 7 * All rights reserved. 8 * 9 * Redistribution and use in source and binary forms, with or without --- 280 unchanged lines hidden (view full) --- 290 291cpu_reset: 292 lis %r1,(tmpstk+TMPSTKSZ-48)@ha /* get new SP */ 293 addi %r1,%r1,(tmpstk+TMPSTKSZ-48)@l 294 295 lis %r3,tocbase@ha 296 ld %r2,tocbase@l(%r3) 297 lis %r3,1@l |
298 bl CNAME(cpudep_ap_early_bootstrap) /* Set PCPU */ |
299 nop |
300 bl CNAME(pmap_cpu_bootstrap) /* Turn on virtual memory */ |
301 nop |
302 bl CNAME(cpudep_ap_bootstrap) /* Set up PCPU and stack */ |
303 nop 304 mr %r1,%r3 /* Use new stack */ |
305 bl CNAME(machdep_ap_bootstrap) /* And away! */ |
306 nop 307 308 /* Should not be reached */ 3099: 310 b 9b 311#endif 312 313/* --- 191 unchanged lines hidden (view full) --- 505 */ 506k_trap: 507 FRAME_SETUP(PC_TEMPSAVE) 508/* Call C interrupt dispatcher: */ 509trapagain: 510 lis %r3,tocbase@ha 511 ld %r2,tocbase@l(%r3) 512 addi %r3,%r1,48 |
513 bl CNAME(powerpc_interrupt) |
514 nop 515 516 .globl CNAME(trapexit) /* backtrace code sentinel */ 517CNAME(trapexit): 518/* Disable interrupts: */ 519 mfmsr %r3 520 andi. %r3,%r3,~PSL_EE@l 521 mtmsr %r3 --- 11 unchanged lines hidden (view full) --- 533 beq 1f 534 mfmsr %r3 /* re-enable interrupts */ 535 ori %r3,%r3,PSL_EE@l 536 mtmsr %r3 537 isync 538 lis %r3,tocbase@ha 539 ld %r2,tocbase@l(%r3) 540 addi %r3,%r1,48 |
541 bl CNAME(ast) |
542 nop 543 .globl CNAME(asttrapexit) /* backtrace code sentinel #2 */ 544CNAME(asttrapexit): 545 b trapexit /* test ast ret value ? */ 5461: 547 FRAME_LEAVE(PC_TEMPSAVE) 548 rfid 549 --- 32 unchanged lines hidden (view full) --- 582 lis %r1,(tmpstk+TMPSTKSZ-48)@ha /* get new SP */ 583 addi %r1,%r1,(tmpstk+TMPSTKSZ-48)@l 584 585 FRAME_SETUP(PC_DBSAVE) 586/* Call C trap code: */ 587 lis %r3,tocbase@ha 588 ld %r2,tocbase@l(%r3) 589 addi %r3,%r1,48 |
590 bl CNAME(db_trap_glue) |
591 nop 592 or. %r3,%r3,%r3 593 bne dbleave 594/* This wasn't for KDB, so switch to real trap: */ 595 ld %r3,FRAME_EXC+48(%r1) /* save exception */ 596 GET_CPUINFO(%r4) 597 std %r3,(PC_DBSAVE+CPUSAVE_R31)(%r4) 598 FRAME_LEAVE(PC_DBSAVE) --- 50 unchanged lines hidden --- |