📄 impl.cod
字号:
; 131 : }
; 132 :
; 133 : Sleep( 100 ); // delay to handle bouncing effect on the interrupt line
00054 e3a00064 mov r0, #0x64
00058 eb000000 bl Sleep
; 134 :
; 135 : if( IsCardPresent() )
0005c e5953000 ldr r3, [r5]
; 136 : {
; 137 : ProcessCardInsertion(pContext);
00060 e1a00004 mov r0, r4
00064 e5933008 ldr r3, [r3, #8]
00068 e3130801 tst r3, #1, 16
0006c 1a000001 bne |$L37668|
00070 eb000000 bl ProcessCardInsertion
; 138 : }
; 139 : else
00074 ea000000 b |$L37669|
00078 |$L37668|
; 140 : {
; 141 : ProcessCardRemoval(pContext);
00078 eb000000 bl ProcessCardRemoval
0007c |$L37669|
; 142 : }
; 143 :
; 144 : InterruptDone( dwSysintrCD );
0007c e5960000 ldr r0, [r6]
00080 eb000000 bl InterruptDone
00084 e5970000 ldr r0, [r7]
00088 e3e01000 mvn r1, #0
0008c eb000000 bl WaitForSingleObject
00090 e3500000 cmp r0, #0
00094 0affffea beq |$L37664|
00098 |$L37837|
; 129 : //DbgPrintZo(1, (TEXT("SDCardDetectIstThread: Thread Exiting\n")));
; 130 : return 0;
00098 e3a00000 mov r0, #0
; 145 : } // while
; 146 : }
0009c e8bd40f0 ldmia sp!, {r4 - r7, lr}
000a0 e12fff1e bx lr
000a4 |$L37848|
000a4 00000000 DCD |dwSysintrCD|
000a8 00000000 DCD |g_pGPIORegs|
000ac 00000000 DCD |dwCardDetectIstThreadPriority|
000b0 00000000 DCD |hCardInsertInterruptEvent|
000b4 |$M37844|
ENDP ; |SDCardDetectIstThread|
EXPORT |SetupCardDetectIST|
IMPORT |InterruptInitialize|
IMPORT |CreateEventW|
IMPORT |CreateThread|
00000 AREA |.text| { |SetupCardDetectIST| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 AREA |.pdata$$SetupCardDetectIST|, PDATA, SELECTION=5, ASSOC=|.text| { |SetupCardDetectIST| } ; comdat associative
|$T37858| DCD |$L37857|
DCD 0x40002b02
; Function compile flags: /Ogsy
00000 AREA |.text| { |SetupCardDetectIST| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 |SetupCardDetectIST| PROC
; 149 : {
00000 |$L37857|
00000 e92d4030 stmdb sp!, {r4, r5, lr}
00004 e24dd00c sub sp, sp, #0xC
00008 |$M37855|
00008 e1a04000 mov r4, r0
; 150 : DWORD threadID; // thread ID
; 151 :
; 152 : // convert the hardware SD/MMC card detect interrupt IRQ into a logical SYSINTR value
; 153 : //if (!KernelIoControl(IOCTL_HAL_REQUEST_SYSINTR, &dwSDCDIrq, sizeof(DWORD), &(dwSysintrCD), sizeof(DWORD), NULL))
; 154 : //{
; 155 : // // invalid SDIO SYSINTR value!
; 156 : // //DEBUGMSG(SDCARD_ZONE_ERROR, (TEXT("Error obtaining SDIO SYSINTR value!\n")));
; 157 : // dwSysintrCD = SYSINTR_UNDEFINED;
; 158 : // return FALSE;
; 159 : //}
; 160 :
; 161 : // allocate the interrupt event for card insertion
; 162 : hCardInsertInterruptEvent = CreateEvent(NULL, FALSE, FALSE,NULL);
0000c e3a03000 mov r3, #0
00010 e3a02000 mov r2, #0
00014 e3a01000 mov r1, #0
00018 e3a00000 mov r0, #0
0001c eb000000 bl CreateEventW
00020 e59f3080 ldr r3, [pc, #0x80]
00024 e1b0e000 movs lr, r0
00028 e583e000 str lr, [r3]
; 163 :
; 164 : if (NULL == hCardInsertInterruptEvent) {
; 165 : return FALSE;
0002c 0a000014 beq |$L37854|
; 166 : }
; 167 :
; 168 : // initialize the card insertion interrupt event
; 169 : if (!InterruptInitialize (dwSysintrCD,
; 170 : hCardInsertInterruptEvent,
; 171 : NULL,
; 172 : 0)) {
00030 e59f106c ldr r1, [pc, #0x6C]
00034 e3a03000 mov r3, #0
00038 e3a02000 mov r2, #0
0003c e5910000 ldr r0, [r1]
00040 e1a0100e mov r1, lr
00044 eb000000 bl InterruptInitialize
00048 e3500000 cmp r0, #0
; 173 : return FALSE;
0004c e3a00000 mov r0, #0
00050 0a00000e beq |$L37673|
; 174 : }
; 175 :
; 176 :
; 177 : // create the interrupt thread to handle card insertion events
; 178 : hCardInsertInterruptThread =
; 179 : CreateThread(NULL,
; 180 : 0,
; 181 : (LPTHREAD_START_ROUTINE)SDCardDetectIstThread,
; 182 : pHardwareContext,
; 183 : 0,
; 184 : &threadID);
00054 e59f2044 ldr r2, [pc, #0x44]
00058 e28de008 add lr, sp, #8
0005c e3a05000 mov r5, #0
00060 e1a03004 mov r3, r4
00064 e3a01000 mov r1, #0
00068 e58de004 str lr, [sp, #4]
0006c e58d5000 str r5, [sp]
00070 eb000000 bl CreateThread
00074 e59f3020 ldr r3, [pc, #0x20]
00078 e3500000 cmp r0, #0
0007c e5830000 str r0, [r3]
; 185 :
; 186 : if (NULL == hCardInsertInterruptThread) {
00080 1a000001 bne |$L37684|
00084 |$L37854|
; 187 : return FALSE;
00084 e3a00000 mov r0, #0
00088 ea000000 b |$L37673|
0008c |$L37684|
; 188 : }
; 189 :
; 190 : return TRUE;
0008c e3a00001 mov r0, #1
00090 |$L37673|
; 191 : }
00090 e28dd00c add sp, sp, #0xC
00094 e8bd4030 ldmia sp!, {r4, r5, lr}
00098 e12fff1e bx lr
0009c |$L37860|
0009c 00000000 DCD |hCardInsertInterruptThread|
000a0 00000000 DCD |SDCardDetectIstThread|
000a4 00000000 DCD |dwSysintrCD|
000a8 00000000 DCD |hCardInsertInterruptEvent|
000ac |$M37856|
ENDP ; |SetupCardDetectIST|
EXPORT |CleanupCardDetectIST|
IMPORT |InterruptDisable|
IMPORT |CloseHandle|
; File c:\wm520\public\wpc\cesysgen\sdk\inc\kfuncs.h
00000 AREA |.text| { |CleanupCardDetectIST| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 AREA |.pdata$$CleanupCardDetectIST|, PDATA, SELECTION=5, ASSOC=|.text| { |CleanupCardDetectIST| } ; comdat associative
|$T37870| DCD |$L37869|
DCD 0x40001e01
; Function compile flags: /Ogsy
; File c:\wm520\platform\al270\platform\mainstoneii\src\drivers\sdhc\impl.c
00000 AREA |.text| { |CleanupCardDetectIST| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 |CleanupCardDetectIST| PROC
; 194 : {
00000 |$L37869|
00000 e92d4030 stmdb sp!, {r4, r5, lr}
00004 |$M37867|
; 195 : InterruptDisable (dwSysintrCD);
00004 e59f3068 ldr r3, [pc, #0x68]
00008 e5930000 ldr r0, [r3]
0000c eb000000 bl InterruptDisable
; 196 :
; 197 : // clean up card insertion IST
; 198 : if (NULL != hCardInsertInterruptThread) {
00010 e59f5058 ldr r5, [pc, #0x58]
00014 e59f4050 ldr r4, [pc, #0x50]
00018 e5953000 ldr r3, [r5]
0001c e3530000 cmp r3, #0
00020 0a000009 beq |$L37688|
; 199 : // wake up the IST
; 200 : SetEvent(hCardInsertInterruptEvent);
00024 e5940000 ldr r0, [r4]
00028 e3a01003 mov r1, #3
0002c eb000000 bl EventModify
; 201 : // wait for the thread to exit
; 202 : WaitForSingleObject(hCardInsertInterruptThread, INFINITE);
00030 e5950000 ldr r0, [r5]
00034 e3e01000 mvn r1, #0
00038 eb000000 bl WaitForSingleObject
; 203 : CloseHandle(hCardInsertInterruptThread);
0003c e5950000 ldr r0, [r5]
00040 eb000000 bl CloseHandle
; 204 : hCardInsertInterruptThread = NULL;
00044 e3a03000 mov r3, #0
00048 e5853000 str r3, [r5]
0004c |$L37688|
; 205 : }
; 206 :
; 207 : // free card insertion interrupt
; 208 : if (NULL != hCardInsertInterruptEvent) {
0004c e5940000 ldr r0, [r4]
00050 e3500000 cmp r0, #0
00054 0a000002 beq |$L37691|
; 209 : CloseHandle(hCardInsertInterruptEvent);
00058 eb000000 bl CloseHandle
; 210 : hCardInsertInterruptEvent = NULL;
0005c e3a03000 mov r3, #0
00060 e5843000 str r3, [r4]
00064 |$L37691|
; 211 : }
; 212 : }
00064 e8bd4030 ldmia sp!, {r4, r5, lr}
00068 e12fff1e bx lr
0006c |$L37872|
0006c 00000000 DCD |hCardInsertInterruptEvent|
00070 00000000 DCD |hCardInsertInterruptThread|
00074 00000000 DCD |dwSysintrCD|
00078 |$M37868|
ENDP ; |CleanupCardDetectIST|
EXPORT |LoadPlatformRegistrySettings|
EXPORT |??_C@_1BM@DFAFDEI@?$AAC?$AAa?$AAr?$AAd?$AAD?$AAe?$AAt?$AAe?$AAc?$AAt?$AAI?$AAR?$AAQ?$AA?$AA@| [ DATA ] ; `string'
EXPORT |??_C@_1CM@GLNDIDJE@?$AAC?$AAa?$AAr?$AAd?$AAD?$AAe?$AAt?$AAe?$AAc?$AAt?$AAI?$AAS?$AAT?$AAP?$AAr?$AAi?$AAo?$AAr?$AAi?$AAt@| [ DATA ] ; `string'
IMPORT |RegQueryValueExW|
00000 AREA |.text| { |LoadPlatformRegistrySettings| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 AREA |.pdata$$LoadPlatformRegistrySettings|, PDATA, SELECTION=5, ASSOC=|.text| { |LoadPlatformRegistrySettings| } ; comdat associative
|$T37881| DCD |$L37880|
DCD 0x40003502
00000 AREA |.rdata| { |??_C@_1CM@GLNDIDJE@?$AAC?$AAa?$AAr?$AAd?$AAD?$AAe?$AAt?$AAe?$AAc?$AAt?$AAI?$AAS?$AAT?$AAP?$AAr?$AAi?$AAo?$AAr?$AAi?$AAt@| }, DATA, READONLY, SELECTION=2 ; comdat any
|??_C@_1CM@GLNDIDJE@?$AAC?$AAa?$AAr?$AAd?$AAD?$AAe?$AAt?$AAe?$AAc?$AAt?$AAI?$AAS?$AAT?$AAP?$AAr?$AAi?$AAo?$AAr?$AAi?$AAt@| DCB "C"
DCB 0x0, "a", 0x0, "r", 0x0, "d", 0x0, "D", 0x0, "e", 0x0, "t"
DCB 0x0, "e", 0x0, "c", 0x0, "t", 0x0, "I", 0x0, "S", 0x0, "T"
DCB 0x0, "P", 0x0, "r", 0x0, "i", 0x0, "o", 0x0, "r", 0x0, "i"
DCB 0x0, "t", 0x0, "y", 0x0, 0x0, 0x0 ; `string'
00000 AREA |.rdata| { |??_C@_1BM@DFAFDEI@?$AAC?$AAa?$AAr?$AAd?$AAD?$AAe?$AAt?$AAe?$AAc?$AAt?$AAI?$AAR?$AAQ?$AA?$AA@| }, DATA, READONLY, SELECTION=2 ; comdat any
|??_C@_1BM@DFAFDEI@?$AAC?$AAa?$AAr?$AAd?$AAD?$AAe?$AAt?$AAe?$AAc?$AAt?$AAI?$AAR?$AAQ?$AA?$AA@| DCB "C"
DCB 0x0, "a", 0x0, "r", 0x0, "d", 0x0, "D", 0x0, "e", 0x0, "t"
DCB 0x0, "e", 0x0, "c", 0x0, "t", 0x0, "I", 0x0, "R", 0x0, "Q"
DCB 0x0, 0x0, 0x0 ; `string'
; Function compile flags: /Ogsy
00000 AREA |.text| { |LoadPlatformRegistrySettings| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 |LoadPlatformRegistrySettings| PROC
; 218 : {
00000 |$L37880|
00000 e92d4070 stmdb sp!, {r4 - r6, lr}
00004 e24dd014 sub sp, sp, #0x14
00008 |$M37878|
00008 e1a05000 mov r5, r0
; 219 : DWORD dwRegVal;
; 220 : DWORD dwDataSize;
; 221 : DWORD dwType;
; 222 :
; 223 : dwDataSize = sizeof(DWORD);
; 224 : if( ERROR_SUCCESS == RegQueryValueEx( hKeyDevice, CARDDETECT_IRQ_TEXT,
; 225 : NULL, &dwType, (LPBYTE)&dwRegVal, &dwDataSize ) &&
; 226 : REG_DWORD == dwType )
0000c e59f10bc ldr r1, [pc, #0xBC]
00010 e3a06004 mov r6, #4
00014 e28de008 add lr, sp, #8
00018 e28d4010 add r4, sp, #0x10
0001c e28d300c add r3, sp, #0xC
00020 e3a02000 mov r2, #0
00024 e58d6008 str r6, [sp, #8]
00028 e58de004 str lr, [sp, #4]
0002c e58d4000 str r4, [sp]
00030 eb000000 bl RegQueryValueExW
00034 e3500000 cmp r0, #0
00038 1a00001d bne |$L37703|
0003c e59d300c ldr r3, [sp, #0xC]
00040 e3530004 cmp r3, #4
00044 1a00001a bne |$L37703|
; 227 : {
; 228 : dwSDCDIrq = dwRegVal;
00048 e59f207c ldr r2, [pc, #0x7C]
0004c e59d3010 ldr r3, [sp, #0x10]
; 233 : }
; 234 :
; 235 : dwDataSize = sizeof(DWORD);
; 236 : if( ERROR_SUCCESS == RegQueryValueEx( hKeyDevice, CARDDETECT_IST_PRI_TEXT,
; 237 : NULL, &dwType, (LPBYTE)&dwRegVal, &dwDataSize ) &&
; 238 : REG_DWORD == dwType )
00050 e59f1070 ldr r1, [pc, #0x70]
00054 e3a06004 mov r6, #4
00058 e5823000 str r3, [r2]
0005c e28de008 add lr, sp, #8
00060 e28d4010 add r4, sp, #0x10
00064 e28d300c add r3, sp, #0xC
00068 e3a02000 mov r2, #0
0006c e1a00005 mov r0, r5
00070 e58d6008 str r6, [sp, #8]
00074 e58de004 str lr, [sp, #4]
00078 e58d4000 str r4, [sp]
0007c eb000000 bl RegQueryValueExW
00080 e3500000 cmp r0, #0
00084 059d300c ldreq r3, [sp, #0xC]
00088 03530004 cmpeq r3, #4
; 239 : {
; 240 : dwCardDetectIstThreadPriority = dwRegVal;
0008c 059f2030 ldreq r2, [pc, #0x30]
00090 059d3010 ldreq r3, [sp, #0x10]
; 241 : }
; 242 : else
; 243 : {
; 244 : dwCardDetectIstThreadPriority = DEFAULT_CARD_DETECT_IST_PRIORITY;
; 245 : }
; 246 :
; 247 : return TRUE;
00094 03a00001 moveq r0, #1
00098 05823000 streq r3, [r2]
0009c 0a000005 beq |$L37696|
000a0 e59f301c ldr r3, [pc, #0x1C]
000a4 e3a02065 mov r2, #0x65
000a8 e3a00001 mov r0, #1
000ac e5832000 str r2, [r3]
000b0 ea000000 b |$L37696|
000b4 |$L37703|
; 229 : }
; 230 : else
; 231 : {
; 232 : return FALSE;
000b4 e3a00000 mov r0, #0
000b8 |$L37696|
; 248 : }
000b8 e28dd014 add sp, sp, #0x14
000bc e8bd4070 ldmia sp!, {r4 - r6, lr}
000c0 e12fff1e bx lr
000c4 |$L37883|
000c4 00000000 DCD |dwCardDetectIstThreadPriority|
000c8 00000000 DCD |??_C@_1CM@GLNDIDJE@?$AAC?$AAa?$AAr?$AAd?$AAD?$AAe?$AAt?$AAe?$AAc?$AAt?$AAI?$AAS?$AAT?$AAP?$AAr?$AAi?$AAo?$AAr?$AAi?$AAt@|
000cc 00000000 DCD |dwSDCDIrq|
000d0 00000000 DCD |??_C@_1BM@DFAFDEI@?$AAC?$AAa?$AAr?$AAd?$AAD?$AAe?$AAt?$AAe?$AAc?$AAt?$AAI?$AAR?$AAQ?$AA?$AA@|
000d4 |$M37879|
ENDP ; |LoadPlatformRegistrySettings|
END
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -