From patchwork Tue Jul 25 14:19:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandre Ghiti X-Patchwork-Id: 125687 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9010:0:b0:3e4:2afc:c1 with SMTP id l16csp2529196vqg; Tue, 25 Jul 2023 08:00:28 -0700 (PDT) X-Google-Smtp-Source: APBJJlFZcE6RA6aB/gURflDzQYxAVOK2Au+q/e2vrySgl3M4sWBho9GFizWgQumGvKQo9vB/l/3L X-Received: by 2002:a05:6870:b689:b0:1b0:60ff:b74a with SMTP id cy9-20020a056870b68900b001b060ffb74amr13817647oab.56.1690297227717; Tue, 25 Jul 2023 08:00:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690297227; cv=none; d=google.com; s=arc-20160816; b=t+zaRn8Ij0xII6o65P+S7OeztdtQK9Ih/es0OSuy+9qqfpHeSvoHtpbv9MBSuWHzHV yTuaeXAtctblGCnsPAAjPsgCOZ6XrPQpJoVy8uNfo0XOyOrxwVuzIw4CeuqQlGYky86B KtQ8hUGBCZiDGE5XryZ/pAYowZU3mDkFFfkVOTEHtaEQOWIo7cfSm9/AXoIgbqgz5zsW 2KHDl+11w6tKdhPEOnUu+70n8N217rVaC342Cx9J8IrjIJhJ/R7ozttxVJuZsCxAQGUq h6bDM7lMsz7zgwxKbSd5BLP38tHrn3br7XvAX9kzHASyI4S06AvCOvIFYrEhEmr2HmxM fjhA== 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=+UwYYe6ucZvdBvqF8iQhg0hDnshi1xav4hUdpbdxiqw=; fh=bhkhUEGGJj1yn1JGWqwsbdZ9PJzEK76/CWp/d2c1UYk=; b=pupMZ+LpWRL6M1ufv4gMHV9WB8mV5BjA+WDl/VeqiptGdoSNqH+KpzGy7wPy6E0WRF UDIioyAVlxXyTU4W78lZ+VmzabNLwLc3KCrhvhK2dISaORbJz00hUNPy8C6XRFzeHBGo E2f6q5GhUFVwjXVEnNae6HDgrEPZOHZly+BjB3+zE2cFuRD742TGP1G0i3IalJBT1geq BmI2tqU79mfYhOEDXtGtX8O4xz7bXXjpkuZwNByHb+Bd+mk0K93bAlnkCX/CPTV/xy04 NyldX4FT+oRlJ5KcMiee/xCHRHLXrRG72Yi+706Cq3mPw4mQdmmsrQhmZjPZBtVgnVr2 orzw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rivosinc-com.20221208.gappssmtp.com header.s=20221208 header.b="WbIR7n/y"; 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 x5-20020a654145000000b0055c7d9edbc5si11415709pgp.174.2023.07.25.08.00.12; Tue, 25 Jul 2023 08:00:27 -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="WbIR7n/y"; 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 S232859AbjGYOWX (ORCPT + 99 others); Tue, 25 Jul 2023 10:22:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33428 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232907AbjGYOWF (ORCPT ); Tue, 25 Jul 2023 10:22:05 -0400 Received: from mail-wr1-x432.google.com (mail-wr1-x432.google.com [IPv6:2a00:1450:4864:20::432]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B4DC52682 for ; Tue, 25 Jul 2023 07:21:38 -0700 (PDT) Received: by mail-wr1-x432.google.com with SMTP id ffacd0b85a97d-314172bac25so4308305f8f.3 for ; Tue, 25 Jul 2023 07:21:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20221208.gappssmtp.com; s=20221208; t=1690294890; x=1690899690; 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=+UwYYe6ucZvdBvqF8iQhg0hDnshi1xav4hUdpbdxiqw=; b=WbIR7n/yzc9VAozw8Sk+VSB2504MVtOdu1vnFMj5noYjek5szstVImCB0Qp6a7sqFz Gz1gOgq/xvFNwR6NQej4DgG6nd0XEbv7N3vBqNr4x74ijnVGuP6dp2xAnyb09iyks1TD U3hriTLler5E7fm9b3s9X5Pv4EUZBMV+gFxGRvGwNfHZyV9OSzwvCZH1U0E6XOZvuUqY p07D4iEfPMttDvKhK+zGj8L1eAcWLj/Q3iN5wQ36akJ38bS8XiId2FJF9QSZk+K+/BxR fR8/8EV1BgMPvCEA5uZCfxHxHjuyY1xOUxXk1NtodoYq/XT1SGJTBfJWvqEg23Om2VK+ P3Qw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690294890; x=1690899690; 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=+UwYYe6ucZvdBvqF8iQhg0hDnshi1xav4hUdpbdxiqw=; b=ZeqqFJS+TJj92dg50qWlKyImV+JTzxRFCFI8QWhwYvBUlj7V9zXGp77Uxyeib1my9r bUtiX6h0GxbwT7Y3/4LtRzk3mboJi/K3hrFn92c3Rv2FJnGp0yTtOMHP6aMsX3Hhm8vd xG09a8IjAv7J2JjlYmzOr9larJK/szW07QTrEvsjwWcTRZfSpv4NxzpoUZJTWcD3UNaH AvGwcw6xBbczBkWDEaeSA5YCl61vpHqA00iWR/hpULpxb+NVddpnAZGYRbUIu7/wMsnv +yqRWAQ6+L9mxuF7KU9O8wi9X23z7e2/foFB2vCz32rsAYHoCT32UzHlvy0+4gDRZwW1 czcQ== X-Gm-Message-State: ABy/qLaj4aH4gHfIoTWPP8xmIIl+x9/JtCmMjyEuSgPTt+bwMdgPf4cA qQRTX6ycyZGM2lez80S1JK2/LQ== X-Received: by 2002:a5d:45c1:0:b0:313:ee5b:d4bc with SMTP id b1-20020a5d45c1000000b00313ee5bd4bcmr9304252wrs.5.1690294889769; Tue, 25 Jul 2023 07:21:29 -0700 (PDT) Received: from alex-rivos.ba.rivosinc.com (amontpellier-656-1-456-62.w92-145.abo.wanadoo.fr. [92.145.124.62]) by smtp.gmail.com with ESMTPSA id x10-20020adff0ca000000b00314367cf43asm16503568wro.106.2023.07.25.07.21.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Jul 2023 07:21:29 -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 , Randy Dunlap , linux-doc@vger.kernel.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Alexandre Ghiti , Atish Patra , Palmer Dabbelt Subject: [PATCH v6 3/3] Documentation: riscv: Update boot image header since EFI stub is supported Date: Tue, 25 Jul 2023 16:19:25 +0200 Message-Id: <20230725141926.823153-3-alexghiti@rivosinc.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230725141926.823153-1-alexghiti@rivosinc.com> References: <20230725141926.823153-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=unavailable 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: INBOX X-GMAIL-THRID: 1772405105455168680 X-GMAIL-MSGID: 1772405105455168680 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 --- - Changes in v5: * Rebase on top of docs-next 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