From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ot1-f49.google.com (mail-ot1-f49.google.com [209.85.210.49]) by mx.groups.io with SMTP id smtpd.web12.70.1614102329138353427 for ; Tue, 23 Feb 2021 09:45:29 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@nuviainc-com.20150623.gappssmtp.com header.s=20150623 header.b=MYP13b0l; spf=pass (domain: nuviainc.com, ip: 209.85.210.49, mailfrom: rebecca@nuviainc.com) Received: by mail-ot1-f49.google.com with SMTP id l23so16418256otn.10 for ; Tue, 23 Feb 2021 09:45:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nuviainc-com.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=Od4ftwna3fBjLrigX1KzbYkojzOR1qmrDytWfV3XdUU=; b=MYP13b0lxoxm6LoNmAvWJsIiQWxq8/ihsh5CwbgI5tzdlw6uLzDV/YgfrPPRKr3yAX VR2pwfY+eORqmRNrnUKp1Ti6WWKXnQMoqTDSJVGC91YZUoy5C+aKJC/ILhetybfAVeP5 mkWgBk08BRCsoEPXTnmrmHgzNmhEwcyuMBQEZeVWGKbPlSsZjZF3WrpSBOVFZokdboFP TYCE0P/Gbr+glCs5nz264sVA8vs3eJx+TL9dNC6R3Rgq6NWP5A2dweaSO/XVelKkIb1N m9cNgtVKq7ibqq8GjbpdIlQi0l7u5aCTkz0hIXWbHfeZlmiWIyKQbH3NTPJxGlyJzdKH 63Ew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=Od4ftwna3fBjLrigX1KzbYkojzOR1qmrDytWfV3XdUU=; b=QTz3m0upT++O+OGjjAEy1eU1GH7/TxNBSdEYIUZqVkPFAcNfJtSNnFc1WPaDWPkZT0 6Q7PLnVEhQDzx4FssxlLOk9R/DOFv7bRoetyucorhmJSKoy9mnX2WRhTbux3AcaVirMe Lbs0kHPVpkwleQHqKcX/FMBUV2gYBDn1EZYtrGwJRlIWmj/ujUqqnYDiUUvftc7tOjAv /pxcBIAnMaJg0tuqeFY8P2oBjWWrYnTweC6dEKJo8yE+FV473Hs1U5nFSpBeIlyaKOiV +hsdK9+q4pumKlc3T0KUIY5CKMuPcUdewQv5kZqSrIqQzt67dk+SXGmtaduUjNPajppd Stfw== X-Gm-Message-State: AOAM532j58zk2b0cSuEAUJPuObO4DcmL62S7zI0GKuXcRYe6l1N96qhF W3qhGaodjfq8HIZh3B+axdYc/9UyOCvZ/Q== X-Google-Smtp-Source: ABdhPJwmn9fpMz/xzU0Q81b80Dz++2B4LLCKVlzGw9l1REhcBz9gF28G8tYk6B087eDEOvSdXjvCmg== X-Received: by 2002:a05:6830:10c1:: with SMTP id z1mr8204412oto.254.1614102328441; Tue, 23 Feb 2021 09:45:28 -0800 (PST) Return-Path: Received: from [10.0.10.142] (c-174-52-16-57.hsd1.ut.comcast.net. [174.52.16.57]) by smtp.gmail.com with ESMTPSA id 20sm3821158oiz.14.2021.02.23.09.45.27 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 23 Feb 2021 09:45:28 -0800 (PST) Subject: Re: [edk2-platforms PATCH v4 1/4] SbsaQemu: Add FdtHelperLib To: Leif Lindholm Cc: devel@edk2.groups.io, Ard Biesheuvel , Graeme Gregory , Radoslaw Biernacki References: <20210223142635.8807-1-rebecca@nuviainc.com> <20210223142635.8807-2-rebecca@nuviainc.com> <20210223163256.GE1664@vanye> From: "Rebecca Cran" Message-ID: <6bfe6007-6ad1-7484-c5a3-dcf5adbf66c1@nuviainc.com> Date: Tue, 23 Feb 2021 10:45:26 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 MIME-Version: 1.0 In-Reply-To: <20210223163256.GE1664@vanye> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit On 2/23/21 9:32 AM, Leif Lindholm wrote: > On Tue, Feb 23, 2021 at 07:26:32 -0700, Rebecca Cran wrote: >> The CountCpusFromFdt function is now used in two places. Create >> FdtHelperLib for this and similar functions. >> >> Signed-off-by: Rebecca Cran >> Reviewed-by: Leif Lindholm >> --- >> Platform/Qemu/SbsaQemu/SbsaQemu.dsc | 2 + >> Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuAcpiDxe/SbsaQemuAcpiDxe.c | 5 +- >> Silicon/Qemu/SbsaQemu/Include/Library/FdtHelperLib.h | 24 ++++++++ >> Silicon/Qemu/SbsaQemu/Library/FdtHelperLib/FdtHelperLib.c | 62 ++++++++++++++++++++ >> Silicon/Qemu/SbsaQemu/Library/FdtHelperLib/FdtHelperLib.inf | 28 +++++++++ >> 5 files changed, 120 insertions(+), 1 deletion(-) >> >> diff --git a/Platform/Qemu/SbsaQemu/SbsaQemu.dsc b/Platform/Qemu/SbsaQemu/SbsaQemu.dsc >> index f6af3f9111ee..8faad3eda217 100644 >> --- a/Platform/Qemu/SbsaQemu/SbsaQemu.dsc >> +++ b/Platform/Qemu/SbsaQemu/SbsaQemu.dsc >> @@ -121,6 +121,8 @@ DEFINE NETWORK_HTTP_BOOT_ENABLE = FALSE >> # ARM PL011 UART Driver >> PL011UartLib|ArmPlatformPkg/Library/PL011UartLib/PL011UartLib.inf >> >> + FdtHelperLib|Silicon/Qemu/SbsaQemu/Library/FdtHelperLib/FdtHelperLib.inf >> + >> # Debug Support >> PeCoffExtraActionLib|ArmPkg/Library/DebugPeCoffExtraActionLib/DebugPeCoffExtraActionLib.inf >> DebugAgentLib|MdeModulePkg/Library/DebugAgentLibNull/DebugAgentLibNull.inf >> diff --git a/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuAcpiDxe/SbsaQemuAcpiDxe.c b/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuAcpiDxe/SbsaQemuAcpiDxe.c >> index fb7c1835c3d7..7bf60cd2ded1 100644 >> --- a/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuAcpiDxe/SbsaQemuAcpiDxe.c >> +++ b/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuAcpiDxe/SbsaQemuAcpiDxe.c >> @@ -487,9 +487,12 @@ InitializeSbsaQemuAcpiDxe ( >> { >> EFI_STATUS Status; >> EFI_ACPI_TABLE_PROTOCOL *AcpiTable; >> + UINT32 NumCores; >> >> // Parse the device tree and get the number of CPUs >> - CountCpusFromFdt (); >> + NumCores = FdtHelperCountCpus (); >> + Status = PcdSet32S (PcdCoreCount, NumCores); >> + ASSERT_RETURN_ERROR (Status); >> >> // Check if ACPI Table Protocol has been installed >> Status = gBS->LocateProtocol ( > > Would this hunk make more sense in 2/4? > (I think it breaks bisect here.) > > No further comments on this set, I think is thise moves, the set can > go in. Umm, yes it should be in 2/4 - apologies. I'll work to improve verifying which patches changes are in. I've just sent out a v5. -- Rebecca Cran