-
Notifications
You must be signed in to change notification settings - Fork 0
NT32
See Nt32Pkg for information on the EDK II source package.
NT32 has not been updated to work w/ 64bit (x64). The environment uses the 32-bit Windows API and compiles IA32 UEFI applications.
The default configuration for NT32 emulates two graphics controllers/monitors through the use of Windows. This allows developers to develop UEFI Apps/Utilities with multi-head environments in mind. The NT32 configuration can be adjusted by changing the following PCD in the NT32.dsc file. Each emulated GOP console is separated by ‘!’. You can reduce down to a single console by removing “!UGA Windows 2”, or you can add more consoles by extending the string with more console names separated by ‘!’.
gEfiNt32PkgTokenSpaceGuid.PcdWinNtGop|L"UGA Window 1!UGA Window 2"|VOID*|52
Referring to running the NT32 Emulation if you are writing an EFI shell script, where do scripts need to be? Fixed place?
NT32 maps two file systems at the shell. These are listed as fs0:/fs1: or fsnt0:/fsnt1: (depending on shell version). You need to give the path in the WORKSPACE to where fsnt0 and fsnt1 are mapped by default. You also need to describe how additional file systems can be mounted in NT32 using PCDs The default for Nt32 emulation is in Nt32Pkg.dsc :
gEfiNt32PkgTokenSpaceGuid.PcdWinNtFileSystem|L".!..\..\..\..\EdkShellBinPkg\Bin\Ia32\Apps"|VOID*|106
In NT32, Microsoft Windows XP would invoke the Visual Studio debugger at a CpuBreakpoint() or ASSERT in an UEFI Application. Then you could start stepping into your “c” source code. In Microsoft Windows 7 it just exits with an error from the “Build Run” command.
This problem can be fixed by adding a missing string value to the registry.
- Run the RegEdt32
- Navigate to the HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows NT\CurrentVersion\AeDebug
- Add a string value entry called "Auto" with a value of "1"
The Registry value should appear as follows:
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows NT\CurrentVersion\AeDebug] "UserDebuggerHotKey"=dword:00000000 "Debugger"="\"C:\\Windows\\system32\\VSJitDebugger.exe\" -p %ld -e %ld" "Auto"="1"
After making this change, if NT32 emulation generates an exception, it will bring up a dialog asking if you want to debug in Visual Studio.
The storage of NV RAM variables for the Nt32Pkg emulation is in the Nt32.fd file in the output build directory, for example, build/NT32/DEBUG_VS2010x86/FV/NT32.fd using VS 2010 and Win 7 X64. If you issue another “Build” this is cleared for the next time “Build Run" is executed.