⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 atamain.cod

📁 PXA270的BSP
💻 COD
📖 第 1 页 / 共 5 页
字号:
	IMPORT	|?PostInit@CDisk@@QAAHPAU_POST_INIT_BUF@@@Z| ; CDisk::PostInit
	IMPORT	|?PerformIoctl@CDisk@@QAAHPAU_IOREQ@@@Z| ; CDisk::PerformIoctl
	IMPORT	|memset|
	IMPORT	|__C_specific_handler|
	IMPORT	|SetLastError|
	IMPORT	|GetCallerProcess|

  00000			 AREA	 |.text| { |DSK_IOControl| }, CODE, ARM, SELECTION=1 ; comdat noduplicate

  00000			 AREA	 |.xdata$$DSK_IOControl|, DATA, SELECTION=5, ASSOC=|.text| { |DSK_IOControl| } ; comdat associative
|$T33604| DCD	0x1
	DCD	|$L33587|
	DCD	|$L33588|
	DCD	|$L33583|
	DCD	|$L33584|

  00000			 AREA	 |.text| { |DSK_IOControl| }, CODE, ARM, SELECTION=1 ; comdat noduplicate

  00000			 AREA	 |.pdata$$DSK_IOControl|, PDATA, SELECTION=5, ASSOC=|.text| { |DSK_IOControl| } ; comdat associative
|$T33606| DCD	|$L33605|
	DCD	0xc0003504

  00000			 AREA	 |.text| { |DSK_IOControl| }, CODE, ARM, SELECTION=1 ; comdat noduplicate

  00000			 AREA	 |.pdata$$DSK_IOControl|, PDATA, SELECTION=5, ASSOC=|.text| { |DSK_IOControl| } ; comdat associative
|$T33608| DCD	|$L33583|
	DCD	0x40000300
; Function compile flags: /Ogsy

  00000			 AREA	 |.text| { |DSK_IOControl| }, CODE, ARM, SELECTION=1 ; comdat noduplicate

  00000	00000000	 DCD         |__C_specific_handler|
  00004	00000000	 DCD         |$T33604|

  00008		 |DSK_IOControl| PROC

; 689  : {

  00008		 |$L33605|
  00008	e1a0c00d	 mov         r12, sp
  0000c	e92d59f0	 stmdb       sp!, {r4 - r8, r11, r12, lr}
  00010	e28db020	 add         r11, sp, #0x20
  00014	e24dd038	 sub         sp, sp, #0x38
  00018		 |$L33602|
  00018	e1a08003	 mov         r8, r3
  0001c	e1a07002	 mov         r7, r2
  00020	e1a06001	 mov         r6, r1
  00024	e1a05000	 mov         r5, r0

; 690  :     BOOL fRet = FALSE;
; 691  :     CDisk *pDisk = (CDisk *)pHandle;
; 692  :     //DEBUGMSG( ZONE_MAIN, (TEXT("ATAPI:DSK_IOControl request Handle = %08X dwCode=%ld\r\n"), pHandle, dwIoControlCode));
; 693  : 	//* * * CAMSDB040204 - Added this for testing. (START)
; 694  : 	//DEBUGMSG(1, (TEXT("ATAPI:DSK_IOControl request Handle = %08X dwCode=%ld\r\n"), pHandle, dwIoControlCode));
; 695  : 	//* * * CAMSDB040204 - Added this for testing. (END)
; 696  : 
; 697  : 	//RETAILMSG(1,(TEXT("IOControler=0x%x\r\n"),dwIoControlCode));
; 698  : 
; 699  : 	//if ( (dwIoControlCode==1) || (dwIoControlCode==1) )
; 700  : 	//	return TRUE ;
; 701  :     
; 702  : 	EnterCriticalSection( &g_csMain);

  00028	e3a04000	 mov         r4, #0
  0002c	e59f00b0	 ldr         r0, [pc, #0xB0]
  00030	eb000000	 bl          EnterCriticalSection

; 703  :     if (!AtaIsValidDisk(pDisk)) 

  00034	e1a00005	 mov         r0, r5
  00038	eb000000	 bl          |?AtaIsValidDisk@@YAHPAVCDisk@@@Z|
  0003c	e3500000	 cmp         r0, #0

; 704  :     {
; 705  :         pDisk = NULL;

  00040	03a05000	 moveq       r5, #0

; 706  :     }
; 707  :     LeaveCriticalSection( &g_csMain);

  00044	e59f0098	 ldr         r0, [pc, #0x98]
  00048	eb000000	 bl          LeaveCriticalSection

; 708  :     if (pDisk) {

  0004c	e3550000	 cmp         r5, #0
  00050	0a00001e	 beq         |$L33150|

; 709  :         if (dwIoControlCode == DISK_IOCTL_INITIALIZED) 

  00054	e3560004	 cmp         r6, #4
  00058	1a000004	 bne         |$L33156|

; 710  :         {
; 711  :             fRet = pDisk->PostInit( (PPOST_INIT_BUF) pInBuf);

  0005c	e1a01007	 mov         r1, r7
  00060	e1a00005	 mov         r0, r5
  00064	eb000000	 bl          |?PostInit@CDisk@@QAAHPAU_POST_INIT_BUF@@@Z|
  00068	e1a04000	 mov         r4, r0

; 712  :         } 
; 713  :         else 

  0006c	ea000017	 b           |$L33150|
  00070		 |$L33156|

; 714  :         {
; 715  :             IOREQ IOReq;
; 716  :             
; 717  :             memset( &IOReq, 0, sizeof(IOReq));

  00070	e3a02030	 mov         r2, #0x30
  00074	e3a01000	 mov         r1, #0
  00078	e24b0050	 sub         r0, r11, #0x50
  0007c	eb000000	 bl          memset

; 718  :             IOReq.dwCode = dwIoControlCode;
; 719  :             IOReq.pInBuf = pInBuf;
; 720  :             IOReq.dwInBufSize = nInBufSize;
; 721  :             IOReq.pOutBuf = pOutBuf;

  00080	e59b3000	 ldr         r3, [r11]

; 722  :             IOReq.dwOutBufSize = nOutBufSize;

  00084	e59b2004	 ldr         r2, [r11, #4]

; 723  :             IOReq.pBytesReturned = pBytesReturned;

  00088	e59b1008	 ldr         r1, [r11, #8]
  0008c	e50b3030	 str         r3, [r11, #-0x30]
  00090	e50b202c	 str         r2, [r11, #-0x2C]
  00094	e50b1028	 str         r1, [r11, #-0x28]
  00098	e50b603c	 str         r6, [r11, #-0x3C]
  0009c	e50b7038	 str         r7, [r11, #-0x38]
  000a0	e50b8034	 str         r8, [r11, #-0x34]

; 724  :             IOReq.hProcess = GetCallerProcess();

  000a4	eb000000	 bl          GetCallerProcess
  000a8	e50b0044	 str         r0, [r11, #-0x44]
  000ac		 |$L33587|

; 725  :             
; 726  :             __try 
; 727  :             {
; 728  :                 DEBUGMSG( ZONE_IOCTL, (TEXT("Enter ioctl %08X\r\n"), dwIoControlCode));
; 729  :                 fRet = pDisk->PerformIoctl(&IOReq);

  000ac	e24b1050	 sub         r1, r11, #0x50
  000b0	e1a00005	 mov         r0, r5
  000b4	eb000000	 bl          |?PerformIoctl@CDisk@@QAAHPAU_IOREQ@@@Z|
  000b8	e1a04000	 mov         r4, r0
  000bc	e50b4058	 str         r4, [r11, #-0x58]
  000c0		 |$L33588|

; 730  :                 DEBUGMSG( ZONE_IOCTL, (TEXT("Exit ioctl %08X\r\n"), dwIoControlCode));
; 731  :             } 
; 732  :             __except(EXCEPTION_EXECUTE_HANDLER) 

  000c0	ea000002	 b           |$L33150|
  000c4		 |$L33584|

; 733  :             {
; 734  :                 DEBUGMSG( ZONE_ERROR, (TEXT("ATAPI:Exception in PerformIoctl !!!\r\n")));
; 735  :                 fRet = FALSE;
; 736  :                 SetLastError(ERROR_GEN_FAILURE);

  000c4	e3a0001f	 mov         r0, #0x1F
  000c8	e3a04000	 mov         r4, #0
  000cc	eb000000	 bl          SetLastError
  000d0		 |$L33150|

; 737  :             }
; 738  :         }
; 739  :     }    
; 740  :     return fRet;

  000d0	e1a00004	 mov         r0, r4

; 741  : }

  000d4	e91b69f0	 ldmdb       r11, {r4 - r8, r11, sp, lr}
  000d8	e12fff1e	 bx          lr

			 ENDP  ; |DSK_IOControl|

  000dc		 |$L33586|
  000dc		 |$L33603|
  000dc		 |$L33583|

; 730  :                 DEBUGMSG( ZONE_IOCTL, (TEXT("Exit ioctl %08X\r\n"), dwIoControlCode));
; 731  :             } 
; 732  :             __except(EXCEPTION_EXECUTE_HANDLER) 

  000dc	e3a00001	 mov         r0, #1
  000e0		 |$L33585|
  000e0	e1a0f00e	 mov         pc, lr
  000e4		 |$L33612|
  000e4	00000000	 DCD         |?g_csMain@@3UCRITICAL_SECTION@@A|
  000e8		 |$L33607|
	EXPORT	|DSK_Read|

  00000			 AREA	 |.text| { |DSK_Read| }, CODE, ARM, SELECTION=1 ; comdat noduplicate

  00000			 AREA	 |.pdata$$DSK_Read|, PDATA, SELECTION=5, ASSOC=|.text| { |DSK_Read| } ; comdat associative
|$T33620| DCD	|$L33619|
	DCD	0x40000601
; Function compile flags: /Ogsy

  00000			 AREA	 |.text| { |DSK_Read| }, CODE, ARM, SELECTION=1 ; comdat noduplicate

  00000		 |DSK_Read| PROC

; 745  : {   

  00000		 |$L33619|
  00000	e52de004	 str         lr, [sp, #-4]!
  00004		 |$M33617|

; 746  :     SetLastError(ERROR_NOT_SUPPORTED);

  00004	e3a00032	 mov         r0, #0x32
  00008	eb000000	 bl          SetLastError

; 747  :     return 0;

  0000c	e3a00000	 mov         r0, #0

; 748  : }

  00010	e49de004	 ldr         lr, [sp], #4
  00014	e12fff1e	 bx          lr
  00018		 |$M33618|

			 ENDP  ; |DSK_Read|

	EXPORT	|DSK_Write|

  00000			 AREA	 |.text| { |DSK_Write| }, CODE, ARM, SELECTION=1 ; comdat noduplicate

  00000			 AREA	 |.pdata$$DSK_Write|, PDATA, SELECTION=5, ASSOC=|.text| { |DSK_Write| } ; comdat associative
|$T33629| DCD	|$L33628|
	DCD	0x40000601
; Function compile flags: /Ogsy

  00000			 AREA	 |.text| { |DSK_Write| }, CODE, ARM, SELECTION=1 ; comdat noduplicate

  00000		 |DSK_Write| PROC

; 752  : {   

  00000		 |$L33628|
  00000	e52de004	 str         lr, [sp, #-4]!
  00004		 |$M33626|

; 753  : 	DEBUGMSG( ZONE_ERROR, (TEXT("ATAPI:DSK_Write(...) failed.  Use IOCTL.\r\n")));
; 754  :     SetLastError(ERROR_NOT_SUPPORTED);

  00004	e3a00032	 mov         r0, #0x32
  00008	eb000000	 bl          SetLastError

; 755  :     return 0;

  0000c	e3a00000	 mov         r0, #0

; 756  : }

  00010	e49de004	 ldr         lr, [sp], #4
  00014	e12fff1e	 bx          lr
  00018		 |$M33627|

			 ENDP  ; |DSK_Write|

	EXPORT	|DSK_Seek|

  00000			 AREA	 |.text| { |DSK_Seek| }, CODE, ARM, SELECTION=1 ; comdat noduplicate

  00000			 AREA	 |.pdata$$DSK_Seek|, PDATA, SELECTION=5, ASSOC=|.text| { |DSK_Seek| } ; comdat associative
|$T33638| DCD	|$L33637|
	DCD	0x40000601
; Function compile flags: /Ogsy

  00000			 AREA	 |.text| { |DSK_Seek| }, CODE, ARM, SELECTION=1 ; comdat noduplicate

  00000		 |DSK_Seek| PROC

; 760  : {

  00000		 |$L33637|
  00000	e52de004	 str         lr, [sp, #-4]!
  00004		 |$M33635|

; 761  :     SetLastError(ERROR_NOT_SUPPORTED);

  00004	e3a00032	 mov         r0, #0x32
  00008	eb000000	 bl          SetLastError

; 762  :     return 0;

  0000c	e3a00000	 mov         r0, #0

; 763  : }

  00010	e49de004	 ldr         lr, [sp], #4
  00014	e12fff1e	 bx          lr
  00018		 |$M33636|

			 ENDP  ; |DSK_Seek|

	EXPORT	|DSK_PowerUp|
; File c:\wince500\platform\bvdmain\drivers\atapi\diskmain.h

  00000			 AREA	 |.text| { |DSK_PowerUp| }, CODE, ARM, SELECTION=1 ; comdat noduplicate

  00000			 AREA	 |.pdata$$DSK_PowerUp|, PDATA, SELECTION=5, ASSOC=|.text| { |DSK_PowerUp| } ; comdat associative
|$T33651| DCD	|$L33650|
	DCD	0x40001201
; Function compile flags: /Ogsy
; File c:\wince500\platform\bvdmain\drivers\atapi\atamain.cpp

  00000			 AREA	 |.text| { |DSK_PowerUp| }, CODE, ARM, SELECTION=1 ; comdat noduplicate

  00000		 |DSK_PowerUp| PROC

; 766  : {

  00000		 |$L33650|
  00000	e92d4010	 stmdb       sp!, {r4, lr}
  00004		 |$M33648|

; 767  :     EnterCriticalSection(&g_csMain);

  00004	e59f4038	 ldr         r4, [pc, #0x38]
  00008	e1a00004	 mov         r0, r4
  0000c	eb000000	 bl          EnterCriticalSection

; 768  :     CDisk *pDisk = g_pDiskRoot;

  00010	e594309c	 ldr         r3, [r4, #0x9C]
  00014	e1b01003	 movs        r1, r3

; 769  :     while(pDisk) 

  00018	0a000005	 beq         |$L33186|
  0001c		 |$L33185|

; 770  :     {
; 771  :         pDisk->PowerUp();

  0001c	e5913004	 ldr         r3, [r1, #4]

; 772  :         pDisk = pDisk->m_pNextDisk;

  00020	e591200c	 ldr         r2, [r1, #0xC]
  00024	e3c33401	 bic         r3, r3, #1, 8
  00028	e5813004	 str         r3, [r1, #4]
  0002c	e1b01002	 movs        r1, r2
  00030	1afffff9	 bne         |$L33185|
  00034		 |$L33186|

; 773  :     }
; 774  :     LeaveCriticalSection(&g_csMain);

  00034	e1a00004	 mov         r0, r4
  00038	eb000000	 bl          LeaveCriticalSection

; 775  : }

  0003c	e8bd4010	 ldmia       sp!, {r4, lr}
  00040	e12fff1e	 bx          lr
  00044		 |$L33653|
  00044	00000000	 DCD         |?g_csMain@@3UCRITICAL_SECTION@@A|
  00048		 |$M33649|

			 ENDP  ; |DSK_PowerUp|

	EXPORT	|DSK_PowerDown|
; File c:\wince500\platform\bvdmain\drivers\atapi\diskmain.h

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -