From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from loongson.cn (loongson.cn [114.242.206.163]) by mx.groups.io with SMTP id smtpd.web10.77619.1673579866066592251 for ; Thu, 12 Jan 2023 19:17:46 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: loongson.cn, ip: 114.242.206.163, mailfrom: lixianglai@loongson.cn) Received: from loongson.cn (unknown [10.2.5.185]) by gateway (Coremail) with SMTP id _____8Cx_epWzcBjCGABAA--.4220S3; Fri, 13 Jan 2023 11:17:42 +0800 (CST) Received: from localhost.localdomain (unknown [10.2.5.185]) by localhost.localdomain (Coremail) with SMTP id AQAAf8Axvr5VzcBjisEYAA--.49868S2; Fri, 13 Jan 2023 11:17:41 +0800 (CST) From: "xianglai" To: devel@edk2.groups.io Cc: Ard Biesheuvel , Bibo Mao , Chao Li , Leif Lindholm , Liming Gao , Michael D Kinney Subject: [edk2-platforms][PATCH V4 0/8] Loongarch add flash device. Date: Fri, 13 Jan 2023 11:17:30 +0800 Message-Id: X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 X-CM-TRANSID: AQAAf8Axvr5VzcBjisEYAA--.49868S2 X-CM-SenderInfo: 5ol0xt5qjotxo6or00hjvr0hdfq/ X-Coremail-Antispam: 1Uk129KBjvJXoW7ZrWUZw1rurWxKw18tFWfuFg_yoW8Kw1Dpr WUZFZakr1UJFWIyw13Aa4UWF45Aa4fKwn8JrsFqw15CasxXr1UW34FvFWrAr47Z343ta40 q3y0kw4UCFs5ZrJanT9S1TB71UUUUUDqnTZGkaVYY2UrUUUUj1kv1TuYvTs0mT0YCTnIWj qI5I8CrVACY4xI64kE6c02F40Ex7xfYxn0WfASr-VFAUDa7-sFnT9fnUUIcSsGvfJTRUUU bnxFc2x0x2IEx4CE42xK8VAvwI8IcIk0rVWrJVCq3wA2ocxC64kIII0Yj41l84x0c7CEw4 AK67xGY2AK021l84ACjcxK6xIIjxv20xvE14v26r1j6r1xM28EF7xvwVC0I7IYx2IY6xkF 7I0E14v26r1j6r4UM28EF7xvwVC2z280aVAFwI0_Gr1j6F4UJwA2z4x0Y4vEx4A2jsIEc7 CjxVAFwI0_Gr1j6F4UJwAS0I0E0xvYzxvE52x082IY62kv0487Mc804VCY07AIYIkI8VC2 zVCFFI0UMc02F40EFcxC0VAKzVAqx4xG6I80ewAv7VCjz48v1sIEY20_WwAm72CE4IkC6x 0Yz7v_Jr0_Gr1lF7xvr2IYc2Ij64vIr41l42xK82IYc2Ij64vIr41l42xK82IY6x8ErcxF aVAv8VWrMxC20s026xCaFVCjc4AY6r1j6r4UMI8I3I0E5I8CrVAFwI0_Jr0_Jr4lx2IqxV Cjr7xvwVAFwI0_JrI_JrWlx4CE17CEb7AF67AKxVWUAVWUtwCIc40Y0x0EwIxGrwCI42IY 6xIIjxv20xvE14v26r1j6r1xMIIF0xvE2Ix0cI8IcVCY1x0267AKxVWUJVW8JwCI42IY6x AIw20EY4v20xvaj40_Jr0_JF4lIxAIcVC2z280aVAFwI0_Gr0_Cr1lIxAIcVC2z280aVCY 1x0267AKxVW8JVW8JrUvcSsGvfC2KfnxnUUI43ZEXa7xRE6wZ7UUUUU== Content-Transfer-Encoding: 8bit This is a patch series that contains: 1.Loongarch add flash device driver. 2.Loongarch add nvme device driver. 3.Optimize the mmu lib of loongarch. 4.Enable zero address protection. v4 changes: -Modify the commit messgae of patch1 and patch2. v3 changes: - Split flash driver patch. v2 changes: - Split the MMU lib-related patches further. - Remove the for loop of flash information lookup in VirtNorFlashPlatformLib Because the Loongarch virtual machine only emulates one flash . - Add the necessary comments in VirtNorFlashPlatformLib. - Remove the hard coding associated with the Flash base address. - Optimize the process of converting huge pages to page table entries in MMU lib. Cc: Ard Biesheuvel Cc: Bibo Mao Cc: Chao Li Cc: Leif Lindholm Cc: Liming Gao Cc: Michael D Kinney xianglai li (8): Platform/Loongson: Add bootmode support. Platform/Loongson: Add nvme device driver for loongarch. Platform/Loongson: Add pflash driver. Platform/Loongson: Support pflash for loongarch. Platform/Loongson: Modify the page table entry access priority. Platform/Loongson: Optimize page table entry null determination. Platform/Loongson: Optimize the huge page and page entry conversion. Platform/Loongson: Enable zero address protection. .../Library/MmuLib/MmuBaseLibPei.inf | 2 + .../Library/MmuLib/MmuLibCore.c | 119 +++++++++++---- .../Library/MmuLib/MmuLibCorePei.c | 5 + .../LoongArchQemuPkg/Library/MmuLib/page.h | 5 +- .../Library/NorFlashQemuLib/NorFlashQemuLib.c | 141 ++++++++++++++++++ .../NorFlashQemuLib/NorFlashQemuLib.inf | 43 ++++++ .../Loongson/LoongArchQemuPkg/Loongson.dsc | 22 ++- .../Loongson/LoongArchQemuPkg/Loongson.fdf | 8 +- .../LoongArchQemuPkg/PlatformPei/Platform.c | 5 + .../LoongArchQemuPkg/VarStore.fdf.inc | 67 +++++++++ 10 files changed, 375 insertions(+), 42 deletions(-) create mode 100644 Platform/Loongson/LoongArchQemuPkg/Library/NorFlashQemuLib/NorFlashQemuLib.c create mode 100644 Platform/Loongson/LoongArchQemuPkg/Library/NorFlashQemuLib/NorFlashQemuLib.inf create mode 100644 Platform/Loongson/LoongArchQemuPkg/VarStore.fdf.inc -- 2.31.1