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 D55FEEB64D9 for ; Wed, 12 Jul 2023 15:06:49 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id DE0D086B44; Wed, 12 Jul 2023 17:05:16 +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="PRUlcRLe"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 3C2E386ADB; Wed, 12 Jul 2023 17:05:11 +0200 (CEST) Received: from mail-io1-xd30.google.com (mail-io1-xd30.google.com [IPv6:2607:f8b0:4864:20::d30]) (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 B962886B1F for ; Wed, 12 Jul 2023 17:05: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=sjg@chromium.org Received: by mail-io1-xd30.google.com with SMTP id ca18e2360f4ac-785d738d3feso20336039f.0 for ; Wed, 12 Jul 2023 08:05:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1689174307; x=1691766307; 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=BaX0BN8r7/ouWgTbBxJjodh6ywvymPjCCIyQbF5Adw4=; b=PRUlcRLeHfR/74VvR1IvbBetwr7QBBupQQoT9nfHAZ+2zYxfCCVyYindJcAVbUEwGN AXYdn8rQ2/mdgKA6UMuues3NjiZ7p4Q+Pss83EzTbIYQ6UWUJQ06v6aUOqSe5Kil0GJM scqBd7nbVriv3xRIaC0AUBr8EZxaIzHkRmTQw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689174307; x=1691766307; 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=BaX0BN8r7/ouWgTbBxJjodh6ywvymPjCCIyQbF5Adw4=; b=BuJH/RRz4PmaHnQcn55yJH/gI6DBtHcV2DsIMfv9kp2OUPw+WMwGaE4ZYuQcmuAyYh yaXUp94pbncUSiFWMRUTdy2uXobETstZRZgC5Nh1C3Kk+VYYwd/YgJ4/voLsEN9B/9gO kGeuuPPDMYgq040TUxVFd+Ty0b7UOstVPDLdyVzv0/3eR10AAmJURPViYBezs66Wuxjq JhTXIIKOxLnpSwiuTXHQ5B5b72eGfxYNcMN40Fb/cR0akKcaXeOPcGacZTH2EEwX3sMG qboggV0S06CNUcAVhWOC26O0zE0M4mwq1lvEfGpxBfzmFmFybGbOzNwWC3Y6+DpX1hae ClKg== X-Gm-Message-State: ABy/qLYNNVi1nFJ1kIDA+ZXmKI/CqyHRsez8j6Ahlm7cSN4ecrifZyPU BfjYrsjRZERL4WxsPHDm3wsTppWOzLZzvMdXwPc= X-Google-Smtp-Source: APBJJlGFcJkjcPgBwu0m4dC3nbjKzQidwAOTS7+h8a8qgBJeVHBOVhujrdgrO7DzcQcvXmw1w2LsSg== X-Received: by 2002:a05:6602:3a8a:b0:783:6aa0:9816 with SMTP id bz10-20020a0566023a8a00b007836aa09816mr1496170iob.7.1689174307288; Wed, 12 Jul 2023 08:05:07 -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 h16-20020a0566380f1000b0042b08954dc3sm1202958jas.33.2023.07.12.08.05.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jul 2023 08:05:07 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Bin Meng , Simon Glass Subject: [PATCH v3 07/18] bootstd: Allow storing x86 setup information Date: Wed, 12 Jul 2023 09:04:36 -0600 Message-ID: <20230712150453.2407923-8-sjg@chromium.org> X-Mailer: git-send-email 2.41.0.390.g38632f3daf-goog In-Reply-To: <20230712150453.2407923-1-sjg@chromium.org> References: <20230712150453.2407923-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 On x86 boards Linux uses a block of binary data to provide information about the command line, memory map, etc. Provide a way to store this in the bootflow so it can be passed on to the OS. No attempt is made to generalise the code, since other archs don't need this information. The field is present always, though, to avoid needing accessors or #ifdefs when building code on other archs. Signed-off-by: Simon Glass Reviewed-by: Bin Meng --- (no changes since v2) Changes in v2: - Explain why the setup information is not behind an #ifdef cmd/bootflow.c | 2 ++ include/bootflow.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/cmd/bootflow.c b/cmd/bootflow.c index f33db7be5f2e..bf30087c7c4e 100644 --- a/cmd/bootflow.c +++ b/cmd/bootflow.c @@ -336,6 +336,8 @@ static int do_bootflow_info(struct cmd_tbl *cmdtp, int flag, int argc, else puts("(none)"); putc('\n'); + if (bflow->x86_setup) + printf("X86 setup: %p\n", bflow->x86_setup); printf("Logo: %s\n", bflow->logo ? simple_xtoa((ulong)map_to_sysmem(bflow->logo)) : "(none)"); if (bflow->logo) { diff --git a/include/bootflow.h b/include/bootflow.h index a1c16ab93b75..f263173c4da5 100644 --- a/include/bootflow.h +++ b/include/bootflow.h @@ -82,6 +82,7 @@ enum bootflow_flags_t { * @fdt_addr: Address of loaded fdt * @flags: Flags for the bootflow (see enum bootflow_flags_t) * @cmdline: OS command line, or NULL if not known (allocated) + * @x86_setup: Pointer to x86 setup block inside @buf, NULL if not present */ struct bootflow { struct list_head bm_node; @@ -106,6 +107,7 @@ struct bootflow { ulong fdt_addr; int flags; char *cmdline; + char *x86_setup; }; /** -- 2.41.0.390.g38632f3daf-goog