From patchwork Mon Jun 26 14:36:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandre Ghiti X-Patchwork-Id: 112997 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp7548550vqr; Mon, 26 Jun 2023 08:05:44 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6BP1hIQH5DavMiAfk/iu7Wz43wo0EpdcklpD9CLAYM5W6WjAJFpNc3GEq2Qyd/xXtoV7nK X-Received: by 2002:a17:907:980e:b0:98c:e0b5:f0cc with SMTP id ji14-20020a170907980e00b0098ce0b5f0ccmr11137939ejc.75.1687791943842; Mon, 26 Jun 2023 08:05:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687791943; cv=none; d=google.com; s=arc-20160816; b=LzyWxS3XoX4qbHsZXla5rwsuoy5G6pUy8vTkYGFdsHelmkV8+a8Y48v2pB6MTV4asD 2cWwxgTpfq2y7jCwY5C793EZQDRjC5lRSUN6LYwzLNkzIPCjg/VVlrxS4fshZRc0dn41 xocjEmTCeY24pu7W2qP7Bu8hObnx2k6/21ZCl/IsUe1GZspCsEHbaxA/TKhfPsNBjVHU Q4hjMZ1YF2GuPBcG9eSbAPmHP76wB+gj0ZJFHMPVrpuL5+ZamtRpv7wgIpzamui35KYn lZ5tPLJe6kTiutE6ULkIDGOCy2Lmc0hF4OErpMyS1jKSjq+2NjXxm45exa/rwAhZ7qxa j+RQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=/pQzPxsmpV8ILmUDokZDt4x2j1OZGQdakvLzX04+Ejg=; fh=EcOnDBL5c3S2nEiYhWSY4B8a1rCPHIQEJ35Tu95NEHc=; b=ff7E01T5L2Rcu79YXHADrpN1mGahrqzZYek7UrOtPoeBhTPPWa7Tl4/HmW9mYvDV5z UNG+HiEaoePNsp6wi5QeS+DpdGXfkbmz3uMl1F2FCfuCc7Y7Eoy8Ktk5/oSBOxcutwOK 95sZhYOhmaouW6312pYYudsw4Eg/zJHea9hx+GOITjrX0whL0Hi+X5V5rOv2YrAF6qmZ WMzFHF3VkfqCtq87hyKYgatSrPf1iAeYCoqcfIpihsp54+HzlcPiwJN01GONkCGfDO1B ej/oPrPQBbdT4m6pPcmJZkbLId3/rWjqJLGB4hlxIyD8/FAwDUDhJJobPlRSlR4zRNAF HPgg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rivosinc-com.20221208.gappssmtp.com header.s=20221208 header.b=uex3RA9q; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n14-20020a170906118e00b0098dcabbe742si2811501eja.121.2023.06.26.08.05.12; Mon, 26 Jun 2023 08:05:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@rivosinc-com.20221208.gappssmtp.com header.s=20221208 header.b=uex3RA9q; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230114AbjFZOig (ORCPT + 99 others); Mon, 26 Jun 2023 10:38:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50618 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231455AbjFZOie (ORCPT ); Mon, 26 Jun 2023 10:38:34 -0400 Received: from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com [IPv6:2a00:1450:4864:20::32f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 82CDFBF for ; Mon, 26 Jun 2023 07:38:32 -0700 (PDT) Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-3fb4146e8ceso2861965e9.0 for ; Mon, 26 Jun 2023 07:38:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20221208.gappssmtp.com; s=20221208; t=1687790311; x=1690382311; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=/pQzPxsmpV8ILmUDokZDt4x2j1OZGQdakvLzX04+Ejg=; b=uex3RA9qERfNnTukZWjHbvUoE92GRFB/vSd/56SJYlEKAAJOF2wGlzoyFo3yf4A7FF 8ZBC9aYsVrrNL+HjSWxsFPpv7zb5e08DTroI6Woc8a03XoBhet2OAK6/2JlRryOIeOd3 I8zI/yrigzMZuoa1Zlpi1pg/KbAe/zkTjZCzFYbA5MTv+E2k183GmHQwYbZH4d/8RKxM JYnOoOnOBhieWlLKxAQoXKiQiFFGGXVm8UL/CZsOzQLSSYXhOmr5G1NMtpRzsMCWp490 AMw2oa2keFry57qcMCFzDn0xN53dGJAe57lsQnHdwyA3ycjoFgAKQdN2+0C18QPEehNu cxHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687790311; x=1690382311; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=/pQzPxsmpV8ILmUDokZDt4x2j1OZGQdakvLzX04+Ejg=; b=NBQ7+zWcYl3aVHHHLIzwERY0tM08WjSLIt7JBM+D7o6CemqtgTZWd1Klq3kMZr9XZ0 3x3FlA7S0cKQtSYGzRRhpFktpJSCbIClQzqdtb9Fp0KNEOae7ihvemJY5VSZpqq5yDwg aRc8XGJqdLeOqCPLAwugaCJggj+y17dcTDfpEXA5OhAyp1PIxfD5u9u9tWY7s76oeFvC RiLG281jMBzOP91b1NIHu/IvO95u/oDj/X3eTDEfcw2pAfZyu6XpiXVfHv/AMwul7EyJ VdOqKWtSc0xEaM0mtf5dG/J6hSIsGrCZ+Z+T6MZcX6tSyOFUge6EUL3RpyUykalCTwFh zomw== X-Gm-Message-State: AC+VfDzdfDM5y284+v91r9nNTDDpsH5y8kTXBL92TipA8gSxj941pGTC zpB2kSAnfxxjbenfexs9RITGHQ== X-Received: by 2002:a7b:cd97:0:b0:3f9:a6f3:f23c with SMTP id y23-20020a7bcd97000000b003f9a6f3f23cmr18047670wmj.36.1687790311012; Mon, 26 Jun 2023 07:38:31 -0700 (PDT) Received: from localhost.localdomain (amontpellier-656-1-456-62.w92-145.abo.wanadoo.fr. [92.145.124.62]) by smtp.gmail.com with ESMTPSA id v2-20020a5d6782000000b00313f5babb18sm1644944wru.9.2023.06.26.07.38.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Jun 2023 07:38:30 -0700 (PDT) From: Alexandre Ghiti To: Jonathan Corbet , Paul Walmsley , Palmer Dabbelt , Albert Ou , =?utf-8?b?QmrDtnJuIFTDtnBlbA==?= , Andrew Jones , Conor Dooley , Sunil V L , Song Shuai , linux-doc@vger.kernel.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Alexandre Ghiti , Atish Patra , Palmer Dabbelt Subject: [PATCH v4 3/3] Documentation: riscv: Update boot image header since EFI stub is supported Date: Mon, 26 Jun 2023 16:36:26 +0200 Message-Id: <20230626143626.106584-3-alexghiti@rivosinc.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230626143626.106584-1-alexghiti@rivosinc.com> References: <20230626143626.106584-1-alexghiti@rivosinc.com> MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1769778125595774270?= X-GMAIL-MSGID: =?utf-8?q?1769778125595774270?= The EFI stub is supported on RISC-V so update the documentation that explains how the boot image header was reused to support it. Signed-off-by: Alexandre Ghiti Reviewed-by: Atish Patra Reviewed-by: Palmer Dabbelt Acked-by: Palmer Dabbelt Acked-by: Palmer Dabbelt --- Documentation/riscv/boot-image-header.rst | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Documentation/riscv/boot-image-header.rst b/Documentation/riscv/boot-image-header.rst index a4a45310c4c4..df2ffc173e80 100644 --- a/Documentation/riscv/boot-image-header.rst +++ b/Documentation/riscv/boot-image-header.rst @@ -28,11 +28,11 @@ header in future. Notes ===== -- This header can also be reused to support EFI stub for RISC-V in future. EFI - specification needs PE/COFF image header in the beginning of the kernel image - in order to load it as an EFI application. In order to support EFI stub, - code0 should be replaced with "MZ" magic string and res3(at offset 0x3c) should - point to the rest of the PE/COFF header. +- This header is also reused to support EFI stub for RISC-V. EFI specification + needs PE/COFF image header in the beginning of the kernel image in order to + load it as an EFI application. In order to support EFI stub, code0 is replaced + with "MZ" magic string and res3(at offset 0x3c) points to the rest of the + PE/COFF header. - version field indicate header version number