?? atapipm.cod
字號:
; 298 : if(dwStatus != ERROR_SUCCESS) {
0008c e59430b0 ldr r3, [r4, #0xB0]
00090 e3a02001 mov r2, #1
00094 e5849014 str r9, [r4, #0x14]
00098 e1a0e00f mov lr, pc
0009c e12fff13 bx r3
000a0 e3500000 cmp r0, #0
; 299 : DEBUGMSG(ZONE_WARNING, (_T("CDiskPower::DiskPowerThread: DevicePowerNotify('%s', D%d) failed %d\r\n"), m_pszPMName, m_timeoutDx, dwStatus));
; 300 : m_fReductionRequested = FALSE;
000a4 15848014 strne r8, [r4, #0x14]
000a8 |$L32089|
; 301 : }
; 302 : }
; 303 :
; 304 : // no need for more timeouts until the disk spins up again
; 305 : hev = m_hevPowerSignal;
; 306 : dwTimeout = INFINITE;
000a8 e3e05000 mvn r5, #0
; 307 : } else {
000ac ea000006 b |$L32518|
000b0 |$L32084|
; 308 : DEBUGMSG(ZONE_POWER, (_T("CDiskPower::DiskPowerThread: activity on '%s' after timeout, device at D%d\r\n"), m_pszPMName, m_curDx));
; 309 : DEBUGCHK(hev == m_hevDummy);
; 310 :
; 311 : // if we are already at or below the spin-down disk power state we don't need
; 312 : // to have a timeout. The comparison relies on the fact that D0 >= Dx >= D4.
; 313 : if(m_curDx < m_timeoutDx) {
000b0 e5942008 ldr r2, [r4, #8]
000b4 e594300c ldr r3, [r4, #0xC]
000b8 e1520003 cmp r2, r3
; 314 : dwTimeout = m_dwPowerTimeout;
000bc b5945018 ldrlt r5, [r4, #0x18]
; 315 : } else {
; 316 : dwTimeout = INFINITE;
000c0 a3e05000 mvnge r5, #0
; 317 : }
; 318 :
; 319 : // if we are not spun up, allow disk activity to wake us up
; 320 : if(m_curDx != D0) {
000c4 e3520000 cmp r2, #0
000c8 0a000000 beq |$L32096|
000cc |$L32518|
; 321 : hev = m_hevPowerSignal;
000cc e5946020 ldr r6, [r4, #0x20]
000d0 |$L32096|
; 322 : }
; 323 : }
; 324 :
; 325 : // release resources
; 326 : ReleaseCS();
000d0 e5943000 ldr r3, [r4]
000d4 e1a00004 mov r0, r4
000d8 e5933028 ldr r3, [r3, #0x28]
000dc e1a0e00f mov lr, pc
000e0 e12fff13 bx r3
; 327 : m_pDisk->ReleaseCS();
000e4 e5940044 ldr r0, [r4, #0x44]
000e8 e5903000 ldr r3, [r0]
000ec e5933034 ldr r3, [r3, #0x34]
000f0 e1a0e00f mov lr, pc
000f4 e12fff13 bx r3
; 328 : break;
000f8 eaffffc8 b |$L32069|
000fc |$L32076|
; 265 : case WAIT_OBJECT_0:
; 266 : // are we supposed to exit?
; 267 : if(m_fShutdownPowerThread) {
000fc e5943028 ldr r3, [r4, #0x28]
00100 e3530000 cmp r3, #0
00104 1a00000c bne |$L32511|
; 268 : DEBUGMSG(ZONE_INIT, (_T("CDiskPower::DiskPowerThread: shutdown event signaled\r\n")));
; 269 : fDone = TRUE;
; 270 : } else {
; 271 : // ignore further activity until the timeout expires
; 272 : TakeCS(); // Note: if you take the disk cs here, take it first
00108 e5943000 ldr r3, [r4]
0010c e1a00004 mov r0, r4
00110 e5933024 ldr r3, [r3, #0x24]
00114 e1a0e00f mov lr, pc
00118 e12fff13 bx r3
; 273 : DEBUGMSG(ZONE_POWER, (_T("CDiskPower::DiskPowerThread: disk activity detected on '%s', use count is %d\r\n"), m_pszPMName, m_UseCount));
; 274 : DEBUGCHK(hev != m_hevDummy);
; 275 : hev = m_hevDummy;
; 276 : dwTimeout = m_dwPowerTimeout;
; 277 : ReleaseCS();
0011c e5943000 ldr r3, [r4]
00120 e5946024 ldr r6, [r4, #0x24]
00124 e5945018 ldr r5, [r4, #0x18]
00128 e5933028 ldr r3, [r3, #0x28]
0012c e1a00004 mov r0, r4
00130 e1a0e00f mov lr, pc
00134 e12fff13 bx r3
00138 eaffffb8 b |$L32069|
0013c |$L32511|
; 329 : default:
; 330 : DEBUGMSG(ZONE_WARNING, (_T("CDiskPower::DiskPowerThread: WaitForSingleObject() returned %d, error %d\r\n"), dwStatus, GetLastError()));
; 331 : break;
; 332 : }
; 333 : }
; 334 :
; 335 : DEBUGMSG(ZONE_INIT, (_T("CDiskPower::DiskPowerThread: all done\r\n")));
; 336 : return 0;
0013c e3a00000 mov r0, #0
; 337 : }
00140 e8bd43f0 ldmia sp!, {r4 - r9, lr}
00144 e12fff1e bx lr
00148 |$M32520|
ENDP ; |?DiskPowerThread@CDiskPower@@EAAKXZ|, CDiskPower::DiskPowerThread
EXPORT |?DiskPowerThreadStub@CDiskPower@@CAKPAX@Z| ; CDiskPower::DiskPowerThreadStub
00000 AREA |.text| { |?DiskPowerThreadStub@CDiskPower@@CAKPAX@Z| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 AREA |.pdata$$?DiskPowerThreadStub@CDiskPower@@CAKPAX@Z|, PDATA, SELECTION=5, ASSOC=|.text| { |?DiskPowerThreadStub@CDiskPower@@CAKPAX@Z| } ; comdat associative
|$T32532| DCD |$L32531|
DCD 0x40000701
; Function compile flags: /Ogsy
00000 AREA |.text| { |?DiskPowerThreadStub@CDiskPower@@CAKPAX@Z| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 |?DiskPowerThreadStub@CDiskPower@@CAKPAX@Z| PROC ; CDiskPower::DiskPowerThreadStub
; 340 : {
00000 |$L32531|
00000 e52de004 str lr, [sp, #-4]!
00004 |$M32529|
; 341 : PREFAST_DEBUGCHK(lpvParam != NULL);
; 342 : CDiskPower *pDiskPower = (CDiskPower *) lpvParam;
; 343 : DWORD dwStatus = pDiskPower->DiskPowerThread();
; 344 : return dwStatus;
00004 e5903000 ldr r3, [r0]
00008 e593302c ldr r3, [r3, #0x2C]
0000c e1a0e00f mov lr, pc
00010 e12fff13 bx r3
; 345 : }
00014 e49de004 ldr lr, [sp], #4
00018 e12fff1e bx lr
0001c |$M32530|
ENDP ; |?DiskPowerThreadStub@CDiskPower@@CAKPAX@Z|, CDiskPower::DiskPowerThreadStub
EXPORT |??_C@_1BI@CJKPFBEK@?$AAc?$AAo?$AAr?$AAe?$AAd?$AAl?$AAl?$AA?4?$AAd?$AAl?$AAl?$AA?$AA@| [ DATA ] ; `string'
EXPORT |??_C@_1CE@FGGCJKBC@?$AAD?$AAe?$AAv?$AAi?$AAc?$AAe?$AAP?$AAo?$AAw?$AAe?$AAr?$AAN?$AAo?$AAt?$AAi?$AAf?$AAy?$AA?$AA@| [ DATA ] ; `string'
EXPORT |??_C@_1BG@GDPAEPDG@?$AAP?$AAo?$AAw?$AAe?$AAr?$AAC?$AAl?$AAa?$AAs?$AAs?$AA?$AA@| [ DATA ] ; `string'
EXPORT |??_C@_1CE@EEGJGNMM@?$AAI?$AAn?$AAa?$AAc?$AAt?$AAi?$AAv?$AAi?$AAt?$AAy?$AAT?$AAi?$AAm?$AAe?$AAo?$AAu?$AAt?$AA?$AA@| [ DATA ] ; `string'
EXPORT |??_C@_1BE@BELKJIPJ@?$AAT?$AAi?$AAm?$AAe?$AAo?$AAu?$AAt?$AAD?$AAx?$AA?$AA@| [ DATA ] ; `string'
EXPORT |??_C@_1CM@LGCLLEHJ@?$AAI?$AAn?$AAa?$AAc?$AAt?$AAi?$AAv?$AAi?$AAt?$AAy?$AAP?$AAr?$AAi?$AAo?$AAr?$AAi?$AAt?$AAy?$AA2?$AA5@| [ DATA ] ; `string'
EXPORT |??_C@_1EO@JGHMMDDC@?$AA?$HL?$AA8?$AAD?$AAD?$AA6?$AA7?$AA9?$AAC?$AAE?$AA?9?$AA8?$AAA?$AAB?$AA4?$AA?9?$AA4?$AA3?$AAc?$AA8?$AA?9@| [ DATA ] ; `string'
EXPORT |??_C@_17OGBPPHLA@?$AAH?$AAn?$AAd?$AA?$AA@| [ DATA ] ; `string'
EXPORT |??_C@_1GE@ICGPCMGK@?$AA?$HL?$AA?$CF?$AA0?$AA8?$AAx?$AA?9?$AA?$CF?$AA0?$AA4?$AAx?$AA?9?$AA?$CF?$AA0?$AA4?$AAx?$AA?9?$AA?$CF?$AA0?$AA4?$AAx@| [ DATA ] ; `string'
IMPORT |LocalAlloc|
IMPORT |CreateEventW|
IMPORT |RegCloseKey|
IMPORT |FreeLibrary|
IMPORT |LoadLibraryW|
IMPORT |RegOpenKeyExW|
IMPORT |RegQueryValueExW|
IMPORT |CreateThread|
IMPORT |StringCchPrintfW|
IMPORT |EnumDeviceInterfaces|
IMPORT |?SendDiskPowerCommand@CDisk@@QAAHEE@Z| ; CDisk::SendDiskPowerCommand
IMPORT |wcsncpy|
IMPORT |wcslen|
IMPORT |CeSetThreadPriority|
IMPORT |GetProcAddressW|
; File c:\wince500\public\common\sdk\inc\objbase.h
00000 AREA |.text| { |?Init@CDiskPower@@UAAHPAVCDisk@@@Z| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 AREA |.pdata$$?Init@CDiskPower@@UAAHPAVCDisk@@@Z|, PDATA, SELECTION=5, ASSOC=|.text| { |?Init@CDiskPower@@UAAHPAVCDisk@@@Z| } ; comdat associative
|$T32578| DCD |$L32577|
DCD 0x40010602
00000 AREA |.rdata| { |??_C@_1GE@ICGPCMGK@?$AA?$HL?$AA?$CF?$AA0?$AA8?$AAx?$AA?9?$AA?$CF?$AA0?$AA4?$AAx?$AA?9?$AA?$CF?$AA0?$AA4?$AAx?$AA?9?$AA?$CF?$AA0?$AA4?$AAx@| }, DATA, READONLY, SELECTION=2 ; comdat any
|??_C@_1GE@ICGPCMGK@?$AA?$HL?$AA?$CF?$AA0?$AA8?$AAx?$AA?9?$AA?$CF?$AA0?$AA4?$AAx?$AA?9?$AA?$CF?$AA0?$AA4?$AAx?$AA?9?$AA?$CF?$AA0?$AA4?$AAx@| DCB "{"
DCB 0x0, "%", 0x0, "0", 0x0, "8", 0x0, "x", 0x0, "-", 0x0, "%"
DCB 0x0, "0", 0x0, "4", 0x0, "x", 0x0, "-", 0x0, "%", 0x0, "0"
DCB 0x0, "4", 0x0, "x", 0x0, "-", 0x0, "%", 0x0, "0", 0x0, "4"
DCB 0x0, "x", 0x0, "-", 0x0, "%", 0x0, "0", 0x0, "2", 0x0, "x"
DCB 0x0, "%", 0x0, "0", 0x0, "2", 0x0, "x", 0x0, "%", 0x0, "0"
DCB 0x0, "2", 0x0, "x", 0x0, "%", 0x0, "0", 0x0, "2", 0x0, "x"
DCB 0x0, "%", 0x0, "0", 0x0, "2", 0x0, "x", 0x0, "%", 0x0, "0"
DCB 0x0, "2", 0x0, "x", 0x0, "}", 0x0, "\\", 0x0, "%", 0x0, "s"
DCB 0x0, 0x0, 0x0 ; `string'
00000 AREA |.rdata| { |??_C@_17OGBPPHLA@?$AAH?$AAn?$AAd?$AA?$AA@| }, DATA, READONLY, SELECTION=2 ; comdat any
|??_C@_17OGBPPHLA@?$AAH?$AAn?$AAd?$AA?$AA@| DCB "H", 0x0, "n", 0x0, "d", 0x0
DCB 0x0, 0x0 ; `string'
00000 AREA |.rdata| { |??_C@_1EO@JGHMMDDC@?$AA?$HL?$AA8?$AAD?$AAD?$AA6?$AA7?$AA9?$AAC?$AAE?$AA?9?$AA8?$AAA?$AAB?$AA4?$AA?9?$AA4?$AA3?$AAc?$AA8?$AA?9@| }, DATA, READONLY, SELECTION=2 ; comdat any
|??_C@_1EO@JGHMMDDC@?$AA?$HL?$AA8?$AAD?$AAD?$AA6?$AA7?$AA9?$AAC?$AAE?$AA?9?$AA8?$AAA?$AAB?$AA4?$AA?9?$AA4?$AA3?$AAc?$AA8?$AA?9@| DCB "{"
DCB 0x0, "8", 0x0, "D", 0x0, "D", 0x0, "6", 0x0, "7", 0x0, "9"
DCB 0x0, "C", 0x0, "E", 0x0, "-", 0x0, "8", 0x0, "A", 0x0, "B"
DCB 0x0, "4", 0x0, "-", 0x0, "4", 0x0, "3", 0x0, "c", 0x0, "8"
DCB 0x0, "-", 0x0, "A", 0x0, "1", 0x0, "4", 0x0, "A", 0x0, "-"
DCB 0x0, "E", 0x0, "A", 0x0, "4", 0x0, "9", 0x0, "6", 0x0, "3"
DCB 0x0, "F", 0x0, "A", 0x0, "A", 0x0, "7", 0x0, "1", 0x0, "5"
DCB 0x0, "}", 0x0, 0x0, 0x0 ; `string'
00000 AREA |.rdata| { |??_C@_1CM@LGCLLEHJ@?$AAI?$AAn?$AAa?$AAc?$AAt?$AAi?$AAv?$AAi?$AAt?$AAy?$AAP?$AAr?$AAi?$AAo?$AAr?$AAi?$AAt?$AAy?$AA2?$AA5@| }, DATA, READONLY, SELECTION=2 ; comdat any
|??_C@_1CM@LGCLLEHJ@?$AAI?$AAn?$AAa?$AAc?$AAt?$AAi?$AAv?$AAi?$AAt?$AAy?$AAP?$AAr?$AAi?$AAo?$AAr?$AAi?$AAt?$AAy?$AA2?$AA5@| DCB "I"
DCB 0x0, "n", 0x0, "a", 0x0, "c", 0x0, "t", 0x0, "i", 0x0, "v"
DCB 0x0, "i", 0x0, "t", 0x0, "y", 0x0, "P", 0x0, "r", 0x0, "i"
DCB 0x0, "o", 0x0, "r", 0x0, "i", 0x0, "t", 0x0, "y", 0x0, "2"
DCB 0x0, "5", 0x0, "6", 0x0, 0x0, 0x0 ; `string'
00000 AREA |.rdata| { |??_C@_1BE@BELKJIPJ@?$AAT?$AAi?$AAm?$AAe?$AAo?$AAu?$AAt?$AAD?$AAx?$AA?$AA@| }, DATA, READONLY, SELECTION=2 ; comdat any
|??_C@_1BE@BELKJIPJ@?$AAT?$AAi?$AAm?$AAe?$AAo?$AAu?$AAt?$AAD?$AAx?$AA?$AA@| DCB "T"
DCB 0x0, "i", 0x0, "m", 0x0, "e", 0x0, "o", 0x0, "u", 0x0, "t"
DCB 0x0, "D", 0x0, "x", 0x0, 0x0, 0x0 ; `string'
00000 AREA |.rdata| { |??_C@_1CE@EEGJGNMM@?$AAI?$AAn?$AAa?$AAc?$AAt?$AAi?$AAv?$AAi?$AAt?$AAy?$AAT?$AAi?$AAm?$AAe?$AAo?$AAu?$AAt?$AA?$AA@| }, DATA, READONLY, SELECTION=2 ; comdat any
|??_C@_1CE@EEGJGNMM@?$AAI?$AAn?$AAa?$AAc?$AAt?$AAi?$AAv?$AAi?$AAt?$AAy?$AAT?$AAi?$AAm?$AAe?$AAo?$AAu?$AAt?$AA?$AA@| DCB "I"
DCB 0x0, "n", 0x0, "a", 0x0, "c", 0x0, "t", 0x0, "i", 0x0, "v"
DCB 0x0, "i", 0x0, "t", 0x0, "y", 0x0, "T", 0x0, "i", 0x0, "m"
DCB 0x0, "e", 0x0, "o", 0x0, "u", 0x0, "t", 0x0, 0x0, 0x0 ; `string'
00000 AREA |.rdata| { |??_C@_1BG@GDPAEPDG@?$AAP?$AAo?$AAw?$AAe?$AAr?$AAC?$AAl?$AAa?$AAs?$AAs?$AA?$AA@| }, DATA, READONLY, SELECTION=2 ; comdat any
|??_C@_1BG@GDPAEPDG@?$AAP?$AAo?$AAw?$AAe?$AAr?$AAC?$AAl?$AAa?$AAs?$AAs?$AA?$AA@| DCB "P"
DCB 0x0, "o", 0x0, "w", 0x0, "e", 0x0, "r", 0x0, "C", 0x0, "l"
DCB 0x0, "a", 0x0, "s", 0x0, "s", 0x0, 0x0, 0x0 ; `string'
00000 AREA |.rdata| { |??_C@_1CE@FGGCJKBC@?$AAD?$AAe?$AAv?$AAi?$AAc?$AAe?$AAP?$AAo?$AAw?$AAe?$AAr?$AAN?$AAo?$AAt?$AAi?$AAf?$AAy?$AA?$AA@| }, DATA, READONLY, SELECTION=2 ; comdat any
|??_C@_1CE@FGGCJKBC@?$AAD?$AAe?$AAv?$AAi?$AAc?$AAe?$AAP?$AAo?$AAw?$AAe?$AAr?$AAN?$AAo?$AAt?$AAi?$AAf?$AAy?$AA?$AA@| DCB "D"
DCB 0x0, "e", 0x0, "v", 0x0, "i", 0x0, "c", 0x0, "e", 0x0, "P"
DCB 0x0, "o", 0x0, "w", 0x0, "e", 0x0, "r", 0x0, "N", 0x0, "o"
DCB 0x0, "t", 0x0, "i", 0x0, "f", 0x0, "y", 0x0, 0x0, 0x0 ; `string'
00000 AREA |.rdata| { |??_C@_1BI@CJKPFBEK@?$AAc?$AAo?$AAr?$AAe?$AAd?$AAl?$AAl?$AA?4?$AAd?$AAl?$AAl?$AA?$AA@| }, DATA, READONLY, SELECTION=2 ; comdat any
|??_C@_1BI@CJKPFBEK@?$AAc?$AAo?$AAr?$AAe?$AAd?$AAl?$AAl?$AA?4?$AAd?$AAl?$AAl?$AA?$AA@| DCB "c"
DCB 0x0, "o", 0x0, "r", 0x0, "e", 0x0, "d", 0x0, "l", 0x0, "l"
DCB 0x0, ".", 0x0, "d", 0x0, "l", 0x0, "l", 0x0, 0x0, 0x0 ; `string'
; Function compile flags: /Ogsy
; File c:\wince500\platform\smdk2410\drivers\atapi\atapipm.cpp
00000 AREA |.text| { |?Init@CDiskPower@@UAAHPAVCDisk@@@Z| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 |?Init@CDiskPower@@UAAHPAVCDisk@@@Z| PROC ; CDiskPower::Init
; 351 : {
00000 |$L32577|
00000 e92d4ff0 stmdb sp!, {r4 - r11, lr}
00004 e24ddfba sub sp, sp, #0xBA, 30
00008 |$M32575|
00008 e1a05000 mov r5, r0
0000c e58d504c str r5, [sp, #0x4C]
; 352 : DWORD dwStatus;
; 353 : GUID gPMClass;
; 354 : int nPriority = 250; // THREAD_PRIORITY_ABOVE_NORMAL
; 355 : HANDLE hActive = NULL;
; 356 : BOOL fOk = TRUE;
; 357 :
; 358 : PREFAST_DEBUGCHK(pDiskParent != NULL);
; 359 : DEBUGMSG(ZONE_INIT, (_T("+CDiskPower::Init(): parent is 0x%08x\r\n"), pDiskParent));
; 360 :
; 361 : // record the parent device
; 362 : m_pDisk = pDiskParent;
; 363 :
; 364 : // get a pointer to the PM APIs we need
; 365 : if(fOk) {
; 366 : HMODULE hmCoreDll = LoadLibrary(L"coredll.dll");
00010 e59f03fc ldr r0, [pc, #0x3FC]
00014 e3a080fa mov r8, #0xFA
00018 e58d8048 str r8, [sp, #0x48]
0001c e3a07000 mov r7, #0
00020 e3a04001 mov r4, #1
00024 e5851044 str r1, [r5, #0x44]
00028 eb000000 bl LoadLibraryW
0002c e1b06000 movs r6, r0
; 367 : if(hmCoreDll == NULL) {
; 368 : DEBUGMSG(ZONE_INIT || ZONE_ERROR, (_T("CDevicePower::Init: LoadLibrary('coredll.dll') failed %d\r\n"), GetLastError()));
; 369 : fOk = FALSE;
; 370 : } else {
00030 0a0000e0 beq |$L32574|
; 371 : m_pfnDevicePowerNotify = (DWORD ((*)(PVOID, CEDEVICE_POWER_STATE, DWORD))) GetProcAddress(hmCoreDll, L"DevicePowerNotify");
00034 e59f13d4 ldr r1, [pc, #0x3D4]
00038 e1a00006 mov r0, r6
0003c eb000000 bl GetProcAddressW
00040 e3500000 cmp r0, #0
00044 e58500b0 str r0, [r5, #0xB0]
; 372 : if(m_pfnDevicePowerNotify == NULL) {
; 373 : DEBUGMSG(ZONE_INIT || ZONE_ERROR, (_T("CDevicePower::Init: GetProcAddress('DevicePowerNotify') failed %d\r\n"), GetLastError()));
; 374 : fOk = FALSE;
; 375 : }
; 376 : // we're explicitly linked with coredll so we don't need the handle
; 377 : FreeLibrary(hmCoreDll);
00048 e1a00006 mov r0, r6
0004c 03a04000 moveq r4, #0
00050 eb000000 bl FreeLibrary
; 378 : }
; 379 : }
; 380 :
; 381 : // read registry configuration
; 382 : if(fOk) {
00054 e3540000 cmp r4, #0
00058 0a0000e0 beq |$L32213|
; 383 : HKEY hk;
; 384 : BOOL fGotClass = FALSE;
; 385 : WCHAR szClass[64]; // big enough for a GUID
; 386 :
; 387 : // determine the power class we are advertising
; 388 : dwStatus = RegOpenKeyEx(HKEY_LOCAL_MACHINE, m_pDisk->m_szDeviceKey, 0, 0, &hk);
0005c e5952044 ldr r2, [r5, #0x44]
00060 e28de028 add lr, sp, #0x28
00064 e3a03000 mov r3, #0
00068 e2821f9e add r1, r2, #0x9E, 30
0006c e3a02000 mov r2, #0
00070 e3a0010a mov r0, #0xA, 2
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -