Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 88067C001DC for ; Fri, 28 Jul 2023 02:40:49 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id E8A3B867A8; Fri, 28 Jul 2023 04:40:17 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="QDlGjW9a"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C161D86795; Fri, 28 Jul 2023 04:39:25 +0200 (CEST) Received: from mail-io1-xd2f.google.com (mail-io1-xd2f.google.com [IPv6:2607:f8b0:4864:20::d2f]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 2BE7886892 for ; Fri, 28 Jul 2023 04:39:01 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-io1-xd2f.google.com with SMTP id ca18e2360f4ac-7869bcee569so63802639f.0 for ; Thu, 27 Jul 2023 19:39:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1690511939; x=1691116739; 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=l8xz9y4DU/8i57MI+xGLOfCUEVKXBc//ctfhYioAMyQ=; b=QDlGjW9aMkn7y9kFY1sRd9vgvBsWzgS4+oZb72+nfNfwbXrwgtBZN/8en+U/H8Mol3 ovZRrG/9/AmPI2uN+ndcMMa7xcjwS20rIjQq8H9u8I8J3JRmI7kLskHjNNhI2r0WUf+y NSsh2yoO66c6NqQfydd0DuaakB++PcVXeWmkM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690511939; x=1691116739; 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=l8xz9y4DU/8i57MI+xGLOfCUEVKXBc//ctfhYioAMyQ=; b=BlJ3HgFUn9H39WlkS01c5NPMaROel4JXEUtTZn71G3oX5KqM8Rq22DrxKoBJRLFe8v TzWPSI2C97kL7yyaczw0oQ3HbOYt4wM4jPEzYelCcrnTsFKRiJ2ODabZZcmWCcNnrSWz Ox3aNSEm4Ogh3Ndv1dgWOH/EYRqkhCU29Po5Lo0XnJIgXt5qxEn4+lFUgqWKhAbx1XkM 61yJVAIiGq3B7w//f8xsuLOikhdD8MAber4tz39li+b3JU8F5h9I7tK6LvIlNnfaFfdT Z5HO34eDsLVK5Iw6hPfxG60ghtgl0xnk6OeCophGm6L0WCzlTNDz9zRp0i1yhH0Lut9Z yQDA== X-Gm-Message-State: ABy/qLaLKO7GGAkvyCMnohoN4QLltjKUYzUG7p2Ya3BLcbALWeDj71jZ 5aaOJ2InScUsvtw7gDnhq/XwM1bZ1jtnoWOk4bk= X-Google-Smtp-Source: APBJJlHGFaEp2P7ZpN+ZgWCMz5z4u0KB/gMgDFu/3lMjWackHFMFpA+Jmc6EJYbkyndUnumYqknNfg== X-Received: by 2002:a6b:660d:0:b0:787:1d0a:ce87 with SMTP id a13-20020a6b660d000000b007871d0ace87mr1463706ioc.17.1690511939638; Thu, 27 Jul 2023 19:38:59 -0700 (PDT) Received: from sjg1.roam.corp.google.com (c-73-14-173-85.hsd1.co.comcast.net. [73.14.173.85]) by smtp.gmail.com with ESMTPSA id g18-20020a0566380c5200b0042acf389acesm799266jal.71.2023.07.27.19.38.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Jul 2023 19:38:59 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Bin Meng , Simon Glass Subject: [PATCH 8/8] x86: coreboot: Enable support for CBFS Date: Thu, 27 Jul 2023 20:37:51 -0600 Message-ID: <20230728023755.680278-9-sjg@chromium.org> X-Mailer: git-send-email 2.41.0.487.g6d72f3e995-goog In-Reply-To: <20230728023755.680278-1-sjg@chromium.org> References: <20230728023755.680278-1-sjg@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.103.8 at phobos.denx.de X-Virus-Status: Clean This is normally used with coreboot, so enable support for it in the coreboot builds. Add an example to show how it is used. Signed-off-by: Simon Glass --- configs/coreboot64_defconfig | 1 + configs/coreboot_defconfig | 1 + doc/board/coreboot/coreboot.rst | 34 +++++++++++++++++++++++++++++++++ 3 files changed, 36 insertions(+) diff --git a/configs/coreboot64_defconfig b/configs/coreboot64_defconfig index 602465175d20..55064d1ce66f 100644 --- a/configs/coreboot64_defconfig +++ b/configs/coreboot64_defconfig @@ -56,3 +56,4 @@ CONFIG_SOUND=y CONFIG_SOUND_I8254=y CONFIG_CONSOLE_SCROLL_LINES=5 # CONFIG_GZIP is not set +CONFIG_CMD_CBFS=y diff --git a/configs/coreboot_defconfig b/configs/coreboot_defconfig index 735cd6eb4c22..77214f1b4c06 100644 --- a/configs/coreboot_defconfig +++ b/configs/coreboot_defconfig @@ -66,3 +66,4 @@ CONFIG_CONSOLE_SCROLL_LINES=5 CONFIG_CMD_DHRYSTONE=y # CONFIG_GZIP is not set CONFIG_SMBIOS_PARSER=y +CONFIG_CMD_CBFS=y diff --git a/doc/board/coreboot/coreboot.rst b/doc/board/coreboot/coreboot.rst index d09dfc553c87..11e461a2ae0b 100644 --- a/doc/board/coreboot/coreboot.rst +++ b/doc/board/coreboot/coreboot.rst @@ -83,6 +83,40 @@ build in `$CBDIR`:: -device ide-hd,drive=disk,bus=ahci.0 \ +CBFS access +----------- + +You can use the 'cbfs' commands to access the Coreboot filesystem:: + + => cbfsinit + => cbfsinfo + + CBFS version: 0x31313132 + ROM size: 0x100000 + Boot block size: 0x4 + CBFS size: 0xffdfc + Alignment: 64 + Offset: 0x200 + + => cbfsls + size type name + ------------------------------------------ + 32 cbfs header cbfs master header + 16720 17 fallback/romstage + 53052 17 fallback/ramstage + 398 raw config + 715 raw revision + 117 raw build_info + 4044 raw fallback/dsdt.aml + 640 cmos layout cmos_layout.bin + 17804 17 fallback/postcar + 335797 payload fallback/payload + 607000 null (empty) + 10752 bootblock bootblock + + 12 file(s) + + => Memory map ---------- -- 2.41.0.487.g6d72f3e995-goog