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 5FCAA941ADB for ; Wed, 27 Mar 2024 14:02:02 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=ELJkWqr84Ss5E5VqFwoB00BP8GgAiwYw9R/5KlKLhYI=; c=relaxed/simple; d=groups.io; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Resent-Date:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding; s=20240206; t=1711548121; v=1; b=UvgncY9Zzio4o76eD6cLb9PONQkwO8Oa9a7/rxfhMt9RaA30tjfchF4BkkgHoKLWGyz6CljI klRPH3uLg/16tGUFX8Lsb03BqRPw3zoNeg1xqPDXgwSi9CZKoS1dDg0VQBEFO6JXPvXjL/VnBQX iZN92oUHNMkCzvL0upIUBMG0+gI7N1z3v/xqDfxwGzMDyCaIC5/wg1af3x263Eu66Tc4+NAxuT4 rCGmu/Ce/vo1wgmWtnfNceu7AYot95J8+Avyvl5knDRfteMwz+1KUq3lcUZvYcg+y4tF6LccZ2F s80cSMNEc2ujXe93JJYcXU9dsRSIdgyqPwdEHNhUGqUJQ== X-Received: by 127.0.0.2 with SMTP id lxkoYY7687511xb251caO8Lj; Wed, 27 Mar 2024 07:02:01 -0700 X-Received: from zg8tmtyylji0my4xnjqumte4.icoremail.net (zg8tmtyylji0my4xnjqumte4.icoremail.net [162.243.164.118]) by mx.groups.io with SMTP id smtpd.web11.38375.1711548120233267591 for ; Wed, 27 Mar 2024 07:02:00 -0700 X-Received: from prodtpl.icoremail.net (unknown [10.12.1.20]) by hzbj-icmmx-7 (Coremail) with SMTP id AQAAfwBHTmrWJgRm+hUXEA--.12862S2; Wed, 27 Mar 2024 22:01:58 +0800 (CST) X-Received: from phytium.com.cn (unknown [218.76.62.144]) by mail (Coremail) with SMTP id AQAAfwD3iPjTJgRmwncAAA--.1442S3; Wed, 27 Mar 2024 22:01:55 +0800 (CST) From: "Xiong Yining" 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, Xiong Yining Subject: [edk2-devel] [PATCH v4 0/1] support multi memory nodes Date: Wed, 27 Mar 2024 14:01:42 +0000 Message-Id: <20240327140143.3802632-1-xiongyining1480@phytium.com.cn> MIME-Version: 1.0 X-CM-TRANSID: AQAAfwD3iPjTJgRmwncAAA--.1442S3 X-CM-SenderInfo: x0lr0wp1lqx0bjrumio6sk53xlxphulrpou0/1tbiAQARBmYDI2QGUQAAsj X-Coremail-Antispam: 1Uk129KBjvJXoW7ZFW5Ar4xuF43tr13Xr1xAFb_yoW8AF15pF WxAFyruw4kK3s2kws7J3Z8Zry3C3WfGr4UCrZrZ3WxWw43WFyjvr4xtrn3Jr98Cr4kX3WU Ga10qw1jg3Wvk3DanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUj1kv1TuYvTs0mT0YCTnIWj DUYxn0WfASr-VFAU7a7-sFnT9fnUUIcSsGvfJ3UbIYCTnIWIevJa73UjIFyTuYvj4RJUUU UUUUU 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: Wed, 27 Mar 2024 07:02:00 -0700 Reply-To: devel@edk2.groups.io,xiongyining1480@phytium.com.cn List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: YIEkAiZNA0shvnL0PQ5vBecfx7686176AA= Content-Transfer-Encoding: 8bit X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240206 header.b=UvgncY9Z; dmarc=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 When SaSbQemu platform is configured with multi memory nodes, like numa architecture, os will ignore any memory node in the device tree except the first one. The kernel reads UEFI memory map for memory information when booting via UEFI. However UEFI only allocates the first memory node memory space for SbsaQemu platform, in this scenario we can refer to the implement of "OvmfPkg/Fdt/HighMemDxe" and use the GCD services to add memory spaces for high memory node. Instead of using FdtClientDxe driver to get the informatin of memory, we get the hardware information of memory via SMC calls, which is proposed on get rid of DeviceTree from SbsaQemu: https://openfw.io/edk2-devel/20240131132400.3022662-1-xiongyining1480@phytium.com.cn/ Changes in v4: - Rename SbsaQemuHardwareInfoLib to HardwareInfoLib and use newer function names. - Link to v3: https://openfw.io/edk2-devel/20240220073332.3249289-1-xiongyining1480@phytium.com.cn/ Changes in v3: - when the memory node is the first one, there is no need to add it. Changes in v2: - get the information of memory via SMC rather than FdtClientDxe. - add a new driver rather than use HighMemDxe. Xiong Yining (1): SbsaQemu: add memory space for the high memory nodes Platform/Qemu/SbsaQemu/SbsaQemu.dsc | 1 + Platform/Qemu/SbsaQemu/SbsaQemu.fdf | 1 + .../SbsaQemuHighMemDxe/SbsaQemuHighMemDxe.inf | 45 ++++++ .../SbsaQemuHighMemDxe/SbsaQemuHighMemDxe.c | 134 ++++++++++++++++++ 4 files changed, 181 insertions(+) create mode 100644 Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuHighMemDxe/SbsaQemuHighMemDxe.inf create mode 100644 Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuHighMemDxe/SbsaQemuHighMemDxe.c -- 2.34.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#117169): https://edk2.groups.io/g/devel/message/117169 Mute This Topic: https://groups.io/mt/105177587/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-