From patchwork Sat Mar 14 00:11:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Atish Patra X-Patchwork-Id: 1254736 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=wdc.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=wdc.com header.i=@wdc.com header.a=rsa-sha256 header.s=dkim.wdc.com header.b=KdoLNTy0; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48fNKb3qYMz9sPJ for ; Sat, 14 Mar 2020 11:11:59 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 2078581333; Sat, 14 Mar 2020 01:11:46 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=wdc.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=wdc.com header.i=@wdc.com header.b="KdoLNTy0"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 7BDF0814D6; Sat, 14 Mar 2020 01:11:44 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from esa6.hgst.iphmx.com (esa6.hgst.iphmx.com [216.71.154.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id B182C8025D for ; Sat, 14 Mar 2020 01:11:38 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=wdc.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=prvs=33551ae11=atish.patra@wdc.com DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1584144699; x=1615680699; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=50C3djZJtsQkls5n68zu0wk/RtdgmlWzQkypkRtSqvo=; b=KdoLNTy0hPVimTjG3zVM2lZLNhg5WSrrloKImo4Kod7iMiX/g6ZZxCoK pfp7NG5XlPzOLohsVg+g/gneeMe6LMwltVnER1+CB3hM/lNxKaIE2A9ea Z8rVLRc+dJcn6NG35mLwkOj9SXHfbOJJ1p7nWgRtK9jSNSzUX93vHUTaz +qMIv8sDv9y2BxSp9Jg4T32mI0vuR38eEmVTMZSybRJnVFdc1sDo8WCbm yRI57Oog8QxN267VOJG9wmxGOzuHARNubWnc1kCXdoMWmByrz0X7z1V2C GoNDoYRac7pG1tCTb0Oud9N6nai2vlEiXcDRJKRP50sVH3vEZ6uMmfvmj g==; IronPort-SDR: K1nGqH3h87uRtBPmj6GtTxPWn7ELbTYALJh4nepRqUlPUoINbns/iVV/CMe6J4QcpCFe/D462S VQfaYP0LmhCZz+4gk7kRkB02k4wyphcgCmfsMPRr+Fk430wIyzSXlSUVTydlNGYSZ2ShoJWVo5 04FeEs5TX8zaXjWsq/Y4dq6KI8qd6uPa5q9ZI7MpehyfLdZJj4bTjCTbyImALO5Sgb3IkMg7lT 3+JrBmlhDbJT2vQMTCUtkWCqGGPi6tD1oHjcYZBqT86vqnCVFDEoEj1uAxhV2g9/7SRcdEPqxI WjY= X-IronPort-AV: E=Sophos;i="5.70,550,1574092800"; d="scan'208";a="133903974" Received: from h199-255-45-15.hgst.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 14 Mar 2020 08:11:37 +0800 IronPort-SDR: jeZ2s4D6GjBeJmIIbUFFAEx++kqM6OvbbC75fN5zuk5eoZ/ucfd4aF2lqAP59SSYlzuACzPAO7 pzOHJhhF/VQ2TRL6kpYux0Nr3tkTni8/5gss7cmi+0n8cp8FOQze6wlo1KD5N/g5gv1s6n41ZZ kE4lmyIYZhXZWPM2uWmsEEX/gi0cfrQUMknVN7/lhXdavmLr9eclPXjjQodyNfOzmmsYWjDXIT 9YkXL2dE0r6VnSuB9/tntwmsqAfk2kWjCoPLoo/CG6Nrlz0Ju2+Bj1QMT9b/PNtiJ79D3xrovJ ZWN9bQa5lk69BpY6VyOvE+wM Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep02.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Mar 2020 17:03:10 -0700 IronPort-SDR: 0PIlJECa1XgXAnapUKYQ5P/CyOyHpy7AKDsI7I1KDbVXSZ+bJkqGOYiFwc0A75xsA+EhulwfK/ 1LnX/q5EdkMZ0qsNb97zANKoFpNEeWDSnJTaOQYyGvVSrg+rZIC2vrr043E8zNiQeZh0WdMzyt OPa4oSL/janVXKsAwohll1i11el2lOBwewPEu6VHjN4vts/bFNmDn5DTqTAB1eal06HA7Nlab2 VHQtsv0BUEvV6Aqr9Tb7VIgkRGoH45riqm7K6FIYbdtTnQAktssgn5q1t07RKTeCBDNkTdjuoQ xzI= WDCIronportException: Internal Received: from wdapacbjl0003.my.asia.wdc.com (HELO yoda.hgst.com) ([10.86.54.92]) by uls-op-cesaip02.wdc.com with ESMTP; 13 Mar 2020 17:11:36 -0700 From: Atish Patra To: u-boot@lists.denx.de Cc: Atish Patra , Alexander Graf , Anup Patel , Bin Meng , Heinrich Schuchardt , Lukas Auer , Palmer Dabbelt , Rick Chen , abner.chang@hpe.com, daniel.schaefer@hpe.com Subject: [PATCH v2 0/4] DT related fixes for RISC-V UEFI Date: Fri, 13 Mar 2020 17:11:28 -0700 Message-Id: <20200314001132.17393-1-atish.patra@wdc.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.30rc1 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.2 at phobos.denx.de X-Virus-Status: Clean This series adds few DT related fixes required for Linux EFI stub to work on RISC-V. Patch 1 adds the boot hartid property under /chosen node. The related discussion can be found here. https://patchwork.ozlabs.org/patch/1233664/ https://lists.denx.de/pipermail/u-boot/2020-March/402085.html Patch 2 fixes a generic issue in bootefi. Patch 3 & 4 provide one of the option to update reserved-memory node for Linux. It depends on Bin's following series in OpenSBI http://lists.infradead.org/pipermail/opensbi/2020-March/001316.html The other options are SBI extension and trap/emulate on PMP csr access. The detaild discussion can be found here. https://github.com/riscv/riscv-sbi-doc/pull/37 Patch 1 & 2 can be applied indepedently from 3 and 4. I want to keep all the patches together to provide a holistic view of changes required for RISC-V UEFI. Changes from v1->v2: 1. Fix the issue if chosen node is not present. Changes from previous version: 1. Renamed the DT node property to "boot-hartid" from "efi-boot-hartid". 2. Changed the property type to u32 instead of u64 for RV32 compatibility. Atish Patra (4): riscv: Add boot hartid to Device tree cmd: bootefi: Parse reserved-memory node from DT riscv: Provide a mechanism for riscv boards to parse reserved memory riscv: Setup reserved-memory node for FU540 arch/riscv/cpu/start.S | 1 + arch/riscv/include/asm/global_data.h | 1 + arch/riscv/include/asm/u-boot-riscv.h | 1 + arch/riscv/lib/asm-offsets.c | 1 + arch/riscv/lib/bootm.c | 59 +++++++++++++++++++++++++++ board/sifive/fu540/fu540.c | 15 +++++++ cmd/bootefi.c | 42 +++++++++++++++---- configs/sifive_fu540_defconfig | 1 + 8 files changed, 112 insertions(+), 9 deletions(-) --- 2.25.1