Geeks With Blogs
Kate Moss' Open Space July 2011 Entries
How to Install Bootsector for Bootable CE Partition
To prepare a bootable CE disk for PC based system, you need to create the partition, format it and transfer the booting files. CE provides a tool CESYS.EXE to transfer boot sector and copy bootloader to target volume for BIOSLOADER. The tool is created since CE 4 and unfortunately, it is out dated and only support FAT12 or FAT16. Modern storage devices have larger capacity and prefer or require to use FAT32/ExFAT. For CE7, there is a new CESYS platform\CEPC\src\boot\tool... that ......

Posted On Tuesday, July 26, 2011 5:08 PM

Passing a Buffer in User Mode Stack to Drivers
Consider the following code piece, it may look fine at the first glance but could pop out access violation under stress test In the user mode applicatio BYTE buffer[ 256 ]; // On stack DWORD read; while (<condition>) { if (ReadFile(hDriver, buffer, sizeof(buffer), &read, NULL) && (read > 0)){ // Do something } } And inside the kernel mode driver: ULONG DRV_Read( HANDLE hOpen, //@parm [IN] HANDLE returned by XXX_Open PUCHAR pBuffer, //@parm [IN,OUT] Pointer to valid memory. ULONG ......

Posted On Saturday, July 9, 2011 6:21 PM

Unaligned Access on ARM
ARM supports unaligned access and CE provides a kernel IOCTL_KLIB_UNALIGNENABLE (refer to http://msdn.microsoft.com/e... for details). Application can use this IOCTL or its helper function, KLibUnalignedAccessEnable, to enable/disable unaligned access. But for some reason, this IOCTL does not work in CE7 under user mode, a workaround is to delegate to a kernel mode library/driver to issue the IOCTL. Or you can use following code to enable it on startup #include ......

Posted On Saturday, July 2, 2011 5:31 PM

Copyright © Kate Moss' Open Space | Powered by: GeeksWithBlogs.net