public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Xiong Yining" <xiongyining1480@phytium.com.cn>
To: devel@edk2.groups.io
Cc: quic_llindhol@quicinc.com, ardb+tianocore@kernel.org,
	graeme@xora.org.uk, marcin.juszkiewicz@linaro.org,
	chenbaozi@phytium.com.cn
Subject: [edk2-devel] [PATCH v4 1/6] Platform/SbsaQemu: read amount of cpus during init
Date: Wed, 31 Jan 2024 10:00:22 +0000	[thread overview]
Message-ID: <20240131100027.2538549-2-xiongyining1480@phytium.com.cn> (raw)
In-Reply-To: <20240131100027.2538549-1-xiongyining1480@phytium.com.cn>

From: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>

We read it once and store in Pcd for future use.

Signed-off-by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>
---
 .../Drivers/SbsaQemuPlatformDxe/SbsaQemuPlatformDxe.c    | 9 +++++----
 .../Drivers/SbsaQemuPlatformDxe/SbsaQemuPlatformDxe.inf  | 4 +++-
 2 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuPlatformDxe/SbsaQemuPlatformDxe.c b/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuPlatformDxe/SbsaQemuPlatformDxe.c
index 4ebbe7c93a..14e1ec7eab 100644
--- a/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuPlatformDxe/SbsaQemuPlatformDxe.c
+++ b/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuPlatformDxe/SbsaQemuPlatformDxe.c
@@ -1,7 +1,7 @@
 /** @file
-*  FDT client protocol driver for qemu,mach-virt-ahci DT node
+*  SbsaQemu Platform Initialization
 *
-*  Copyright (c) 2019, Linaro Ltd. All rights reserved.
+*  Copyright (c) Linaro Ltd. All rights reserved.
 *
 *  SPDX-License-Identifier: BSD-2-Clause-Patent
 *
@@ -12,13 +12,12 @@
 #include <Library/DebugLib.h>
 #include <Library/NonDiscoverableDeviceRegistrationLib.h>
 #include <Library/PcdLib.h>
+#include <Library/SbsaQemuHardwareInfoLib.h>
 #include <Library/UefiBootServicesTableLib.h>
 #include <Library/UefiDriverEntryPoint.h>
 #include <IndustryStandard/SbsaQemuSmc.h>
 #include <IndustryStandard/SbsaQemuPlatformVersion.h>
 
-#include <Protocol/FdtClient.h>
-
 EFI_STATUS
 EFIAPI
 InitializeSbsaQemuPlatformDxe (
@@ -123,5 +122,7 @@ InitializeSbsaQemuPlatformDxe (
     }
   }
 
+  SbsaQemuGetCpuCount ();
+
   return EFI_SUCCESS;
 }
diff --git a/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuPlatformDxe/SbsaQemuPlatformDxe.inf b/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuPlatformDxe/SbsaQemuPlatformDxe.inf
index 19534b7a27..9752694a43 100644
--- a/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuPlatformDxe/SbsaQemuPlatformDxe.inf
+++ b/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuPlatformDxe/SbsaQemuPlatformDxe.inf
@@ -1,7 +1,7 @@
 ## @file
 #  This driver effectuates SbsaQemu platform configuration settings
 #
-#  Copyright (c) 2019, Linaro Ltd. All rights reserved.
+#  Copyright (c) Linaro Ltd. All rights reserved.
 #
 #  SPDX-License-Identifier: BSD-2-Clause-Patent
 #
@@ -32,6 +32,7 @@
   PcdLib
   DebugLib
   NonDiscoverableDeviceRegistrationLib
+  SbsaQemuHardwareInfoLib
   UefiDriverEntryPoint
 
 [Pcd]
@@ -46,6 +47,7 @@
   gArmTokenSpaceGuid.PcdGicDistributorBase
   gArmTokenSpaceGuid.PcdGicRedistributorsBase
   gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdGicItsBase
+  gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdCoreCount
 
 
 [Depex]
-- 
2.34.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#114873): https://edk2.groups.io/g/devel/message/114873
Mute This Topic: https://groups.io/mt/104072179/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



  reply	other threads:[~2024-01-31 10:01 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-31 10:00 [edk2-devel] [PATCH v4 0/6] get rid of DeviceTree from SbsaQemu Xiong Yining
2024-01-31 10:00 ` Xiong Yining [this message]
2024-01-31 10:00 ` [edk2-devel] [PATCH v4 2/6] Platform/SbsaQemu: use PcdCoreCount directly Xiong Yining
2024-01-31 10:00 ` [edk2-devel] [PATCH v4 3/6] Platform/SbsaQemu: move FdtHandlerLib to SbsaQemuHardwareInfoLib Xiong Yining
2024-01-31 10:00 ` [edk2-devel] [PATCH v4 4/6] Platform/SbsaQemu: hang if there is no cpu information Xiong Yining
2024-01-31 10:00 ` [edk2-devel] [PATCH v4 5/6] Platform/SbsaQemu: get the information of memory via SMC calls Xiong Yining
2024-01-31 10:00 ` [edk2-devel] [PATCH v4 6/6] Platform/SbsaQemu: add DeviceTree fallbacks to parse memory information Xiong Yining

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240131100027.2538549-2-xiongyining1480@phytium.com.cn \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox