From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 946C0D80CA0 for ; Fri, 22 Mar 2024 16:09:01 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=mqo+Dyi0slAZwIITK8Ze5Fe/kyVyixPTNVsQCUmumEg=; c=relaxed/simple; d=groups.io; h=From:Subject:Date:Message-Id:MIME-Version:To:Cc:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Resent-Date:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Type:Content-Transfer-Encoding; s=20240206; t=1711123740; v=1; b=kvQzJcKQ6PpCHEyjX/9eODooH2ie4VNNeTtU5uG3VU6eizTDuvoB84Wi7/PKTXbZBUUmefN1 mdQXvWija0I0gkRdJpSsg8tRQ+eraGGd/9tAxSLj1mW4NQNz8F0tD+W3eYvU14JG37mpfB/T4JD OM5P2viRAjiI/AqSbfjYXZD8ge0fDIo663pQO9rS+IeNuQzjDufJPzb6biAivdknpox3lQrNoM/ fOpBLe//hxrUfpOjU3wH376iG4nfZLnilCWfTXaGKgArfLsjncEAUbX/0HyJFbsmTeLRFNCZIka i1ic1ZwbBMPWn0xGuFzY7VOxaxhMtq1ZGkPKjZYJljRgg== X-Received: by 127.0.0.2 with SMTP id 5pk2YY7687511xokj6nbrzP0; Fri, 22 Mar 2024 09:09:00 -0700 X-Received: from muminek.juszkiewicz.com.pl (muminek.juszkiewicz.com.pl [213.251.184.221]) by mx.groups.io with SMTP id smtpd.web10.71.1711123739219414679 for ; Fri, 22 Mar 2024 09:08:59 -0700 X-Received: from localhost (localhost [127.0.0.1]) by muminek.juszkiewicz.com.pl (Postfix) with ESMTP id 1B51E260CC8; Fri, 22 Mar 2024 17:08:54 +0100 (CET) X-Virus-Scanned: Debian amavis at juszkiewicz.com.pl X-Received: from muminek.juszkiewicz.com.pl ([127.0.0.1]) by localhost (muminek.juszkiewicz.com.pl [127.0.0.1]) (amavis, port 10024) with ESMTP id ZoipDBj2weu1; Fri, 22 Mar 2024 17:08:52 +0100 (CET) X-Received: from [172.17.0.1] (83.11.22.169.ipv4.supernova.orange.pl [83.11.22.169]) by muminek.juszkiewicz.com.pl (Postfix) with ESMTPSA id B6B0C260259; Fri, 22 Mar 2024 17:08:49 +0100 (CET) From: "Marcin Juszkiewicz" Subject: [edk2-devel] [PATCH edk2-platforms v9 0/4] get rid of DeviceTree from SbsaQemu Date: Fri, 22 Mar 2024 17:08:46 +0100 Message-Id: <20240322-no-dt-for-cpu-v9-0-92e947e0fbdf@linaro.org> MIME-Version: 1.0 X-B4-Tracking: v=1; b=H4sIAA6t/WUC/2XOTW7DIBCG4atErEsEQ2CYrHKPqgvMT4JUmQinV qvIdy+2VNWxlx/S8w5PNsSa48DOhyerccxDLn0b9HZg/ub6a+Q5tM1AwElIqXlfeHjwVCr39y8 OXkupSIVEijVzrzHl76X3/tH2LQ+PUn+W/Ajz61/JbEojcMGNTwJtINehuXzm3tVyLPXK5tSoV hxOW64a1wp1agkSCnfc/HMldtdN484Hi4BOdpp2HFdc0pbjwoXT6EA5m3bcrjiILbfz54k6R2S NjP6FT9P0C0C+G6qnAQAA To: devel@edk2.groups.io Cc: Leif Lindholm , Ard Biesheuvel , Graeme Gregory , Xiong Yining , Chen Baozi , Marcin Juszkiewicz Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Resent-Date: Fri, 22 Mar 2024 09:08:59 -0700 Reply-To: devel@edk2.groups.io,marcin.juszkiewicz@linaro.org List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: RT8exK4nViqsDk4E0FWlxW6Ox7686176AA= Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240206 header.b=kvQzJcKQ; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=linaro.org (policy=none) We want to stop parsing DeviceTree to gather hardware information. Instead we ask TF-A for those details using SMC calls. On real hardware platform it could be asking on-board Embedded Controller. Hardware information (CPU, Memory) is now in SbsaQemuHardwareInfoLib together with new code for handling SMC stuff. There is no DT parsing anywhere. TF-A part is merged already (and we have it in edk2-non-osi): https://review.trustedfirmware.org/c/TF-A/trusted-firmware-a/+/25707 Patch 4 needs work to pass MemInfo as reference. Signed-off-by: Marcin Juszkiewicz --- Changes in v9: - recreated 3rd patch to drop all traces of Device Tree use - Link to v8: https://openfw.io/edk2-devel/20240320-no-dt-for-cpu-v8-0-599b= a99861ec@linaro.org Changes in v8: - added HardwareInfoLib library class - created SbsaQemuHardwareInfoLib as HardwareInfoLib - dropped SbsaQemu from functions (to keep HardwareInfoLib class generic) - Link to v7: https://openfw.io/edk2-devel/20240319-no-dt-for-cpu-v7-0-ac0a= 57a23a8f@linaro.org Changes in v7: - dropped CoreCount Pcd - code calls SbsaQemuGetCpuCount() instead - dropped DT fallbacks - we have up-to-date TF-A in edk2-non-osi - system shutdowns when there is no cpu or memory information - SbsaQemuHardwareInfoLib debug calls show function names - Link to v6: https://openfw.io/edk2-devel/20240306-no-dt-for-cpu-v6-0-acd8= 727a1b59@linaro.org Changes in v6 (Marcin Juszkiewicz): - patch 5 now shutdowns system in case of no CPU information Changes in v5 (Xiong Yining): - added missing patch - Link to v5: https://openfw.io/edk2-devel/20240131132400.3022662-1-xiongyi= ning1480@phytium.com.cn/ Changes in v4 (Xiong Yining): - patch 6 add the support for getting the hardware information of memory vi= a SMC calls. - patch 7 add the callback of DeviceTree when SMC calls defined on patch 6 = failled. - replace FdtHelperGetMpidr() with SbsaQemuGetMpidr() on patch 4 to compile= successfully. - Link to v4: https://openfw.io/edk2-devel/20240131100027.2538549-1-xiongyi= ning1480@phytium.com.cn/ Changes in v3: - added SMC_SIP_CALL_SUCCESS - on SMC call fail tell that SMC call failed instead of blaming TF-A - hang when there is no cpu information (TODO: shutdown instead) - Link to v3: https://openfw.io/edk2-devel/20240124-no-dt-for-cpu-v3-0-5375= fcf09037@linaro.org/ --- Marcin Juszkiewicz (3): Platform/SbsaQemu: add SbsaQemuHardwareInfoLib Platform/SbsaQemu: use SbsaQemuHardwareInfoLib for cpu information Platform/SbsaQemu: drop use of DeviceTree Xiong Yining (1): Platform/SbsaQemu: get the information of memory via SMC calls Silicon/Qemu/SbsaQemu/SbsaQemu.dec | 3 +- Platform/Qemu/SbsaQemu/SbsaQemu.dsc | 9 +- Platform/Qemu/SbsaQemu/OemMiscLib/OemMiscLib.inf | 6 +- .../Drivers/SbsaQemuAcpiDxe/SbsaQemuAcpiDxe.inf | 5 +- .../SbsaQemu/Library/FdtHelperLib/FdtHelperLib.inf | 33 ----- .../SbsaQemuHardwareInfoLib.inf | 29 ++++ .../SbsaQemu/Library/SbsaQemuLib/SbsaQemuLib.inf | 5 +- .../SbsaQemu/Include/IndustryStandard/SbsaQemuSmc.h | 19 ++- .../Qemu/SbsaQemu/Include/Library/FdtHelperLib.h | 36 ----- .../Qemu/SbsaQemu/Include/Library/HardwareInfoLib.h | 73 ++++++++++ Platform/Qemu/SbsaQemu/OemMiscLib/OemMiscLib.c | 11 +- .../Drivers/SbsaQemuAcpiDxe/SbsaQemuAcpiDxe.c | 21 +-- .../SbsaQemuPlatformDxe/SbsaQemuPlatformDxe.c | 2 - .../SbsaQemu/Library/FdtHelperLib/FdtHelperLib.c | 98 ------------- .../SbsaQemuHardwareInfoLib.c | 146 ++++++++++++++++= ++++ .../Qemu/SbsaQemu/Library/SbsaQemuLib/SbsaQemuMem.c | 54 ++------ 16 files changed, 298 insertions(+), 252 deletions(-) --- base-commit: 80ee8b861edb6a8b02a100f63bbb435499f8741a change-id: 20240115-no-dt-for-cpu-2c511393df93 Best regards, --=20 Marcin Juszkiewicz -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#117056): https://edk2.groups.io/g/devel/message/117056 Mute This Topic: https://groups.io/mt/105088434/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-