Changeset 208b5f5 in mainline for kernel/arch/sparc32/src/trap_table.S
- Timestamp:
- 2013-12-29T14:32:55Z (11 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 4c14b88, 6fa9a99d, 9be30cdf, aacdb8e
- Parents:
- 2a13328
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/sparc32/src/trap_table.S
r2a13328 r208b5f5 165 165 save 166 166 167 ldd [%sp + 168 ldd [%sp + 167 ldd [%sp + 0], %l0 168 ldd [%sp + 8], %l2 169 169 ldd [%sp + 16], %l4 170 170 ldd [%sp + 24], %l6 … … 430 430 nop 431 431 432 433 432 1: 434 433 /* Rotate WIM on bit LEFT, we have 8 windows */ … … 442 441 mov %g0, %wim 443 442 nop; nop; nop 444 443 445 444 /* Kernel: */ 446 445 restore … … 563 562 mov %psr, %l0 564 563 or %l0, (1 << 5), %l0 564 or %l0, 0xf00, %l0 565 565 mov %l0, %psr 566 566 nop … … 568 568 nop 569 569 nop 570 571 /* Get UWB address */572 ## switch_to_invalid %g5, %g6573 ## mov %l6, %g1574 ## switch_back %g5, %g6575 570 576 571 /* Flush windows to stack */ … … 582 577 add %sp, 128, %o1 583 578 584 /* Return from handler */579 /* Return from handler (leave PIL disabled) */ 585 580 ld [%sp + 92], %l1 586 581 ld [%sp + 96], %l2 587 582 ld [%sp + 100], %l0 583 or %l0, 0xf00, %l0 588 584 mov %l0, %psr 589 585 nop … … 653 649 ld [%sp + 116], %g4 654 650 ld [%sp + 120], %g7 651 655 652 mov %l3, %sp 656 653 b 10f … … 659 656 9: 660 657 inline_restore_kernel 658 661 659 ld [%sp + 104], %g1 662 660 ld [%sp + 108], %g2 … … 664 662 ld [%sp + 116], %g4 665 663 ld [%sp + 120], %g7 664 665 /* Restore old sp */ 666 add %sp, 128, %sp 666 667 667 668 10: … … 716 717 switch_back %g5, %g6 717 718 mov %g7, %sp 718 ## mov %sp, %fp719 719 720 720 5: … … 733 733 st %l0, [%sp + 120] 734 734 735 /* Enable traps */735 /* Enable traps (without PIL) */ 736 736 mov %psr, %l0 737 737 or %l0, (1 << 5), %l0 738 or %l0, 0xf00, %l0 738 739 mov %l0, %psr 739 740 nop … … 747 748 748 749 /* Jump to actual subroutine */ 749 mov %g2, %o0750 750 call irq_exception 751 751 add %sp, 128, %o1 752 752 753 /* Return from handler */753 /* Return from handler (leave PIL disabled) */ 754 754 ld [%sp + 92], %l1 755 755 ld [%sp + 96], %l2 756 756 ld [%sp + 100], %l0 757 or %l0, 0xf00, %l0 757 758 mov %l0, %psr 758 759 nop … … 766 767 * and save uwb address for future use. 767 768 */ 768 if_from_kernel 6f769 if_from_kernel 9f 769 770 switch_to_invalid %g5, %g6 770 771 clr %l7 … … 797 798 ba 0b 798 799 nop 799 800 800 801 /* 801 802 * We've restored all user space windows. Now time to … … 815 816 switch_back %g5, %g6 816 817 817 /* If next window is invalid, do inline restore */ 818 6: 819 get_wim_number %g6 820 get_cwp %g7 821 inc %g7 822 and %g7, 0x7, %g7 823 cmp %g6, %g7 824 bne 8f 825 826 if_from_kernel 7f 827 828 inline_restore_uspace %g1 829 switch_to_invalid %g5, %g6 830 mov %g1, %l6 831 switch_back %g5, %g6 832 b 8f 833 nop 834 835 7: 836 inline_restore_kernel 837 838 8: 818 mov %sp, %l3 819 sub %g2, 128, %sp 839 820 ld [%sp + 104], %g1 840 821 ld [%sp + 108], %g2 … … 842 823 ld [%sp + 116], %g4 843 824 ld [%sp + 120], %g7 825 826 mov %l3, %sp 827 b 10f 828 nop 829 830 9: 831 inline_restore_kernel 832 833 ld [%sp + 104], %g1 834 ld [%sp + 108], %g2 835 ld [%sp + 112], %g3 836 ld [%sp + 116], %g4 837 ld [%sp + 120], %g7 838 839 /* Restore old sp */ 840 add %sp, 128, %sp 841 842 10: 844 843 jmp %l1 845 844 rett %l2 … … 892 891 switch_back %g5, %g6 893 892 mov %g7, %sp 894 ## 893 ## mov %sp, %fp 895 894 896 895 5: … … 909 908 st %l0, [%sp + 120] 910 909 911 /* Enable traps */910 /* Enable traps (without PIL) */ 912 911 mov %psr, %l0 913 912 or %l0, (1 << 5), %l0 913 or %l0, 0xf00, %l0 914 914 mov %l0, %psr 915 915 nop … … 933 933 mov %i5, %o5 934 934 935 /* Return from handler */935 /* Return from handler (with PIL disabled) */ 936 936 ld [%sp + 92], %l1 937 937 ld [%sp + 96], %l2 … … 940 940 mov %psr, %l1 941 941 and %l1, 0xf, %l1 942 or %l1, 0x00000f00, %l1 942 943 and %l0, 0xfffffff0, %l0 943 944 or %l0, %l1, %l0 … … 1009 1010 ld [%sp + 116], %g4 1010 1011 ld [%sp + 120], %g7 1012 1011 1013 mov %l1, %sp 1014 nop 1015 nop 1016 nop 1017 1012 1018 jmp %l2 1013 1019 rett %l2 + 4 … … 1035 1041 #define INTERRUPT(_vector, _priority) \ 1036 1042 .org trap_table + _vector * TRAP_ENTRY_SIZE; \ 1037 mov %psr, %l0 ; \ 1038 mov _priority, %g2 ; \ 1043 mov _priority, %o0 ; \ 1039 1044 b interrupt_trap ; \ 1045 nop ; 1040 1046 nop ; 1041 1047
Note:
See TracChangeset
for help on using the changeset viewer.