SlideShare a Scribd company logo
HII Compile
Based on EDKII
Nov.21.2013
Boy.Wang
1. The HII Database is the resource that serves as the
repository of all the form, string, image and font data for
the system.
2. The Driver Install elements (such as fonts, strings, images
and forms) into the HII Database.
3. The Forms Browser uses these elements to render the UI
on the display devices.
.vfr
.c
.uni
HII
database
HII String Pack (.uni)
HII String Pack - .uni to .h .c
1. The build.exe will get all the string IDs from the .uni files.
2. Macros will be generated in “$BASE_NAME + StrDefs.h” and included
by AutoGen.h for the string IDs used.
Those string IDs not used will be generated but commented out.
3. The HII string package data will be generated in AutoGen.c in the form
of a byte array, with array name “$BASE_NAME + Strings”.
.c
.h
.uni
.uni
.uni
Example
SetupUtilityLib.inf
[Defines]
BASE_NAME = SetupUtilityLib
...
[Sources]
CopyRightString.uni
SetupUtilityLibString.uni
SetupUtilityLibStrDefs.h
AutoGen.h AutoGen.c
Main.c, Language.c, ...
SetupUtilityLibString.uni
CopyRightString.uni
/=#
#include "Standard.uni"
#string STR_COPYRIGHT #language en-US “Copyrightn”
...
#ifndef _STRDEFS_912E59DC_
#define _STRDEFS_912E59DC_
...
#define STR_COPYRIGHT 0x0002
#define STR_CHANNELB_STRING 0x0003
#define STR_MISC_BIOS_VERSION 0x0004
#define STR_MAIN_TITLE 0x0005
#define STR_BLANK_STRING 0x0006
#define STR_BIOS_VERSION_STRING 0x0007
#define STR_CPU_TYPE_STRING 0x0008
#define STR_CPU_TYPE_STRING2 0x0009
#define STR_TIME_HELP 0x000A
#define STR_DATE_HELP 0x000B
#define STR_ENABLE_TEXT 0x000C
...
#endif
CopyRightString.uni
/=#
#include "Standard.uni"
#string STR_MISC_BIOS_VERSION #language en-US “Fake”
...
SetupUtilityLibString.uni
SetupUtilityLibStrDefs.h
In order to facilitate localization, users reference strings by an identifier
unique to the package list which the driver installed. Each identifier may
have several translations associated with it.
#ifndef _AUTOGENH_912E59DC_
#define _AUTOGENH_912E59DC_
#include "SetupUtilityLibStrDefs.h"
...
#endif
// 0x0002: STR_COPYRIGHT:0x0002
0x14, 0x43, 0x00, 0x6F, 0x00, 0x70, ...,
...,
// 0x0004: STR_MISC_BIOS_VERSION:0x0004
0x14, 0x44, 0x00, 0x69, 0x00, 0x73, ...,
...,
// PACKAGE DATA
// 0x0001: ???
...,
// 0x0002: STR_COPYRIGHT:0x0002
0x14, 0x46, 0x00, 0x72, 0x00, 0x61, ...,
...,
// 0x0004: STR_MISC_BIOS_VERSION:0x0004
0x14, 0x46, 0x00, 0x61, 0x00, 0x6B, ...,
...,
// PACKAGE DATA
...
};
AutoGen.h
unsigned char SetupUtilityLibStrings[36126 + 4096] = {
// STRGATHER_OUTPUT_HEADER
0x1E, 0x8D, 0x00, 0x00,
// PACKAGE HEADER
...,
// PACKAGE DATA
// 0x0001: ???
...,
AutoGen.c
VFR (.vfr)
Visual Forms Representation
VFR - .vfr to .c
1. VfrCompile.exe will compile VFR into IFR.
2. IFR will be generated in $FILE.c in the form of a byte array, with array
name “$FILE + Bin”.
3. IFR (Internal Forms Representation) is a bunch of byte-code in style of C
that is used for the representation of UI.
.vfr
.vfr
.vfr
.c
.c
.c
Example
SetupUtilityLib.inf - .vfr to .c
[Defines]
BASE_NAME = SetupUtilityLib
...
[Sources]
MainVfr.vfr
BootVfr.vfr
MainVfr.vfr
BootVfr.vfr
MainVfr.c
BootVfr.c
GLOBAL_REMOVE_IF_UNREFERENCED
unsigned char MainVfrBin[] = {
// ARRAY LENGTH
0xCC, 0x02, 0x00, 0x00,
// PACKAGE HEADER
0xC8, 0x02, 0x00, 0x02,
// PACKAGE DATA
0x0E, 0xA7, 0xF4, 0x27, 0x4A, 0xA0,
0x11, 0x3D, 0x05, 0x00, 0x06, 0x00,
0x5E, 0x32, 0xEB, 0x83, 0x26, 0x04,
...
};
MainVfr.c
GLOBAL_REMOVE_IF_UNREFERENCED
unsigned char BootVfrBin[] = {
// ARRAY LENGTH
0x69, 0x0F, 0x00, 0x00,
// PACKAGE HEADER
0x65, 0x0F, 0x00, 0x02,
// PACKAGE DATA
0x0E, 0xA7, 0xF4, 0x27, 0x4A, 0xA0,
0x11, 0x3D, 0x59, 0x00, 0x06, 0x00,
0x5E, 0x32, 0xEB, 0x83, 0x26, 0x04,
...
};
BootVfr.c
Appendix
Preprocess Option - /FI (cl.exe)
This option causes the preprocessor to process the header file specified by
filename before it processes any files specified by #include preprocessor
directives.
/FIfilename
If multiple /FI options are used, the associated files are processed in the
order they are found in the CL environment variable, on the command line, or
in any response file.
Note - (EDK2) HII Compile

More Related Content

What's hot

Introduction to yocto
Introduction to yoctoIntroduction to yocto
Introduction to yocto
Alex Gonzalez
 
Boot process: BIOS vs UEFI
Boot process: BIOS vs UEFIBoot process: BIOS vs UEFI
Boot process: BIOS vs UEFI
Alea Soluciones, S.L.
 
Yocto project and open embedded training
Yocto project and open embedded trainingYocto project and open embedded training
Yocto project and open embedded training
H Ming
 
Bootloaders (U-Boot)
Bootloaders (U-Boot) Bootloaders (U-Boot)
Bootloaders (U-Boot)
Omkar Rane
 
LCA14: LCA14-502: The way to a generic TrustZone® solution
LCA14: LCA14-502: The way to a generic TrustZone® solutionLCA14: LCA14-502: The way to a generic TrustZone® solution
LCA14: LCA14-502: The way to a generic TrustZone® solution
Linaro
 
Qemu Pcie
Qemu PcieQemu Pcie
Page cache in Linux kernel
Page cache in Linux kernelPage cache in Linux kernel
Page cache in Linux kernel
Adrian Huang
 
LCU14 302- How to port OP-TEE to another platform
LCU14 302- How to port OP-TEE to another platformLCU14 302- How to port OP-TEE to another platform
LCU14 302- How to port OP-TEE to another platform
Linaro
 
SFO15-TR9: PSCI, ACPI (and UEFI to boot)
SFO15-TR9: PSCI, ACPI (and UEFI to boot)SFO15-TR9: PSCI, ACPI (and UEFI to boot)
SFO15-TR9: PSCI, ACPI (and UEFI to boot)
Linaro
 
Linux Kernel Booting Process (1) - For NLKB
Linux Kernel Booting Process (1) - For NLKBLinux Kernel Booting Process (1) - For NLKB
Linux Kernel Booting Process (1) - For NLKB
shimosawa
 
Btrfs and Snapper - The Next Steps from Pure Filesystem Features to Integrati...
Btrfs and Snapper - The Next Steps from Pure Filesystem Features to Integrati...Btrfs and Snapper - The Next Steps from Pure Filesystem Features to Integrati...
Btrfs and Snapper - The Next Steps from Pure Filesystem Features to Integrati...
Gábor Nyers
 
Boosting I/O Performance with KVM io_uring
Boosting I/O Performance with KVM io_uringBoosting I/O Performance with KVM io_uring
Boosting I/O Performance with KVM io_uring
ShapeBlue
 
Understanding a kernel oops and a kernel panic
Understanding a kernel oops and a kernel panicUnderstanding a kernel oops and a kernel panic
Understanding a kernel oops and a kernel panic
Joseph Lu
 
Interrupts on xv6
Interrupts on xv6Interrupts on xv6
Interrupts on xv6
Takuya ASADA
 
Diving into SWUpdate: adding new platform support in 30minutes with Yocto/OE !
Diving into SWUpdate: adding new platform support in 30minutes with Yocto/OE !Diving into SWUpdate: adding new platform support in 30minutes with Yocto/OE !
Diving into SWUpdate: adding new platform support in 30minutes with Yocto/OE !
Pierre-jean Texier
 
Uboot startup sequence
Uboot startup sequenceUboot startup sequence
Uboot startup sequenceHoucheng Lin
 
Bootstrap process of u boot (NDS32 RISC CPU)
Bootstrap process of u boot (NDS32 RISC CPU)Bootstrap process of u boot (NDS32 RISC CPU)
Bootstrap process of u boot (NDS32 RISC CPU)
Macpaul Lin
 
HKG15-311: OP-TEE for Beginners and Porting Review
HKG15-311: OP-TEE for Beginners and Porting ReviewHKG15-311: OP-TEE for Beginners and Porting Review
HKG15-311: OP-TEE for Beginners and Porting Review
Linaro
 
Build your own embedded linux distributions by yocto project
Build your own embedded linux distributions by yocto projectBuild your own embedded linux distributions by yocto project
Build your own embedded linux distributions by yocto project
Yen-Chin Lee
 
Vmlinux: anatomy of bzimage and how x86 64 processor is booted
Vmlinux: anatomy of bzimage and how x86 64 processor is bootedVmlinux: anatomy of bzimage and how x86 64 processor is booted
Vmlinux: anatomy of bzimage and how x86 64 processor is booted
Adrian Huang
 

What's hot (20)

Introduction to yocto
Introduction to yoctoIntroduction to yocto
Introduction to yocto
 
Boot process: BIOS vs UEFI
Boot process: BIOS vs UEFIBoot process: BIOS vs UEFI
Boot process: BIOS vs UEFI
 
Yocto project and open embedded training
Yocto project and open embedded trainingYocto project and open embedded training
Yocto project and open embedded training
 
Bootloaders (U-Boot)
Bootloaders (U-Boot) Bootloaders (U-Boot)
Bootloaders (U-Boot)
 
LCA14: LCA14-502: The way to a generic TrustZone® solution
LCA14: LCA14-502: The way to a generic TrustZone® solutionLCA14: LCA14-502: The way to a generic TrustZone® solution
LCA14: LCA14-502: The way to a generic TrustZone® solution
 
Qemu Pcie
Qemu PcieQemu Pcie
Qemu Pcie
 
Page cache in Linux kernel
Page cache in Linux kernelPage cache in Linux kernel
Page cache in Linux kernel
 
LCU14 302- How to port OP-TEE to another platform
LCU14 302- How to port OP-TEE to another platformLCU14 302- How to port OP-TEE to another platform
LCU14 302- How to port OP-TEE to another platform
 
SFO15-TR9: PSCI, ACPI (and UEFI to boot)
SFO15-TR9: PSCI, ACPI (and UEFI to boot)SFO15-TR9: PSCI, ACPI (and UEFI to boot)
SFO15-TR9: PSCI, ACPI (and UEFI to boot)
 
Linux Kernel Booting Process (1) - For NLKB
Linux Kernel Booting Process (1) - For NLKBLinux Kernel Booting Process (1) - For NLKB
Linux Kernel Booting Process (1) - For NLKB
 
Btrfs and Snapper - The Next Steps from Pure Filesystem Features to Integrati...
Btrfs and Snapper - The Next Steps from Pure Filesystem Features to Integrati...Btrfs and Snapper - The Next Steps from Pure Filesystem Features to Integrati...
Btrfs and Snapper - The Next Steps from Pure Filesystem Features to Integrati...
 
Boosting I/O Performance with KVM io_uring
Boosting I/O Performance with KVM io_uringBoosting I/O Performance with KVM io_uring
Boosting I/O Performance with KVM io_uring
 
Understanding a kernel oops and a kernel panic
Understanding a kernel oops and a kernel panicUnderstanding a kernel oops and a kernel panic
Understanding a kernel oops and a kernel panic
 
Interrupts on xv6
Interrupts on xv6Interrupts on xv6
Interrupts on xv6
 
Diving into SWUpdate: adding new platform support in 30minutes with Yocto/OE !
Diving into SWUpdate: adding new platform support in 30minutes with Yocto/OE !Diving into SWUpdate: adding new platform support in 30minutes with Yocto/OE !
Diving into SWUpdate: adding new platform support in 30minutes with Yocto/OE !
 
Uboot startup sequence
Uboot startup sequenceUboot startup sequence
Uboot startup sequence
 
Bootstrap process of u boot (NDS32 RISC CPU)
Bootstrap process of u boot (NDS32 RISC CPU)Bootstrap process of u boot (NDS32 RISC CPU)
Bootstrap process of u boot (NDS32 RISC CPU)
 
HKG15-311: OP-TEE for Beginners and Porting Review
HKG15-311: OP-TEE for Beginners and Porting ReviewHKG15-311: OP-TEE for Beginners and Porting Review
HKG15-311: OP-TEE for Beginners and Porting Review
 
Build your own embedded linux distributions by yocto project
Build your own embedded linux distributions by yocto projectBuild your own embedded linux distributions by yocto project
Build your own embedded linux distributions by yocto project
 
Vmlinux: anatomy of bzimage and how x86 64 processor is booted
Vmlinux: anatomy of bzimage and how x86 64 processor is bootedVmlinux: anatomy of bzimage and how x86 64 processor is booted
Vmlinux: anatomy of bzimage and how x86 64 processor is booted
 

Viewers also liked

決戰巴別塔之巔:Cross platform with c++
決戰巴別塔之巔:Cross platform with c++決戰巴別塔之巔:Cross platform with c++
決戰巴別塔之巔:Cross platform with c++
boyw165
 
Kernel Recipes 2015: Representing device-tree peripherals in ACPI
Kernel Recipes 2015: Representing device-tree peripherals in ACPIKernel Recipes 2015: Representing device-tree peripherals in ACPI
Kernel Recipes 2015: Representing device-tree peripherals in ACPI
Anne Nicolas
 
Note - (EDK2) Acpi Tables Compile and Install
Note - (EDK2) Acpi Tables Compile and InstallNote - (EDK2) Acpi Tables Compile and Install
Note - (EDK2) Acpi Tables Compile and Installboyw165
 
今時のチープなノートPC HP Stream 11でXubuntuを動かす
今時のチープなノートPC HP Stream 11でXubuntuを動かす今時のチープなノートPC HP Stream 11でXubuntuを動かす
今時のチープなノートPC HP Stream 11でXubuntuを動かす
shimadah
 
32bit UEFIマシンで遊ぶ
32bit UEFIマシンで遊ぶ32bit UEFIマシンで遊ぶ
32bit UEFIマシンで遊ぶ
shimadah
 
いまどきのLinuxインストールバトル(新型PC編) OSC2015 Nagoya LT
いまどきのLinuxインストールバトル(新型PC編) OSC2015 Nagoya LTいまどきのLinuxインストールバトル(新型PC編) OSC2015 Nagoya LT
いまどきのLinuxインストールバトル(新型PC編) OSC2015 Nagoya LT
shimadah
 
UEFI時代のブートローダ
UEFI時代のブートローダUEFI時代のブートローダ
UEFI時代のブートローダ
Takuya ASADA
 

Viewers also liked (8)

決戰巴別塔之巔:Cross platform with c++
決戰巴別塔之巔:Cross platform with c++決戰巴別塔之巔:Cross platform with c++
決戰巴別塔之巔:Cross platform with c++
 
Kernel Recipes 2015: Representing device-tree peripherals in ACPI
Kernel Recipes 2015: Representing device-tree peripherals in ACPIKernel Recipes 2015: Representing device-tree peripherals in ACPI
Kernel Recipes 2015: Representing device-tree peripherals in ACPI
 
Note - (EDK2) Acpi Tables Compile and Install
Note - (EDK2) Acpi Tables Compile and InstallNote - (EDK2) Acpi Tables Compile and Install
Note - (EDK2) Acpi Tables Compile and Install
 
今時のチープなノートPC HP Stream 11でXubuntuを動かす
今時のチープなノートPC HP Stream 11でXubuntuを動かす今時のチープなノートPC HP Stream 11でXubuntuを動かす
今時のチープなノートPC HP Stream 11でXubuntuを動かす
 
32bit UEFIマシンで遊ぶ
32bit UEFIマシンで遊ぶ32bit UEFIマシンで遊ぶ
32bit UEFIマシンで遊ぶ
 
いまどきのLinuxインストールバトル(新型PC編) OSC2015 Nagoya LT
いまどきのLinuxインストールバトル(新型PC編) OSC2015 Nagoya LTいまどきのLinuxインストールバトル(新型PC編) OSC2015 Nagoya LT
いまどきのLinuxインストールバトル(新型PC編) OSC2015 Nagoya LT
 
Play with UEFI
Play with UEFIPlay with UEFI
Play with UEFI
 
UEFI時代のブートローダ
UEFI時代のブートローダUEFI時代のブートローダ
UEFI時代のブートローダ
 

Similar to Note - (EDK2) HII Compile

Unit v
Unit vUnit v
Unit v
snehaarao19
 
Linux Kernel Tour
Linux Kernel TourLinux Kernel Tour
Linux Kernel Tour
samrat das
 
Mysql python
Mysql pythonMysql python
Mysql python
Janu Jahnavi
 
Mysql python
Mysql pythonMysql python
Mysql python
Janu Jahnavi
 
DEF CON 27 - KYLE GWINNUP - next generation process emulation with binee
DEF CON 27 - KYLE GWINNUP - next generation process emulation with bineeDEF CON 27 - KYLE GWINNUP - next generation process emulation with binee
DEF CON 27 - KYLE GWINNUP - next generation process emulation with binee
Felipe Prado
 
0x01 - Breaking into Linux VMs for Fun and Profit.pdf
0x01 - Breaking into Linux VMs for Fun and Profit.pdf0x01 - Breaking into Linux VMs for Fun and Profit.pdf
0x01 - Breaking into Linux VMs for Fun and Profit.pdf
scribdsituation719
 
Reversing & malware analysis training part 3 windows pe file format basics
Reversing & malware analysis training part 3   windows pe file format basicsReversing & malware analysis training part 3   windows pe file format basics
Reversing & malware analysis training part 3 windows pe file format basicsAbdulrahman Bassam
 
Learning to Rank Relevant Malware Strings Using Weak Supervision
Learning to Rank Relevant Malware Strings Using Weak SupervisionLearning to Rank Relevant Malware Strings Using Weak Supervision
Learning to Rank Relevant Malware Strings Using Weak Supervision
Phil Tully
 
Lec 47.48 - stream-files
Lec 47.48 - stream-filesLec 47.48 - stream-files
Lec 47.48 - stream-filesPrincess Sam
 
Writing videogames with titanium appcelerator
Writing videogames with titanium appceleratorWriting videogames with titanium appcelerator
Writing videogames with titanium appcelerator
Alessio Ricco
 
Web2py Code Lab
Web2py Code LabWeb2py Code Lab
Web2py Code LabColin Su
 
Sphinx autodoc - automated API documentation (PyCon APAC 2015 in Taiwan)
Sphinx autodoc - automated API documentation (PyCon APAC 2015 in Taiwan)Sphinx autodoc - automated API documentation (PyCon APAC 2015 in Taiwan)
Sphinx autodoc - automated API documentation (PyCon APAC 2015 in Taiwan)
Takayuki Shimizukawa
 
Reversing malware analysis training part3 windows pefile formatbasics
Reversing malware analysis training part3 windows pefile formatbasicsReversing malware analysis training part3 windows pefile formatbasics
Reversing malware analysis training part3 windows pefile formatbasics
Cysinfo Cyber Security Community
 
Reversing & malware analysis training part 3 windows pe file format basics
Reversing & malware analysis training part 3   windows pe file format basicsReversing & malware analysis training part 3   windows pe file format basics
Reversing & malware analysis training part 3 windows pe file format basics
securityxploded
 
Python 내장 함수
Python 내장 함수Python 내장 함수
Python 내장 함수
용 최
 
Cypherock Assessment (1).pdf
Cypherock Assessment (1).pdfCypherock Assessment (1).pdf
Cypherock Assessment (1).pdf
PARNIKA GUPTA
 
Post Exploitation Bliss: Loading Meterpreter on a Factory iPhone, Black Hat U...
Post Exploitation Bliss: Loading Meterpreter on a Factory iPhone, Black Hat U...Post Exploitation Bliss: Loading Meterpreter on a Factory iPhone, Black Hat U...
Post Exploitation Bliss: Loading Meterpreter on a Factory iPhone, Black Hat U...
Vincenzo Iozzo
 
Serialization/deserialization
Serialization/deserializationSerialization/deserialization
Serialization/deserialization
Young Alista
 
"Why is there no artificial intelligence yet?" Or, analysis of CNTK tool kit ...
"Why is there no artificial intelligence yet?" Or, analysis of CNTK tool kit ..."Why is there no artificial intelligence yet?" Or, analysis of CNTK tool kit ...
"Why is there no artificial intelligence yet?" Or, analysis of CNTK tool kit ...
PVS-Studio
 
PVS-Studio, a solution for resource intensive applications development
PVS-Studio, a solution for resource intensive applications developmentPVS-Studio, a solution for resource intensive applications development
PVS-Studio, a solution for resource intensive applications development
OOO "Program Verification Systems"
 

Similar to Note - (EDK2) HII Compile (20)

Unit v
Unit vUnit v
Unit v
 
Linux Kernel Tour
Linux Kernel TourLinux Kernel Tour
Linux Kernel Tour
 
Mysql python
Mysql pythonMysql python
Mysql python
 
Mysql python
Mysql pythonMysql python
Mysql python
 
DEF CON 27 - KYLE GWINNUP - next generation process emulation with binee
DEF CON 27 - KYLE GWINNUP - next generation process emulation with bineeDEF CON 27 - KYLE GWINNUP - next generation process emulation with binee
DEF CON 27 - KYLE GWINNUP - next generation process emulation with binee
 
0x01 - Breaking into Linux VMs for Fun and Profit.pdf
0x01 - Breaking into Linux VMs for Fun and Profit.pdf0x01 - Breaking into Linux VMs for Fun and Profit.pdf
0x01 - Breaking into Linux VMs for Fun and Profit.pdf
 
Reversing & malware analysis training part 3 windows pe file format basics
Reversing & malware analysis training part 3   windows pe file format basicsReversing & malware analysis training part 3   windows pe file format basics
Reversing & malware analysis training part 3 windows pe file format basics
 
Learning to Rank Relevant Malware Strings Using Weak Supervision
Learning to Rank Relevant Malware Strings Using Weak SupervisionLearning to Rank Relevant Malware Strings Using Weak Supervision
Learning to Rank Relevant Malware Strings Using Weak Supervision
 
Lec 47.48 - stream-files
Lec 47.48 - stream-filesLec 47.48 - stream-files
Lec 47.48 - stream-files
 
Writing videogames with titanium appcelerator
Writing videogames with titanium appceleratorWriting videogames with titanium appcelerator
Writing videogames with titanium appcelerator
 
Web2py Code Lab
Web2py Code LabWeb2py Code Lab
Web2py Code Lab
 
Sphinx autodoc - automated API documentation (PyCon APAC 2015 in Taiwan)
Sphinx autodoc - automated API documentation (PyCon APAC 2015 in Taiwan)Sphinx autodoc - automated API documentation (PyCon APAC 2015 in Taiwan)
Sphinx autodoc - automated API documentation (PyCon APAC 2015 in Taiwan)
 
Reversing malware analysis training part3 windows pefile formatbasics
Reversing malware analysis training part3 windows pefile formatbasicsReversing malware analysis training part3 windows pefile formatbasics
Reversing malware analysis training part3 windows pefile formatbasics
 
Reversing & malware analysis training part 3 windows pe file format basics
Reversing & malware analysis training part 3   windows pe file format basicsReversing & malware analysis training part 3   windows pe file format basics
Reversing & malware analysis training part 3 windows pe file format basics
 
Python 내장 함수
Python 내장 함수Python 내장 함수
Python 내장 함수
 
Cypherock Assessment (1).pdf
Cypherock Assessment (1).pdfCypherock Assessment (1).pdf
Cypherock Assessment (1).pdf
 
Post Exploitation Bliss: Loading Meterpreter on a Factory iPhone, Black Hat U...
Post Exploitation Bliss: Loading Meterpreter on a Factory iPhone, Black Hat U...Post Exploitation Bliss: Loading Meterpreter on a Factory iPhone, Black Hat U...
Post Exploitation Bliss: Loading Meterpreter on a Factory iPhone, Black Hat U...
 
Serialization/deserialization
Serialization/deserializationSerialization/deserialization
Serialization/deserialization
 
"Why is there no artificial intelligence yet?" Or, analysis of CNTK tool kit ...
"Why is there no artificial intelligence yet?" Or, analysis of CNTK tool kit ..."Why is there no artificial intelligence yet?" Or, analysis of CNTK tool kit ...
"Why is there no artificial intelligence yet?" Or, analysis of CNTK tool kit ...
 
PVS-Studio, a solution for resource intensive applications development
PVS-Studio, a solution for resource intensive applications developmentPVS-Studio, a solution for resource intensive applications development
PVS-Studio, a solution for resource intensive applications development
 

Recently uploaded

Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Globus
 
openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
Shane Coughlan
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus
 
Game Development with Unity3D (Game Development lecture 3)
Game Development  with Unity3D (Game Development lecture 3)Game Development  with Unity3D (Game Development lecture 3)
Game Development with Unity3D (Game Development lecture 3)
abdulrafaychaudhry
 
Nidhi Software Price. Fact , Costs, Tips
Nidhi Software Price. Fact , Costs, TipsNidhi Software Price. Fact , Costs, Tips
Nidhi Software Price. Fact , Costs, Tips
vrstrong314
 
Mobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona InfotechMobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona Infotech
Drona Infotech
 
Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"
Donna Lenk
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
Globus
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
Philip Schwarz
 
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, BetterWebinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
XfilesPro
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
Fermin Galan
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
Max Andersen
 
Pro Unity Game Development with C-sharp Book
Pro Unity Game Development with C-sharp BookPro Unity Game Development with C-sharp Book
Pro Unity Game Development with C-sharp Book
abdulrafaychaudhry
 
Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
Matt Welsh
 
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus
 
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Globus
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
NYGGS Automation Suite
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
Google
 
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdfVitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke
 
APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)
Boni García
 

Recently uploaded (20)

Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
 
openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
 
Game Development with Unity3D (Game Development lecture 3)
Game Development  with Unity3D (Game Development lecture 3)Game Development  with Unity3D (Game Development lecture 3)
Game Development with Unity3D (Game Development lecture 3)
 
Nidhi Software Price. Fact , Costs, Tips
Nidhi Software Price. Fact , Costs, TipsNidhi Software Price. Fact , Costs, Tips
Nidhi Software Price. Fact , Costs, Tips
 
Mobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona InfotechMobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona Infotech
 
Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
 
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, BetterWebinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
 
Pro Unity Game Development with C-sharp Book
Pro Unity Game Development with C-sharp BookPro Unity Game Development with C-sharp Book
Pro Unity Game Development with C-sharp Book
 
Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
 
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024
 
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
 
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdfVitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdf
 
APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)
 

Note - (EDK2) HII Compile

  • 1. HII Compile Based on EDKII Nov.21.2013 Boy.Wang
  • 2.
  • 3. 1. The HII Database is the resource that serves as the repository of all the form, string, image and font data for the system. 2. The Driver Install elements (such as fonts, strings, images and forms) into the HII Database. 3. The Forms Browser uses these elements to render the UI on the display devices. .vfr .c .uni HII database
  • 5. HII String Pack - .uni to .h .c 1. The build.exe will get all the string IDs from the .uni files. 2. Macros will be generated in “$BASE_NAME + StrDefs.h” and included by AutoGen.h for the string IDs used. Those string IDs not used will be generated but commented out. 3. The HII string package data will be generated in AutoGen.c in the form of a byte array, with array name “$BASE_NAME + Strings”. .c .h .uni .uni .uni
  • 8. /=# #include "Standard.uni" #string STR_COPYRIGHT #language en-US “Copyrightn” ... #ifndef _STRDEFS_912E59DC_ #define _STRDEFS_912E59DC_ ... #define STR_COPYRIGHT 0x0002 #define STR_CHANNELB_STRING 0x0003 #define STR_MISC_BIOS_VERSION 0x0004 #define STR_MAIN_TITLE 0x0005 #define STR_BLANK_STRING 0x0006 #define STR_BIOS_VERSION_STRING 0x0007 #define STR_CPU_TYPE_STRING 0x0008 #define STR_CPU_TYPE_STRING2 0x0009 #define STR_TIME_HELP 0x000A #define STR_DATE_HELP 0x000B #define STR_ENABLE_TEXT 0x000C ... #endif CopyRightString.uni /=# #include "Standard.uni" #string STR_MISC_BIOS_VERSION #language en-US “Fake” ... SetupUtilityLibString.uni SetupUtilityLibStrDefs.h In order to facilitate localization, users reference strings by an identifier unique to the package list which the driver installed. Each identifier may have several translations associated with it.
  • 9. #ifndef _AUTOGENH_912E59DC_ #define _AUTOGENH_912E59DC_ #include "SetupUtilityLibStrDefs.h" ... #endif // 0x0002: STR_COPYRIGHT:0x0002 0x14, 0x43, 0x00, 0x6F, 0x00, 0x70, ..., ..., // 0x0004: STR_MISC_BIOS_VERSION:0x0004 0x14, 0x44, 0x00, 0x69, 0x00, 0x73, ..., ..., // PACKAGE DATA // 0x0001: ??? ..., // 0x0002: STR_COPYRIGHT:0x0002 0x14, 0x46, 0x00, 0x72, 0x00, 0x61, ..., ..., // 0x0004: STR_MISC_BIOS_VERSION:0x0004 0x14, 0x46, 0x00, 0x61, 0x00, 0x6B, ..., ..., // PACKAGE DATA ... }; AutoGen.h unsigned char SetupUtilityLibStrings[36126 + 4096] = { // STRGATHER_OUTPUT_HEADER 0x1E, 0x8D, 0x00, 0x00, // PACKAGE HEADER ..., // PACKAGE DATA // 0x0001: ??? ..., AutoGen.c
  • 10. VFR (.vfr) Visual Forms Representation
  • 11. VFR - .vfr to .c 1. VfrCompile.exe will compile VFR into IFR. 2. IFR will be generated in $FILE.c in the form of a byte array, with array name “$FILE + Bin”. 3. IFR (Internal Forms Representation) is a bunch of byte-code in style of C that is used for the representation of UI. .vfr .vfr .vfr .c .c .c
  • 13. SetupUtilityLib.inf - .vfr to .c [Defines] BASE_NAME = SetupUtilityLib ... [Sources] MainVfr.vfr BootVfr.vfr MainVfr.vfr BootVfr.vfr MainVfr.c BootVfr.c
  • 14. GLOBAL_REMOVE_IF_UNREFERENCED unsigned char MainVfrBin[] = { // ARRAY LENGTH 0xCC, 0x02, 0x00, 0x00, // PACKAGE HEADER 0xC8, 0x02, 0x00, 0x02, // PACKAGE DATA 0x0E, 0xA7, 0xF4, 0x27, 0x4A, 0xA0, 0x11, 0x3D, 0x05, 0x00, 0x06, 0x00, 0x5E, 0x32, 0xEB, 0x83, 0x26, 0x04, ... }; MainVfr.c GLOBAL_REMOVE_IF_UNREFERENCED unsigned char BootVfrBin[] = { // ARRAY LENGTH 0x69, 0x0F, 0x00, 0x00, // PACKAGE HEADER 0x65, 0x0F, 0x00, 0x02, // PACKAGE DATA 0x0E, 0xA7, 0xF4, 0x27, 0x4A, 0xA0, 0x11, 0x3D, 0x59, 0x00, 0x06, 0x00, 0x5E, 0x32, 0xEB, 0x83, 0x26, 0x04, ... }; BootVfr.c
  • 16. Preprocess Option - /FI (cl.exe) This option causes the preprocessor to process the header file specified by filename before it processes any files specified by #include preprocessor directives. /FIfilename If multiple /FI options are used, the associated files are processed in the order they are found in the CL environment variable, on the command line, or in any response file.