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 B92D2AC0A67 for ; Tue, 16 Jan 2024 07:48:49 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=b5fE5wWtlZUNMCGY8xFgKRlxmQpjyPaQ2ZBPqI8cA64=; 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=1705391328; v=1; b=dv5FEqQqtMxSDISrKi4AD+rc8rt9wGzEvM3mhSrcXIivOW1yOoTqLED61svi6uOCHoF58g6m LPGcldF/VX3XYdZlRtEzBJpuizan7m7+t8IgM+s23aeHgkAPeUu0gezDcgMuV8cIBVh/DhB49I1 w8pQ4c8I7+syuBnmurT4J6Ok= X-Received: by 127.0.0.2 with SMTP id mN1iYY7687511xB1YdNZ1a8q; Mon, 15 Jan 2024 23:48:48 -0800 X-Received: from muminek.juszkiewicz.com.pl (muminek.juszkiewicz.com.pl [213.251.184.221]) by mx.groups.io with SMTP id smtpd.web10.7819.1705391327546897373 for ; Mon, 15 Jan 2024 23:48:47 -0800 X-Received: from localhost (localhost [127.0.0.1]) by muminek.juszkiewicz.com.pl (Postfix) with ESMTP id C163A260AB9; Tue, 16 Jan 2024 08:48:44 +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 6RNGi-OeJqkh; Tue, 16 Jan 2024 08:48:42 +0100 (CET) X-Received: from [192.168.210.114] (83.11.14.94.ipv4.supernova.orange.pl [83.11.14.94]) by muminek.juszkiewicz.com.pl (Postfix) with ESMTPSA id 0A7292602C9; Tue, 16 Jan 2024 08:48:41 +0100 (CET) From: "Marcin Juszkiewicz" Subject: [edk2-devel] [PATCH edk2-platforms v2 0/4] get rid of DeviceTree from SbsaQemu Date: Tue, 16 Jan 2024 08:48:31 +0100 Message-Id: <20240116-no-dt-for-cpu-v2-0-6cf078d9ab76@linaro.org> MIME-Version: 1.0 X-B4-Tracking: v=1; b=H4sIAM80pmUC/x3MMQ6AIAxA0auYzjaRogNexTgYKNoFDKgxIdxd4 viG/wtkTsIZ5q5A4keyxNBAfQf22MLOKK4ZaKBxUGrCENFd6GNCe95IdlJKG+280dCaM7GX9/8 ta60forHG4V8AAAA= 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: f2I2wbA1DPTYUFjRM1FlAHqfx7686176AA= 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=dv5FEqQq; 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 --- Marcin Juszkiewicz (4): Platform/SbsaQemu: add SbsaQemuHardwareInfoLib Platform/SbsaQemu: read amount of cpus during init Platform/SbsaQemu: use PcdCoreCount directly Platform/SbsaQemu: move FdtHandlerLib to SbsaQemuHardwareInfoLib 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 | 2 + .../Qemu/SbsaQemu/Include/Library/FdtHelperLib.h | 36 ---- .../Include/Library/SbsaQemuHardwareInfoLib.h | 45 +++++ Platform/Qemu/SbsaQemu/OemMiscLib/OemMiscLib.c | 10 +- .../Drivers/SbsaQemuAcpiDxe/SbsaQemuAcpiDxe.c | 16 +- .../SbsaQemuPlatformDxe/SbsaQemuPlatformDxe.c | 9 +- .../SbsaQemu/Library/FdtHelperLib/FdtHelperLib.c | 98 ---------- .../SbsaQemuHardwareInfoLib.c | 204 ++++++++++++++++= ++++ 14 files changed, 308 insertions(+), 197 deletions(-) --- base-commit: a1598bbcd167f4a5cf61229156426ef6f0784ab3 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 (#113873): https://edk2.groups.io/g/devel/message/113873 Mute This Topic: https://groups.io/mt/103758013/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-