Could you add the below debug message to the beginning of 
InitializeUsbDebugHardware() for further debugging?

DEBUG (( EFI_D_INFO,  "UsbDbg: Handle = %08x, Base = %08x, Offset  = %08x\n", 
Handle, Handle->UsbDebugPortMemoryBase, Handle->DebugPortOffset ));

Please stick to 0.78 version and set pcds to the first configuration you shared.

As you can connect usb debug device with WinDbg, we suspect some data 
structures may be corrupted after memory migration in MemoryInit.

Thanks
Feng

From: Anteja Vuk-Maček [mailto:anteja.vukma...@gmail.com]
Sent: Thursday, April 09, 2015 14:35
To: Tian, Feng
Cc: edk2-devel@lists.sourceforge.net; elinux-minnowbo...@lists.elinux.org; He, 
Tim; Wei, David; Lin, Jie
Subject: Re: [edk2] Bug in DebugCommunicationLibUsb

Hi,

I follow UDK Debugger user manual version 1.91 and my PCDs settings are 
matching with real because values for PCDs I see in procesor datasheet. Also, 
with success it connected to the UDK debugger tool+WinDbg andafter that 
firmware stoped and after in WinDbg I command go and than it stoped in 
MemoryInit. And I s
I try default PCD settings

 ( gEfiSourceLevelDebugPkgTokenSpaceGuid.PcdUsbEhciPciAddress 
|0x000E8000|UINT32|0x00000003 ( ehci -> 0.29.0 )
gEfiSourceLevelDebugPkgTokenSpaceGuid.PcdUsbEhciMemorySpaceBase 
|0xd0000000|UINT32|0x00000002
gEfiSourceLevelDebugPkgTokenSpaceGuid.PcdUsbDebugPortMemorySpaceBase 
|0xd0000000|UINT32|0x00000001 )

 and WinDbg was connected and try debug but firmware stoped in MemoryInit.

When I try  PCDs settings

gEfiSourceLevelDebugPkgTokenSpaceGuid.PcdUsbEhciPciAddress 
|0x000E8000|UINT32|0x00000003   ( ehci -> 0.29.0 )
gEfiSourceLevelDebugPkgTokenSpaceGuid.PcdUsbEhciMemorySpaceBase 
|0x00000000|UINT32|0x00000002
gEfiSourceLevelDebugPkgTokenSpaceGuid.PcdUsbDebugPortMemorySpaceBase 
|0x00000000|UINT32|0x00000001

nothing was changed, and WinDbg was also connected on MinnowMax version 0.78 . 
But on MinnowMax version 0.76 firmware was connect to the WinDbg and  stoped me 
in SEC phase and I got only this log  >>>>SecStartup .
Log for MinnowMax version 0.78  :

>>>>SecStartup

Mono Status Code PEIM Loaded
Install PPI: 1F4C6F90-B06B-48D8-A201-BAE5F1CD7D56
Install PPI: AB294A92-EAF5-4CF3-AB2B-2D4BED4DB63D
Register PPI Notify: F894643D-C449-42D1-8EA8-85BDD8C65BDE
GGC: 0x00000210 GMSsize:0x00000002
I'm Minnow2!
CheckCfioPnpSettings: CFIO Pnp Settings Disabled
Setting BootMode to BOOT_WITH_FULL_CONFIGURATION
Setup MMIO size ...

Install PPI: E767BF7F-4DB6-5B34-1011-4FBE4CA7AFD2
PROGRESS CODE: V3020003 I0
Loading PEIM at 0x000FFFDEDA0 EntryPoint=0x000FFFDF000 SeCUma.efi
PROGRESS CODE: V3020002 I0
POSTCODE=<6543>
Install PPI: CBD86677-362F-4C04-9459-A741326E05CF
Info: SeC PPI load sucessfully
PROGRESS CODE: V3020003 I0
Loading PEIM at 0x000FFFE08A0 EntryPoint=0x000FFFE0B00 DebugAgentPei.efi
PROGRESS CODE: V3020002 I0
POSTCODE=<F5BD>
Install PPI: 3CD652B4-6D33-4DCE-89DB-83DF9766FCCA
Register PPI Notify: F894643D-C449-42D1-8EA8-85BDD8C65BDE
USB Debug Port: TimerFrequency  = 0x369E99
USB Debug Port: TimerStartValue = 0x0
USB Debug Port: TimerEndValue   = 0xFFFFFF
UsbDbg: Start EHCI debug port initialization!
UsbDbg: Need to reset the host controller. ControlStatus = 00000000
UsbDbg: Reset the host controller.
UsbDbg: Reset the debug port.
    PDB = 
c:\minnowboard078\Build\Vlv2TbltDevicePkg\DEBUG_VS2008x86\IA32\SourceLevelDebugPkg\DebugAgentPei\DebugAgentPei\DEBUG\DebugAgentPei.pdb
PROGRESS CODE: V3020003 I0
Loading PEIM at 0x000FFFE7F20 EntryPoint=0x000FFFE8180 PchEarlyInitPeim.efi
PROGRESS CODE: V3020002 I0
POSTCODE=<45FF>
PROGRESS CODE: V3020003 I0
Loading PEIM at 0x000FFFEBA20 EntryPoint=0x000FFFEBC80 MemoryInit.efi
PROGRESS CODE: V3020002 I0
POSTCODE=<43B3>
Reg_EFF_DualCH_EN = 0x200301C0.
Buffer size brefore add 165B, after adjust 1668.
MRC Parameters not valid. status is 8000000E
Set MRC paramaters for MinnowBoard Max.
MmioConf0[0xFED0E220], MmioPadval[0xFED0E228]
Gpio_S5_5 value is 0x3
Determine the memory size is [2GB]
DRAM_Speed is 1066MHz!
DRAM_Speed is type 1, EccEnabled = 0
tCL = 7
tRP_tRCD = 7
tWR = 8
tWTR = 5
tRRD = 6
tRTP = 4
tFAW = 28
PROGRESS CODE: V51001 I0
POSTCODE=<0024>
PROGRESS CODE: V51002 I0
POSTCODE=<0025>
PROGRESS CODE: V51003 I0
POSTCODE=<0027>
Configuring Memory...
CheckMicrocodeRevision  = 00000321, CpuId = 00030673
####: ConfigureMemory() Entry
Current function  is McEnableHPET
 Current function  is ClearSelfRefresh
 Current function  is OemTrackInitComplete
 Current function  is ProgSFRVolSel
 Current function  is ProgDdrTimingControl
 Current function  is ProgBunit
 Current function  is ProgMpllSetup
 Current function  is ProgStaticDdrSetup
 Current function  is ProgStaticInitPerf
 Current function  is ProgStaticPwrClkGating
 Current function  is DUnitBlMode
 Current function  is ControlDDR3Reset
 Current function  is EnableVreg
 Current function  is ProgHmc
 Current function  is ProgReadWriteFifoPtr
 Current function  is ProgComp
 Current function  is SetIOBUFACT
 Current function  is ProgDdecodeBeforeJedec
 Current function  is PerformDDR3Reset
 Current function  is PreJedecInit
 Current function  is PerformJedecInit
 Current function  is SetDDRInitializationComplete
 Current function  is PerformJedecInit
 CurrentUsbDbg: Need to reset the host controller. ControlStatus = 10FF00FF
UsbDbg: Reset the host controller.

Problem :  May I got souce code of MemorInt.efi because firmware stoped in 
MemoryInit  I want to know what's  happening ? I try opened and got code in IDA 
but it wasn't readable.
               May somebody tell me  for PcdUsbEhciMemorySpaceBase and 
PcdUsbDebugPortMemorySpaceBase PCDs which value is correct ?

Best regards ,
Anteja Vuk-Maček
------------------------------------------------------------------------------
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to