blob: 33f2ffe4104326491010d3553fc868221800cc38 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
|
# Overview
* **Feature Name:** Logo
* **PI Phase(s) Supported:** DXE
* **SMM Required?** No
## Purpose
This feature provides the Logo image and driver that produces EDKII_PLATFORM_LOGO_PROTOCOL:
1. LogoDxe.inf includes a BMP logo in the EFI file, the driver provides the image via EDKII_PLATFORM_LOGO_PROTOCOL.
2. JpegLogoDxe.inf includes a JPEG logo in the EFI file, the driver uses EFI_HII_IMAGE_DECODER_PROTOCOL to decode the JPEG file and provide the image via EDKII_PLATFORM_LOGO_PROTOCOL.
# High-Level Theory of Operation
The driver produces a EDKII_PLATFORM_LOGO_PROTOCOL to provide a logo picture shown on setup screen.
The Logo file is built in HII package list as EFI resource, the driver uses EFI_HII_DATABASE_PROTOCOL
to the publish HII package list to HII Database and get images via EFI_HII_IMAGE_EX_PROTOCOL.
## Firmware Volumes
* PostMemory
## Modules
A bulleted list of the modules that make up the feature.
* LogoDxe
* JpegLogoDxe
## LogoDxe
This driver provides a bitmap image via EDKII_PLATFORM_LOGO_PROTOCOL.
## JpegLogoDxe
This driver uses EFI_HII_IMAGE_DECODER_PROTOCOL to decode the jpeg data and provide a bitmap image via
EDKII_PLATFORM_LOGO_PROTOCOL.
## Key Functions
* This feature produces a EDKII_PLATFORM_LOGO_PROTOCOL which could be used by consumer such as Edk2\MdeModulePkg\Library\BootLogoLib.
## Configuration
* gLogoFeaturePkgTokenSpaceGuid.PcdLogoFeatureEnable
TRUE: Enable logo feature
FALSE: Disable logo feature
* gLogoFeaturePkgTokenSpaceGuid.PcdJpgEnable
TRUE: Use jpeg logo
FALSE: Use bitmap logo
## Data Flows
Architecturally defined data structures and flows for the feature.
### Data flows of LogoDxe
```txt
| Consumer | | LogoFeatruePkg | |HiiDatabaseDxe|
------------ ------------------ ----------------
| | |
| |--bitmap image data->|
|<---bitmap data--|<-return bitmap data-|
```
### Data flows of JpegLogoDxe
```txt
| Consumer | | LogoFeatruePkg | |HiiDatabaseDxe| | EFI_HII_IMAGE_DECODER_PROTOCOL |
------------ ------------------ ---------------- ----------------------------------
| | | |
| |---Jpeg Image data-->|---------decode Jpeg------->|
|<---bitmap data--|<-return bitmap data-|<-----return bitmap data----|
```
## Control Flows
Consumer gets image from the logo driver via EDKII_PLATFORM_LOGO_PROTOCOL.
## Build Flows
Supported build targets
* VS2019
* CLANGPDB
* GCC5
## Test Point Results
Not available.
## Functional Exit Criteria
* Check wether EDKII_PLATFORM_LOGO_PROTOCOL->GetImage() return a default Intel logo.
* If using jpeg logo, a dex driver which produces EFI_HII_IMAGE_DECODER_PROTOCOL(name is
gEfiHiiImageDecoderNameJpegGuid) is necessary, it is used to decode Jpeg data.
## Feature Enabling Checklist
### Option 1
* Include AdvancedFeatures.dsc in platform dsc file, and use pcd to enable the feature.
```dsc
gLogoFeaturePkgTokenSpaceGuid.PcdLogoFeatureEnable |TRUE
gLogoFeaturePkgTokenSpaceGuid.PcdJpgEnable |FALSE
!include Include/AdvancedFeatures.dsc
```
* Include PreMemory.fdf and inPostMemory.fdf in platform fdf file
```fdf
!include Include/PreMemory.fdf
!include Include/PostMemory.fdf
```
### Option 2
* To use bitmap logo, include "LogoFeaturePkg/LogoDxe/LogoDxe.inf" in platform dsc file, and include
"INF LogoFeaturePkg/LogoDxe/LogoDxe.inf" in platform fdf file.
* To use jpeg logo, include "LogoFeaturePkg/LogoDxe/JpegLogoDxe.inf" in platform dsc file, and include
"INF LogoFeaturePkg/LogoDxe/JpegLogoDxe.inf" in platform fdf file.
## Performance Impact
* LogoDxe
* EFI size: 180 KB
* Time spent in EDKII_PLATFORM_LOGO_PROTOCOL->GetImage(): about 18 milliseconds
* JpegLogoDxe
* EFI size: 13.6 KB
* Time spent in EDKII_PLATFORM_LOGO_PROTOCOL->GetImage(): about 80 milliseconds
|