[MinnowBoard] How to build the firmware image with SourceLevelDebugPkg?

Fan, Jeff jeff.fan at intel.com
Wed Apr 1 08:18:07 UTC 2015


HI,

Anyway, support SourcelevelDebugPkg needs some additional size in firmware image.
Generally, increasing FV section size is one correct method if FV size is not enough.

About the USB 2.0 port, if you want to boot firmware without HOST, please plug out the USB debug cable.

And, it seems that you do not link PeCoffExtraActionLib correctly. Please refer the following in OvmfPkg.dsc.
!ifdef $(SOURCE_DEBUG_ENABLE)
  PeCoffExtraActionLib|SourceLevelDebugPkg/Library/PeCoffExtraActionLibDebug/PeCoffExtraActionLibDebug.inf
!else
  PeCoffExtraActionLib|MdePkg/Library/BasePeCoffExtraActionLibNull/BasePeCoffExtraActionLibNull.inf
  DebugAgentLib|MdeModulePkg/Library/DebugAgentLibNull/DebugAgentLibNull.inf
!endif

Thanks!
Jeff
From: Anteja Vuk-Maček [mailto:anteja.vukmacek at gmail.com]
Sent: Wednesday, April 01, 2015 2:46 PM
To: edk2-devel at lists.sourceforge.net; elinux-minnowboard at lists.elinux.org; Fan, Jeff; Wei, David
Subject: How to build the firmware image with SourceLevelDebugPkg?

Hi,

  I want do source level debugging with ajays usb 2.0 debug device  and I use UDK-debuger-tool-use-manuel-SR1-v1-91 (https://firmware.intel.com/sites/default/files/UDK-Debugger-Tool-User-Manual-SR1-v1-91_0.pdf).

  When I did all changes and executed build -D SOURCE_DEBUG_ENABLE command, compiler gave me error ( error 3000:  Invalid required Fv image size 0x2e890 exeeds the set fv image size 0x2d000 enFds.exe).

Next thing I did was changing fv recovery and fv recovery in Vlv2TbltDevicePkg/PlatformPkg.fdf,
FLASH_REGION_FV_RECOVERY2_SIZE to 0x0002A000 and changed FLASH_REGION_FV_RECOVERY_OFFSET to 0x002D0000 and FLASH_REGION_FV_RECOVERY_SIZE 0x00030000.  When I did this changes, I compiled firmware image with success but firmware didn't work correctly they don't boot to the end.

I got only this log with  teraterm when was minnowMax booting.

 >>>>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 0x000FFFDE8A0 EntryPoint=0x000FFFDEB00 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 0x000FFFE03A0 EntryPoint=0x000FFFE0600 DebugAgentPei.efi
PROGRESS CODE: V3020002 I0
POSTCODE=<F5BD>
Install PPI: 3CD652B4-6D33-4DCE-89DB-83DF9766FCCA
Register PPI Notify: F894643D-C449-42D1-8EA8-85BDD8C65BDE
TimerFrequency  = 0x369E99
TimerStartValue = 0x0
TimerEndValue   = 0xFFFFFF
UsbDbg: Start EHCI debug port initialization!
USB Debugging__Function:InitializeUsbDebugHardware__Need to reset the host controller.USB Debugging__Function:InitializeUsbDebugHardware__Reset the host controller
USB Debugging__Function:InitializeUsbDebugHardware__Reset the debug port.
USB Debugging__Function:InitializeUsbDebugHardware__Enable Usb Debug Port Capability.
PROGRESS CODE: V3020003 I0
Loading PEIM at 0x000FFFE79A0 EntryPoint=0x000FFFE7C00 PchEarlyInitPeim.efi
PROGRESS CODE: V3020002 I0
POSTCODE=<45FF>
PROGRESS CODE: V3020003 I0
Loading PEIM at 0x000FFFEB4A0 EntryPoint=0x000FFFEB700 MemoryInit.efi
PROGRESS CODE: V3020002 I0
POSTCODE=<43B3>
Reg_EFF_DualCH_EN = 0x200301C0.
Buffer size brefore add 1673, after adjust 1680.
MRC Parameters not valid. status is 8000000E
MmioConf0[0xFED0E220], MmioPadval[0xFED0E228]
Gpio_S5_5 value is 0x3
Determine the memory size is [2GB]
DRAM_Speed is 1, EccEnabled = 1
MemoryInit for Minnow2
tCL = 11
tRP_tRCD = 11
tWR = 12
tWTR = 6
tRRD = 6
tRTP = 6
tFAW = 32
PROGRESS CODE: V51001 I0
POSTCODE=<0024>
PROGRESS CODE: V51002 I0
POSTCODE=<0025>
PROGRESS CODE: V51003 I0
POSTCODE=<0027>
Configuring Memory...
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
 Current function  is DisableRank2RankSwitching
 Current function  is MMRC_RcvnTrain
 ReceiveEnable: ch 0
ReceiveEnableEntryHooks: ch 0
DecodeAndExeRegAssignment: ch 0
CPGC_Setup: ch 0 rk 0
CPGC_S_SetupSeq: ch 0
GetSetDataSignal - RCVN_MIN: ch 0
GetSetDataSignal - DELAYS_RCVN_DEL: ch 0
GetSetDataSignal - RCVN_MIN: ch 0
GetSetDataSignal - DELAYS_RCVN_DEL: ch 0
GetSetDataSignal - RCVN_MIN: ch 0
GetSetDataSignal - DELAYS_RCVN_DEL: ch 0
GetSetDataSignal - RCVN_MIN: ch 0
GetSetDataSignal - DELAYS_RCVN_DEL: ch 0
GetSetDataSignal - RCVN_MIN: ch 0
GetSetDataSignal - DELAYS_RCVN_DEL: ch 0
GetSetDataSignal - RCVN_MIN: ch 0
GetSetDataSignal - DELAYS_RCVN_DEL: ch 0
GetSetDataSignal - RCVN_MIN: ch 0
GetSetDataSignal - DELAYS_RCVN_DEL: ch 0
GetSetDataSignal - RCVN_MIN: ch 0
GetSetDataSignal - DELAYS_RCVN_DEL: ch 0
JedecCmd - JEDEC_PRECHARGEALL: ch 0 rk 0
GetSetDataSignal - strob 0: ch 0 rk 0
GetSetDataSignal -

I think my firmware don't work correctly and in manual is written :  "The target image can still run without a host-side debugger. In this situation, the target image will pause for a few seconds at a time to continue trying to detect the existence of a debug host and will perform a normal boot if a timeout occurs."

Problem:  Why don't have space in fv recovery for SourceLevelDebugPkg and  what I need to do for solve this problem?  May  somebody tell  me what I must to do  to build the firmware image with SourceLevelDebugPkg?

Best regards,
Anteja Vuk-Maček
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.elinux.org/pipermail/elinux-minnowboard/attachments/20150401/7dc9f36d/attachment-0001.html>


More information about the elinux-MinnowBoard mailing list