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 1049B7803D2 for ; Wed, 24 Jan 2024 13:53:44 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=jxW0GpcpX/FvaakPj0bw9BpSHA6SV+38qO1UpkgYQUw=; 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:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Type:Content-Transfer-Encoding; s=20140610; t=1706104423; v=1; b=droU4Wm702F5HkkZvJE6rvvLiVCZJxeNQjDBtIM1U0mT4QrPCwR/pABbDByH7xrEnfjfn3AK rKB5XsgkO5olJVvZsL71nNm8NixARM8E08D4O4njC3sn1ARbn/LOOKgwmYt2jPsY3d97O/Okb/H Yw/FIiV9FVZO+kDT5rCKfR+Q= X-Received: by 127.0.0.2 with SMTP id G6f5YY7687511xHEw6LO6e2V; Wed, 24 Jan 2024 05:53:43 -0800 X-Received: from muminek.juszkiewicz.com.pl (muminek.juszkiewicz.com.pl [213.251.184.221]) by mx.groups.io with SMTP id smtpd.web11.22946.1706104422855929197 for ; Wed, 24 Jan 2024 05:53:43 -0800 X-Received: from localhost (localhost [127.0.0.1]) by muminek.juszkiewicz.com.pl (Postfix) with ESMTP id CEEEA260ADD; Wed, 24 Jan 2024 14:53:39 +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 bGOT950wSI7A; Wed, 24 Jan 2024 14:53:37 +0100 (CET) X-Received: from [192.168.200.139] (83.11.3.72.ipv4.supernova.orange.pl [83.11.3.72]) by muminek.juszkiewicz.com.pl (Postfix) with ESMTPSA id 22A9B26009D; Wed, 24 Jan 2024 14:53:36 +0100 (CET) From: "Marcin Juszkiewicz" Subject: [edk2-devel] [PATCH edk2-platforms v3 0/5] get rid of DeviceTree from SbsaQemu Date: Wed, 24 Jan 2024 14:53:35 +0100 Message-Id: <20240124-no-dt-for-cpu-v3-0-5375fcf09037@linaro.org> MIME-Version: 1.0 X-B4-Tracking: v=1; b=H4sIAF8WsWUC/13MywrCMBCF4Vcps3YkF9taV76HdFFzaQckKZNal JJ3NxbcuPwPnG+D5Jhcgku1AbuVEsVQQh8qMNMQRodkS4MS6iSkrDFEtAv6yGjmJypTS6k7bX2 noXxmdp5eu3frS0+UlsjvnV/Vd/1JzZ+0KhTYGC/as+2Ge9tcHxQGjsfII/Q55w/bVNaBqwAAA A== To: devel@edk2.groups.io Cc: Leif Lindholm , Ard Biesheuvel , Graeme Gregory , 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 Reply-To: devel@edk2.groups.io,marcin.juszkiewicz@linaro.org List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: 2FulE3B6tSUECQaSZ1lUe7mlx7686176AA= 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=20140610 header.b=droU4Wm7; 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. If TF-A answer to SMC call would be not success then we assume that it is old version and go back to parsing DeviceTree data directly. Just now it is present in one place (SbsaQemuHardwareInfoLib) together with new code for handling SMC stuff. I hope that we can drop FdtHandler part as part of 202411 release. TF-A part: https://review.trustedfirmware.org/c/TF-A/trusted-firmware-a/+/2= 5707 After this change the only place where DT data is parsed directly is checking for memory nodes. Patches for that code will be sent once we get SMC calls into TF-A. Signed-off-by: Marcin Juszkiewicz --- 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 v2: https://openfw.io/edk2-devel/20240116-no-dt-for-cpu-v2-0-6cf0= 78d9ab76@linaro.org/T/#t --- Marcin Juszkiewicz (5): Platform/SbsaQemu: add SbsaQemuHardwareInfoLib Platform/SbsaQemu: read amount of cpus during init Platform/SbsaQemu: use PcdCoreCount directly Platform/SbsaQemu: move FdtHandlerLib to SbsaQemuHardwareInfoLib Platform/SbsaQemu: hang if there is no cpu information Platform/Qemu/SbsaQemu/SbsaQemu.dsc | 4 +- Platform/Qemu/SbsaQemu/OemMiscLib/OemMiscLib.inf | 6 +- .../Drivers/SbsaQemuAcpiDxe/SbsaQemuAcpiDxe.inf | 4 +- .../SbsaQemuPlatformDxe/SbsaQemuPlatformDxe.inf | 4 +- .../SbsaQemu/Library/FdtHelperLib/FdtHelperLib.inf | 33 ---- .../SbsaQemuHardwareInfoLib.inf | 34 ++++ .../SbsaQemu/Include/IndustryStandard/SbsaQemuSmc.h | 15 +- .../Qemu/SbsaQemu/Include/Library/FdtHelperLib.h | 36 ---- .../Include/Library/SbsaQemuHardwareInfoLib.h | 45 +++++ Platform/Qemu/SbsaQemu/OemMiscLib/OemMiscLib.c | 10 +- .../Drivers/SbsaQemuAcpiDxe/SbsaQemuAcpiDxe.c | 13 +- .../SbsaQemuPlatformDxe/SbsaQemuPlatformDxe.c | 9 +- .../SbsaQemu/Library/FdtHelperLib/FdtHelperLib.c | 98 ---------- .../SbsaQemuHardwareInfoLib.c | 205 ++++++++++++++++= ++++ 14 files changed, 317 insertions(+), 199 deletions(-) --- base-commit: 82c4c4b038659843adb519d2e94ad83d77332c26 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 (#114295): https://edk2.groups.io/g/devel/message/114295 Mute This Topic: https://groups.io/mt/103931816/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-