Changeset 8263 for trunk/src/kernel32/oslibdos.cpp
- Timestamp:
- Apr 13, 2002, 9:47:24 AM (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/oslibdos.cpp
r8261 r8263 1 /* $Id: oslibdos.cpp,v 1.9 8 2002-04-13 07:41:31bird Exp $ */1 /* $Id: oslibdos.cpp,v 1.99 2002-04-13 07:47:24 bird Exp $ */ 2 2 /* 3 3 * Wrappers for OS/2 Dos* API … … 2967 2967 BOOL flagTiledData = FALSE; 2968 2968 2969 #define MEM_TILED_CEILING 0x1fffffff2970 2971 // bounce buffer support2972 // make sure no parameter or data buffer can pass the tiled memory region2973 // barrier (usually 512MB). OS/2 kernel does not correctly translate these2974 // addresses to a 16:16 address used in device driver land. In fact,2975 // DosDevIOCtl is not a high memory enabled API!2976 2977 if (pTiledParm && (((DWORD)pTiledParm + max(dwParmMaxLen, *pdwParmLen)) > MEM_TILED_CEILING))2978 {2979 rc = DosAllocMem(&pTiledParm, dwParmMaxLen, PAG_READ | PAG_WRITE);2980 if (rc)2981 goto _exit_ioctl;2982 2983 flagTiledParm = TRUE;2984 }2985 2986 if (pTiledData && (((DWORD)pTiledData + max(dwDataMaxLen, *pdwDataLen)) > MEM_TILED_CEILING))2987 {2988 rc = DosAllocMem(&pTiledData, dwDataMaxLen, PAG_READ | PAG_WRITE);2989 if (rc)2990 goto _exit_ioctl;2991 2992 flagTiledData = TRUE;2993 }2994 2995 // copy data from real buffers to2996 // bounce buffers if necessary2997 if (pTiledParm != pParm)2998 memcpy(pTiledParm, pParm, *pdwParmLen);2999 3000 if (pTiledData != pData)3001 memcpy(pTiledData, pData, *pdwDataLen);3002 3003 2969 #if 1 3004 2970 /* … … 3054 3020 3055 3021 #endif 3022 3023 #define MEM_TILED_CEILING 0x1fffffff 3024 3025 // bounce buffer support 3026 // make sure no parameter or data buffer can pass the tiled memory region 3027 // barrier (usually 512MB). OS/2 kernel does not correctly translate these 3028 // addresses to a 16:16 address used in device driver land. In fact, 3029 // DosDevIOCtl is not a high memory enabled API! 3030 3031 if (pTiledParm && (((DWORD)pTiledParm + max(dwParmMaxLen, *pdwParmLen)) > MEM_TILED_CEILING)) 3032 { 3033 rc = DosAllocMem(&pTiledParm, dwParmMaxLen, PAG_READ | PAG_WRITE); 3034 if (rc) 3035 goto _exit_ioctl; 3036 3037 flagTiledParm = TRUE; 3038 } 3039 3040 if (pTiledData && (((DWORD)pTiledData + max(dwDataMaxLen, *pdwDataLen)) > MEM_TILED_CEILING)) 3041 { 3042 rc = DosAllocMem(&pTiledData, dwDataMaxLen, PAG_READ | PAG_WRITE); 3043 if (rc) 3044 goto _exit_ioctl; 3045 3046 flagTiledData = TRUE; 3047 } 3048 3049 // copy data from real buffers to 3050 // bounce buffers if necessary 3051 if (pTiledParm != pParm) 3052 memcpy(pTiledParm, pParm, *pdwParmLen); 3053 3054 if (pTiledData != pData) 3055 memcpy(pTiledData, pData, *pdwDataLen); 3056 3056 3057 3057 3058 rc = DosDevIOCtl( (HFILE)hFile, dwCat, dwFunc,
Note:
See TracChangeset
for help on using the changeset viewer.