Android does not use the Foundation model, so the extra step of linking
fdt.dtb to the correct DTB file is not needed. Therefore, default the
Android config to use fvp-base-gicv2-psci.dtb directly.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ryan Harkin <ryan.harkin(a)linaro.org>
---
.../ArmVExpressPkg/ArmVExpress-FVP-AArch64.dsc | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-FVP-AArch64.dsc b/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-FVP-AArch64.dsc
index 1b681b8..db61aa8 100644
--- a/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-FVP-AArch64.dsc
+++ b/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-FVP-AArch64.dsc
@@ -163,11 +163,12 @@
!ifdef $(EDK2_USE_ANDROID_CONFIG)
gArmPlatformTokenSpaceGuid.PcdDefaultBootDevicePath|L"VenHw(C5B9C74A-6D72-4719-99AB-C59F199091EB)/kernel"
gArmPlatformTokenSpaceGuid.PcdDefaultBootInitrdPath|L"VenHw(C5B9C74A-6D72-4719-99AB-C59F199091EB)/ramdisk.img"
+ gArmPlatformTokenSpaceGuid.PcdDefaultFdtLocalDevicePath|L"VenHw(C5B9C74A-6D72-4719-99AB-C59F199091EB)/fvp-base-gicv2-psci.dtb"
!else
gArmPlatformTokenSpaceGuid.PcdDefaultBootDevicePath|L"VenHw(C5B9C74A-6D72-4719-99AB-C59F199091EB)/Image"
gArmPlatformTokenSpaceGuid.PcdDefaultBootArgument|"console=ttyAMA0 earlyprintk=pl011,0x1c090000 debug user_debug=31 loglevel=9 root=/dev/vda2"
-!endif
gArmPlatformTokenSpaceGuid.PcdDefaultFdtLocalDevicePath|L"VenHw(C5B9C74A-6D72-4719-99AB-C59F199091EB)/fdt.dtb"
+!endif
gArmPlatformTokenSpaceGuid.PcdDefaultBootType|3
gArmPlatformTokenSpaceGuid.PcdFdtDevicePath|L"VenHw(C5B9C74A-6D72-4719-99AB-C59F199091EB)/fdt.dtb"
--
1.7.9.5
The following patches fix various Versatile Express BSP build issues happening since 2013.12-rc1 was pushed.
[PATCH 1/3] VEA5: ARM Packages: Renamed PL390Gic driver into ArmGic
[PATCH 2/3] TC1: ARM Packages: Renamed PL390Gic driver into ArmGic
[PATCH 3/3] TC2: fix debug builds after ACPI was added
Hi Arnd,
Thank you for your comments.
On Fri, Dec 06, 2013 at 02:59:48AM +0100, Arnd Bergmann wrote:
> On Thursday 28 November 2013, Leif Lindholm wrote:
> > @@ -898,6 +900,10 @@ void __init setup_arch(char **cmdline_p)
> > sanity_check_meminfo();
> > arm_memblock_init(&meminfo, mdesc);
> >
> > +#ifdef CONFIG_EFI
> > + uefi_memblock_arm_reserve_range();
> > +#endif
> > +
>
> Better use
>
> if (IS_ENABLED(CONFIG_EFI))
>
> here for readability and better build-time checking of the interface when
> CONFIG_EFI is disabled.
I think I'll do what Grant suggested and stub it out in asm/uefi.h.
> > +/*
> > + * Returns 1 if 'facility' is enabled, 0 otherwise.
> > + */
> > +int efi_enabled(int facility)
> > +{
> > + return test_bit(facility, &arm_uefi_facility) != 0;
> > +}
> > +EXPORT_SYMBOL(efi_enabled);
>
> I'd use EXPORT_SYMBOL_GPL() unless there is a documented reason why
> a symbol should be available to GPL-incompatible modules.
So ... this is duplicating x86 code which Matt Fleming has promised
to make generic. I'd prefer to keep it identical to x86 until this
copy goes away.
> > +static __init int is_discardable_region(efi_memory_desc_t *md)
> > +{
> > +#ifdef KEEP_ALL_REGIONS
> > + return 0;
> > +#endif
>
> IS_ENABLED() again.
Ok.
> > + if (md->attribute & EFI_MEMORY_RUNTIME)
> > + return 0;
> > +
> > + switch (md->type) {
> > +#ifdef KEEP_BOOT_SERVICES_REGIONS
> > + case EFI_BOOT_SERVICES_CODE:
> > + case EFI_BOOT_SERVICES_DATA:
> > +#endif
>
> and I think it can be used here too:
>
> switch (md->type) {
> case EFI_BOOT_SERVICES_CODE:
> case EFI_BOOT_SERVICES_DATA:
> if (IS_ENABLED(KEEP_BOOT_SERVICES_REGIONS))
> return 1;
> /* fallthrough */
> case EFI_ACPI_RECLAIM_MEMORY:
Will redesign for next version.
> > + memmap.phys_map = early_memremap((phys_addr_t)(u32) uefi_boot_mmap,
> > + uefi_boot_mmap_size);
> > + if (!memmap.phys_map)
> > + return 1;
> > +
> > + p = memmap.phys_map;
> > + e = (void *)((u32)p + uefi_boot_mmap_size);
>
> You are doing a lot of type casts here, which is normally an indication
> that you have the types wrong in some way. I can't spot a mistake
> here, but maybe you can give it some more thought and see if it can be
> changed.
Grant made much the same comments here. It is possible the change to
the DT bindings to have all addresses 64-bit actually makes this go
away. I will revisit for next version.
> > +static int __init remap_region(efi_memory_desc_t *md, efi_memory_desc_t *entry)
> > +{
> > + u64 va;
> > + u64 paddr;
> > + u64 size;
> > +
> > + *entry = *md;
> > + paddr = entry->phys_addr;
> > + size = entry->num_pages << EFI_PAGE_SHIFT;
> > +
> > + /*
> > + * Map everything writeback-capable as coherent memory,
> > + * anything else as device.
> > + */
> > + if (md->attribute & EFI_MEMORY_WB)
> > + va = (u64)((u32)uefi_remap(paddr, size) & 0xffffffffUL);
> > + else
> > + va = (u64)((u32)uefi_ioremap(paddr, size) & 0xffffffffUL);
>
> Same here. Why is 'va' a u64?
Because the field in the structure (defined by UEFI) is 64-bit:
entry->virt_addr = va;
/
Leif
On Fri, Nov 29, 2013 at 11:53:19AM +0000, Matt Fleming wrote:
> On Thu, 28 Nov, at 04:41:20PM, Leif Lindholm wrote:
> > In systems based on [U]EFI-conformant firmware, runtime services provide
> > a standardised way for the kernel to update firmware environment
> > variables. This is used for example by efibootmgr to update which image
> > should be loaded on next boot.
> >
> > This patchset implements basic support for UEFI runtime services on ARM
> > platforms, as well as the basic underlying EFI support. It also defines
> > a mechanism by which the required information is passed from the
> > bootloader (the EFI stub submitted separately) to the kernel via FDT
> > entries.
>
> This all looks pretty good to me. Is this series going through the ARM
> trees?
Thanks.
That's the plan.
/
Leif
The addition of ACPI to the image pushed the size of debug builds over
the 0xD2000 limit. Resizing to 0xD5000 fixes this problem.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ryan Harkin <ryan.harkin(a)linaro.org>
---
.../ArmVExpressPkg/ArmVExpress-CTA15-A7.fdf | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-CTA15-A7.fdf b/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-CTA15-A7.fdf
index ffd72cd..f225448 100644
--- a/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-CTA15-A7.fdf
+++ b/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-CTA15-A7.fdf
@@ -26,12 +26,12 @@
[FD.ARM_VEXPRESS_CTA15A7_EFI]
BaseAddress = 0x81000000|gArmTokenSpaceGuid.PcdFdBaseAddress # The base address of the Firmware in remapped DRAM.
-Size = 0x000D2000|gArmTokenSpaceGuid.PcdFdSize # The size in bytes of the FLASH Device
+Size = 0x000D5000|gArmTokenSpaceGuid.PcdFdSize # The size in bytes of the FLASH Device
ErasePolarity = 1
BlockSize = 0x00001000
-NumBlocks = 0xD2
+NumBlocks = 0xD5
-0x00000000|0x000D2000
+0x00000000|0x000D5000
gArmTokenSpaceGuid.PcdFvBaseAddress|gArmTokenSpaceGuid.PcdFvSize
FV = FVMAIN_COMPACT
--
1.7.9.5
Forwarding to the public list.
---------- Forwarded message ----------
From: Steven Kinney <steven.kinney(a)linaro.org>
Date: 3 December 2013 13:59
Subject: Re: [linaro-uefi-internal] Re: Topic branches for 2013.12-rc-1
To: Anmar Oueja <anmar.oueja(a)linaro.org>
Cc: linaro-uefi-internal <linaro-uefi-internal(a)linaro.org>
Hi All,
2013.12-rc1 will be pushed today; note that the Tianocore
has changes that disrupt patches, for example, in DSC files because of
a GIC DXE name change (from PL390DXE to GICDXE). I have had to
manually apply patches or "hack" patches to have them cleanly apply.
So if you have patches, regarding current work, based off a previous
revision of the Tianocore master, simply be aware that some patches
might need alteration to apply cleanly or simply manually apply the
patch if the diff is small.
Thanks,
Steve
On 2 December 2013 19:03, Anmar Oueja <anmar.oueja(a)linaro.org> wrote:
>
> Hello all,
>
> Please note the following dates:
>
> * December 12th is freeze date (no new patches will be accepted past that date)
> * December 19th is public release date
>
> anmar
>
> On 2 December 2013 10:47, Steven Kinney <steven.kinney(a)linaro.org> wrote:
> > Hi UEFI folks,
> >
> > I am working on the RC1 for 2013.12 and need all of you to
> > create topic branches, based off the latest Tianocore master, and I will
> > track these topic branches when creating 2013.12-rc1. I will look at
> > patches, sent via the linaro-uefi-internal, but will not apply any patches
> > outside of individual topic branches; the mailing list patches will be
> > considered review only.
> >
> > Thanks,
> >
> > Steve
Hello list,
Please cc me, as I'm not subscribed.
It seems that imgbuild.sh destroys the GPT, resulting in kernel not
found.
I followed the instruction on
https://wiki.linaro.org/LEG/Engineering/Kernel/UEFI/build
and do as follows:
# create GPT on 16GB SD:
gdisk -l /dev/sdb
GPT fdisk (gdisk) version 0.8.7
Partition table scan:
MBR: protective
BSD: not present
APM: not present
GPT: present
Found valid GPT with protective MBR; using GPT.
Disk /dev/sdb: 31116288 sectors, 14.8 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): 58356604-961A-4F20-9D71-B4F19ED27A35
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 31116254
Partitions will be aligned on 2048-sector boundaries
Total free space is 30067645 sectors (14.3 GiB)
Number Start (sector) End (sector) Size Code Name
1 10240 1058815 512.0 MiB EF00 EFI System
# create filesystem, copy kernel and dtb:
mkfs.vfat -F32 /dev/sdb1
mount /dev/sdb1 /mnt/
cp arch/arm/boot/uImage /mnt/
cp arch/arm/boot/dts/exynos5250-arndale.dtb /mnt/board.dtb
umount /mnt/
# fetch trees and build:
git clone git://git.linaro.org/arm/uefi/uefi-next.git
git clone git://git.linaro.org/arm/uefi/uefi-tools.git
export PATH=$PATH:/usr/src/uefi-tools
cd uefi-next/
git checkout linaro-tracking
uefi-build.sh arndale
cd SamsungPlatformPkg/Apps/Tools/mkbl2/
# 'burn; image to SD:
./imgburn.sh --disk /dev/sdb --image ../../../../Build/Arndale-Exynos/RELEASE_ARMLINUXGCC/FV/ARNDALE_EFI.fd
Config:
IMAGE ../../../../Build/Arndale-Exynos/RELEASE_ARMLINUXGCC/FV/ARNDALE_EFI.fd
SoC 5250
DISK /dev/sdb
source file(../../../../Build/Arndale-Exynos/RELEASE_ARMLINUXGCC/FV/ARNDALE_EFI.fd) size = 2703360 bytes
target file(./fwbl2.bin) size = 16384 bytes
16+0 records in
16+0 records out
8192 bytes (8.2 kB) copied, 0.00652876 s, 1.3 MB/s
32+0 records in
32+0 records out
16384 bytes (16 kB) copied, 0.0048919 s, 3.3 MB/s
5280+0 records in
5280+0 records out
2703360 bytes (2.7 MB) copied, 0.729687 s, 3.7 MB/s
# list SD:
# gdisk -l /dev/sdb
GPT fdisk (gdisk) version 0.8.7
Caution: invalid main GPT header, but valid backup; regenerating main header
from backup!
Caution! After loading partitions, the CRC doesn't check out!
Warning! Main partition table CRC mismatch! Loaded backup partition table
instead of main partition table!
Warning! One or more CRCs don't match. You should repair the disk!
Partition table scan:
MBR: protective
BSD: not present
APM: not present
GPT: damaged
****************************************************************************
Caution: Found protective or hybrid MBR and corrupt GPT. Using GPT, but disk
verification and recovery are STRONGLY recommended.
****************************************************************************
Disk /dev/sdb: 31116288 sectors, 14.8 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): 58356604-961A-4F20-9D71-B4F19ED27A35
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 31116254
Partitions will be aligned on 2048-sector boundaries
Total free space is 30067645 sectors (14.3 GiB)
Number Start (sector) End (sector) Size Code Name
1 10240 1058815 512.0 MiB EF00 EFI System
# Boot arndale:
(screen /dev/ttyUSB0 115200)
Boot firmware (version 0.90 built at 20:04:00 on Nov 29 2013)
PROGRESS CODE: V3020003 I0
PROGRESS CODE: V3020002 I0
PROGRESS CODE: V3020003 I0
PROGRESS CODE: V3020002 I0
The default boot selection will start in 1 seconds
ERROR: Did not find Linux kernel.
[1] Linaro image on SD card
- VenHw(3A02E7FE-0649-4FB4-BE4F-A862CA1872A9)/HD(2,MBR,0x00000000,0x2000,0x1A000)/uImage
- Initrd: VenHw(3A02E7FE-0649-4FB4-BE4F-A862CA1872A9)/HD(2,MBR,0x00000000,0x2000,0x1A000)/uInitrd
- Arguments: root=/dev/mmcblk1p3 rw rootwait console=ttySAC2,115200n8 init --no-log
- FDT: VenHw(3A02E7FE-0649-4FB4-BE4F-A862CA1872A9)/HD(2,MBR,0x00000000,0x2000,0x1A000)/board.dtb
- LoaderType: Linux kernel with Local FDT
-----------------------
Global FDT Config
- VenHw(3A02E7FE-0649-4FB4-BE4F-A862CA1872A9)/HD(2,MBR,0x00000000,0x2000,0x1A000)/board.dtb
-----------------------
[a] Boot Manager
[b] Shell
[c] Reboot
[d] Shutdown
Start:
There is no response on keypresses here. There should be?
If I fix the GPT with gdisk, I get no output on boot.
This EFI boot is new for me, so please let me know if I do something
wrong. Also, please let me know if this is the wrong list for this kind
of questions.
Sander