Received: by 2002:a05:7412:d008:b0:f9:6acb:47ec with SMTP id bd8csp346286rdb; Tue, 19 Dec 2023 20:46:35 -0800 (PST) X-Google-Smtp-Source: AGHT+IFgxBV90xgV9UCvQ2eUmrwGkjn0ZvcDiVwE4SOEGiTZEzxkJFBSWaun7njJN5RDKF7F0vyC X-Received: by 2002:a05:6a21:788d:b0:194:c6d3:1bd4 with SMTP id bf13-20020a056a21788d00b00194c6d31bd4mr840994pzc.124.1703047594733; Tue, 19 Dec 2023 20:46:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703047594; cv=none; d=google.com; s=arc-20160816; b=eNN1jh7leqcwuvISioduaQlwofTWO9bTsndHmcdcg8cqsV3hQi/8r6AMxtOYWn57lt u8lKBO71pxeIwvk3wi+OIUYHahPxSoFKa84hYZkCoRYFPz7nowqXlaxRQSBnHsMBfY/B cI/aAkkjWZlGpqZ4xkYeuOLdHWLQOc7q60IYMWnsj2kYQiSQDpnF2lsZ1ZmrWasL1PpA PcZROBY87sSelYeXpCLJ70F68fEwylq0Mh0+mz05U5/0iK4EwLJEI1nduPSKWzjf+0cV 9ZdUpy24wOcLhViIawQNHmFyUxq8S2wGMTiSnXbqotzL72+Jz+qYkEUksFj8RRpC0eBT 5zCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :dkim-signature; bh=ObOjGHxxzANzBA20+fRUpz/qy8ssxRN2M1oEwSnchMg=; fh=qv4hr+2raX41Ds5D4zdNM4FeCqyongGywxkupETKcXU=; b=HjCk7oE4WTXVMEzfTLa3Q50oaYsuatrrbAQGmGQkN8RSPxpacAe6Q3CKED/+okZgrm glCuDmH9qeSYA3pgUdQN2sQwBgq0chbdvZPh1JPP5qVev8xVtc7YYvFncxmknPpIXt0A phfXX8Uy519jjSeeNrT383pojXI55AKI+M5/Gkzbj2HxhOv3K0TtKOjXyT1fwZGuhUAR rOB0dYKp+Uii2SiYAou47IO/zBgnGERMccsUKu6BAUy2KkikazRvelKn5HQLsHr4e4V5 rFlGlY9pE45BFDkrtoCufp4ZykrlrIHwuGXW9xcTE+bQixIat+Vl4SC1nZA0mQGSF9r4 6RUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=XEObP6NA; spf=pass (google.com: domain of linux-kernel+bounces-6375-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-6375-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id l4-20020a17090a49c400b0028b1fd3aaadsi2365043pjm.164.2023.12.19.20.46.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Dec 2023 20:46:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-6375-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=XEObP6NA; spf=pass (google.com: domain of linux-kernel+bounces-6375-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-6375-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id C298FB23ABF for ; Wed, 20 Dec 2023 04:46:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3468DF9E3; Wed, 20 Dec 2023 04:46:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="XEObP6NA" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-ed1-f41.google.com (mail-ed1-f41.google.com [209.85.208.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CA760C153 for ; Wed, 20 Dec 2023 04:46:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=google.com Received: by mail-ed1-f41.google.com with SMTP id 4fb4d7f45d1cf-552d39ac3ccso666715a12.0 for ; Tue, 19 Dec 2023 20:46:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1703047576; x=1703652376; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=ObOjGHxxzANzBA20+fRUpz/qy8ssxRN2M1oEwSnchMg=; b=XEObP6NAyuPE33DE6Fp3QBXNAaZNZth6v2xSsGDHfV118mNirehzBug2ojRxg7Z3Kg UqzXHMrmgnJBzatxZfE/5S0O0DFLGABlk/vO+UQKjMLV0/3rT+6ULQtYgV3ppqSmy2MC erFWBrsajNh7TULP7URSJ/kkXeZixhXeNUCko= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703047576; x=1703652376; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=ObOjGHxxzANzBA20+fRUpz/qy8ssxRN2M1oEwSnchMg=; b=bhttpDjFKQ08aupLcsGTvnVb8HLmjgvdJKpAPc77fjFtADjIAMUhOCtcqeIZn6b+n1 JPGHbjK63VMkWjNbMMiYTPsixVBTh0kYvltAmEIXYkoI5xo2gmMLTEU09Lyd/dBybp7k RAESulwOIB/idC1cHznnKL7F+yFyCQyoJCRfaghVIA4q+db62gOmPYNdX2ASdj90zSGq eMydEOFiL2Xhis1vb3AaacJwKk85sE2S+PuDyD8W/FkXSLJbhu52bEaqPkroovbP+gS/ bC81iLbJK9m5uirroaXcqn1abAOvdhNUR0VuO46odt9Dwcuke8lQmqpITjupmk6bWaX9 fISA== X-Gm-Message-State: AOJu0YxW33WpXYEA0v71PpbV71pP0PCnhU5FzbQGPYn27ZXoJmjUU0jG 50c9/IA4d0S6EJo1wf2vlfhnjtqnoL/v+IYvc+lcjfZ5f7j/ X-Received: by 2002:a17:906:c15:b0:a26:8f35:20e3 with SMTP id s21-20020a1709060c1500b00a268f3520e3mr484981ejf.4.1703047576066; Tue, 19 Dec 2023 20:46:16 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20230926194242.2732127-1-sjg@chromium.org> <20230926194242.2732127-2-sjg@chromium.org> In-Reply-To: From: Simon Glass Date: Tue, 19 Dec 2023 21:46:04 -0700 Message-ID: Subject: Re: [PATCH v7 2/2] schemas: Add some common reserved-memory usages To: "Chiu, Chasel" Cc: Ard Biesheuvel , "devicetree@vger.kernel.org" , Mark Rutland , Rob Herring , "Tan, Lean Sheng" , lkml , Dhaval Sharma , "Brune, Maximilian" , Yunhui Cui , "Dong, Guo" , Tom Rini , ron minnich , "Guo, Gua" , "linux-acpi@vger.kernel.org" , U-Boot Mailing List Content-Type: text/plain; charset="UTF-8" Hi, On Mon, 11 Dec 2023 at 10:52, Simon Glass wrote: > > Hi, > > On Tue, 28 Nov 2023 at 13:31, Chiu, Chasel wrote: > > > > > > > > > > > -----Original Message----- > > > From: Ard Biesheuvel > > > Sent: Tuesday, November 28, 2023 10:08 AM > > > To: Chiu, Chasel > > > Cc: Simon Glass ; devicetree@vger.kernel.org; Mark Rutland > > > ; Rob Herring ; Tan, Lean Sheng > > > ; lkml ; Dhaval > > > Sharma ; Brune, Maximilian > > > ; Yunhui Cui ; > > > Dong, Guo ; Tom Rini ; ron minnich > > > ; Guo, Gua ; linux- > > > acpi@vger.kernel.org; U-Boot Mailing List > > > Subject: Re: [PATCH v7 2/2] schemas: Add some common reserved-memory > > > usages > > > > > > You are referring to a 2000 line patch so it is not 100% clear where to look tbh. > > > > > > > > > On Tue, 21 Nov 2023 at 19:37, Chiu, Chasel wrote: > > > > > > > > > > > > In PR, UefiPayloadPkg/Library/FdtParserLib/FdtParserLib.c, line 268 is for > > > related example code. > > > > > > > > > > That refers to a 'memory-allocation' node, right? How does that relate to the > > > 'reserved-memory' node? > > > > > > And crucially, how does this clarify in which way "runtime-code" and "runtime- > > > data" reservations are being used? > > > > > > Since the very beginning of this discussion, I have been asking repeatedly for > > > examples that describe the wider context in which these reservations are used. > > > The "runtime" into runtime-code and runtime-data means that these regions have > > > a special significance to the operating system, not just to the next bootloader > > > stage. So I want to understand exactly why it is necessary to describe these > > > regions in a way where the operating system might be expected to interpret this > > > information and act upon it. > > > > > > > > > I think runtime code and data today are mainly for supporting UEFI runtime services - some BIOS functions for OS to utilize, OS may follow below ACPI spec to treat them as reserved range: > > https://uefi.org/specs/ACPI/6.5/15_System_Address_Map_Interfaces.html#uefi-memory-types-and-mapping-to-acpi-address-range-types > > > > Like I mentioned earlier, that PR is still in early phase and has not reflected all the required changes yet, but the idea is to build gEfiMemoryTypeInformationGuid HOB from FDT reserved-memory nodes. > > UEFI generic Payload has DxeMain integrated, however Memory Types are platform-specific, for example, some platforms may need bigger runtime memory for their implementation, that's why we want such FDT reserved-memory node to tell DxeMain. > > > > The Payload flow will be like this: > > Payload creates built-in default MemoryTypes table -> > > FDT reserved-memory node to override if required (this also ensures the same memory map cross boots so ACPI S4 works) -> > > Build gEfiMemoryTypeInformationGuid HOB by "platfom specific" MemoryTypes Table -> > > DxeMain/GCD to consume this MemoryTypes table and setup memory service -> > > Install memory types table to UEFI system table.Configuration table... > > > > Note: if Payload built-in default MemoryTypes table works fine for the platform, then FDT reserved-memory node does not need to provide such 'usage' compatible strings. (optional) > > This FDT node could allow flexibility/compatibility without rebuilding Payload binary. > > > > Not sure if I answered all your questions, please highlight which area you need more information. > > Any more thoughts on this? If not, I would like to see this patch > applied, please. I am really not sure who or what is holding this up, so far. Can we perhaps get this applied in time for Christmas? It would be a nice end to the year. Regards, Simon