key learnings from efi framework shipping project
TRANSCRIPT
Key Learnings Key Learnings from EFI from EFI Framework Framework Shipping Shipping ProjectProject
Daniel LinDaniel LinMarketing DirectorMarketing Director
Genius HuangGenius HuangSenior EngineerSenior Engineer
Insyde SoftwareInsyde Software
PFIS003PFIS003
2*Third party marks and brands are the property of their respective owners
AgendaAgenda Why EFI Framework from OEM’s viewpointsWhy EFI Framework from OEM’s viewpoints
Major differences in debugging methods between Major differences in debugging methods between Framework and Legacy BIOS.Framework and Legacy BIOS.
The power of using the Framework to speed up firmware The power of using the Framework to speed up firmware development for your new platforms. development for your new platforms.
How NVRAM variables are used in the Framework and the How NVRAM variables are used in the Framework and the advantages over CMOS.advantages over CMOS.
Reduce your engineering effort by leveraging legacy BIOS Reduce your engineering effort by leveraging legacy BIOS experience while using the Framework experience while using the Framework
3*Third party marks and brands are the property of their respective owners
AgendaAgenda Why EFI Framework from OEM’s viewpointWhy EFI Framework from OEM’s viewpoint
Major differences in debugging methods Major differences in debugging methods between Framework and Legacy BIOS.between Framework and Legacy BIOS.
The power of using the Framework to speed up The power of using the Framework to speed up firmware development for your new platforms. firmware development for your new platforms.
How NVRAM variables are used in the How NVRAM variables are used in the Framework and the advantages over CMOS.Framework and the advantages over CMOS.
Reduce your engineering effort by leveraging Reduce your engineering effort by leveraging legacy BIOS experience while using the legacy BIOS experience while using the Framework Framework
4*Third party marks and brands are the property of their respective owners
Why EFI Framework from OEM’s Why EFI Framework from OEM’s viewpointviewpoint
Multiple hardware's supportMultiple hardware's support Dual core CPU, 64 bit CPU Dual core CPU, 64 bit CPU
New FeaturesNew Features VT, LT and xxT.VT, LT and xxT.
Time-To-MarketTime-To-Market Easy to add and remove featuresEasy to add and remove features Easy to Reuse Code on future platformsEasy to Reuse Code on future platforms High Code QualityHigh Code Quality Good Development and Debug EnvironmentGood Development and Debug Environment Ability to Carve up the project and OutsourceAbility to Carve up the project and Outsource Fast Engineering Learning CurveFast Engineering Learning Curve
5*Third party marks and brands are the property of their respective owners
Framework is technical trend for Framework is technical trend for OEM/ODMOEM/ODM
“ “C” CodeC” Code Code ReuseCode Reuse Driver ModelDriver Model Pre-boot Environment Pre-boot Environment
built-inbuilt-in Networking built in Networking built in
(eg: PXE Boot)(eg: PXE Boot) Backward compatible Backward compatible
with legacy BIOSwith legacy BIOS
legacy O
SL
oad
er
Hardware
Pre-EFI Modules
UEFI
UEFI
PEI FoundationFoundation
Co
mp
atibility S
up
po
rt M
od
ule
EFI OS Loader
Fram
ewo
rk Drivers
EF
I D
rivers
legacy O
ptio
n
RO
Ms
Driver E
xecutio
n E
nviro
nm
entArchitectural Protocols
Platfo
rm D
rivers
6*Third party marks and brands are the property of their respective owners
Viewpoints from a sever maker Viewpoints from a sever maker “Egenera”“Egenera”
OS EFI Requirement OS EFI Requirement New Features New Features Easy to add and remove features Easy to add and remove features Easy to Reuse Code on future platforms Easy to Reuse Code on future platforms High Code QualityHigh Code Quality Good Development and Debug Environment Good Development and Debug Environment Ability to Carve up the project and Outsource Ability to Carve up the project and Outsource Fast Engineering Learning Curve Fast Engineering Learning Curve
7*Third party marks and brands are the property of their respective owners
AgendaAgenda Why EFI framework from OEM’s viewpointWhy EFI framework from OEM’s viewpoint
Major differences in debugging methods between Major differences in debugging methods between Framework and Legacy BIOS.Framework and Legacy BIOS.
The power of using the Framework to speed up firmware The power of using the Framework to speed up firmware development for your new platforms. development for your new platforms.
How NVRAM variables are used in the Framework and the How NVRAM variables are used in the Framework and the advantages over CMOS.advantages over CMOS.
Reduce your engineering effort by leveraging legacy BIOS Reduce your engineering effort by leveraging legacy BIOS experience while using the Frameworkexperience while using the Framework
8*Third party marks and brands are the property of their respective owners
Debugging in legacy BIOSDebugging in legacy BIOS
Port 80 is traditional method for the BIOS Port 80 is traditional method for the BIOS debugdebug
Port 80 with digits output onlyPort 80 with digits output only Forces engineers to guess on execution Forces engineers to guess on execution
locationlocation Any advance debugging requires special Any advance debugging requires special
design, additional software efforts or design, additional software efforts or additional hardware. additional hardware.
9*Third party marks and brands are the property of their respective owners
EFI Framework provides a powerful EFI Framework provides a powerful way of debuggingway of debugging
Built-in debugging mechanismBuilt-in debugging mechanism Debug messages output through serial Debug messages output through serial
portport Debug messages can be defined easily Debug messages can be defined easily
as detail as you need.as detail as you need. Any digits or wording can be transferred Any digits or wording can be transferred
to the debug console without any to the debug console without any additional programming efforts.additional programming efforts.
Symbolic debug message is supported.Symbolic debug message is supported.
10*Third party marks and brands are the property of their respective owners
Insyde debug tools Insyde debug tools Debug even before memory sizingDebug even before memory sizing Set breakpoints in C language, showing Set breakpoints in C language, showing
converted disassembly codes converted disassembly codes simultaneouslysimultaneously
Pure software tool connected thru Pure software tool connected thru standard USB 2.0, parallel portstandard USB 2.0, parallel port
Update flash ROM thru debugger toolUpdate flash ROM thru debugger toolHost Target
USB2.0LPT
USB2.0LPT
H2ODDT
Hyper terminal
USB /LPT cable/COM
Early state debug support, Source codes level debug, Cost saving and easy to use Early state debug support, Source codes level debug, Cost saving and easy to use
11*Third party marks and brands are the property of their respective owners
Using debug messages in code is Using debug messages in code is the same as “printf”the same as “printf”
Example of how to code output debug Example of how to code output debug message in PEI and DXE phasemessage in PEI and DXE phase–PEI phasePEI phase
– PEI_DEBUGPEI_DEBUG((PeiServices, EFI_D_INFO,”Messages”))((PeiServices, EFI_D_INFO,”Messages”))
–DXE/BDS phaseDXE/BDS phase– DEBUGDEBUG((EFI_D_ERROR,”Messages”))((EFI_D_ERROR,”Messages”))
12*Third party marks and brands are the property of their respective owners
Easy to understand debug Easy to understand debug messagesmessages
13*Third party marks and brands are the property of their respective owners
What is the way of debugging for What is the way of debugging for EFI Framework?EFI Framework?
Rich debugging messages Rich debugging messages – Register valueRegister value
– MEM,I/O and CPUMEM,I/O and CPU
– Data structure variableData structure variable
– Full name procedureFull name procedure
– CommentsComments
14*Third party marks and brands are the property of their respective owners
Various debug tools for EFI Various debug tools for EFI Framework developmentFramework development
Hardware DebuggingHardware Debugging– American AriumAmerican Arium
EFI Shell EFI Shell – Command Line ToolsCommand Line Tools
Debug flagsDebug flags– Thru Hyper terminal to show the debug messagesThru Hyper terminal to show the debug messages
DOS utilitiesDOS utilities– DEBUG.EXEDEBUG.EXE– E820.EXE E820.EXE – DMITOOL.EXE DMITOOL.EXE – PCICHK.EXE & PCIDUMP.EXEPCICHK.EXE & PCIDUMP.EXE
15*Third party marks and brands are the property of their respective owners
AgendaAgenda Why EFI framework from OEM’s viewpointWhy EFI framework from OEM’s viewpoint
Major differences in debugging methods between Major differences in debugging methods between Framework and Legacy BIOS.Framework and Legacy BIOS.
The power of using the Framework to speed up The power of using the Framework to speed up firmware development for your new platforms. firmware development for your new platforms.
How NVRAM variables are used in the Framework How NVRAM variables are used in the Framework and the advantages over CMOS.and the advantages over CMOS.
Reduce your engineering effort by leveraging Reduce your engineering effort by leveraging legacy BIOS experience while using the legacy BIOS experience while using the Framework Framework
16*Third party marks and brands are the property of their respective owners
The power of using the Framework to The power of using the Framework to speed up firmware development for speed up firmware development for
your new platforms. your new platforms. Modular code structureModular code structure
–Exchangeable CPU drivers. Exchangeable CPU drivers. Dothan vs. YonahDothan vs. Yonah
Highly reusable modules/driversHighly reusable modules/drivers–OEM features reusableOEM features reusable
EFI Framework tolerates failure EFI Framework tolerates failure components with event log to record the components with event log to record the debug messagesdebug messages
17*Third party marks and brands are the property of their respective owners
Quick bring up works with EFI Quick bring up works with EFI FrameworkFramework
Create your own project folderCreate your own project folder–For your specific projectFor your specific project
Customize GPIO valueCustomize GPIO value– based on the schematicsbased on the schematics
Customize PCI routing tableCustomize PCI routing table–To assign correct resource for your projectTo assign correct resource for your project
Uses EMUVariable driverUses EMUVariable driver–To use RAM as Flash during bring-up stageTo use RAM as Flash during bring-up stage–To save time before flash driver readyTo save time before flash driver ready
Highly utilizing CRB platform source codesHighly utilizing CRB platform source codes
18*Third party marks and brands are the property of their respective owners
AgendaAgenda Why EFI framework from OEM’s viewpointWhy EFI framework from OEM’s viewpoint
Major differences in debugging methods between Major differences in debugging methods between Framework and Legacy BIOS.Framework and Legacy BIOS.
The power of using the Framework to speed up firmware The power of using the Framework to speed up firmware development for your new platforms. development for your new platforms.
How NVRAM variables are used in the Framework and the How NVRAM variables are used in the Framework and the advantages over CMOS.advantages over CMOS.
Reduce your engineering effort by leveraging legacy BIOS Reduce your engineering effort by leveraging legacy BIOS experience while using the Frameworkexperience while using the Framework
19*Third party marks and brands are the property of their respective owners
Contents of Flash part for EFI Contents of Flash part for EFI FrameworkFramework
SEC,PEI and DXE (firmware volumes)SEC,PEI and DXE (firmware volumes)
– SEC initializes cache as RAMSEC initializes cache as RAM– Modules initial codes will be put into PEI phase Modules initial codes will be put into PEI phase – Device drivers will be put into DXE phaseDevice drivers will be put into DXE phase
EC ROMEC ROM– Normally we will treat ECROM as an individual firmware Normally we will treat ECROM as an individual firmware
volumevolume Option ROM /PXEOption ROM /PXE
– Put them into DXE firmware volumePut them into DXE firmware volume CMOS replacementCMOS replacement
– NVRAM Non Volatile RAMNVRAM Non Volatile RAM– Variable storageVariable storage
20*Third party marks and brands are the property of their respective owners
A Firmware Volume is a logical container.A Firmware Volume is a logical container. A flash part may store one or more logical A flash part may store one or more logical
containers.containers. The files which are contained in a The files which are contained in a firmware volume must be accessed firmware volume must be accessed in:in:– Security (SEC) phase orSecurity (SEC) phase or
– Pre-EFI Initialization (PEI) phase or Pre-EFI Initialization (PEI) phase or
– Driver Execution Environment (DXE) phase.Driver Execution Environment (DXE) phase.
What is a Firmware Volume?What is a Firmware Volume?
21*Third party marks and brands are the property of their respective owners
Rationale of Firmware VolumeRationale of Firmware Volume
Firmware Volume Architecture
Firmware Volume
Driver
Firmware Volume Block
Driver
Firmware Storage
Device
Low Level
Interface
Low Level
Interface
File Level
Interface
File Level
Interface
FvbServiceFvbService
Flash Memory Device
Flash Memory Device
22*Third party marks and brands are the property of their respective owners
POST/ RunTime
Code
Boot Block
DXE Phase
Variable Storage
SEC/PEI Phase
VS.
Firmware Volume
Legacy BIOS H2O
Firmware Volume
Firmware Volume
Flash Rom Map – Comparison Flash Rom Map – Comparison between Legacy BIOS and EFI between Legacy BIOS and EFI
FrameworkFramework
23*Third party marks and brands are the property of their respective owners
The advantages of using Variable The advantages of using Variable StorageStorage Flexible Variable Storage location in Flexible Variable Storage location in
flash deviceflash device CMOS replacementCMOS replacement All variables can be defined with any All variables can be defined with any
data types such as byte, words, any data types such as byte, words, any string length depends on the variable string length depends on the variable storage total size. storage total size.
Variables defragment- Two Variables defragment- Two Variable Variable StorageStorage areas for areas for Variable Variable defragment defragment and recovery.and recovery.
24*Third party marks and brands are the property of their respective owners
Variable Storage process flow Variable Storage process flow diagramdiagram
NVRAM 0
NVRAM 1
System Boot
Store MEM to NVRAM1
and NVRAM 0 after
process Defragment
Memory
NVRAM 0 FullNVRAM 0 Full
Copy
Failed to boot
NVRAM 0
NVRAM 1
Memory
Copy
System Boot
25*Third party marks and brands are the property of their respective owners
How to modify your Flash Rom Map How to modify your Flash Rom Map of EFI for a Mobile caseof EFI for a Mobile case
DXE PhaseDXE Phase
NVRAM / CPU micro codeNVRAM / CPU micro code
SEC/PEI PhaseSEC/PEI Phase
DXE PhaseDXE Phase
NVRAM/ CPU micro codeNVRAM/ CPU micro code
SEC/PEI PhaseSEC/PEI Phase
EC RomEC Rom
26*Third party marks and brands are the property of their respective owners
AgendaAgenda Why EFI framework from OEM’s viewpointWhy EFI framework from OEM’s viewpoint
Major differences in debugging methods between Major differences in debugging methods between Framework and Legacy BIOS.Framework and Legacy BIOS.
The power of using the Framework to speed up firmware The power of using the Framework to speed up firmware development for your new platforms. development for your new platforms.
How NVRAM variables are used in the Framework and the How NVRAM variables are used in the Framework and the advantages over CMOS.advantages over CMOS.
Reduce your engineering effort by leveraging legacy BIOS Reduce your engineering effort by leveraging legacy BIOS experience while using the Frameworkexperience while using the Framework
27*Third party marks and brands are the property of their respective owners
Reduce your engineering effort by Reduce your engineering effort by leveraging legacy BIOS experience leveraging legacy BIOS experience
while using the Frameworkwhile using the Framework To reuse OEM drivers which were used To reuse OEM drivers which were used
in previous projectsin previous projects Any drivers can be packaged as binary Any drivers can be packaged as binary
files since all implementations are using files since all implementations are using driver model.driver model.
Simultaneous co-development model- Simultaneous co-development model- Different projects can be shared with the Different projects can be shared with the same feature in binary file format without same feature in binary file format without source codes doing the re-compile.source codes doing the re-compile.
28*Third party marks and brands are the property of their respective owners
Example: How to add /remove an Example: How to add /remove an Application or drivers with simple Application or drivers with simple wayway#
# Drivers necessary to use the debugger# These are placed here so they will load early if they are desired.# NOTE:# Including these in the FV will take over use of the COM port.#Edk\Sample\Universal\Debugger\Debugport\Dxe\DebugPort.inf FV=NULLEdk\Sample\Cpu\DebugSupport\Dxe\DebugSupport.inf FV=NULL
## Following are the DXE drivers (alphabetical order)#
Bus\Isa\IsaBus\Dxe\IsaBus.infBus\Isa\IsaFloppy\Dxe\IsaFloppy.inf
$(SHELL_INF)\Shell.inf# $(SHELL_INF)\Shell.inf
29*Third party marks and brands are the property of their respective owners
Life demo for a debug Life demo for a debug demonstrationdemonstration Debug tool to show how Framework Debug tool to show how Framework
works with first initial PEI codes before works with first initial PEI codes before memory sizingmemory sizing
Debug tool to show modules loading Debug tool to show modules loading sequence sequence
To show how to trace the source EFI To show how to trace the source EFI Framework with Debug toolsFramework with Debug tools
30*Third party marks and brands are the property of their respective owners
SummarySummary Time to MarketTime to Market
– Various platformVarious platform supportssupports with unified EFI with unified EFI Framework is very beneficial for customersFramework is very beneficial for customers
Easy for debugging Easy for debugging – EFI Framework embedded powerful debugging EFI Framework embedded powerful debugging
mechanism mechanism
Easy for developmentEasy for development– Modularity provides flexibility for parallel Modularity provides flexibility for parallel
developmentsdevelopments
Reusable engineering effortsReusable engineering efforts– New features for reuse for different platformsNew features for reuse for different platforms
31*Third party marks and brands are the property of their respective owners
Additional EFI /Framework Additional EFI /Framework Sessions Sessions
DateDate SessionSession IDID CompanyCompany TimeTime
Oct. 27Oct. 27 ““Unified EFI” Industry Unified EFI” Industry Group introduction and the Group introduction and the Firmware Bridge to the Firmware Bridge to the IntelIntel®® EM64T and Microsoft EM64T and Microsoft Vista*Vista*
PFIS001PFIS001 Intel, HPIntel, HP DoneDone
Implementing Implementing Manageable Server Manageable Server Platforms using EFI & Platforms using EFI & The FrameworkThe Framework
PFIS002PFIS002 AMIAMI DoneDone
Key Learnings from EFI Key Learnings from EFI Framework Shipping Framework Shipping ProjectProject
PFIS003PFIS003 InsydeInsyde DoneDone
Implementing the PEI Implementing the PEI and DXE Within and DXE Within Phoenix TrustedCore*Phoenix TrustedCore*
PFIS004PFIS004 PhoenixPhoenix 16:50 - 17:4016:50 - 17:40
Oct. 28Oct. 28 Implementing the Implementing the Framework on non-Framework on non-Intel ChipsetsIntel Chipsets
PSSS006PSSS006 HPHP 11:45 - 12:2511:45 - 12:25
32*Third party marks and brands are the property of their respective owners
Additional Resources for this Additional Resources for this SessionSession
Complete US IDF presentation can be downloaded from Complete US IDF presentation can be downloaded from the IDF web site – when prompted enter:the IDF web site – when prompted enter:
– Username: idfUsername: idf– Password: fall2005Password: fall2005
More web based info:More web based info:http://www.uefi.org
http://www.intel.com/technology/framework http://www.intel.com/technology/efi
http://www.tianocore.org
33*Third party marks and brands are the property of their respective owners
Please fill out the Please fill out the Session Evaluation Session Evaluation Form.Form.
Thank You!Thank You!
34*Third party marks and brands are the property of their respective owners
Backup SlidesBackup Slides
35*Third party marks and brands are the property of their respective owners
Q&AQ&A
36*Third party marks and brands are the property of their respective owners
Demonstration procedure-1Demonstration procedure-1
Hardware configuration Hardware configuration –Host machineHost machine–Target MachineTarget Machine– Insyde USB cableInsyde USB cable–Serial port cableSerial port cable
Software configurationSoftware configuration–Hyper terminalHyper terminal–H2ODDTH2ODDT– Insyde USB driverInsyde USB driver
37*Third party marks and brands are the property of their respective owners
Demonstration scenario-IDemonstration scenario-I Remove RAM from RAM slotRemove RAM from RAM slot Show two windows for Hyper terminal and Insyde Show two windows for Hyper terminal and Insyde
H2ODDTH2ODDT Show break two break points when memory sizing–PEI Show break two break points when memory sizing–PEI
memory init and error handle procedurememory init and error handle procedure We also Show No memory detected at Hyper terminal We also Show No memory detected at Hyper terminal
side when detected no memory in RAM slotside when detected no memory in RAM slot Show source codes at DDT side- MC detect memoryShow source codes at DDT side- MC detect memory Show the exact source code line when it hangs on Show the exact source code line when it hangs on
both hyper terminal and DDTboth hyper terminal and DDT
38*Third party marks and brands are the property of their respective owners
Demonstration scenario- IIDemonstration scenario- II
Install RAM into RAM slotInstall RAM into RAM slot Show the memory init without stopShow the memory init without stop Show the drivers loading sequence via Show the drivers loading sequence via
command line windowcommand line window
39*Third party marks and brands are the property of their respective owners
Demonstration scenario- IIIDemonstration scenario- III
Show host bridge bus0/device 1f /function 0Show host bridge bus0/device 1f /function 0 Show the platform driver how to modify PCI Show the platform driver how to modify PCI
register values- register values- – show the original register values-show the original register values-
– Show platform driver is modifying a GPI rout Show platform driver is modifying a GPI rout registerregister
– Then we can see the change from PCI register Then we can see the change from PCI register dump windows dump windows
PCI E registers dumpPCI E registers dump