This week I was assigned the task of deploying a Windows 8.1 Enterprise x64 image to a few Surface 2 Pro machines, using ConfigMgr 2012 SP1 CU3 integrated with MDT 2012 Update 1.
I had already created the necessary WinPE 5.0 boot images as outlined on Niall Brady's blog, and applied the UEFI fix from Ronni Pedersens blog to the task sequence, but deployment still failed with the following error:
OsdDiskPart.exe – Application Error
The instruction at 0x5706c0b9 referenced memory at 0x00000680. The memory could not be read. Click on OK to terminate the program.
After some research, this turned out to be another known issue. The task sequence creates EFI partitions on the drive multiple times, and that causes OsdDiskpart.exe to choke and die.
Note: This is also valid for ConfigMgr 2012 R2 and MDT 2013, and not only for Surface 2, but for about any deployment of UEFI enabled devices. It totally sucks that these bugs weren't fixed before release, but at least there are good workarounds.
Configure the two extra UEFI partition steps to not create EFI partitions, but instead just create and format a single partition. See below example (and then repeat for the second "Format and Partition Disk (UEFI) action").