NT32 - tianocorecn/tianocorecn.github.io GitHub Wiki
NT32 questions
NT32 not updated to work w/64bit
It works on win7 as 32 bit but not fully validated.
The NT32 emulation on Win 7 is not fully validated for Win 7 (UDK2010.UP3). On some systems if you try again it works. There also maybe a problem with running the NT32 emulation with multple processors under Win 7. Try limiting the number of intances for the "Build Run" to 1 processor.
Yes, the default configuration for NT32 emulates 2 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?
Yes , NT32 has two file systems –fsnt0 and fsnt1. 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
Windows XP would invoke the Visual Studio debugger with adding a CpuBreakpoint() or an ASSERT in an UEFI Application with Nt32 emulation. Then you could start stepping into your “c” source code. Now with Windows 7 it just exits with an error from the “Build Run” command. Is there a way to have the Visual Studio debugger get invoked in the Nt32 emulation in Windows 7?
Yes,
The problem is that there is a string value missing in the registry that needs to be added to enable this.
- 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"
[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 “Build Run