Boot WinXP 32/64-bit on UEFI 32/64-bit

I did new tests on ASUS:

  • I installed WinXP x64 in legacy mode on a 100MB FAT32 + 5GB NTFS MBR disk
  • I installed iGPU Intel driver
  • I made an image of NTFS partition in Acronis BR
  • I cleaned the disk and created GPT partitions:

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
     
    select disk 0
    clean
    convert gpt
    create partition efi size=100
    format quick fs=fat32 label="System"
    create partition msr size=16
    create partition primary size=5120
    format quick fs=ntfs label="Windows"
    create partition primary
    format quick fs=ntfs label="Data"
     
  • using Acronis BR, I restored the system from the image to the NTFS partition (Windows)
  • I have copied efi files to the FAT32 partition and winload.efi to NTFS
  • in the BCD file I turned on the debugger and connected a second computer with WinDbg


If I boot the system with CSM enabled and Secure Boot disabled then I have error IRQL_NOT_LESS_OR_EQUAL (0a) caused by VIDEOPRT.SYS:
1
2
3
 
FAULTING_IP:
nt!MmMapIoSpace+46e
fffff800`018e2cae 668b4e1a mov cx,word ptr [rsi+1Ah]
 


If I boot the system with CSM disabled and Secure Boot enabled then I have error PAGE_FAULT_IN_NONPAGED_AREA (50) caused by igxpmp64.sys:
1
2
3
 
FAULTING_IP:
hal!x86BiosExecuteInterrupt+76d
fffff800`01ca664d 0fb608 movzx ecx,byte ptr [rax]
 


This means that WinXP can also be booted from a GPT partition in pure UEFI with the Secure Boot option enabled

WinDbg log CSM on, Secure Boot off: https://pastebin.com/RkxNLrQR
WinDbg log CSM off, Secure Boot on: https://pastebin.com/KPCduyAF