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 437F2C001DF for ; Sun, 30 Jul 2023 17:17:16 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 95DED86A49; Sun, 30 Jul 2023 19:16:08 +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="QX3Ra1p2"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id BBE97863A4; Sun, 30 Jul 2023 19:15:47 +0200 (CEST) Received: from mail-io1-xd35.google.com (mail-io1-xd35.google.com [IPv6:2607:f8b0:4864:20::d35]) (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 A8A74866DA for ; Sun, 30 Jul 2023 19:15:43 +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-xd35.google.com with SMTP id ca18e2360f4ac-7908ff76516so20374239f.1 for ; Sun, 30 Jul 2023 10:15:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1690737342; x=1691342142; 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=0Be2ZUuEFUIF9h7uAOmCZuv/nd4dBwHO4fpqwpMl7X0=; b=QX3Ra1p2c0C50fiBoWIm8p8vw3CLKNSYoBLmFSB3pacAL9Yb33ioZbQojGMo71BGif unOv0b5i6yupYNisU0iK7wGwAthIBfSeTWzgLGNHV+QRsptX1t/HI6J1//vCIN8ABQWo X5YJaU6Jd2PRQ1sNsIcDK1Nw9Vig2rbVXl4Vc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690737342; x=1691342142; 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=0Be2ZUuEFUIF9h7uAOmCZuv/nd4dBwHO4fpqwpMl7X0=; b=jblMZpKF6GBK9CeEXREfDB8gjMGqn19d85VID6Dy8VsZHXoz78dwGWar6nRHsixi+D wxzTFO2HwMgo+OqTpD/HhB/vhmRdcARKlnFwy7UnsWi5UMlBCOaloSnbsUrG+MPfp/08 Il3EGRgJ1+aUaJohDb90S5Qfca7+9TRIoESZu/8i5uSvePPpBi6axovNB6R4M1wBCsOa ZzmdIAcbI3K7vvgykvOKpRaLGj7cyhe17QDxFbh/AmmbdJLZ+MUoIQ7EiAanzkM+6Nc4 M8ldyY7eEQBqPrm3TcWsMuPN6bx8VSQ3miSEqZrGq8q+0NmxJ/Es/b8AdsoJE2WuVcJK ax5A== X-Gm-Message-State: ABy/qLangfSyB56knZso4ixJH5ACnwjZb7b02zRUcqXRu3Qjdp7gjprW LCu7waDOkw+zo58pQFlq5mixPSM2X4cf/1BVz4k= X-Google-Smtp-Source: APBJJlFgqO4ZfTxeKsZrVORIaJRSYLvLhsl2JKgHNlniGVczoGLv9sfEqXF5VI2xEW1BjtbHm8AN0A== X-Received: by 2002:a6b:b7d6:0:b0:790:96ba:ecb3 with SMTP id h205-20020a6bb7d6000000b0079096baecb3mr3383294iof.10.1690737342301; Sun, 30 Jul 2023 10:15:42 -0700 (PDT) Received: from sjg1.lan (c-73-14-173-85.hsd1.co.comcast.net. [73.14.173.85]) by smtp.gmail.com with ESMTPSA id y11-20020a6bd80b000000b00786582eb9fbsm2657473iob.15.2023.07.30.10.15.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 30 Jul 2023 10:15:42 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Mattijs Korpershoek , Bin Meng , Simon Glass Subject: [PATCH v2 9/9] x86: coreboot: Enable support for CBFS Date: Sun, 30 Jul 2023 11:15:19 -0600 Message-ID: <20230730171531.914677-9-sjg@chromium.org> X-Mailer: git-send-email 2.41.0.487.g6d72f3e995-goog In-Reply-To: <20230730171531.914677-1-sjg@chromium.org> References: <20230730171531.914677-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 --- (no changes since v1) 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