2019.01 RC3
This commit is contained in:
parent
ff742d18c6
commit
3e7633feba
|
@ -1,106 +0,0 @@
|
|||
From patchwork Tue Dec 11 09:00:42 2018
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 7bit
|
||||
Subject: [U-Boot,v2] efi_loader: Make RTS relocation more robust
|
||||
X-Patchwork-Submitter: Alexander Graf <agraf@suse.de>
|
||||
X-Patchwork-Id: 1010906
|
||||
Message-Id: <20181211090042.89935-1-agraf@suse.de>
|
||||
To: u-boot@lists.denx.de
|
||||
Cc: Heinrich Schuchardt <xypron.glpk@gmx.de>,
|
||||
Guillaume GARDET <guillaume.gardet@free.fr>,
|
||||
Loic Devulder <ldevulder@suse.de>
|
||||
Date: Tue, 11 Dec 2018 10:00:42 +0100
|
||||
From: Alexander Graf <agraf@suse.de>
|
||||
List-Id: U-Boot discussion <u-boot.lists.denx.de>
|
||||
|
||||
While changing the RTS alignment to 64KB in commit 7a82c3051c8f
|
||||
("efi_loader: Align runtime section to 64kb") the relocation code
|
||||
started to break.
|
||||
|
||||
The reason for that is that we didn't actually look at the real
|
||||
relocation data. We merely took the RUNTIME_CODE section as a
|
||||
hint and started to relocate based on self calculated data from
|
||||
that point on. That calculation was now out of sync though.
|
||||
|
||||
To ensure we're not running into such a situation again, this patch
|
||||
makes the runtime relocation code a bit more robust. We can just
|
||||
trust the phys/virt hints from the payload. We also should check that
|
||||
we really only have a single section, as the code doesn't handle
|
||||
multiple code relocations yet.
|
||||
|
||||
Fixes: 7a82c3051c8f ("efi_loader: Align runtime section to 64kb")
|
||||
Reported-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
||||
Reported-by: Loic Devulder <ldevulder@suse.de>
|
||||
Signed-off-by: Alexander Graf <agraf@suse.de>
|
||||
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
||||
Tested-by: Loic Devulder <ldevulder@suse.de>
|
||||
Tested-by: Jonathan Gray <jsg@jsg.id.au>
|
||||
---
|
||||
|
||||
v1 -> v2:
|
||||
|
||||
- Add more verbose comment explaining why we have the
|
||||
sanity check.
|
||||
---
|
||||
lib/efi_loader/efi_runtime.c | 34 +++++++++++++++++++++++++++++++---
|
||||
1 file changed, 31 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/lib/efi_loader/efi_runtime.c b/lib/efi_loader/efi_runtime.c
|
||||
index 95844efdb0..fff93f0960 100644
|
||||
--- a/lib/efi_loader/efi_runtime.c
|
||||
+++ b/lib/efi_loader/efi_runtime.c
|
||||
@@ -436,14 +436,42 @@ static efi_status_t EFIAPI efi_set_virtual_address_map(
|
||||
uint32_t descriptor_version,
|
||||
struct efi_mem_desc *virtmap)
|
||||
{
|
||||
- ulong runtime_start = (ulong)&__efi_runtime_start &
|
||||
- ~(ulong)EFI_PAGE_MASK;
|
||||
int n = memory_map_size / descriptor_size;
|
||||
int i;
|
||||
+ int rt_code_sections = 0;
|
||||
|
||||
EFI_ENTRY("%lx %lx %x %p", memory_map_size, descriptor_size,
|
||||
descriptor_version, virtmap);
|
||||
|
||||
+ /*
|
||||
+ * TODO:
|
||||
+ * Further down we are cheating. While really we should implement
|
||||
+ * SetVirtualAddressMap() events and ConvertPointer() to allow
|
||||
+ * dynamically loaded drivers to expose runtime services, we don't
|
||||
+ * today.
|
||||
+ *
|
||||
+ * So let's ensure we see exactly one single runtime section, as
|
||||
+ * that is the built-in one. If we see more (or less), someone must
|
||||
+ * have tried adding or removing to that which we don't support yet.
|
||||
+ * In that case, let's better fail rather than expose broken runtime
|
||||
+ * services.
|
||||
+ */
|
||||
+ for (i = 0; i < n; i++) {
|
||||
+ struct efi_mem_desc *map = (void*)virtmap +
|
||||
+ (descriptor_size * i);
|
||||
+
|
||||
+ if (map->type == EFI_RUNTIME_SERVICES_CODE)
|
||||
+ rt_code_sections++;
|
||||
+ }
|
||||
+
|
||||
+ if (rt_code_sections != 1) {
|
||||
+ /*
|
||||
+ * We expose exactly one single runtime code section, so
|
||||
+ * something is definitely going wrong.
|
||||
+ */
|
||||
+ return EFI_EXIT(EFI_INVALID_PARAMETER);
|
||||
+ }
|
||||
+
|
||||
/* Rebind mmio pointers */
|
||||
for (i = 0; i < n; i++) {
|
||||
struct efi_mem_desc *map = (void*)virtmap +
|
||||
@@ -483,7 +511,7 @@ static efi_status_t EFIAPI efi_set_virtual_address_map(
|
||||
map = (void*)virtmap + (descriptor_size * i);
|
||||
if (map->type == EFI_RUNTIME_SERVICES_CODE) {
|
||||
ulong new_offset = map->virtual_start -
|
||||
- (runtime_start - gd->relocaddr);
|
||||
+ map->physical_start + gd->relocaddr;
|
||||
|
||||
efi_runtime_relocate(new_offset, map);
|
||||
/* Once we're virtual, we can no longer handle
|
|
@ -0,0 +1,47 @@
|
|||
From patchwork Mon Dec 17 10:05:45 2018
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 7bit
|
||||
Subject: [U-Boot,2/2] mmc: bring back partition init for non-DM MMC drivers
|
||||
X-Patchwork-Submitter: Andre Przywara <andre.przywara@arm.com>
|
||||
X-Patchwork-Id: 1014381
|
||||
X-Patchwork-Delegate: jagannadh.teki@gmail.com
|
||||
Message-Id: <20181217100545.28369-3-andre.przywara@arm.com>
|
||||
To: Maxime Ripard <maxime.ripard@bootlin.com>,
|
||||
Jagan Teki <jagan@openedev.com>, Jaehoon Chung <jh80.chung@samsung.com>
|
||||
Cc: Tom Rini <trini@konsulko.com>, u-boot@lists.denx.de
|
||||
Date: Mon, 17 Dec 2018 10:05:45 +0000
|
||||
From: Andre Przywara <andre.przywara@arm.com>
|
||||
List-Id: U-Boot discussion <u-boot.lists.denx.de>
|
||||
|
||||
Commit d0851c893706 ("blk: Call part_init() in the post_probe() method")
|
||||
removed the call to part_init() in mmc.c, as this is done by the DM_MMC
|
||||
framework.
|
||||
However Allwinner is (still) relying on a non-DM MMC driver, so we are
|
||||
now missing the implicit partition init, leading to failing MMC accesses
|
||||
due to the missing partition information.
|
||||
|
||||
Bring the call back just for non-DM MMC driver to fix this regression.
|
||||
|
||||
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
|
||||
Reviewed-by: Simon Glass <sjg@chromium.org>
|
||||
Tested-by: Soeren Moch <smoch@web.de>
|
||||
---
|
||||
drivers/mmc/mmc.c | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
|
||||
index f5c821e308..d858127132 100644
|
||||
--- a/drivers/mmc/mmc.c
|
||||
+++ b/drivers/mmc/mmc.c
|
||||
@@ -2449,6 +2449,10 @@ static int mmc_startup(struct mmc *mmc)
|
||||
bdesc->revision[0] = 0;
|
||||
#endif
|
||||
|
||||
+#if !defined(CONFIG_DM_MMC) && (!defined(CONFIG_SPL_BUILD) || defined(CONFIG_SPL_LIBDISK_SUPPORT))
|
||||
+ part_init(bdesc);
|
||||
+#endif
|
||||
+
|
||||
return 0;
|
||||
}
|
||||
|
2
sources
2
sources
|
@ -1 +1 @@
|
|||
SHA512 (u-boot-2019.01-rc2.tar.bz2) = d1c76fba9935c3bb7bee67219106af3a05f020cbad6ea2bf4865877d2c67d5ef76ba2d5d49ac623fe8db72fd5adfa5f13894ca80a22d1b0bdbc2549ffdab0815
|
||||
SHA512 (u-boot-2019.01-rc3.tar.bz2) = aa7dffd176519912c163d640dbb53aa0893283ab45c5567d031d11cb168fb68e4af5fb9a6f6b311d21cb53e5db4b09d34928852d1b7333f98c515301693af7d9
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
%global candidate rc2
|
||||
%global candidate rc3
|
||||
|
||||
Name: uboot-tools
|
||||
Version: 2019.01
|
||||
Release: 0.3%{?candidate:.%{candidate}}%{?dist}
|
||||
Release: 0.4%{?candidate:.%{candidate}}%{?dist}
|
||||
Summary: U-Boot utilities
|
||||
License: GPLv2+ BSD LGPL-2.1+ LGPL-2.0+
|
||||
URL: http://www.denx.de/wiki/U-Boot
|
||||
|
@ -20,7 +20,7 @@ Patch1: uefi-use-Fedora-specific-path-name.patch
|
|||
# general fixes
|
||||
Patch2: uefi-distro-load-FDT-from-any-partition-on-boot-device.patch
|
||||
Patch3: usb-kbd-fixes.patch
|
||||
Patch4: efi_loader-Make-RTS-relocation-more-robust.patch
|
||||
Patch4: mmc-bring-back-partition-init-for-non-DM-MMC-drivers.patch
|
||||
|
||||
# Board fixes and enablement
|
||||
Patch10: rpi-Enable-using-the-DT-provided-by-the-Raspberry-Pi.patch
|
||||
|
@ -162,7 +162,7 @@ done
|
|||
%endif
|
||||
|
||||
make HOSTCC="gcc $RPM_OPT_FLAGS" %{?_smp_mflags} CROSS_COMPILE="" tools-only_defconfig V=1 O=builds/
|
||||
make HOSTCC="gcc $RPM_OPT_FLAGS" %{?_smp_mflags} CROSS_COMPILE="" tools-only V=1 O=builds/
|
||||
make HOSTCC="gcc $RPM_OPT_FLAGS" %{?_smp_mflags} CROSS_COMPILE="" tools-all V=1 O=builds/
|
||||
|
||||
%install
|
||||
mkdir -p $RPM_BUILD_ROOT%{_bindir}
|
||||
|
@ -315,6 +315,9 @@ cp -p board/warp7/README builds/docs/README.warp7
|
|||
%endif
|
||||
|
||||
%changelog
|
||||
* Tue Jan 8 2019 Peter Robinson <pbrobinson@fedoraproject.org> 2019.01-0.4-rc3
|
||||
- 2019.01 RC3
|
||||
|
||||
* Tue Dec 18 2018 Peter Robinson <pbrobinson@fedoraproject.org> 2019.01-0.3-rc2
|
||||
- 2019.01 RC2
|
||||
|
||||
|
|
Loading…
Reference in New Issue