exceptions-64e.S (277a163c83d7ba93fba1e8980d29a9f8bfcfba6c) | exceptions-64e.S (b1576fec7f4dd4657694fefc97fda4cf28ec68e9) |
---|---|
1/* 2 * Boot code and exception vectors for Book3E processors 3 * 4 * Copyright (C) 2007 Ben. Herrenschmidt (benh@kernel.crashing.org), IBM Corp. 5 * 6 * This program is free software; you can redistribute it and/or 7 * modify it under the terms of the GNU General Public License 8 * as published by the Free Software Foundation; either version --- 485 unchanged lines hidden (view full) --- 494 START_EXCEPTION(label); \ 495 NORMAL_EXCEPTION_PROLOG(trapnum, intnum, PROLOG_ADDITION_MASKABLE)\ 496 EXCEPTION_COMMON(trapnum) \ 497 INTS_DISABLE; \ 498 ack(r8); \ 499 CHECK_NAPPING(); \ 500 addi r3,r1,STACK_FRAME_OVERHEAD; \ 501 bl hdlr; \ | 1/* 2 * Boot code and exception vectors for Book3E processors 3 * 4 * Copyright (C) 2007 Ben. Herrenschmidt (benh@kernel.crashing.org), IBM Corp. 5 * 6 * This program is free software; you can redistribute it and/or 7 * modify it under the terms of the GNU General Public License 8 * as published by the Free Software Foundation; either version --- 485 unchanged lines hidden (view full) --- 494 START_EXCEPTION(label); \ 495 NORMAL_EXCEPTION_PROLOG(trapnum, intnum, PROLOG_ADDITION_MASKABLE)\ 496 EXCEPTION_COMMON(trapnum) \ 497 INTS_DISABLE; \ 498 ack(r8); \ 499 CHECK_NAPPING(); \ 500 addi r3,r1,STACK_FRAME_OVERHEAD; \ 501 bl hdlr; \ |
502 b .ret_from_except_lite; | 502 b ret_from_except_lite; |
503 504/* This value is used to mark exception frames on the stack. */ 505 .section ".toc","aw" 506exception_marker: 507 .tc ID_EXC_MARKER[TC],STACK_FRAME_REGS_MARKER 508 509 510/* --- 34 unchanged lines hidden (view full) --- 545 .globl interrupt_end_book3e 546interrupt_end_book3e: 547 548/* Critical Input Interrupt */ 549 START_EXCEPTION(critical_input); 550 CRIT_EXCEPTION_PROLOG(0x100, BOOKE_INTERRUPT_CRITICAL, 551 PROLOG_ADDITION_NONE) 552 EXCEPTION_COMMON_CRIT(0x100) | 503 504/* This value is used to mark exception frames on the stack. */ 505 .section ".toc","aw" 506exception_marker: 507 .tc ID_EXC_MARKER[TC],STACK_FRAME_REGS_MARKER 508 509 510/* --- 34 unchanged lines hidden (view full) --- 545 .globl interrupt_end_book3e 546interrupt_end_book3e: 547 548/* Critical Input Interrupt */ 549 START_EXCEPTION(critical_input); 550 CRIT_EXCEPTION_PROLOG(0x100, BOOKE_INTERRUPT_CRITICAL, 551 PROLOG_ADDITION_NONE) 552 EXCEPTION_COMMON_CRIT(0x100) |
553 bl .save_nvgprs | 553 bl save_nvgprs |
554 bl special_reg_save 555 CHECK_NAPPING(); 556 addi r3,r1,STACK_FRAME_OVERHEAD | 554 bl special_reg_save 555 CHECK_NAPPING(); 556 addi r3,r1,STACK_FRAME_OVERHEAD |
557 bl .unknown_exception | 557 bl unknown_exception |
558 b ret_from_crit_except 559 560/* Machine Check Interrupt */ 561 START_EXCEPTION(machine_check); 562 MC_EXCEPTION_PROLOG(0x000, BOOKE_INTERRUPT_MACHINE_CHECK, 563 PROLOG_ADDITION_NONE) 564 EXCEPTION_COMMON_MC(0x000) | 558 b ret_from_crit_except 559 560/* Machine Check Interrupt */ 561 START_EXCEPTION(machine_check); 562 MC_EXCEPTION_PROLOG(0x000, BOOKE_INTERRUPT_MACHINE_CHECK, 563 PROLOG_ADDITION_NONE) 564 EXCEPTION_COMMON_MC(0x000) |
565 bl .save_nvgprs | 565 bl save_nvgprs |
566 bl special_reg_save 567 CHECK_NAPPING(); 568 addi r3,r1,STACK_FRAME_OVERHEAD | 566 bl special_reg_save 567 CHECK_NAPPING(); 568 addi r3,r1,STACK_FRAME_OVERHEAD |
569 bl .machine_check_exception | 569 bl machine_check_exception |
570 b ret_from_mc_except 571 572/* Data Storage Interrupt */ 573 START_EXCEPTION(data_storage) 574 NORMAL_EXCEPTION_PROLOG(0x300, BOOKE_INTERRUPT_DATA_STORAGE, 575 PROLOG_ADDITION_2REGS) 576 mfspr r14,SPRN_DEAR 577 mfspr r15,SPRN_ESR --- 29 unchanged lines hidden (view full) --- 607 NORMAL_EXCEPTION_PROLOG(0x700, BOOKE_INTERRUPT_PROGRAM, 608 PROLOG_ADDITION_1REG) 609 mfspr r14,SPRN_ESR 610 EXCEPTION_COMMON(0x700) 611 INTS_DISABLE 612 std r14,_DSISR(r1) 613 addi r3,r1,STACK_FRAME_OVERHEAD 614 ld r14,PACA_EXGEN+EX_R14(r13) | 570 b ret_from_mc_except 571 572/* Data Storage Interrupt */ 573 START_EXCEPTION(data_storage) 574 NORMAL_EXCEPTION_PROLOG(0x300, BOOKE_INTERRUPT_DATA_STORAGE, 575 PROLOG_ADDITION_2REGS) 576 mfspr r14,SPRN_DEAR 577 mfspr r15,SPRN_ESR --- 29 unchanged lines hidden (view full) --- 607 NORMAL_EXCEPTION_PROLOG(0x700, BOOKE_INTERRUPT_PROGRAM, 608 PROLOG_ADDITION_1REG) 609 mfspr r14,SPRN_ESR 610 EXCEPTION_COMMON(0x700) 611 INTS_DISABLE 612 std r14,_DSISR(r1) 613 addi r3,r1,STACK_FRAME_OVERHEAD 614 ld r14,PACA_EXGEN+EX_R14(r13) |
615 bl .save_nvgprs 616 bl .program_check_exception 617 b .ret_from_except | 615 bl save_nvgprs 616 bl program_check_exception 617 b ret_from_except |
618 619/* Floating Point Unavailable Interrupt */ 620 START_EXCEPTION(fp_unavailable); 621 NORMAL_EXCEPTION_PROLOG(0x800, BOOKE_INTERRUPT_FP_UNAVAIL, 622 PROLOG_ADDITION_NONE) 623 /* we can probably do a shorter exception entry for that one... */ 624 EXCEPTION_COMMON(0x800) 625 ld r12,_MSR(r1) 626 andi. r0,r12,MSR_PR; 627 beq- 1f | 618 619/* Floating Point Unavailable Interrupt */ 620 START_EXCEPTION(fp_unavailable); 621 NORMAL_EXCEPTION_PROLOG(0x800, BOOKE_INTERRUPT_FP_UNAVAIL, 622 PROLOG_ADDITION_NONE) 623 /* we can probably do a shorter exception entry for that one... */ 624 EXCEPTION_COMMON(0x800) 625 ld r12,_MSR(r1) 626 andi. r0,r12,MSR_PR; 627 beq- 1f |
628 bl .load_up_fpu | 628 bl load_up_fpu |
629 b fast_exception_return 6301: INTS_DISABLE | 629 b fast_exception_return 6301: INTS_DISABLE |
631 bl .save_nvgprs | 631 bl save_nvgprs |
632 addi r3,r1,STACK_FRAME_OVERHEAD | 632 addi r3,r1,STACK_FRAME_OVERHEAD |
633 bl .kernel_fp_unavailable_exception 634 b .ret_from_except | 633 bl kernel_fp_unavailable_exception 634 b ret_from_except |
635 636/* Altivec Unavailable Interrupt */ 637 START_EXCEPTION(altivec_unavailable); 638 NORMAL_EXCEPTION_PROLOG(0x200, BOOKE_INTERRUPT_SPE_ALTIVEC_UNAVAIL, 639 PROLOG_ADDITION_NONE) 640 /* we can probably do a shorter exception entry for that one... */ 641 EXCEPTION_COMMON(0x200) 642#ifdef CONFIG_ALTIVEC 643BEGIN_FTR_SECTION 644 ld r12,_MSR(r1) 645 andi. r0,r12,MSR_PR; 646 beq- 1f | 635 636/* Altivec Unavailable Interrupt */ 637 START_EXCEPTION(altivec_unavailable); 638 NORMAL_EXCEPTION_PROLOG(0x200, BOOKE_INTERRUPT_SPE_ALTIVEC_UNAVAIL, 639 PROLOG_ADDITION_NONE) 640 /* we can probably do a shorter exception entry for that one... */ 641 EXCEPTION_COMMON(0x200) 642#ifdef CONFIG_ALTIVEC 643BEGIN_FTR_SECTION 644 ld r12,_MSR(r1) 645 andi. r0,r12,MSR_PR; 646 beq- 1f |
647 bl .load_up_altivec | 647 bl load_up_altivec |
648 b fast_exception_return 6491: 650END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC) 651#endif 652 INTS_DISABLE | 648 b fast_exception_return 6491: 650END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC) 651#endif 652 INTS_DISABLE |
653 bl .save_nvgprs | 653 bl save_nvgprs |
654 addi r3,r1,STACK_FRAME_OVERHEAD | 654 addi r3,r1,STACK_FRAME_OVERHEAD |
655 bl .altivec_unavailable_exception 656 b .ret_from_except | 655 bl altivec_unavailable_exception 656 b ret_from_except |
657 658/* AltiVec Assist */ 659 START_EXCEPTION(altivec_assist); 660 NORMAL_EXCEPTION_PROLOG(0x220, 661 BOOKE_INTERRUPT_SPE_FP_DATA_ALTIVEC_ASSIST, 662 PROLOG_ADDITION_NONE) 663 EXCEPTION_COMMON(0x220) 664 INTS_DISABLE | 657 658/* AltiVec Assist */ 659 START_EXCEPTION(altivec_assist); 660 NORMAL_EXCEPTION_PROLOG(0x220, 661 BOOKE_INTERRUPT_SPE_FP_DATA_ALTIVEC_ASSIST, 662 PROLOG_ADDITION_NONE) 663 EXCEPTION_COMMON(0x220) 664 INTS_DISABLE |
665 bl .save_nvgprs | 665 bl save_nvgprs |
666 addi r3,r1,STACK_FRAME_OVERHEAD 667#ifdef CONFIG_ALTIVEC 668BEGIN_FTR_SECTION | 666 addi r3,r1,STACK_FRAME_OVERHEAD 667#ifdef CONFIG_ALTIVEC 668BEGIN_FTR_SECTION |
669 bl .altivec_assist_exception | 669 bl altivec_assist_exception |
670END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC) 671#else | 670END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC) 671#else |
672 bl .unknown_exception | 672 bl unknown_exception |
673#endif | 673#endif |
674 b .ret_from_except | 674 b ret_from_except |
675 676 677/* Decrementer Interrupt */ 678 MASKABLE_EXCEPTION(0x900, BOOKE_INTERRUPT_DECREMENTER, 679 decrementer, .timer_interrupt, ACK_DEC) 680 681/* Fixed Interval Timer Interrupt */ 682 MASKABLE_EXCEPTION(0x980, BOOKE_INTERRUPT_FIT, 683 fixed_interval, .unknown_exception, ACK_FIT) 684 685/* Watchdog Timer Interrupt */ 686 START_EXCEPTION(watchdog); 687 CRIT_EXCEPTION_PROLOG(0x9f0, BOOKE_INTERRUPT_WATCHDOG, 688 PROLOG_ADDITION_NONE) 689 EXCEPTION_COMMON_CRIT(0x9f0) | 675 676 677/* Decrementer Interrupt */ 678 MASKABLE_EXCEPTION(0x900, BOOKE_INTERRUPT_DECREMENTER, 679 decrementer, .timer_interrupt, ACK_DEC) 680 681/* Fixed Interval Timer Interrupt */ 682 MASKABLE_EXCEPTION(0x980, BOOKE_INTERRUPT_FIT, 683 fixed_interval, .unknown_exception, ACK_FIT) 684 685/* Watchdog Timer Interrupt */ 686 START_EXCEPTION(watchdog); 687 CRIT_EXCEPTION_PROLOG(0x9f0, BOOKE_INTERRUPT_WATCHDOG, 688 PROLOG_ADDITION_NONE) 689 EXCEPTION_COMMON_CRIT(0x9f0) |
690 bl .save_nvgprs | 690 bl save_nvgprs |
691 bl special_reg_save 692 CHECK_NAPPING(); 693 addi r3,r1,STACK_FRAME_OVERHEAD 694#ifdef CONFIG_BOOKE_WDT | 691 bl special_reg_save 692 CHECK_NAPPING(); 693 addi r3,r1,STACK_FRAME_OVERHEAD 694#ifdef CONFIG_BOOKE_WDT |
695 bl .WatchdogException | 695 bl WatchdogException |
696#else | 696#else |
697 bl .unknown_exception | 697 bl unknown_exception |
698#endif 699 b ret_from_crit_except 700 701/* System Call Interrupt */ 702 START_EXCEPTION(system_call) 703 mr r9,r13 /* keep a copy of userland r13 */ 704 mfspr r11,SPRN_SRR0 /* get return address */ 705 mfspr r12,SPRN_SRR1 /* get previous MSR */ 706 mfspr r13,SPRN_SPRG_PACA /* get our PACA */ 707 b system_call_common 708 709/* Auxiliary Processor Unavailable Interrupt */ 710 START_EXCEPTION(ap_unavailable); 711 NORMAL_EXCEPTION_PROLOG(0xf20, BOOKE_INTERRUPT_AP_UNAVAIL, 712 PROLOG_ADDITION_NONE) 713 EXCEPTION_COMMON(0xf20) 714 INTS_DISABLE | 698#endif 699 b ret_from_crit_except 700 701/* System Call Interrupt */ 702 START_EXCEPTION(system_call) 703 mr r9,r13 /* keep a copy of userland r13 */ 704 mfspr r11,SPRN_SRR0 /* get return address */ 705 mfspr r12,SPRN_SRR1 /* get previous MSR */ 706 mfspr r13,SPRN_SPRG_PACA /* get our PACA */ 707 b system_call_common 708 709/* Auxiliary Processor Unavailable Interrupt */ 710 START_EXCEPTION(ap_unavailable); 711 NORMAL_EXCEPTION_PROLOG(0xf20, BOOKE_INTERRUPT_AP_UNAVAIL, 712 PROLOG_ADDITION_NONE) 713 EXCEPTION_COMMON(0xf20) 714 INTS_DISABLE |
715 bl .save_nvgprs | 715 bl save_nvgprs |
716 addi r3,r1,STACK_FRAME_OVERHEAD | 716 addi r3,r1,STACK_FRAME_OVERHEAD |
717 bl .unknown_exception 718 b .ret_from_except | 717 bl unknown_exception 718 b ret_from_except |
719 720/* Debug exception as a critical interrupt*/ 721 START_EXCEPTION(debug_crit); 722 CRIT_EXCEPTION_PROLOG(0xd00, BOOKE_INTERRUPT_DEBUG, 723 PROLOG_ADDITION_2REGS) 724 725 /* 726 * If there is a single step or branch-taken exception in an --- 42 unchanged lines hidden (view full) --- 769 */ 770 mfspr r14,SPRN_DBSR 771 EXCEPTION_COMMON_CRIT(0xd00) 772 std r14,_DSISR(r1) 773 addi r3,r1,STACK_FRAME_OVERHEAD 774 mr r4,r14 775 ld r14,PACA_EXCRIT+EX_R14(r13) 776 ld r15,PACA_EXCRIT+EX_R15(r13) | 719 720/* Debug exception as a critical interrupt*/ 721 START_EXCEPTION(debug_crit); 722 CRIT_EXCEPTION_PROLOG(0xd00, BOOKE_INTERRUPT_DEBUG, 723 PROLOG_ADDITION_2REGS) 724 725 /* 726 * If there is a single step or branch-taken exception in an --- 42 unchanged lines hidden (view full) --- 769 */ 770 mfspr r14,SPRN_DBSR 771 EXCEPTION_COMMON_CRIT(0xd00) 772 std r14,_DSISR(r1) 773 addi r3,r1,STACK_FRAME_OVERHEAD 774 mr r4,r14 775 ld r14,PACA_EXCRIT+EX_R14(r13) 776 ld r15,PACA_EXCRIT+EX_R15(r13) |
777 bl .save_nvgprs 778 bl .DebugException 779 b .ret_from_except | 777 bl save_nvgprs 778 bl DebugException 779 b ret_from_except |
780 781kernel_dbg_exc: 782 b . /* NYI */ 783 784/* Debug exception as a debug interrupt*/ 785 START_EXCEPTION(debug_debug); 786 DBG_EXCEPTION_PROLOG(0xd00, BOOKE_INTERRUPT_DEBUG, 787 PROLOG_ADDITION_2REGS) --- 46 unchanged lines hidden (view full) --- 834 mfspr r14,SPRN_DBSR 835 EXCEPTION_COMMON_DBG(0xd08) 836 INTS_DISABLE 837 std r14,_DSISR(r1) 838 addi r3,r1,STACK_FRAME_OVERHEAD 839 mr r4,r14 840 ld r14,PACA_EXDBG+EX_R14(r13) 841 ld r15,PACA_EXDBG+EX_R15(r13) | 780 781kernel_dbg_exc: 782 b . /* NYI */ 783 784/* Debug exception as a debug interrupt*/ 785 START_EXCEPTION(debug_debug); 786 DBG_EXCEPTION_PROLOG(0xd00, BOOKE_INTERRUPT_DEBUG, 787 PROLOG_ADDITION_2REGS) --- 46 unchanged lines hidden (view full) --- 834 mfspr r14,SPRN_DBSR 835 EXCEPTION_COMMON_DBG(0xd08) 836 INTS_DISABLE 837 std r14,_DSISR(r1) 838 addi r3,r1,STACK_FRAME_OVERHEAD 839 mr r4,r14 840 ld r14,PACA_EXDBG+EX_R14(r13) 841 ld r15,PACA_EXDBG+EX_R15(r13) |
842 bl .save_nvgprs 843 bl .DebugException 844 b .ret_from_except | 842 bl save_nvgprs 843 bl DebugException 844 b ret_from_except |
845 846 START_EXCEPTION(perfmon); 847 NORMAL_EXCEPTION_PROLOG(0x260, BOOKE_INTERRUPT_PERFORMANCE_MONITOR, 848 PROLOG_ADDITION_NONE) 849 EXCEPTION_COMMON(0x260) 850 INTS_DISABLE 851 CHECK_NAPPING() 852 addi r3,r1,STACK_FRAME_OVERHEAD | 845 846 START_EXCEPTION(perfmon); 847 NORMAL_EXCEPTION_PROLOG(0x260, BOOKE_INTERRUPT_PERFORMANCE_MONITOR, 848 PROLOG_ADDITION_NONE) 849 EXCEPTION_COMMON(0x260) 850 INTS_DISABLE 851 CHECK_NAPPING() 852 addi r3,r1,STACK_FRAME_OVERHEAD |
853 bl .performance_monitor_exception 854 b .ret_from_except_lite | 853 bl performance_monitor_exception 854 b ret_from_except_lite |
855 856/* Doorbell interrupt */ 857 MASKABLE_EXCEPTION(0x280, BOOKE_INTERRUPT_DOORBELL, 858 doorbell, .doorbell_exception, ACK_NONE) 859 860/* Doorbell critical Interrupt */ 861 START_EXCEPTION(doorbell_crit); 862 CRIT_EXCEPTION_PROLOG(0x2a0, BOOKE_INTERRUPT_DOORBELL_CRITICAL, 863 PROLOG_ADDITION_NONE) 864 EXCEPTION_COMMON_CRIT(0x2a0) | 855 856/* Doorbell interrupt */ 857 MASKABLE_EXCEPTION(0x280, BOOKE_INTERRUPT_DOORBELL, 858 doorbell, .doorbell_exception, ACK_NONE) 859 860/* Doorbell critical Interrupt */ 861 START_EXCEPTION(doorbell_crit); 862 CRIT_EXCEPTION_PROLOG(0x2a0, BOOKE_INTERRUPT_DOORBELL_CRITICAL, 863 PROLOG_ADDITION_NONE) 864 EXCEPTION_COMMON_CRIT(0x2a0) |
865 bl .save_nvgprs | 865 bl save_nvgprs |
866 bl special_reg_save 867 CHECK_NAPPING(); 868 addi r3,r1,STACK_FRAME_OVERHEAD | 866 bl special_reg_save 867 CHECK_NAPPING(); 868 addi r3,r1,STACK_FRAME_OVERHEAD |
869 bl .unknown_exception | 869 bl unknown_exception |
870 b ret_from_crit_except 871 872/* 873 * Guest doorbell interrupt 874 * This general exception use GSRRx save/restore registers 875 */ 876 START_EXCEPTION(guest_doorbell); 877 GDBELL_EXCEPTION_PROLOG(0x2c0, BOOKE_INTERRUPT_GUEST_DBELL, 878 PROLOG_ADDITION_NONE) 879 EXCEPTION_COMMON(0x2c0) 880 addi r3,r1,STACK_FRAME_OVERHEAD | 870 b ret_from_crit_except 871 872/* 873 * Guest doorbell interrupt 874 * This general exception use GSRRx save/restore registers 875 */ 876 START_EXCEPTION(guest_doorbell); 877 GDBELL_EXCEPTION_PROLOG(0x2c0, BOOKE_INTERRUPT_GUEST_DBELL, 878 PROLOG_ADDITION_NONE) 879 EXCEPTION_COMMON(0x2c0) 880 addi r3,r1,STACK_FRAME_OVERHEAD |
881 bl .save_nvgprs | 881 bl save_nvgprs |
882 INTS_RESTORE_HARD | 882 INTS_RESTORE_HARD |
883 bl .unknown_exception 884 b .ret_from_except | 883 bl unknown_exception 884 b ret_from_except |
885 886/* Guest Doorbell critical Interrupt */ 887 START_EXCEPTION(guest_doorbell_crit); 888 CRIT_EXCEPTION_PROLOG(0x2e0, BOOKE_INTERRUPT_GUEST_DBELL_CRIT, 889 PROLOG_ADDITION_NONE) 890 EXCEPTION_COMMON_CRIT(0x2e0) | 885 886/* Guest Doorbell critical Interrupt */ 887 START_EXCEPTION(guest_doorbell_crit); 888 CRIT_EXCEPTION_PROLOG(0x2e0, BOOKE_INTERRUPT_GUEST_DBELL_CRIT, 889 PROLOG_ADDITION_NONE) 890 EXCEPTION_COMMON_CRIT(0x2e0) |
891 bl .save_nvgprs | 891 bl save_nvgprs |
892 bl special_reg_save 893 CHECK_NAPPING(); 894 addi r3,r1,STACK_FRAME_OVERHEAD | 892 bl special_reg_save 893 CHECK_NAPPING(); 894 addi r3,r1,STACK_FRAME_OVERHEAD |
895 bl .unknown_exception | 895 bl unknown_exception |
896 b ret_from_crit_except 897 898/* Hypervisor call */ 899 START_EXCEPTION(hypercall); 900 NORMAL_EXCEPTION_PROLOG(0x310, BOOKE_INTERRUPT_HV_SYSCALL, 901 PROLOG_ADDITION_NONE) 902 EXCEPTION_COMMON(0x310) 903 addi r3,r1,STACK_FRAME_OVERHEAD | 896 b ret_from_crit_except 897 898/* Hypervisor call */ 899 START_EXCEPTION(hypercall); 900 NORMAL_EXCEPTION_PROLOG(0x310, BOOKE_INTERRUPT_HV_SYSCALL, 901 PROLOG_ADDITION_NONE) 902 EXCEPTION_COMMON(0x310) 903 addi r3,r1,STACK_FRAME_OVERHEAD |
904 bl .save_nvgprs | 904 bl save_nvgprs |
905 INTS_RESTORE_HARD | 905 INTS_RESTORE_HARD |
906 bl .unknown_exception 907 b .ret_from_except | 906 bl unknown_exception 907 b ret_from_except |
908 909/* Embedded Hypervisor priviledged */ 910 START_EXCEPTION(ehpriv); 911 NORMAL_EXCEPTION_PROLOG(0x320, BOOKE_INTERRUPT_HV_PRIV, 912 PROLOG_ADDITION_NONE) 913 EXCEPTION_COMMON(0x320) 914 addi r3,r1,STACK_FRAME_OVERHEAD | 908 909/* Embedded Hypervisor priviledged */ 910 START_EXCEPTION(ehpriv); 911 NORMAL_EXCEPTION_PROLOG(0x320, BOOKE_INTERRUPT_HV_PRIV, 912 PROLOG_ADDITION_NONE) 913 EXCEPTION_COMMON(0x320) 914 addi r3,r1,STACK_FRAME_OVERHEAD |
915 bl .save_nvgprs | 915 bl save_nvgprs |
916 INTS_RESTORE_HARD | 916 INTS_RESTORE_HARD |
917 bl .unknown_exception 918 b .ret_from_except | 917 bl unknown_exception 918 b ret_from_except |
919 920/* LRAT Error interrupt */ 921 START_EXCEPTION(lrat_error); 922 NORMAL_EXCEPTION_PROLOG(0x340, BOOKE_INTERRUPT_LRAT_ERROR, 923 PROLOG_ADDITION_NONE) 924 EXCEPTION_COMMON(0x340) 925 addi r3,r1,STACK_FRAME_OVERHEAD 926 bl .save_nvgprs --- 82 unchanged lines hidden (view full) --- 1009storage_fault_common: 1010 std r14,_DAR(r1) 1011 std r15,_DSISR(r1) 1012 addi r3,r1,STACK_FRAME_OVERHEAD 1013 mr r4,r14 1014 mr r5,r15 1015 ld r14,PACA_EXGEN+EX_R14(r13) 1016 ld r15,PACA_EXGEN+EX_R15(r13) | 919 920/* LRAT Error interrupt */ 921 START_EXCEPTION(lrat_error); 922 NORMAL_EXCEPTION_PROLOG(0x340, BOOKE_INTERRUPT_LRAT_ERROR, 923 PROLOG_ADDITION_NONE) 924 EXCEPTION_COMMON(0x340) 925 addi r3,r1,STACK_FRAME_OVERHEAD 926 bl .save_nvgprs --- 82 unchanged lines hidden (view full) --- 1009storage_fault_common: 1010 std r14,_DAR(r1) 1011 std r15,_DSISR(r1) 1012 addi r3,r1,STACK_FRAME_OVERHEAD 1013 mr r4,r14 1014 mr r5,r15 1015 ld r14,PACA_EXGEN+EX_R14(r13) 1016 ld r15,PACA_EXGEN+EX_R15(r13) |
1017 bl .do_page_fault | 1017 bl do_page_fault |
1018 cmpdi r3,0 1019 bne- 1f | 1018 cmpdi r3,0 1019 bne- 1f |
1020 b .ret_from_except_lite 10211: bl .save_nvgprs | 1020 b ret_from_except_lite 10211: bl save_nvgprs |
1022 mr r5,r3 1023 addi r3,r1,STACK_FRAME_OVERHEAD 1024 ld r4,_DAR(r1) | 1022 mr r5,r3 1023 addi r3,r1,STACK_FRAME_OVERHEAD 1024 ld r4,_DAR(r1) |
1025 bl .bad_page_fault 1026 b .ret_from_except | 1025 bl bad_page_fault 1026 b ret_from_except |
1027 1028/* 1029 * Alignment exception doesn't fit entirely in the 0x100 bytes so it 1030 * continues here. 1031 */ 1032alignment_more: 1033 std r14,_DAR(r1) 1034 std r15,_DSISR(r1) 1035 addi r3,r1,STACK_FRAME_OVERHEAD 1036 ld r14,PACA_EXGEN+EX_R14(r13) 1037 ld r15,PACA_EXGEN+EX_R15(r13) | 1027 1028/* 1029 * Alignment exception doesn't fit entirely in the 0x100 bytes so it 1030 * continues here. 1031 */ 1032alignment_more: 1033 std r14,_DAR(r1) 1034 std r15,_DSISR(r1) 1035 addi r3,r1,STACK_FRAME_OVERHEAD 1036 ld r14,PACA_EXGEN+EX_R14(r13) 1037 ld r15,PACA_EXGEN+EX_R15(r13) |
1038 bl .save_nvgprs | 1038 bl save_nvgprs |
1039 INTS_RESTORE_HARD | 1039 INTS_RESTORE_HARD |
1040 bl .alignment_exception 1041 b .ret_from_except | 1040 bl alignment_exception 1041 b ret_from_except |
1042 1043/* 1044 * We branch here from entry_64.S for the last stage of the exception 1045 * return code path. MSR:EE is expected to be off at that point 1046 */ 1047_GLOBAL(exception_return_book3e) 1048 b 1f 1049 --- 117 unchanged lines hidden (view full) --- 1167 lhz r12,PACA_TRAP_SAVE(r13) 1168 std r12,_TRAP(r1) 1169 addi r11,r1,INT_FRAME_SIZE 1170 std r11,0(r1) 1171 li r12,0 1172 std r12,0(r11) 1173 ld r2,PACATOC(r13) 11741: addi r3,r1,STACK_FRAME_OVERHEAD | 1042 1043/* 1044 * We branch here from entry_64.S for the last stage of the exception 1045 * return code path. MSR:EE is expected to be off at that point 1046 */ 1047_GLOBAL(exception_return_book3e) 1048 b 1f 1049 --- 117 unchanged lines hidden (view full) --- 1167 lhz r12,PACA_TRAP_SAVE(r13) 1168 std r12,_TRAP(r1) 1169 addi r11,r1,INT_FRAME_SIZE 1170 std r11,0(r1) 1171 li r12,0 1172 std r12,0(r11) 1173 ld r2,PACATOC(r13) 11741: addi r3,r1,STACK_FRAME_OVERHEAD |
1175 bl .kernel_bad_stack | 1175 bl kernel_bad_stack |
1176 b 1b 1177 1178/* 1179 * Setup the initial TLB for a core. This current implementation 1180 * assume that whatever we are running off will not conflict with 1181 * the new mapping at PAGE_OFFSET. 1182 */ 1183_GLOBAL(initial_tlb_book3e) --- 332 unchanged lines hidden (view full) --- 1516_GLOBAL(start_initialization_book3e) 1517 mflr r28 1518 1519 /* First, we need to setup some initial TLBs to map the kernel 1520 * text, data and bss at PAGE_OFFSET. We don't have a real mode 1521 * and always use AS 0, so we just set it up to match our link 1522 * address and never use 0 based addresses. 1523 */ | 1176 b 1b 1177 1178/* 1179 * Setup the initial TLB for a core. This current implementation 1180 * assume that whatever we are running off will not conflict with 1181 * the new mapping at PAGE_OFFSET. 1182 */ 1183_GLOBAL(initial_tlb_book3e) --- 332 unchanged lines hidden (view full) --- 1516_GLOBAL(start_initialization_book3e) 1517 mflr r28 1518 1519 /* First, we need to setup some initial TLBs to map the kernel 1520 * text, data and bss at PAGE_OFFSET. We don't have a real mode 1521 * and always use AS 0, so we just set it up to match our link 1522 * address and never use 0 based addresses. 1523 */ |
1524 bl .initial_tlb_book3e | 1524 bl initial_tlb_book3e |
1525 1526 /* Init global core bits */ | 1525 1526 /* Init global core bits */ |
1527 bl .init_core_book3e | 1527 bl init_core_book3e |
1528 1529 /* Init per-thread bits */ | 1528 1529 /* Init per-thread bits */ |
1530 bl .init_thread_book3e | 1530 bl init_thread_book3e |
1531 1532 /* Return to common init code */ 1533 tovirt(r28,r28) 1534 mtlr r28 1535 blr 1536 1537 1538/* --- 4 unchanged lines hidden (view full) --- 1543 * except that it's generally entered from the holding loop in head_64.S 1544 * after CPUs have been gathered by Open Firmware. 1545 * 1546 * We assume we are in 32 bits mode running with whatever TLB entry was 1547 * set for us by the firmware or POR engine. 1548 */ 1549_GLOBAL(book3e_secondary_core_init_tlb_set) 1550 li r4,1 | 1531 1532 /* Return to common init code */ 1533 tovirt(r28,r28) 1534 mtlr r28 1535 blr 1536 1537 1538/* --- 4 unchanged lines hidden (view full) --- 1543 * except that it's generally entered from the holding loop in head_64.S 1544 * after CPUs have been gathered by Open Firmware. 1545 * 1546 * We assume we are in 32 bits mode running with whatever TLB entry was 1547 * set for us by the firmware or POR engine. 1548 */ 1549_GLOBAL(book3e_secondary_core_init_tlb_set) 1550 li r4,1 |
1551 b .generic_secondary_smp_init | 1551 b generic_secondary_smp_init |
1552 1553_GLOBAL(book3e_secondary_core_init) 1554 mflr r28 1555 1556 /* Do we need to setup initial TLB entry ? */ 1557 cmplwi r4,0 1558 bne 2f 1559 1560 /* Setup TLB for this core */ | 1552 1553_GLOBAL(book3e_secondary_core_init) 1554 mflr r28 1555 1556 /* Do we need to setup initial TLB entry ? */ 1557 cmplwi r4,0 1558 bne 2f 1559 1560 /* Setup TLB for this core */ |
1561 bl .initial_tlb_book3e | 1561 bl initial_tlb_book3e |
1562 1563 /* We can return from the above running at a different 1564 * address, so recalculate r2 (TOC) 1565 */ | 1562 1563 /* We can return from the above running at a different 1564 * address, so recalculate r2 (TOC) 1565 */ |
1566 bl .relative_toc | 1566 bl relative_toc |
1567 1568 /* Init global core bits */ | 1567 1568 /* Init global core bits */ |
15692: bl .init_core_book3e | 15692: bl init_core_book3e |
1570 1571 /* Init per-thread bits */ | 1570 1571 /* Init per-thread bits */ |
15723: bl .init_thread_book3e | 15723: bl init_thread_book3e |
1573 1574 /* Return to common init code at proper virtual address. 1575 * 1576 * Due to various previous assumptions, we know we entered this 1577 * function at either the final PAGE_OFFSET mapping or using a 1578 * 1:1 mapping at 0, so we don't bother doing a complicated check 1579 * here, we just ensure the return address has the right top bits. 1580 * --- 86 unchanged lines hidden --- | 1573 1574 /* Return to common init code at proper virtual address. 1575 * 1576 * Due to various previous assumptions, we know we entered this 1577 * function at either the final PAGE_OFFSET mapping or using a 1578 * 1:1 mapping at 0, so we don't bother doing a complicated check 1579 * here, we just ensure the return address has the right top bits. 1580 * --- 86 unchanged lines hidden --- |