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 7C6D87803D8 for ; Tue, 19 Mar 2024 13:50:08 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=yfNzm4I0FuL9NCvgaAA8b4MQyQAxE2EoXf/dVmY/yuw=; 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=1710856207; v=1; b=Mug+9hCDrPchvEulY2lPTrJ+yNSs14L8gNUy21iSSLSF5SE2MzdmPEnggITjKF4/JBO5wHyw RUFzq0iD1CqGZe/glSwfP4W9YFefWXuXDeCfG8+yA6+4U9ijhLeEsJ1dR/BUgCexuTfVNxcdRS1 ftCohMPe/bFbi5iaRT/WMpqw1lPYLsmJN0zd83e0IEp1n0E4isGyt1aGgDZoL+XdBsLcfvKMXOs Rp+2G0fpywxQAZOjB7sm1uIqbsi84tCe0V72ZSH7O0OsNCeKDau7GxshiuyX3bdKJme480mB2W6 g3SORyp0SF/94oAVLXv+T4X/NKM/F2tm2e4UOadvATcew== X-Received: by 127.0.0.2 with SMTP id MZvMYY7687511xnom59G1ZZt; Tue, 19 Mar 2024 06:50:07 -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.15951.1710856206194036255 for ; Tue, 19 Mar 2024 06:50:06 -0700 X-Received: from localhost (localhost [127.0.0.1]) by muminek.juszkiewicz.com.pl (Postfix) with ESMTP id 951B7260BCF; Tue, 19 Mar 2024 14:49:59 +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 ngWDeWKX6TVf; Tue, 19 Mar 2024 14:49:57 +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 AE24626005A; Tue, 19 Mar 2024 14:49:55 +0100 (CET) From: "Marcin Juszkiewicz" Subject: [edk2-devel] [PATCH edk2-platforms v7 0/4] get rid of DeviceTree from SbsaQemu Date: Tue, 19 Mar 2024 14:49:53 +0100 Message-Id: <20240319-no-dt-for-cpu-v7-0-ac0a57a23a8f@linaro.org> MIME-Version: 1.0 X-B4-Tracking: v=1; b=H4sIAAGY+WUC/2XN3QrCIBjG8VsJjzP8mDo76j6iA+fHJsQcuqQYu /fcIKrt8Hnh938nkGz0NoHzYQLRZp986MsQxwPQnepbC70pGxBEKoQxg32AZoQuRKiHBySaYUw lNU5SUMwQrfPPtXe9ld35NIb4WvOZLNdPiW9KmUAEuXZI1EaqRvDL3fcqhlOILVhSmf5wUm05L ZxRwVxJSETFjvMvp2j3nReutKkFEQo3TP7xeZ7fS+bjXSkBAAA= 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: Tue, 19 Mar 2024 06:50:06 -0700 Reply-To: devel@edk2.groups.io,marcin.juszkiewicz@linaro.org List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: poixc9MUhQuK8vhv772c1Z2Hx7686176AA= 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=Mug+9hCD; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=linaro.org (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io 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 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 FdtHandlerLib Xiong Yining (1): Platform/SbsaQemu: get the information of memory via SMC calls Platform/Qemu/SbsaQemu/SbsaQemu.dsc | 4 +- Platform/Qemu/SbsaQemu/OemMiscLib/OemMiscLib.inf | 6 +- .../Drivers/SbsaQemuAcpiDxe/SbsaQemuAcpiDxe.inf | 5 +- .../SbsaQemu/Library/FdtHelperLib/FdtHelperLib.inf | 33 ----- .../SbsaQemuHardwareInfoLib.inf | 31 +++++ .../SbsaQemu/Library/SbsaQemuLib/SbsaQemuLib.inf | 4 +- .../SbsaQemu/Include/IndustryStandard/SbsaQemuSmc.h | 19 ++- .../Qemu/SbsaQemu/Include/Library/FdtHelperLib.h | 36 ----- .../Include/Library/SbsaQemuHardwareInfoLib.h | 73 ++++++++++ Platform/Qemu/SbsaQemu/OemMiscLib/OemMiscLib.c | 11 +- .../Drivers/SbsaQemuAcpiDxe/SbsaQemuAcpiDxe.c | 21 +-- .../SbsaQemu/Library/FdtHelperLib/FdtHelperLib.c | 98 ------------- .../SbsaQemuHardwareInfoLib.c | 146 ++++++++++++++++= ++++ .../Qemu/SbsaQemu/Library/SbsaQemuLib/SbsaQemuMem.c | 54 ++------ 14 files changed, 298 insertions(+), 243 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 (#116895): https://edk2.groups.io/g/devel/message/116895 Mute This Topic: https://groups.io/mt/105024008/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-