Skip to contentSkip to conversation

efi patch queue 2018-07-10

GIT PULL NAK Alexander Graf 3 participants 5 messages Jul 10, 2018 – Jul 25, 2018

lore
Share & tools
lore
#0 lore raw

Hi Tom,

This is my current patch queue for efi. Please pull.

Alex

The following changes since commit 495c70f9dfad1a5428ec84b52e8667ea4760ecd6:

net: designware: Add reset ctrl to driver (2018-07-09 15:28:28 -0400)

are available in the git repository at:

git://github.com/agraf/u-boot.git tags/signed-efi-next

for you to fetch changes up to e2c6ec921b5a37ac96aba34731c972dfee9943b0:

MAINTAINERS: assign lib/charset.c (2018-07-10 18:01:08 +0200)

----------------------------------------------------------------
Patch queue for efi - 2018-07-10

Highlights this time:

- Many small fixes to improve spec compatibility (found by SCT)
- Almost enough to run with sandbox target
- GetTime() improvements
- Enable EFI_LOADER and HYP entry on ARMv7 with NONSEC=y

----------------------------------------------------------------
Alexander Graf (10):
efi_loader: Use compiler constants for image loader
efi_loader: Use map_sysmem() in bootefi command
efi_loader: Allow SMBIOS tables in highmem
efi_loader: Disable miniapps on sandbox
efi_loader: Introduce ms abi vararg helpers
efi_loader: Move to compiler based target architecture determination
elf: Move x86 reloc defines to common elf.h
efi_loader: Use common elf.h reloc defines
efi_loader: Expose U-Boot addresses in memory map for sandbox
efi_loader: Rename sections to allow for implicit data

Heinrich Schuchardt (29):
efi_selftest: update .gitignore
efi_loader: efi_allocate_pages is too restrictive
efi_loader: check parameters of CreateEvent
efi_loader: check parameters in memory allocation
efi_loader: check parameters of GetMemoryMap
efi_loader: check map_key in ExitBootServices
fs: fat: cannot write to subdirectories
efi_selftest: test writing to file
efi_driver: set DM_FLAG_NAME_ALLOCED flag
efi_loader: set revision in loaded image protocol
efi_loader: EFI_SIMPLE_TEXT_INPUT_PROTOCOL.Reset()
efi_loader: clear screen has to reset cursor position
efi_loader: specify UEFI spec revision
efi_loader: correct EFI_RUNTIME_SERVICES_SIGNATURE
efi_loader: correct headersize EFI tables
efi_loader: provide firmware revision
efi_loader: calculate crc32 for EFI tables
efi_loader: allocate configuration table array
efi_selftest: test InstallConfigurationTable()
efi_loader: correct signature of CalculateCrc32()
efi_loader: update crc32 in InstallConfigurationTable
efi_selftest: check crc32 for InstallConfigurationTable
efi_selftest: unit test for CalculateCrc32()
rtc: remove CONFIG_CMD_DATE dependency
efi_loader: remove unused efi_get_time_init()
efi_loader: complete implementation of GetTime()
efi_selftest: support printing leading zeroes
efi_selftest: unit test for GetTime()
MAINTAINERS: assign lib/charset.c

Mark Kettenis (5):
ARM: HYP/non-sec: migrate stack
efi_loader: ARM: run EFI payloads non-secure
efi_loader: ARM: don't attempt to enter non-secure mode twice
ARM: HYP/non-sec: enable ARMV7_LPAE if HYP mode is supported Revert "efi_loader: no support for ARMV7_NONSEC=y"

Simon Glass (5):
efi: sandbox: Adjust memory usage for sandbox
vsprintf: Handle NULL with %pU
efi_selftest: Clean up a few comments and messages
efi: Tidy up device-tree-size calculation in copy_fdt()
efi: Drop error return in efi_carve_out_dt_rsv()

 MAINTAINERS                                  |   1 +
 arch/arm/config.mk                           |   4 +-
 arch/arm/cpu/armv7/Kconfig                   |   2 +-
 arch/arm/cpu/armv7/nonsec_virt.S             |   2 +
 arch/arm/cpu/armv8/u-boot.lds                |  24 ++-
 arch/arm/cpu/u-boot.lds                      |  36 ++--
 arch/arm/mach-zynq/u-boot.lds                |  36 ++--
 arch/riscv/cpu/ax25/u-boot.lds               |  26 ++-
 arch/sandbox/config.mk                       |   3 +
 arch/sandbox/cpu/u-boot.lds                  |   9 +-
 arch/x86/config.mk                           |   2 +-
 arch/x86/cpu/u-boot.lds                      |  32 ++--
 arch/x86/include/asm/elf.h                   |  45 -----
 arch/x86/lib/reloc_ia32_efi.c                |   1 -
 arch/x86/lib/reloc_x86_64_efi.c              |   1 -
 board/qualcomm/dragonboard410c/u-boot.lds    |  17 +-
 board/qualcomm/dragonboard820c/u-boot.lds    |  24 ++-
 board/ti/am335x/u-boot.lds                   |  36 ++--
 cmd/bootefi.c                                |  90 +++++++--
 doc/README.uefi                              |   2 -
 drivers/rtc/at91sam9_rtt.c                   |   4 -
 drivers/rtc/davinci.c                        |   2 -
 drivers/rtc/ds1302.c                         |   4 -
 drivers/rtc/ds1306.c                         |   4 -
 drivers/rtc/ds1307.c                         |   4 -
 drivers/rtc/ds1337.c                         |   4 -
 drivers/rtc/ds1374.c                         |   3 -
 drivers/rtc/ds164x.c                         |   4 -
 drivers/rtc/ds174x.c                         |   4 -
 drivers/rtc/ds3231.c                         |   4 -
 drivers/rtc/imxdi.c                          |   4 -
 drivers/rtc/m41t11.c                         |   3 -
 drivers/rtc/m41t60.c                         |   3 -
 drivers/rtc/m41t62.c                         |   4 -
 drivers/rtc/m48t35ax.c                       |   4 -
 drivers/rtc/max6900.c                        |   4 -
 drivers/rtc/mc146818.c                       |   3 -
 drivers/rtc/mcfrtc.c                         |   4 -
 drivers/rtc/mk48t59.c                        |   4 -
 drivers/rtc/pcf8563.c                        |   4 -
 drivers/rtc/rs5c372.c                        |   3 -
 drivers/rtc/rx8025.c                         |   4 -
 drivers/rtc/s3c24x0_rtc.c                    |   4 -
 drivers/rtc/x1205.c                          |   4 -
 fs/fat/fat_write.c                           |  16 +-
 include/efi.h                                |   8 +
 include/efi_api.h                            |  16 +-
 include/efi_loader.h                         |  13 +-
 include/elf.h                                |  35 ++++
 lib/efi_driver/efi_block_device.c            |   2 +
 lib/efi_loader/Kconfig                       |   2 -
 lib/efi_loader/Makefile                      |   3 +
 lib/efi_loader/efi_boottime.c                | 169 +++++++++++------
 lib/efi_loader/efi_console.c                 |   9 +-
 lib/efi_loader/efi_image_loader.c            |  12 +-
 lib/efi_loader/efi_memory.c                  |  65 +++++--
 lib/efi_loader/efi_runtime.c                 |  83 ++++++---
 lib/efi_loader/efi_smbios.c                  |  11 +-
 lib/efi_selftest/.gitignore                  |   4 +-
 lib/efi_selftest/Makefile                    |   5 +-
 lib/efi_selftest/efi_selftest.c              |  14 +-
 lib/efi_selftest/efi_selftest_block_device.c |  70 +++++++
 lib/efi_selftest/efi_selftest_config_table.c | 266 +++++++++++++++++++++++++++
 lib/efi_selftest/efi_selftest_console.c      |  33 ++--
 lib/efi_selftest/efi_selftest_crc32.c        | 141 ++++++++++++++
 lib/efi_selftest/efi_selftest_rtc.c          |  67 +++++++
 lib/vsprintf.c                               |   5 +-
 67 files changed, 1131 insertions(+), 400 deletions(-)
 delete mode 100644 arch/x86/include/asm/elf.h
 create mode 100644 lib/efi_selftest/efi_selftest_config_table.c
 create mode 100644 lib/efi_selftest/efi_selftest_crc32.c
 create mode 100644 lib/efi_selftest/efi_selftest_rtc.c
#1 lore raw
Quoted 11 lines · Alexander Graf

Hi Tom,

This is my current patch queue for efi. Please pull.

Alex

The following changes since commit 495c70f9dfad1a5428ec84b52e8667ea4760ecd6:

net: designware: Add reset ctrl to driver (2018-07-09 15:28:28 -0400)

Quoted 8 lines

are available in the git repository at:

git://github.com/agraf/u-boot.git tags/signed-efi-next

for you to fetch changes up to e2c6ec921b5a37ac96aba34731c972dfee9943b0:

MAINTAINERS: assign lib/charset.c (2018-07-10 18:01:08 +0200)

NAK, this totally breaks qemu-x86_64:
Building current source for 1 boards (1 thread, 16 jobs per thread)

    1    0    0 /1      qemu-x86_64

+u-boot-test-flash qemu-x86_64 na
===================================== test session starts ===================================== platform linux2 -- Python 2.7.12, pytest-2.8.7, py-1.4.31, pluggy-0.3.1
rootdir: /, inifile:
collected 127 items
+u-boot-test-reset qemu-x86_64 na
warning: TCG doesn't support requested feature: CPUID.01H:ECX.vmx [bit 5]

U-Boot SPL 2018.07-00106-gdbe7256f0d42 (Jul 10 2018 - 16:54:23 -0400)
CPU: x86_64, vendor AMD, device 663h
Trying to boot from SPI
Jumping to 64-bit U-Boot: Note many features are missing
No serial driver found
^C
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! KeyboardInterrupt !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! /home/trini/work/u-boot/u-boot/test/py/u_boot_spawn.py:171: KeyboardInterrupt ================== 4 tests deselected by '-knot sleep and not efi_selftest' =================== ======================= 4 deselected, 1 pytest-warnings in 4.93 seconds =======================

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180710/ac2a8657/attachment.sig>
#2 lore raw
Quoted 33 lines · Tom Rini
Quoted 11 lines · Alexander Graf

Hi Tom,

This is my current patch queue for efi. Please pull.

Alex

The following changes since commit 495c70f9dfad1a5428ec84b52e8667ea4760ecd6:

net: designware: Add reset ctrl to driver (2018-07-09 15:28:28 -0400)

Quoted 8 lines

are available in the git repository at:

git://github.com/agraf/u-boot.git tags/signed-efi-next

for you to fetch changes up to e2c6ec921b5a37ac96aba34731c972dfee9943b0:

MAINTAINERS: assign lib/charset.c (2018-07-10 18:01:08 +0200)

NAK, this totally breaks qemu-x86_64:
Building current source for 1 boards (1 thread, 16 jobs per thread)

    1    0    0 /1      qemu-x86_64

+u-boot-test-flash qemu-x86_64 na
===================================== test session starts ===================================== platform linux2 -- Python 2.7.12, pytest-2.8.7, py-1.4.31, pluggy-0.3.1
rootdir: /, inifile:
collected 127 items
+u-boot-test-reset qemu-x86_64 na
warning: TCG doesn't support requested feature: CPUID.01H:ECX.vmx [bit 5]

Quoted 6 lines

U-Boot SPL 2018.07-00106-gdbe7256f0d42 (Jul 10 2018 - 16:54:23 -0400)
CPU: x86_64, vendor AMD, device 663h
Trying to boot from SPI
Jumping to 64-bit U-Boot: Note many features are missing
No serial driver found
^C

That was the breakage that I reported to Bin earlier as well. Let me bisect ...

Alex

#3 lore raw
Quoted 36 lines · Alexander Graf
Quoted 33 lines · Tom Rini
Quoted 11 lines · Alexander Graf

Hi Tom,

This is my current patch queue for efi. Please pull.

Alex

The following changes since commit 495c70f9dfad1a5428ec84b52e8667ea4760ecd6:

net: designware: Add reset ctrl to driver (2018-07-09 15:28:28 -0400)

Quoted 8 lines

are available in the git repository at:

git://github.com/agraf/u-boot.git tags/signed-efi-next

for you to fetch changes up to e2c6ec921b5a37ac96aba34731c972dfee9943b0:

MAINTAINERS: assign lib/charset.c (2018-07-10 18:01:08 +0200)

NAK, this totally breaks qemu-x86_64:
Building current source for 1 boards (1 thread, 16 jobs per thread)

    1    0    0 /1      qemu-x86_64

+u-boot-test-flash qemu-x86_64 na
===================================== test session starts ===================================== platform linux2 -- Python 2.7.12, pytest-2.8.7, py-1.4.31, pluggy-0.3.1
rootdir: /, inifile:
collected 127 items
+u-boot-test-reset qemu-x86_64 na
warning: TCG doesn't support requested feature: CPUID.01H:ECX.vmx [bit 5]

Quoted 9 lines
Quoted 6 lines

U-Boot SPL 2018.07-00106-gdbe7256f0d42 (Jul 10 2018 - 16:54:23 -0400)
CPU: x86_64, vendor AMD, device 663h
Trying to boot from SPI
Jumping to 64-bit U-Boot: Note many features are missing
No serial driver found
^C

That was the breakage that I reported to Bin earlier as well. Let me bisect ...

I think I have an idea ;)

ab1340bf15c9ad7d1a7edbe51ec93c45e11c5c2c is the first bad commit commit ab1340bf15c9ad7d1a7edbe51ec93c45e11c5c2c

Author: Alexander Graf <[email protected]>
Date:   Tue Jun 12 07:48:37 2018 +0200

efi_loader: Rename sections to allow for implicit data

Some times gcc may generate data that is then used within code that may be part of an efi runtime section. That data could be jump tables, constants or strings.

In order to make sure we catch these, we need to ensure that gcc emits them into a section that we can relocate together with all the other efi runtime bits. This only works if the -ffunction-sections and -fdata-sections flags are passed and the efi runtime functions are in a section that starts with ".text".

Up to now we had all efi runtime bits in sections that did not interfere with the normal section naming scheme, but this forces us to do so. Hence we need to move the efi_loader text/data/rodata sections before the global *(.text*) catch-all section.

With this patch in place, we should hopefully have an easier time to extend the efi runtime functionality in the future.

#4 lore raw

Hi Alex,

Quoted 74 lines · Alexander Graf
Quoted 36 lines · Alexander Graf
Quoted 33 lines · Tom Rini
Quoted 11 lines · Alexander Graf

Hi Tom,

This is my current patch queue for efi. Please pull.

Alex

The following changes since commit 495c70f9dfad1a5428ec84b52e8667ea4760ecd6:

net: designware: Add reset ctrl to driver (2018-07-09 15:28:28 -0400)

Quoted 8 lines

are available in the git repository at:

git://github.com/agraf/u-boot.git tags/signed-efi-next

for you to fetch changes up to e2c6ec921b5a37ac96aba34731c972dfee9943b0:

MAINTAINERS: assign lib/charset.c (2018-07-10 18:01:08 +0200)

NAK, this totally breaks qemu-x86_64:
Building current source for 1 boards (1 thread, 16 jobs per thread)

    1    0    0 /1      qemu-x86_64

+u-boot-test-flash qemu-x86_64 na
===================================== test session starts ===================================== platform linux2 -- Python 2.7.12, pytest-2.8.7, py-1.4.31, pluggy-0.3.1
rootdir: /, inifile:
collected 127 items
+u-boot-test-reset qemu-x86_64 na
warning: TCG doesn't support requested feature: CPUID.01H:ECX.vmx [bit 5]

Quoted 9 lines
Quoted 6 lines

U-Boot SPL 2018.07-00106-gdbe7256f0d42 (Jul 10 2018 - 16:54:23 -0400)
CPU: x86_64, vendor AMD, device 663h
Trying to boot from SPI
Jumping to 64-bit U-Boot: Note many features are missing
No serial driver found
^C

That was the breakage that I reported to Bin earlier as well. Let me bisect ...

I think I have an idea ;)

ab1340bf15c9ad7d1a7edbe51ec93c45e11c5c2c is the first bad commit commit ab1340bf15c9ad7d1a7edbe51ec93c45e11c5c2c

Author: Alexander Graf <[email protected]>
Date:   Tue Jun 12 07:48:37 2018 +0200

efi_loader: Rename sections to allow for implicit data

Some times gcc may generate data that is then used within code that may be part of an efi runtime section. That data could be jump tables, constants or strings.

In order to make sure we catch these, we need to ensure that gcc emits them into a section that we can relocate together with all the other efi runtime bits. This only works if the -ffunction-sections and -fdata-sections flags are passed and the efi runtime functions are in a section that starts with ".text".

Up to now we had all efi runtime bits in sections that did not interfere with the normal section naming scheme, but this forces us to do so. Hence we need to move the efi_loader text/data/rodata sections before the global *(.text*) catch-all section.

Quoted 8 lines

With this patch in place, we should hopefully have an easier time to extend the efi runtime functionality in the future.

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
https://lists.denx.de/listinfo/u-boot

Do you have an ETA on this pull request? I have some patches to enable sandbox EFI support but I think I need to wait until your patches are in?

Regards,
Simon