# Copyright (c) 2014, Linaro Limited. All rights reserved.\r
# Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.\r
#\r
-# This program and the accompanying materials\r
-# are licensed and made available under the terms and conditions of the BSD License\r
-# which accompanies this distribution. The full text of the license may be found at\r
-# http://opensource.org/licenses/bsd-license.php\r
-#\r
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+# SPDX-License-Identifier: BSD-2-Clause-Patent\r
#\r
\r
################################################################################\r
#\r
################################################################################\r
\r
+[Defines]\r
+!if $(FD_SIZE_IN_MB) == 2\r
+ DEFINE FVMAIN_COMPACT_SIZE = 0x1f8000\r
+!endif\r
+!if $(FD_SIZE_IN_MB) == 3\r
+ DEFINE FVMAIN_COMPACT_SIZE = 0x2f8000\r
+!endif\r
+\r
[FD.QEMU_EFI]\r
BaseAddress = 0x00000000|gArmTokenSpaceGuid.PcdFdBaseAddress # QEMU assigns 0 - 0x8000000 for a BootROM\r
-Size = 0x00200000|gArmTokenSpaceGuid.PcdFdSize # The size in bytes of the FLASH Device\r
+Size = $(FD_SIZE)|gArmTokenSpaceGuid.PcdFdSize # The size in bytes of the FLASH Device\r
ErasePolarity = 1\r
\r
# This one is tricky, it must be: BlockSize * NumBlocks = Size\r
BlockSize = 0x00001000\r
-NumBlocks = 0x200\r
+NumBlocks = $(FD_NUM_BLOCKS)\r
\r
################################################################################\r
#\r
################################################################################\r
\r
#\r
-# Implement the Linux kernel header layout so that the Xen loader will identify\r
+# Implement the Linux kernel header layout so that the loader will identify\r
# it as something bootable, and execute it with a FDT pointer in x0 or r2.\r
-# This area will be reused to store a copy of the FDT so round it up to 8 KB.\r
+# This area will be reused to store a copy of the FDT so round it up to 32 KB.\r
#\r
-0x00000000|0x00002000\r
+0x00000000|0x00008000\r
DATA = {\r
!if $(ARCH) == AARCH64\r
0x01, 0x00, 0x00, 0x10, # code0: adr x1, .\r
- 0xff, 0x07, 0x00, 0x14, # code1: b 0x2000\r
+ 0xff, 0x1f, 0x00, 0x14, # code1: b 0x8000\r
0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, # text_offset: 512 KB\r
+!if $(FD_SIZE_IN_MB) == 2\r
0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, # image_size: 2 MB\r
+!endif\r
+!if $(FD_SIZE_IN_MB) == 3\r
+ 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, # image_size: 3 MB\r
+!endif\r
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, # flags\r
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, # res2\r
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, # res3\r
0x00, 0x00, 0xa0, 0xe1, # nop\r
0x00, 0x00, 0xa0, 0xe1, # nop\r
\r
- 0xf6, 0x07, 0x00, 0xea, # b 0x2000\r
+ 0xf6, 0x1f, 0x00, 0xea, # b 0x8000\r
0x18, 0x28, 0x6f, 0x01, # magic\r
0x00, 0x00, 0x00, 0x00, # start\r
+!if $(FD_SIZE_IN_MB) == 2\r
0x00, 0x00, 0x20, 0x00, # image size: 2 MB\r
+!endif\r
+!if $(FD_SIZE_IN_MB) == 3\r
+ 0x00, 0x00, 0x30, 0x00, # image size: 3 MB\r
+!endif\r
0x01, 0x02, 0x03, 0x04 # endiannness flag\r
!endif\r
}\r
\r
-0x00002000|0x001fe000\r
+0x00008000|$(FVMAIN_COMPACT_SIZE)\r
gArmTokenSpaceGuid.PcdFvBaseAddress|gArmTokenSpaceGuid.PcdFvSize\r
FV = FVMAIN_COMPACT\r
\r
READ_LOCK_CAP = TRUE\r
READ_LOCK_STATUS = TRUE\r
\r
- INF ArmVirtPkg/PrePi/ArmVirtPrePiUniCoreRelocatable.inf\r
+ INF RuleOverride = SELF_RELOC ArmVirtPkg/PrePi/ArmVirtPrePiUniCoreRelocatable.inf\r
\r
FILE FV_IMAGE = 9E21FD93-9C72-4c15-8C4B-E77F1DB2D792 {\r
SECTION GUIDED EE4E5898-3914-4259-9D6E-DC7BD79403CF PROCESSING_REQUIRED = TRUE {\r