]>
Commit | Line | Data |
---|---|---|
8de84d42 AB |
1 | #\r |
2 | # Copyright (c) 2011-2015, ARM Limited. All rights reserved.\r | |
3 | # Copyright (c) 2014, Linaro Limited. All rights reserved.\r | |
42e3d9eb | 4 | # Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.\r |
8de84d42 | 5 | #\r |
9792fb0e | 6 | # SPDX-License-Identifier: BSD-2-Clause-Patent\r |
8de84d42 AB |
7 | #\r |
8 | \r | |
9 | ################################################################################\r | |
10 | #\r | |
11 | # FD Section\r | |
12 | # The [FD] Section is made up of the definition statements and a\r | |
13 | # description of what goes into the Flash Device Image. Each FD section\r | |
14 | # defines one flash "device" image. A flash device image may be one of\r | |
15 | # the following: Removable media bootable image (like a boot floppy\r | |
16 | # image,) an Option ROM image (that would be "flashed" into an add-in\r | |
17 | # card,) a System "Flash" image (that would be burned into a system's\r | |
18 | # flash) or an Update ("Capsule") image that will be used to update and\r | |
19 | # existing system flash.\r | |
20 | #\r | |
21 | ################################################################################\r | |
22 | \r | |
7551529c AB |
23 | [Defines]\r |
24 | !if $(FD_SIZE_IN_MB) == 2\r | |
25 | DEFINE FVMAIN_COMPACT_SIZE = 0x1f8000\r | |
26 | !endif\r | |
27 | !if $(FD_SIZE_IN_MB) == 3\r | |
28 | DEFINE FVMAIN_COMPACT_SIZE = 0x2f8000\r | |
29 | !endif\r | |
30 | \r | |
8de84d42 AB |
31 | [FD.QEMU_EFI]\r |
32 | BaseAddress = 0x00000000|gArmTokenSpaceGuid.PcdFdBaseAddress # QEMU assigns 0 - 0x8000000 for a BootROM\r | |
7551529c | 33 | Size = $(FD_SIZE)|gArmTokenSpaceGuid.PcdFdSize # The size in bytes of the FLASH Device\r |
8de84d42 AB |
34 | ErasePolarity = 1\r |
35 | \r | |
36 | # This one is tricky, it must be: BlockSize * NumBlocks = Size\r | |
37 | BlockSize = 0x00001000\r | |
7551529c | 38 | NumBlocks = $(FD_NUM_BLOCKS)\r |
8de84d42 AB |
39 | \r |
40 | ################################################################################\r | |
41 | #\r | |
42 | # Following are lists of FD Region layout which correspond to the locations of different\r | |
43 | # images within the flash device.\r | |
44 | #\r | |
45 | # Regions must be defined in ascending order and may not overlap.\r | |
46 | #\r | |
47 | # A Layout Region start with a eight digit hex offset (leading "0x" required) followed by\r | |
48 | # the pipe "|" character, followed by the size of the region, also in hex with the leading\r | |
49 | # "0x" characters. Like:\r | |
50 | # Offset|Size\r | |
51 | # PcdOffsetCName|PcdSizeCName\r | |
52 | # RegionType <FV, DATA, or FILE>\r | |
53 | #\r | |
54 | ################################################################################\r | |
55 | \r | |
56 | #\r | |
4d2ea261 | 57 | # Implement the Linux kernel header layout so that the loader will identify\r |
8de84d42 | 58 | # it as something bootable, and execute it with a FDT pointer in x0 or r2.\r |
4d2ea261 | 59 | # This area will be reused to store a copy of the FDT so round it up to 32 KB.\r |
8de84d42 | 60 | #\r |
4d2ea261 | 61 | 0x00000000|0x00008000\r |
8de84d42 AB |
62 | DATA = {\r |
63 | !if $(ARCH) == AARCH64\r | |
64 | 0x01, 0x00, 0x00, 0x10, # code0: adr x1, .\r | |
4d2ea261 | 65 | 0xff, 0x1f, 0x00, 0x14, # code1: b 0x8000\r |
8de84d42 | 66 | 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, # text_offset: 512 KB\r |
7551529c | 67 | !if $(FD_SIZE_IN_MB) == 2\r |
8de84d42 | 68 | 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, # image_size: 2 MB\r |
7551529c AB |
69 | !endif\r |
70 | !if $(FD_SIZE_IN_MB) == 3\r | |
71 | 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, # image_size: 3 MB\r | |
72 | !endif\r | |
8de84d42 AB |
73 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, # flags\r |
74 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, # res2\r | |
75 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, # res3\r | |
76 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, # res4\r | |
77 | 0x41, 0x52, 0x4d, 0x64, # magic: "ARM\x64"\r | |
78 | 0x00, 0x00, 0x00, 0x00 # res5\r | |
79 | !else\r | |
80 | 0x08, 0x10, 0x4f, 0xe2, # adr r1, .\r | |
81 | 0x02, 0x00, 0xa0, 0xe1, # mov r0, r2 (DTB)\r | |
82 | 0x00, 0x00, 0xa0, 0xe1, # nop\r | |
83 | 0x00, 0x00, 0xa0, 0xe1, # nop\r | |
84 | 0x00, 0x00, 0xa0, 0xe1, # nop\r | |
85 | 0x00, 0x00, 0xa0, 0xe1, # nop\r | |
86 | 0x00, 0x00, 0xa0, 0xe1, # nop\r | |
87 | 0x00, 0x00, 0xa0, 0xe1, # nop\r | |
88 | \r | |
4d2ea261 | 89 | 0xf6, 0x1f, 0x00, 0xea, # b 0x8000\r |
8de84d42 AB |
90 | 0x18, 0x28, 0x6f, 0x01, # magic\r |
91 | 0x00, 0x00, 0x00, 0x00, # start\r | |
7551529c | 92 | !if $(FD_SIZE_IN_MB) == 2\r |
8de84d42 | 93 | 0x00, 0x00, 0x20, 0x00, # image size: 2 MB\r |
7551529c AB |
94 | !endif\r |
95 | !if $(FD_SIZE_IN_MB) == 3\r | |
96 | 0x00, 0x00, 0x30, 0x00, # image size: 3 MB\r | |
97 | !endif\r | |
8de84d42 AB |
98 | 0x01, 0x02, 0x03, 0x04 # endiannness flag\r |
99 | !endif\r | |
100 | }\r | |
101 | \r | |
7551529c | 102 | 0x00008000|$(FVMAIN_COMPACT_SIZE)\r |
8de84d42 AB |
103 | gArmTokenSpaceGuid.PcdFvBaseAddress|gArmTokenSpaceGuid.PcdFvSize\r |
104 | FV = FVMAIN_COMPACT\r | |
105 | \r | |
bf57a42a | 106 | !include VarStore.fdf.inc\r |
8de84d42 AB |
107 | \r |
108 | ################################################################################\r | |
109 | #\r | |
110 | # FV Section\r | |
111 | #\r | |
112 | # [FV] section is used to define what components or modules are placed within a flash\r | |
113 | # device file. This section also defines order the components and modules are positioned\r | |
114 | # within the image. The [FV] section consists of define statements, set statements and\r | |
115 | # module statements.\r | |
116 | #\r | |
117 | ################################################################################\r | |
118 | \r | |
c9eca0b2 | 119 | !include ArmVirtQemuFvMain.fdf.inc\r |
8de84d42 | 120 | \r |
8de84d42 AB |
121 | [FV.FVMAIN_COMPACT]\r |
122 | FvAlignment = 16\r | |
123 | ERASE_POLARITY = 1\r | |
124 | MEMORY_MAPPED = TRUE\r | |
125 | STICKY_WRITE = TRUE\r | |
126 | LOCK_CAP = TRUE\r | |
127 | LOCK_STATUS = TRUE\r | |
128 | WRITE_DISABLED_CAP = TRUE\r | |
129 | WRITE_ENABLED_CAP = TRUE\r | |
130 | WRITE_STATUS = TRUE\r | |
131 | WRITE_LOCK_CAP = TRUE\r | |
132 | WRITE_LOCK_STATUS = TRUE\r | |
133 | READ_DISABLED_CAP = TRUE\r | |
134 | READ_ENABLED_CAP = TRUE\r | |
135 | READ_STATUS = TRUE\r | |
136 | READ_LOCK_CAP = TRUE\r | |
137 | READ_LOCK_STATUS = TRUE\r | |
138 | \r | |
fd708fe0 | 139 | INF RuleOverride = SELF_RELOC ArmVirtPkg/PrePi/ArmVirtPrePiUniCoreRelocatable.inf\r |
8de84d42 AB |
140 | \r |
141 | FILE FV_IMAGE = 9E21FD93-9C72-4c15-8C4B-E77F1DB2D792 {\r | |
142 | SECTION GUIDED EE4E5898-3914-4259-9D6E-DC7BD79403CF PROCESSING_REQUIRED = TRUE {\r | |
143 | SECTION FV_IMAGE = FVMAIN\r | |
144 | }\r | |
145 | }\r | |
146 | \r | |
f4aee089 | 147 | !include ArmVirtRules.fdf.inc\r |