📄 interrupt.cod
字号:
; Listing generated by Microsoft (R) Optimizing Compiler Version 12.20.9615
TTL d:\wince420\platform\ep931x\kernel\hal\.\interrupt.c
CODE32
00000 AREA |.drectve|, DRECTVE
DCB "-defaultlib:coredll.lib "
DCB "-defaultlib:corelibc.lib "
00000 AREA |.data|, DATA
COMMON |fInterruptFlag|, 0x4
COMMON |gdwInterruptMask1|, 0x4
COMMON |gdwInterruptMask2|, 0x4
COMMON |fPS2Int|, 0x4
00000 AREA |.rdata|, DATA, READONLY
|EdbgVendorIds| DCW 0x0
DCW 0x0
DCD 0x4033
DCB 0x1
DCB "AD", 0x0
DCW 0x1050
DCW 0x940
DCD 0x4005
DCB 0x1
DCB "LS", 0x0
DCW 0x1050
DCW 0x940
DCD 0x2078
DCB 0x1
DCB "LS", 0x0
DCW 0x10ec
DCW 0x8029
DCD 0xc0f0
DCB 0x1
DCB "KS", 0x0
DCW 0x10ec
DCW 0x8129
DCD 0x0
DCB 0x4
DCB "RT", 0x0
DCW 0x10ec
DCW 0x8139
DCD 0x900b
DCB 0x4
DCB "RT", 0x0
DCW 0x10ec
DCW 0x8139
DCD 0xd0c9
DCB 0x4
DCB "RT", 0x0
DCW 0x10ec
DCW 0x8139
DCD 0xe04c
DCB 0x4
DCB "RT", 0x0
DCW 0x1186
DCW 0x1300
DCD 0x50ba
DCB 0x4
DCB "DL", 0x0
DCW 0x100b
DCW 0x20
DCD 0xa0cc
DCB 0x5
DCB "NG", 0x0
DCW 0x10b7
DCW 0x9050
DCD 0x6008
DCB 0x6
DCB "3C", 0x0
DCW 0x10b7
DCW 0x9200
DCD 0x476
DCB 0x6
DCB "3C", 0x0
EXPORT |OEMInterruptHandlerFIQ|
; File d:\wince420\platform\ep931x\kernel\hal\interrupt.c
00000 AREA |.text| { |OEMInterruptHandlerFIQ| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 AREA |.pdata$$OEMInterruptHandlerFIQ|, PDATA, SELECTION=5, ASSOC=|.text| { |OEMInterruptHandlerFIQ| } ; comdat associative
|$T14222| DCD |OEMInterruptHandlerFIQ|
DCD 0x40000500
; Function compile flags: /Ogsy
00000 AREA |.text| { |OEMInterruptHandlerFIQ| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 |OEMInterruptHandlerFIQ| PROC
; 65 : {
00000 |$M14220|
; 66 : // Fake CPUEnterIdle needs to know about interrupt firing.
; 67 : fInterruptFlag = TRUE;
00000 e59f0008 ldr r0, [pc, #8]
00004 e3a01001 mov r1, #1
00008 e5801000 str r1, [r0]
; 68 : }
0000c e12fff1e bx lr
00010 |$L14224|
00010 00000000 DCD |fInterruptFlag|
00014 |$M14221|
ENDP ; |OEMInterruptHandlerFIQ|
EXPORT |TimerInterrupt|
EXPORT |OEMInterruptHandler|
IMPORT |fResumeFlag|
IMPORT |dwIsrTime1|
IMPORT |fIntrTime|
IMPORT |wNumInterrupts|
IMPORT |PerfCountSinceTick|
IMPORT |CPUClearSysTimerIRQ|
IMPORT |OEMWriteDebugByte|
00000 AREA |.text| { |OEMInterruptHandler| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 AREA |.pdata$$OEMInterruptHandler|, PDATA, SELECTION=5, ASSOC=|.text| { |OEMInterruptHandler| } ; comdat associative
|$T14236| DCD |OEMInterruptHandler|
DCD 0x4000cc01
; Function compile flags: /Ogsy
00000 AREA |.text| { |OEMInterruptHandler| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 |OEMInterruptHandler| PROC
; 80 : {
00000 e92d40f0 stmdb sp!, {r4 - r7, lr}
00004 |$M14234|
; 81 : register ULONG ulVic1Irq, ulVic2Irq;
; 82 : // volatile ULONG ulDummyRead;
; 83 : DWORD retval;
; 84 :
; 85 :
; 86 : //
; 87 : // Read the interrupt status registers.
; 88 : //
; 89 : ulVic1Irq = *VIC1_IRQSTATUS;
00004 e3a0020b mov r0, #0xB, 4
00008 e380080b orr r0, r0, #0xB, 16
; 90 : ulVic2Irq = *VIC2_IRQSTATUS;
0000c e3a0120b mov r1, #0xB, 4
00010 e5904000 ldr r4, [r0]
; 91 :
; 92 : //
; 93 : // Set the default value to nop
; 94 : //
; 95 : retval = SYSINTR_NOP;
; 96 :
; 97 : //
; 98 : // Fake CPUEnterIdle needs to know about interrupt firing.
; 99 : //
; 100 : fInterruptFlag = TRUE;
00014 e59f0310 ldr r0, [pc, #0x310]
00018 e3811703 orr r1, r1, #3, 14
0001c e3a07001 mov r7, #1
00020 e5915000 ldr r5, [r1]
00024 e3a06000 mov r6, #0
00028 e5807000 str r7, [r0]
; 101 :
; 102 :
; 103 : if(ulVic1Irq & INT1_TIMER1)
0002c e3140010 tst r4, #0x10
00030 0a000014 beq |$L13940|
; 104 : {
; 105 : //
; 106 : // Temporary hack for the PS2 keyboard driver.
; 107 : //
; 108 : if((gdwInterruptMask2 & INT2_SPI) && (*SPI_SR & SPISR_RNE) && !fPS2Int)
00034 e59f02ec ldr r0, [pc, #0x2EC]
00038 e5901000 ldr r1, [r0]
0003c e3110602 tst r1, #2, 12
00040 0a00000c beq |$L13942|
00044 e59f02d8 ldr r0, [pc, #0x2D8]
00048 e5900000 ldr r0, [r0]
0004c e3100004 tst r0, #4
00050 0a000008 beq |$L13942|
00054 e59f12b4 ldr r1, [pc, #0x2B4]
00058 e5910000 ldr r0, [r1]
0005c e3500000 cmp r0, #0
; 109 : {
; 110 : fPS2Int = 1;
; 111 : *VIC2_INTCLEAR = INT2_SPI;
00060 059f22a0 ldreq r2, [pc, #0x2A0]
00064 03a00602 moveq r0, #2, 12
00068 05817000 streq r7, [r1]
; 112 : retval = SYSINTR_SPI;
0006c 03a0601c moveq r6, #0x1C
00070 05820000 streq r0, [r2]
00074 0a0000a0 beq |$L14016|
00078 |$L13942|
; 113 : }
; 114 : else
; 115 : {
; 116 : retval = TimerInterrupt();
00078 eb000000 bl TimerInterrupt
0007c e1a06000 mov r6, r0
; 117 : CPUClearSysTimerIRQ();
00080 eb000000 bl CPUClearSysTimerIRQ
; 118 : }
; 119 : }
; 120 :
; 121 : else
00084 ea00009c b |$L14016|
00088 |$L13940|
; 122 : {
; 123 : //
; 124 : // If we're timing interrupts, keep track of when this one came in
; 125 : //
; 126 : if (fIntrTime)
00088 e59f0290 ldr r0, [pc, #0x290]
0008c e5901000 ldr r1, [r0]
00090 e3510000 cmp r1, #0
00094 0a00000a beq |$L13946|
; 127 : {
; 128 : //
; 129 : // Subtract off dwReschedIncrment since interrupt hasn't been cleared
; 130 : //
; 131 : dwIsrTime1 = PerfCountSinceTick();
00098 eb000000 bl PerfCountSinceTick
0009c e59f3278 ldr r3, [pc, #0x278]
000a0 e5830000 str r0, [r3]
; 132 : wNumInterrupts++;
000a4 e59f326c ldr r3, [pc, #0x26C]
000a8 e1d300b0 ldrh r0, [r3]
000ac e1a01800 mov r1, r0, lsl #16
000b0 e1a02821 mov r2, r1, lsr #16
000b4 e2820001 add r0, r2, #1
000b8 e1a01800 mov r1, r0, lsl #16
000bc e1a02821 mov r2, r1, lsr #16
000c0 e1c320b0 strh r2, [r3]
000c4 |$L13946|
; 133 : }
; 134 : //
; 135 : // If we get any device interrupts, signal the resume flag. The flag
; 136 : // will release the CPU from OEMPowerOff if the user had previously
; 137 : // chosen to suspend the platform. In OEMPowerOff, only the interrupts
; 138 : // allowed to wake us up will be enabled so we needn't worry about
; 139 : // that here.
; 140 : //
; 141 : fResumeFlag = TRUE;
000c4 e59f0248 ldr r0, [pc, #0x248]
; 142 :
; 143 : //
; 144 : // This was not a timer interrupt, must be a device interrupt.
; 145 : // Change the priority of the interrupt by changing the order that
; 146 : // the interrupt is processed.
; 147 : //
; 148 : //
; 149 : // Ethernet interrupt.
; 150 : //
; 151 : if(ulVic2Irq & INT2_ETHERNET)
000c8 e3150080 tst r5, #0x80
; 152 : {
; 153 : *VIC2_INTCLEAR = INT2_ETHERNET;
000cc 159f1234 ldrne r1, [pc, #0x234]
; 154 : retval = SYSINTR_ETHER;
000d0 13a06017 movne r6, #0x17
000d4 e5c07000 strb r7, [r0]
000d8 13a00080 movne r0, #0x80
000dc 15810000 strne r0, [r1]
000e0 1a000085 bne |$L14016|
; 155 : }
; 156 : //
; 157 : // USB interrupt
; 158 : //
; 159 : else if(ulVic2Irq & INT2_USB)
000e4 e3150401 tst r5, #1, 8
; 160 : {
; 161 : *VIC2_INTCLEAR = INT2_USB;
000e8 159f1218 ldrne r1, [pc, #0x218]
000ec 13a00401 movne r0, #1, 8
; 162 : retval = SYSINTR_USB;
000f0 13a06018 movne r6, #0x18
000f4 15810000 strne r0, [r1]
000f8 1a00007f bne |$L14016|
; 163 : }
; 164 : //
; 165 : // Check the serial port interrupts.
; 166 : //
; 167 : else if(ulVic2Irq & INT2_UART1)
000fc e3150601 tst r5, #1, 12
; 168 : {
; 169 : *VIC2_INTCLEAR = INT2_UART1;
00100 159f1200 ldrne r1, [pc, #0x200]
00104 13a00601 movne r0, #1, 12
; 170 : retval = SYSINTR_UART1;
00108 13a06019 movne r6, #0x19
0010c 15810000 strne r0, [r1]
00110 1a000079 bne |$L14016|
; 171 : }
; 172 : else if(ulVic2Irq & INT2_UART2)
00114 e3150501 tst r5, #1, 10
; 173 : {
; 174 : *VIC2_INTCLEAR = INT2_UART2;
00118 159f11e8 ldrne r1, [pc, #0x1E8]
0011c 13a00501 movne r0, #1, 10
; 175 : retval = SYSINTR_UART2;
00120 13a0601a movne r6, #0x1A
00124 15810000 strne r0, [r1]
00128 1a000073 bne |$L14016|
; 176 : }
; 177 : else if(ulVic2Irq & INT2_UART3)
0012c e3150502 tst r5, #2, 10
; 178 : {
; 179 : *VIC2_INTCLEAR = INT2_UART3;
00130 159f11d0 ldrne r1, [pc, #0x1D0]
00134 13a00502 movne r0, #2, 10
; 180 : retval = SYSINTR_UART3;
00138 13a0601b movne r6, #0x1B
0013c 15810000 strne r0, [r1]
00140 1a00006d bne |$L14016|
; 181 : }
; 182 :
; 183 : //
; 184 : // Check to see if it is a keyboard interrupt
; 185 : //
; 186 : else if(ulVic1Irq & INT1_KEYPAD)
00144 e3140202 tst r4, #2, 4
; 187 : {
; 188 : *VIC1_INTCLEAR = INT1_KEYPAD;
00148 159f11bc ldrne r1, [pc, #0x1BC]
0014c 13a00202 movne r0, #2, 4
; 189 : retval = SYSINTR_KEYBOARD;
00150 13a06010 movne r6, #0x10
00154 15810000 strne r0, [r1]
00158 1a000067 bne |$L14016|
; 190 : }
; 191 :
; 192 : //
; 193 : // Check to see if the SPI port has generated an interrupt.
; 194 : // This is used for the PS/2 keyboard driver.
; 195 : //
; 196 : else if(ulVic2Irq & INT2_SPI)
0015c e3150602 tst r5, #2, 12
; 197 : {
; 198 : fPS2Int = 1;
00160 159f01a8 ldrne r0, [pc, #0x1A8]
00164 13a0601c movne r6, #0x1C
; 199 : *VIC2_INTCLEAR = INT2_SPI;
00168 159f1198 ldrne r1, [pc, #0x198]
0016c 15807000 strne r7, [r0]
00170 13a00602 movne r0, #2, 12
00174 15810000 strne r0, [r1]
00178 1a00005f bne |$L14016|
; 200 : retval = SYSINTR_SPI;
; 201 : }
; 202 : //
; 203 : // Real time clock interrupt. Occurs very infrequently so
; 204 : // put at the bottom of the interrupt priority list.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -