On Apr 11, 2013, at 6:04 AM, Duane Voth <dua...@gmail.com> wrote:

> Thanks Andrew, I'll give CpuBreakpoint() a try.  Is there a good place you 
> know of where to place a startup breakpoint so that all the system data 
> structures are in place (and Andrei's script will run properly)?
> 

I usually just place it in the entry point of failing driver. 

The serial output has a lot of info about where you are in the boot process. 
This is the output of the EmulatorPkg....

Switch from IA32 to X64 happens in DXE IPL to load DXE Core (produces EFI 
Services):
DXE IPL Entry
0x106f58240 Loading 
/Users/fish/work/edk2TOT/Build/Emulator/DEBUG_XCLANG/X64/MdeModulePkg/Core/Dxe/DxeMain/DEBUG/DxeCore.dll
 with entry point 0x106f5c390
Loading PEIM at 0x00106F58000 EntryPoint=0x00106F5C390 DxeCore.efi
PROGRESS CODE: V3021001 I0
Loading DXE CORE at 0x00106F58000 EntryPoint=0x00106F5C390
Install PPI: 605EA650-C65C-42E1-BA80-91A52AB618C6
0x106f58000 Loading 
/Users/fish/work/edk2TOT/Build/Emulator/DEBUG_XCLANG/X64/MdeModulePkg/Core/Dxe/DxeMain/DEBUG/DxeCore.dll
 with entry point 0x00000000
HOBLIST address in DXE = 0x106F31018
Memory Allocation 0x00000004 0x106F38000 - 0x106F57FFF
Memory Allocation 0x00000004 0x106FFF000 - 0x106FFFFFF
Memory Allocation 0x00000004 0x106FE9000 - 0x106FFEFFF
Memory Allocation 0x00000004 0x106FE6000 - 0x106FE8FFF
Memory Allocation 0x00000004 0x106FE3000 - 0x106FE5FFF
Memory Allocation 0x00000004 0x106FE0000 - 0x106FE2FFF
Memory Allocation 0x00000004 0x106FDB000 - 0x106FDFFFF
Memory Allocation 0x00000004 0x106FD1000 - 0x106FDAFFF
Memory Allocation 0x00000004 0x106FCD000 - 0x106FD0FFF
Memory Allocation 0x00000004 0x106F92000 - 0x106FCCFFF
Memory Allocation 0x00000004 0x106F58000 - 0x106F91FFF
Memory Allocation 0x00000003 0x106F58000 - 0x106F91FFF
Memory Allocation 0x00000004 0x106F38000 - 0x106F57FFF
Memory Allocation 0x00000004 0x103000000 - 0x10301FFFF
FV Hob            0x102000000 - 0x10257FFFF
FV Hob            0x102580000 - 0x10259FFFF
InstallProtocolInterface: D8117CFE-94A6-11D4-9A3A-0090273FC14D 106F8ED78
InstallProtocolInterface: 8F644FA9-E850-4DB1-9CE2-0B44698E8DA4 106F2DD30
InstallProtocolInterface: 09576E91-6D3F-11D2-8E39-00A0C969723B 106F2E818
InstallProtocolInterface: 8F644FA9-E850-4DB1-9CE2-0B44698E8DA4 106F2DC30
InstallProtocolInterface: 09576E91-6D3F-11D2-8E39-00A0C969723B 106F2E498
InstallProtocolInterface: 220E73B6-6BDB-4413-8405-B974B108619A 106F2DA30
InstallProtocolInterface: EE4E5898-3914-4259-9D6E-DC7BD79403CF 106F8DCA8
InstallProtocolInterface: FC1BCDB0-7D31-49AA-936A-A4600D9DD083 106F8DCA8
InstallProtocolInterface: A31280AD-481E-41B6-95E8-127F4C984779 106F8DCA8

The DXE Core dispatches drivers and you see that info like:
Loading driver 80CF7257-87AB-47F9-A3FE-D50B76D89541
InstallProtocolInterface: 5B1B31A1-9562-11D2-8E3F-00A0C969723B 106D08E40
0x1064ee240 Loading 
/Users/fish/work/edk2TOT/Build/Emulator/DEBUG_XCLANG/X64/MdeModulePkg/Universal/PCD/Dxe/Pcd/DEBUG/PcdDxe.dll
 with entry point 0x1064f0de0
Loading driver at 0x001064EE000 EntryPoint=0x001064F0DE0 PcdDxe.efi

The DEBUG print for "Loading driver at " is coming from: 
https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2/MdeModulePkg/Core/Dxe/Image/Image.c

 Note the long form of the info is coming out of the gdb script in the emulator 
0x1064ee240 Loading 
/Users/fish/work/edk2TOT/Build/Emulator/DEBUG_XCLANG/X64/MdeModulePkg/Universal/PCD/Dxe/Pcd/DEBUG/PcdDxe.dll
 with entry point 0x1064f0de0


I don't use gdb, I've converted to lldb. But with the Xcode version of gdb you 
had to tell gdb what processor architecture you were using since you start 
without a target. So you may just get the default processor mode that was 
compiled into gdb when you launch it. 

Thanks,

Andrew Fish



> Andrei - ouch that syntax :)   Is there anyway we can get to DxeCore.gST ?   
> Perhaps GenFw...  Will send patches as I gain certainty I'm doing it right!  
> However it seems that the two (or more?) environments want different answers 
> - my patches for GCC will likely break the greater numbers using MSC - I'm 
> not willing to do that...
> ------------------------------------------------------------------------------
> Precog is a next-generation analytics platform capable of advanced
> analytics on semi-structured data. The platform includes APIs for building
> apps and a phenomenal toolset for data science. Developers can use
> our toolset for easy data analysis & visualization. Get a free account!
> http://www2.precog.com/precogplatform/slashdotnewsletter_______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/edk2-devel


------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to