1#
2#  Copyright (c) 2018, Linaro Limited. All rights reserved.
3#
4#  SPDX-License-Identifier: BSD-2-Clause-Patent
5#
6
7################################################################################
8#
9# FD Section
10# The [FD] Section is made up of the definition statements and a
11# description of what goes into  the Flash Device Image.  Each FD section
12# defines one flash "device" image.  A flash device image may be one of
13# the following: Removable media bootable image (like a boot floppy
14# image,) an Option ROM image (that would be "flashed" into an add-in
15# card,) a System "Flash"  image (that would be burned into a system's
16# flash) or an Update ("Capsule") image that will be used to update and
17# existing system flash.
18#
19################################################################################
20
21[FD.BL33_AP_UEFI]
22BaseAddress   = 0x1AC98000|gArmTokenSpaceGuid.PcdFdBaseAddress  # The base address of the Firmware in NOR Flash.
23Size          = 0x000F0000|gArmTokenSpaceGuid.PcdFdSize         # The size in bytes of the FLASH Device
24ErasePolarity = 1
25
26# This one is tricky, it must be: BlockSize * NumBlocks = Size
27BlockSize     = 0x00001000
28NumBlocks     = 0xF0
29
30################################################################################
31#
32# Following are lists of FD Region layout which correspond to the locations of different
33# images within the flash device.
34#
35# Regions must be defined in ascending order and may not overlap.
36#
37# A Layout Region start with a eight digit hex offset (leading "0x" required) followed by
38# the pipe "|" character, followed by the size of the region, also in hex with the leading
39# "0x" characters. Like:
40# Offset|Size
41# PcdOffsetCName|PcdSizeCName
42# RegionType <FV, DATA, or FILE>
43#
44################################################################################
45
460x00000000|0x000F0000
47gArmTokenSpaceGuid.PcdFvBaseAddress|gArmTokenSpaceGuid.PcdFvSize
48FV = FVMAIN_COMPACT
49
50
51################################################################################
52#
53# FV Section
54#
55# [FV] section is used to define what components or modules are placed within a flash
56# device file.  This section also defines order the components and modules are positioned
57# within the image.  The [FV] section consists of define statements, set statements and
58# module statements.
59#
60################################################################################
61
62[FV.FvMain]
63BlockSize          = 0x40
64NumBlocks          = 0         # This FV gets compressed so make it just big enough
65FvAlignment        = 8         # FV alignment and FV attributes setting.
66ERASE_POLARITY     = 1
67MEMORY_MAPPED      = TRUE
68STICKY_WRITE       = TRUE
69LOCK_CAP           = TRUE
70LOCK_STATUS        = TRUE
71WRITE_DISABLED_CAP = TRUE
72WRITE_ENABLED_CAP  = TRUE
73WRITE_STATUS       = TRUE
74WRITE_LOCK_CAP     = TRUE
75WRITE_LOCK_STATUS  = TRUE
76READ_DISABLED_CAP  = TRUE
77READ_ENABLED_CAP   = TRUE
78READ_STATUS        = TRUE
79READ_LOCK_CAP      = TRUE
80READ_LOCK_STATUS   = TRUE
81
82  APRIORI DXE {
83    INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf
84  }
85
86  INF MdeModulePkg/Core/Dxe/DxeMain.inf
87
88  #
89  # PI DXE Drivers producing Architectural Protocols (EFI Services)
90  #
91  INF ArmPkg/Drivers/CpuDxe/CpuDxe.inf
92  INF MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf
93  INF MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf
94  INF MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf
95  INF EmbeddedPkg/EmbeddedMonotonicCounter/EmbeddedMonotonicCounter.inf
96  INF MdeModulePkg/Universal/ResetSystemRuntimeDxe/ResetSystemRuntimeDxe.inf
97  INF EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClockRuntimeDxe.inf
98  INF EmbeddedPkg/MetronomeDxe/MetronomeDxe.inf
99
100  #
101  # Multiple Console IO support
102  #
103  INF MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatformDxe.inf
104  INF MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf
105  INF MdeModulePkg/Universal/SerialDxe/SerialDxe.inf
106
107  INF ArmPkg/Drivers/ArmGic/ArmGicDxe.inf
108  INF ArmPkg/Drivers/TimerDxe/TimerDxe.inf
109
110  INF MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf
111
112  INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf
113
114  #
115  # GPIO
116  #
117  INF Platform/Hisilicon/HiKey960/HiKey960GpioDxe/HiKey960GpioDxe.inf
118  INF ArmPlatformPkg/Drivers/PL061GpioDxe/PL061GpioDxe.inf
119
120  #
121  # Virtual Keyboard
122  #
123  INF EmbeddedPkg/Drivers/VirtualKeyboardDxe/VirtualKeyboardDxe.inf
124
125  INF Platform/Hisilicon/HiKey960/HiKey960Dxe/HiKey960Dxe.inf
126
127  #
128  # USB Host Support
129  #
130  INF MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBusDxe.inf
131
132  #
133  # USB Mass Storage Support
134  #
135  INF MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassStorageDxe.inf
136
137  #
138  # USB Peripheral Support
139  #
140  INF EmbeddedPkg/Drivers/AndroidFastbootTransportUsbDxe/FastbootTransportUsbDxe.inf
141
142  #
143  # Fastboot
144  #
145  INF EmbeddedPkg/Application/AndroidFastboot/AndroidFastbootApp.inf
146
147  #
148  # UEFI Network Stack
149  #
150!include NetworkPkg/Network.fdf.inc
151  #
152  # FAT filesystem + GPT/MBR partitioning
153  #
154  INF MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIoDxe.inf
155  INF MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf
156  INF FatPkg/EnhancedFatDxe/Fat.inf
157  INF MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf
158
159  INF MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf
160
161  INF MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf
162
163  #
164  # UEFI applications
165  #
166  INF ShellPkg/Application/Shell/Shell.inf
167!ifdef $(INCLUDE_TFTP_COMMAND)
168  INF ShellPkg/DynamicCommand/TftpDynamicCommand/TftpDynamicCommand.inf
169!endif #$(INCLUDE_TFTP_COMMAND)
170
171  #
172  # Bds
173  #
174  INF MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf
175  INF MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf
176  INF MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineDxe.inf
177  INF MdeModulePkg/Universal/BdsDxe/BdsDxe.inf
178  INF MdeModulePkg/Application/UiApp/UiApp.inf
179
180[FV.FVMAIN_COMPACT]
181FvAlignment        = 8
182ERASE_POLARITY     = 1
183MEMORY_MAPPED      = TRUE
184STICKY_WRITE       = TRUE
185LOCK_CAP           = TRUE
186LOCK_STATUS        = TRUE
187WRITE_DISABLED_CAP = TRUE
188WRITE_ENABLED_CAP  = TRUE
189WRITE_STATUS       = TRUE
190WRITE_LOCK_CAP     = TRUE
191WRITE_LOCK_STATUS  = TRUE
192READ_DISABLED_CAP  = TRUE
193READ_ENABLED_CAP   = TRUE
194READ_STATUS        = TRUE
195READ_LOCK_CAP      = TRUE
196READ_LOCK_STATUS   = TRUE
197
198  INF ArmPlatformPkg/PrePi/PeiUniCore.inf
199
200  FILE FV_IMAGE = 9E21FD93-9C72-4c15-8C4B-E77F1DB2D792 {
201    SECTION GUIDED EE4E5898-3914-4259-9D6E-DC7BD79403CF PROCESSING_REQUIRED = TRUE {
202      SECTION FV_IMAGE = FVMAIN
203    }
204  }
205
206!include Silicon/Hisilicon/Hisilicon.fdf.inc
207