Changeset 2ccd275 in mainline
- Timestamp:
- 2005-11-09T14:23:05Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 802bb95
- Parents:
- b183865e
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
Makefile
rb183865e r2ccd275 141 141 .PHONY: all clean config depend boot 142 142 143 all: kernel.bin boot 143 all: kernel.bin boot disasm 144 144 145 145 -include Makefile.depend 146 146 147 147 clean: 148 -rm -f kernel.bin kernel.raw kernel.map kernel.map.pre kernel.objdump generic/src/debug/real_map.bin Makefile.depend generic/include/arch generic/include/genarch arch/$(ARCH)/_link.ld148 -rm -f kernel.bin kernel.raw kernel.map kernel.map.pre kernel.objdump kernel.disasm generic/src/debug/real_map.bin Makefile.depend generic/include/arch generic/include/genarch arch/$(ARCH)/_link.ld 149 149 find generic/src/ arch/$(ARCH)/src/ genarch/src/ -name '*.o' -exec rm \{\} \; 150 150 $(MAKE) -C arch/$(ARCH)/boot clean … … 178 178 $(MAKE) -C arch/$(ARCH)/boot build KERNEL_SIZE="`cat kernel.bin | wc -c`" CC=$(CC) AS=$(AS) LD=$(LD) 179 179 180 disasm: kernel.raw 181 $(OBJDUMP) -d kernel.raw > kernel.disasm 182 180 183 %.o: %.S 181 $(CC) $(DEFS) $(AFLAGS) $(CFLAGS) - c $< -o $@184 $(CC) $(DEFS) $(AFLAGS) $(CFLAGS) -D__ASM__ -c $< -o $@ 182 185 183 186 %.o: %.s -
arch/amd64/src/asm_utils.S
rb183865e r2ccd275 34 34 #define ERROR_WORD_INTERRUPT_LIST 0x00027D00 35 35 36 #define __ASM__37 36 #include <arch/pm.h> 38 37 -
arch/amd64/src/boot/boot.S
rb183865e r2ccd275 26 26 # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 27 # 28 29 #define __ASM__30 28 31 29 #include <arch/mm/page.h> -
arch/amd64/src/smp/ap.S
rb183865e r2ccd275 31 31 # 32 32 33 #define __ASM__34 33 #include <arch/boot/boot.h> 35 34 #include <arch/pm.h> -
arch/ia32/src/boot/boot.S
rb183865e r2ccd275 27 27 # 28 28 29 #define __ASM__30 31 29 #include <arch/boot/boot.h> 32 30 #include <arch/boot/memmapasm.h> -
arch/ia64/include/asm.h
rb183865e r2ccd275 221 221 static inline void interrupts_restore(ipl_t ipl) 222 222 { 223 __asm__ volatile ( 224 "mov psr.l = %0\n" 225 ";;\n" 226 "srlz.d\n" 227 : : "r" ((__u64) ipl) 228 ); 223 if (ipl & PSR_I_MASK) 224 (void) interrupts_enable(); 225 else 226 (void) interrupts_disable(); 229 227 } 230 228 -
arch/ia64/include/interrupt.h
rb183865e r2ccd275 31 31 32 32 #include <arch/types.h> 33 #include <arch/register.h> 33 34 34 /** External interrupt vectors. */35 /** External Interrupt vectors. */ 35 36 #define INTERRUPT_TIMER 0 36 37 #define INTERRUPT_SPURIOUS 15 38 39 /** General Exception codes. */ 40 #define GE_ILLEGALOP 0 41 #define GE_PRIVOP 1 42 #define GE_PRIVREG 2 43 #define GE_RESREGFLD 3 44 #define GE_DISBLDISTRAN 4 45 #define GE_ILLEGALDEP 8 37 46 38 47 #define EOI 0 /**< The actual value doesn't matter. */ … … 46 55 __u64 ar_rsc; 47 56 __address cr_ifa; 48 __u64cr_isr;57 cr_isr_t cr_isr; 49 58 __address cr_iipa; 50 59 __u64 cr_ips; -
arch/ia64/include/register.h
rb183865e r2ccd275 30 30 #define __ia64_REGISTER_H__ 31 31 32 #ifndef __ASM__ 32 33 #include <arch/types.h> 34 #endif 33 35 34 36 #define CR_IVR_MASK 0xf 35 37 #define PSR_I_MASK 0x4000 38 #define PSR_IC_MASK 0x2000 36 39 37 40 /** Application registers. */ … … 109 112 /* CR82-CR127 reserved */ 110 113 114 #ifndef __ASM__ 111 115 /** External Interrupt Vector Register */ 112 116 union cr_ivr { … … 144 148 typedef union cr_itv cr_itv_t; 145 149 150 /** Interruption Status Register */ 151 union cr_isr { 152 struct { 153 union { 154 /** General Exception code field structuring. */ 155 struct { 156 unsigned ge_na : 4; 157 unsigned ge_code : 4; 158 } __attribute__ ((packed)); 159 __u16 code; 160 }; 161 __u8 vector; 162 unsigned : 8; 163 unsigned x : 1; /**< Execute exception. */ 164 unsigned w : 1; /**< Write exception. */ 165 unsigned r : 1; /**< Read exception. */ 166 unsigned na : 1; /**< Non-access exception. */ 167 unsigned sp : 1; /**< Speculative load exception. */ 168 unsigned rs : 1; /**< Register stack. */ 169 unsigned ir : 1; /**< Incomplete Register frame. */ 170 unsigned ni : 1; /**< Nested Interruption. */ 171 unsigned so : 1; /**< IA-32 Supervisor Override. */ 172 unsigned ei : 2; /**< Excepting Instruction. */ 173 unsigned ed : 1; /**< Exception Deferral. */ 174 unsigned : 20; 175 } __attribute__ ((packed)); 176 __u64 value; 177 }; 178 179 typedef union cr_isr cr_isr_t; 180 181 #endif /* !__ASM__ */ 182 146 183 #endif -
arch/ia64/src/interrupt.c
rb183865e r2ccd275 106 106 107 107 static char *vector_to_string(__u16 vector); 108 static void dump_ stack(struct exception_regdump *pstate);108 static void dump_interrupted_context(struct exception_regdump *pstate); 109 109 110 110 char *vector_to_string(__u16 vector) … … 118 118 } 119 119 120 void dump_ stack(struct exception_regdump *pstate)120 void dump_interrupted_context(struct exception_regdump *pstate) 121 121 { 122 122 char *ifa, *iipa, *iip; … … 127 127 128 128 putchar('\n'); 129 printf("Interrupted context dump:\n"); 129 130 printf("ar.bsp=%P\tar.bspstore=%P\n", pstate->ar_bsp, pstate->ar_bspstore); 130 131 printf("ar.rnat=%Q\tar.rsc=%Q\n", pstate->ar_rnat, pstate->ar_rsc); 131 132 printf("ar.ifs=%Q\tar.pfs=%Q\n", pstate->ar_ifs, pstate->ar_pfs); 132 printf("cr.isr=%Q\tcr.ips=%Q\t\n", pstate->cr_isr , pstate->cr_ips);133 printf("cr.isr=%Q\tcr.ips=%Q\t\n", pstate->cr_isr.value, pstate->cr_ips); 133 134 134 printf("cr.iip=%Q (%s)\n", pstate->cr_iip,iip ? iip : "?");135 printf("cr.iipa=%Q 136 printf("cr.ifa=%Q 135 printf("cr.iip=%Q, #%d\t(%s)\n", pstate->cr_iip, pstate->cr_isr.ei ,iip ? iip : "?"); 136 printf("cr.iipa=%Q\t(%s)\n", pstate->cr_iipa, iipa ? iipa : "?"); 137 printf("cr.ifa=%Q\t(%s)\n", pstate->cr_ifa, ifa ? ifa : "?"); 137 138 } 138 139 139 140 void general_exception(__u64 vector, struct exception_regdump *pstate) 140 141 { 141 dump_stack(pstate); 142 panic("General Exception\n"); 142 char *desc = ""; 143 144 dump_interrupted_context(pstate); 145 146 switch (pstate->cr_isr.ge_code) { 147 case GE_ILLEGALOP: 148 desc = "Illegal Operation fault"; 149 break; 150 case GE_PRIVOP: 151 desc = "Privileged Operation fault"; 152 break; 153 case GE_PRIVREG: 154 desc = "Privileged Register fault"; 155 break; 156 case GE_RESREGFLD: 157 desc = "Reserved Register/Field fault"; 158 break; 159 case GE_DISBLDISTRAN: 160 desc = "Disabled Instruction Set Transition fault"; 161 break; 162 case GE_ILLEGALDEP: 163 desc = "Illegal Dependency fault"; 164 break; 165 default: 166 desc = "unknown"; 167 break; 168 } 169 170 panic("General Exception (%s)\n", desc); 143 171 } 144 172 145 173 void break_instruction(__u64 vector, struct exception_regdump *pstate) 146 174 { 147 dump_ stack(pstate);175 dump_interrupted_context(pstate); 148 176 panic("Break Instruction\n"); 149 177 } … … 151 179 void universal_handler(__u64 vector, struct exception_regdump *pstate) 152 180 { 153 dump_ stack(pstate);181 dump_interrupted_context(pstate); 154 182 panic("Interruption: %W (%s)\n", (__u16) vector, vector_to_string(vector)); 155 183 } -
arch/ia64/src/ivt.S
rb183865e r2ccd275 1 1 # 2 2 # Copyright (C) 2005 Jakub Vana 3 # Copyright (C) 2005 Jakub Jermar 3 4 # All rights reserved. 4 5 # … … 28 29 29 30 #include <arch/stack.h> 31 #include <arch/register.h> 30 32 31 33 #define STACK_ITEMS 12 … … 190 192 191 193 /* 6. switch to bank 1 and reenable PSR.ic */ 192 ssm 0x2000194 ssm PSR_IC_MASK 193 195 bsw.1 ;; 194 196 srlz.d … … 308 310 309 311 /* 15. disable PSR.ic and switch to bank 0 */ 310 rsm 0x2000312 rsm PSR_IC_MASK 311 313 bsw.0 ;; 312 314 srlz.d -
arch/mips32/src/context.S
rb183865e r2ccd275 27 27 # 28 28 29 #define __ASM__30 29 #include <arch/asm/regname.h> 31 30 #include <arch/context_offset.h> -
arch/mips32/src/start.S
rb183865e r2ccd275 27 27 # 28 28 29 #define __ASM__30 31 29 #include <arch/asm/regname.h> 32 30 #include <arch/mm/page.h> -
arch/sparc64/src/context.S
rb183865e r2ccd275 27 27 # 28 28 29 #define __ASM__30 29 #include <arch/context_offset.h> 31 30
Note:
See TracChangeset
for help on using the changeset viewer.