From patchwork Mon Jun 18 15:22:54 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Graf X-Patchwork-Id: 139020 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp4091269lji; Mon, 18 Jun 2018 08:33:01 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLryMCloUvgqsPt4DEergEZsxmp5XXs+aIzgvcH9YkZL5gLB+CBZQDBW6QxUhrhQ/npxDEE X-Received: by 2002:a50:93c5:: with SMTP id o63-v6mr11652921eda.311.1529335981351; Mon, 18 Jun 2018 08:33:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529335981; cv=none; d=google.com; s=arc-20160816; b=WaNBypoYjMz7btbFhCcdTK6aAQsgWH5N0iOkIwkKjA1ktv89YNNP7xjuNZZ2CLwzAh +q9LgaUReb865XM7U12O3/8BVFfVKQxCk2kBEeZHGl1BfPqI9y0SbiSROA2qnPMVXIyU Gz7oN518ylTRIh0Bhbeis/veDet+FK5O8nVMw7pgzr4hvNr16sjRdbSRej9VdtYiRfn9 JpfACzWkIqB5jWkFxPb8K2vyqpCtlUJryA+j0LqY6giyv3WrDNFncfDDYOPOJkUO930t JUK5Qu9jwMir5e4Sl7MfDFI161V1w/R/VTwOalQPMlKgADiw0FvZhFGHgO0sPiC4QIo0 041A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:message-id:date:to:from :arc-authentication-results; bh=CFQKsjsw8MjN+N9lp29LrJQyhDvuackRCYN6+/gFKv8=; b=er2I90ewb7pKC6yAdRxbzYMOBGKsGgOThyYDx+/5Q/q4YlZpt/9KEcaT8667/bSCTO lGXOEP8d3pMkv55ZDUtkDmeDTl2xwPeEUXpWflamX67++3OKyp2Cjebf67IV3t5HkQm2 DWXzjvyx1g/6THwa6YSpw3iyC1NO7pmluvxOe7TBW2y4vcjJxWBmXXYo/05+MClQsmmC WeR4Ur9vRJEXbRlJPcNJ1u4NYciWUmFQMhz/E+khSC4xAw5FBIM7tK2gNPaOhII9oT+b VHaVYm9BpE6RDTfUQRqHYKtgLIKMp2oPANIXkAkYNe3aPa7pQpfn5chYFALPdqkrSo8v nWcQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Return-Path: Received: from lists.denx.de (dione.denx.de. [81.169.180.215]) by mx.google.com with ESMTP id b57-v6si9319181edd.229.2018.06.18.08.33.01; Mon, 18 Jun 2018 08:33:01 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) client-ip=81.169.180.215; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by lists.denx.de (Postfix, from userid 105) id D3525C21E7E; Mon, 18 Jun 2018 15:29:22 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 469C6C21F8F; Mon, 18 Jun 2018 15:23:43 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 000ECC21EE5; Mon, 18 Jun 2018 15:23:20 +0000 (UTC) Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by lists.denx.de (Postfix) with ESMTPS id 219F7C21DDC for ; Mon, 18 Jun 2018 15:23:17 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext-too.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id BC8D4AF67; Mon, 18 Jun 2018 15:23:16 +0000 (UTC) From: Alexander Graf To: u-boot@lists.denx.de Date: Mon, 18 Jun 2018 17:22:54 +0200 Message-Id: <20180618152315.34233-1-agraf@suse.de> X-Mailer: git-send-email 2.12.3 Cc: Heinrich Schuchardt , Andy Shevchenko Subject: [U-Boot] [PATCH v4 00/21] sandbox: efi_loader support X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" This patch set augments Simon's patch set for efi_loader support in sandbox[1], but cuts off the memory allocation scheme at a different point. According to the UEFI spec, efi_allocate_pages() takes a uint64_t * argument. Via this argument, we get a physical address as input, but emit a pointer as output. With this patch set in place, I can successfully run the selftest suite as well as an aarch64 grub.efi binary. X86_64 grub.efi doesn't work because that one requires inl instructions to work. Alex [1] https://patchwork.ozlabs.org/project/uboot/list/?series=49832 v1 -> v2: - only compile efi_add_known_memory if efi_loader is enabled - clarify address vs pointer in fs_read patch - include mapmem.h v2 -> v3: - removed: efi_loader: Pass address to fs_read() - new: fs: Convert fs_read/write to take buffer instead of address - new: efi_loader: Introduce ms abi vararg helpers - new: sandbox: Enable 1:1 map - new: distro: Move to compiler based target architecture determination - new: efi_loader: Move to compiler based target architecture determination - new: sandbox: Allow to execute from RAM - new: sandbox: Fix setjmp/longjmp v3 -> v4: - remove 1:1 map again - switch to U-Boot addresses exposed in memory tables - new: elf: Move x86 reloc defines to common elf.h - new: sandbox: Always allocate aligned buffers - new: efi_loader: Expose U-Boot addresses in memory map for sandbox Alexander Graf (16): efi_loader: Use compiler constants for image loader efi_loader: Use map_sysmem() in bootefi command efi.h: Do not use config options efi_loader: Allow SMBIOS tables in highmem sandbox: Map host memory for efi_loader efi_loader: Disable miniapps on sandbox fs: Convert fs_read/write to take buffer instead of address efi_loader: Introduce ms abi vararg helpers distro: Move to compiler based target architecture determination efi_loader: Move to compiler based target architecture determination sandbox: Fix setjmp/longjmp elf: Move x86 reloc defines to common elf.h efi_loader: Use common elf.h reloc defines sandbox: Allow to execute from RAM sandbox: Always allocate aligned buffers efi_loader: Expose U-Boot addresses in memory map for sandbox Heinrich Schuchardt (1): efi_loader: efi_allocate_pages is too restrictive Simon Glass (4): efi: sandbox: Add distroboot support efi: sandbox: Add relocation constants efi: sandbox: Enable EFI loader for sandbox efi: sandbox: Adjust memory usage for sandbox arch/sandbox/cpu/cpu.c | 20 ++++++++++++---- arch/sandbox/cpu/os.c | 39 +++++++++++++++--------------- arch/sandbox/include/asm/setjmp.h | 4 +++- 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/BuR/common/common.c | 2 +- board/gdsys/p1022/controlcenterd-id.c | 10 ++++---- cmd/bootefi.c | 13 ++++++---- cmd/mvebu/bubt.c | 4 ++-- common/splash_source.c | 4 +++- drivers/bootcount/bootcount_ext.c | 12 +++++----- drivers/fpga/zynqpl.c | 8 ++++--- fs/fs.c | 20 ++++++++-------- include/config_distro_bootcmd.h | 17 ++++++++----- include/efi.h | 25 ++++++++++--------- include/elf.h | 35 +++++++++++++++++++++++++++ include/fs.h | 12 +++++----- include/os.h | 19 +++++++++++++++ lib/efi/Makefile | 4 ++-- lib/efi_loader/Kconfig | 2 +- lib/efi_loader/efi_boottime.c | 36 ++++++++++++++-------------- lib/efi_loader/efi_file.c | 6 ++--- lib/efi_loader/efi_image_loader.c | 12 +++++----- lib/efi_loader/efi_memory.c | 28 ++++++++++++++-------- lib/efi_loader/efi_runtime.c | 21 ++++++++-------- lib/efi_loader/efi_smbios.c | 11 +++++++-- lib/efi_selftest/Makefile | 2 +- 28 files changed, 228 insertions(+), 185 deletions(-) delete mode 100644 arch/x86/include/asm/elf.h