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 74E1E940FC7 for ; Thu, 14 Mar 2024 02:10:32 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=ur+Nc1an673A7GPwMq2o14YqNnjMVlldxD3aQ7uAYP4=; c=relaxed/simple; d=groups.io; h=Message-ID:Date:MIME-Version:User-Agent:Subject:From:To:Cc:Reply-To:References:In-Reply-To:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Resent-Date:List-Unsubscribe-Post:List-Unsubscribe:Content-Type; s=20240206; t=1710382231; v=1; b=RCw2a+UbPvLks3w6fK6tPqpUsZI0d3QqGZWQLMCZwcUbFs3WXhJcgKDqZsmEcyfg8twa5MkE /Ojm39dH/Qa8ujOipba4fiLG+HFgglG/vc+5+NGmVDsuWau6CXp983sMKMs15OgUQtKcJCBfgRc iPrXyxIA1l2q0sqJXD7W17g7L6XEpaUocIm0Rq2425tjjovE+wqyFfsY44K3Qrq1iKYjYcmp9q2 0J3GmevzR6o9X2ENdtwiBpG8EmDqQIr7dTSsvtL+rikWBxWf+Fpj+oHgdc+XnHfoFOYcv+E8yg8 eBYc07fV3dv5tDeOhwhvlJICgUmqYCV7LHMXosC+UGKUQ== X-Received: by 127.0.0.2 with SMTP id doJPYY7687511xwL6hwe5xmq; Wed, 13 Mar 2024 19:10:31 -0700 X-Received: from mail.loongson.cn (mail.loongson.cn [114.242.206.163]) by mx.groups.io with SMTP id smtpd.web11.1926.1710382229506502587 for ; Wed, 13 Mar 2024 19:10:30 -0700 X-Received: from loongson.cn (unknown [10.40.24.149]) by gateway (Coremail) with SMTP id _____8DxbOmQXPJlIu8YAA--.50159S3; Thu, 14 Mar 2024 10:10:24 +0800 (CST) X-Received: from [10.40.24.149] (unknown [10.40.24.149]) by localhost.localdomain (Coremail) with SMTP id AQAAf8Dxfs2KXPJlN2tZAA--.36619S3; Thu, 14 Mar 2024 10:10:19 +0800 (CST) Message-ID: <1b7698aa-be15-4373-abd8-8dc49e6b880e@loongson.cn> Date: Thu, 14 Mar 2024 10:10:19 +0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [edk2-devel] [PATCH v1 00/26] Part 2 patch set to enable LoongArch virtual machine in edk2 From: "Chao Li" To: devel@edk2.groups.io Cc: Ray Ni , Rahul Kumar , Gerd Hoffmann , Ard Biesheuvel , Jiewen Yao , Leif Lindholm , Sami Mujawar , Sunil V L , Bibo Mao , Dongyan Qian Reply-To: devel@edk2.groups.io,lichao@loongson.cn References: <17BBAC320AB81FFB.17779@groups.io> In-Reply-To: <17BBAC320AB81FFB.17779@groups.io> X-CM-TRANSID: AQAAf8Dxfs2KXPJlN2tZAA--.36619S3 X-CM-SenderInfo: xolfxt3r6o00pqjv00gofq/1tbiAQAQCGXxY+cHGwACsX X-Coremail-Antispam: 1Uk129KBj9fXoW3KFyDZFyfCr15Jw4kWryrKrX_yoW8GryDGo W8Jan7Aw4UArs3C3sa9wnxJrW3WF47uws5Wr47ZayUAFs8Cw1jgFZxXryrXFyrZF98Xw15 G34rJa1ktFWavrn3l-sFpf9Il3svdjkaLaAFLSUrUUUUbb8apTn2vfkv8UJUUUU8wcxFpf 9Il3svdxBIdaVrnUUv73VFW2AGmfu7bjvjm3AaLaJ3UjIYCTnIWjp_UUU5_7kC6x804xWl 14x267AKxVWUJVW8JwAFc2x0x2IEx4CE42xK8VAvwI8IcIk0rVWrJVCq3wAFIxvE14AKwV WUXVWUAwA2ocxC64kIII0Yj41l84x0c7CEw4AK67xGY2AK021l84ACjcxK6xIIjxv20xvE 14v26r4j6ryUM28EF7xvwVC0I7IYx2IY6xkF7I0E14v26r4j6F4UM28EF7xvwVC2z280aV AFwI0_Cr0_Gr1UM28EF7xvwVC2z280aVCY1x0267AKxVW8Jr0_Cr1UM2AIxVAIcxkEcVAq 07x20xvEncxIr21l57IF6xkI12xvs2x26I8E6xACxx1lYx0E2Ix0cI8IcVAFwI0_Jrv_JF 1lYx0Ex4A2jsIE14v26r1j6r4UMcvjeVCFs4IE7xkEbVWUJVW8JwACjcxG0xvEwIxGrwCj r7xvwVCIw2I0I7xG6c02F41l42xK82IYc2Ij64vIr41l4I8I3I0E4IkC6x0Yz7v_Jr0_Gr 1lx2IqxVAqx4xG67AKxVWUGVWUWwC20s026x8GjcxK67AKxVWUGVWUWwC2zVAF1VAY17CE 14v26r1q6r43MIIYrxkI7VAKI48JMIIF0xvE2Ix0cI8IcVAFwI0_Jr0_JF4lIxAIcVC0I7 IYx2IY6xkF7I0E14v26r1j6r4UMIIF0xvE42xK8VAvwI8IcIk0rVWUJVWUCwCI42IY6I8E 87Iv67AKxVWUJVW8JwCI42IY6I8E87Iv6xkF7I0E14v26r1j6r4UYxBIdaVFxhVjvjDU0x ZFpf9x07UMlksUUUUU= 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, 13 Mar 2024 19:10:30 -0700 List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: efL7Ti0EV1YYcTijMzjqODoIx7686176AA= Content-Type: multipart/alternative; boundary="------------0nuicQqd00Y8xTmlbEDdmJdC" X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240206 header.b=RCw2a+Ub; 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 --------------0nuicQqd00Y8xTmlbEDdmJdC Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable Hi All, I submitted this version a few days ago and any comments are very=20 welcome, can you review this series? Thanks, Chao On 2024/3/11 17:36, Chao Li wrote: > This patch set is the part 2 of enable LoongArch virtual machine and is > a continuation of the first patch series v8 submitted at: > https://edk2.groups.io/g/devel/message/114526. > > Patch1-Patch4: Reorder some INF files located in UefiCpuPkg > alphabetically. > > Patch5-Patch14: Added Timer, CpuMmuLib, CpuMmuInitLib, MpInitLib, CpuDxe > for LoongArch, and added some PCD and header files requested by the > above libraries and drivers. > > Patch15-Patch25: LoongArch QEMU virtual machine private code, include > SEC and PEI phase, some libraries and drivers. > > Patch26: Added LoongArchVirt's self introduction-file. > > Modfied modules: UefiCpuPkg and OvmfPkg > > BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=3D4584 > > PR:https://github.com/tianocore/edk2/pull/5208 > > Cc: Ray Ni > Cc: Rahul Kumar > Cc: Gerd Hoffmann > Cc: Ard Biesheuvel > Cc: Jiewen Yao > Cc: Gerd Hoffmann > Cc: Leif Lindholm > Cc: Sami Mujawar > Cc: Sunil V L > Cc: Bibo Mao > Cc: Dongyan Qian > > Chao Li (26): > UefiCpuPkg/CpuTimerLib: Reorder the INF file alphabetically > UefiCpuPkg/CpuExceptionHandlerLib: Reorder the INF files > alphabetically > UefiCpuPkg/MpInitLib: Reorder the INF files alphabetically > UefiCpuPkg/CpuDxe: Reorder the INF file alphabetically > UefiCpuPkg: Add LoongArch64 CPU Timer instance > UefiCpuPkg: Add CPU exception library for LoongArch > UefiCpuPkg: Add CpuMmuLib.h to UefiCpuPkg > UefiCpuPkg: Added a new PCD named PcdCpuExceptionVectorBaseAddress > UefiCpuPkg: Added a new PCD named PcdCpuMmuIsEnabled > UefiCpuPkg: Add CpuMmuLib to UefiCpuPkg > UefiCpuPkg: Add CpuMmuInitLib.h to UefiCpuPkg > UefiCpuPkg: Add CpuMmuInitLib to UefiCpuPkg > UefiCpuPkg: Add multiprocessor library for LoongArch64 > UefiCpuPkg: Add CpuDxe driver for LoongArch64 > OvmfPkg/LoongArchVirt: Add stable timer driver > OvmfPkg/LoongArchVirt: Add a NULL library named > CollectApResouceLibNull > OvmfPkg/LoongArchVirt: Add serial port hook library > OvmfPkg/LoongArchVirt: Add the early serial port output library > OvmfPkg/LoongArchVirt: Add real time clock library > OvmfPkg/LoongArchVirt: Add NorFlashQemuLib > OvmfPkg/LoongArchVirt: Add FdtQemuFwCfgLib > OvmfPkg/LoongArchVirt: Add reset system library > OvmfPkg/LoongArchVirt: Support SEC phase > OvmfPkg/LoongArchVirt: Support PEI phase > OvmfPkg/LoongArchVirt: Add build file > OvmfPkg/LoongArchVirt: Add self introduction file > > .../Drivers/StableTimerDxe/Timer.c | 381 ++++ > .../Drivers/StableTimerDxe/Timer.h | 127 ++ > .../Drivers/StableTimerDxe/TimerDxe.inf | 41 + > .../CollectApResourceLibNull.c | 38 + > .../CollectApResourceLibNull.inf | 31 + > .../CollectApResourceLibNull.uni | 9 + > .../EarlyFdtSerialPortLib16550.c | 815 +++++++++ > .../EarlyFdtSerialPortLib16550.inf | 46 + > .../EarlyFdt16550SerialPortHookLib.c | 52 + > .../EarlyFdt16550SerialPortHookLib.inf | 37 + > .../Fdt16550SerialPortHookLib.c | 39 + > .../Fdt16550SerialPortHookLib.inf | 33 + > .../Fdt16550SerialPortHookLib.uni | 14 + > .../FdtQemuFwCfgLib/FdtQemuFwCfgPeiLib.c | 504 +++++ > .../FdtQemuFwCfgLib/FdtQemuFwCfgPeiLib.inf | 42 + > .../FdtQemuFwCfgLib/QemuFwCfgLibInternal.h | 73 + > .../Library/FdtQemuFwCfgLib/QemuFwCfgPei.c | 117 ++ > .../DxeLsRealTimeClockLib.c | 327 ++++ > .../DxeLsRealTimeClockLib.inf | 41 + > .../LsRealTimeClockLib/LsRealTimeClock.h | 47 + > .../PeiLsRealTimeClockLib.c | 31 + > .../PeiLsRealTimeClockLib.inf | 29 + > .../Library/NorFlashQemuLib/NorFlashQemuLib.c | 140 ++ > .../NorFlashQemuLib/NorFlashQemuLib.inf | 43 + > .../BaseResetSystemAcpiGed.c | 148 ++ > .../BaseResetSystemAcpiGedLib.inf | 36 + > .../DxeResetSystemAcpiGed.c | 259 +++ > .../DxeResetSystemAcpiGedLib.inf | 41 + > .../ResetSystemAcpiLib/ResetSystemAcpiGed.c | 125 ++ > .../ResetSystemAcpiLib/ResetSystemAcpiGed.h | 23 + > OvmfPkg/LoongArchVirt/LoongArchVirt.fdf.inc | 34 + > OvmfPkg/LoongArchVirt/LoongArchVirtQemu.dsc | 680 +++++++ > OvmfPkg/LoongArchVirt/LoongArchVirtQemu.fdf | 313 ++++ > OvmfPkg/LoongArchVirt/PlatformPei/Fv.c | 39 + > OvmfPkg/LoongArchVirt/PlatformPei/MemDetect.c | 202 ++ > OvmfPkg/LoongArchVirt/PlatformPei/Platform.c | 393 ++++ > OvmfPkg/LoongArchVirt/PlatformPei/Platform.h | 128 ++ > .../LoongArchVirt/PlatformPei/PlatformPei.inf | 72 + > OvmfPkg/LoongArchVirt/Readme.md | 69 + > OvmfPkg/LoongArchVirt/Sec/LoongArch64/Start.S | 184 ++ > OvmfPkg/LoongArchVirt/Sec/SecMain.c | 506 +++++ > OvmfPkg/LoongArchVirt/Sec/SecMain.inf | 53 + > OvmfPkg/LoongArchVirt/VarStore.fdf.inc | 67 + > UefiCpuPkg/CpuDxe/CpuDxe.inf | 37 +- > UefiCpuPkg/CpuDxe/LoongArch64/CpuDxe.c | 426 +++++ > UefiCpuPkg/CpuDxe/LoongArch64/CpuDxe.h | 288 +++ > UefiCpuPkg/CpuDxe/LoongArch64/CpuMp.c | 544 ++++++ > UefiCpuPkg/CpuDxe/LoongArch64/Exception.c | 159 ++ > UefiCpuPkg/Include/Library/CpuMmuInitLib.h | 34 + > UefiCpuPkg/Include/Library/CpuMmuLib.h | 55 + > .../DxeCpuExceptionHandlerLib.inf | 37 +- > .../LoongArch/DxeExceptionLib.c | 198 ++ > .../LoongArch/ExceptionCommon.c | 171 ++ > .../LoongArch/ExceptionCommon.h | 131 ++ > .../LoongArch64/ArchExceptionHandler.c | 268 +++ > .../LoongArch64/ExceptionHandlerAsm.S | 366 ++++ > .../LoongArch/SecPeiExceptionLib.c | 102 ++ > .../PeiCpuExceptionHandlerLib.inf | 16 +- > .../SecPeiCpuExceptionHandlerLib.inf | 31 +- > .../SmmCpuExceptionHandlerLib.inf | 16 +- > .../Library/CpuMmuInitLib/CpuMmuInitLib.inf | 42 + > .../Library/CpuMmuInitLib/CpuMmuInitLib.uni | 14 + > .../CpuMmuInitLib/LoongArch64/CpuMmuInit.c | 242 +++ > .../LoongArch64/TlbExceptionHandle.S | 51 + > .../LoongArch64/TlbExceptionHandle.h | 36 + > UefiCpuPkg/Library/CpuMmuLib/CpuMmuLib.inf | 38 + > UefiCpuPkg/Library/CpuMmuLib/CpuMmuLib.uni | 14 + > .../Library/CpuMmuLib/LoongArch64/CpuMmu.c | 614 +++++++ > .../Library/CpuMmuLib/LoongArch64/Page.h | 24 + > .../CpuMmuLib/LoongArch64/TlbInvalid.S | 24 + > .../CpuMmuLib/LoongArch64/TlbInvalid.h | 24 + > .../Library/CpuTimerLib/BaseCpuTimerLib.inf | 17 +- > .../CpuTimerLib/LoongArch64/CpuTimerLib.c | 251 +++ > UefiCpuPkg/Library/MpInitLib/DxeMpInitLib.inf | 39 +- > .../Library/MpInitLib/LoongArch64/DxeMpLib.c | 480 +++++ > .../Library/MpInitLib/LoongArch64/MpLib.c | 1621 +++++++++++++++++ > .../Library/MpInitLib/LoongArch64/MpLib.h | 361 ++++ > .../Library/MpInitLib/LoongArch64/PeiMpLib.c | 404 ++++ > UefiCpuPkg/Library/MpInitLib/PeiMpInitLib.inf | 37 +- > UefiCpuPkg/UefiCpuPkg.dec | 17 + > UefiCpuPkg/UefiCpuPkg.dsc | 7 + > 81 files changed, 13586 insertions(+), 79 deletions(-) > create mode 100644 OvmfPkg/LoongArchVirt/Drivers/StableTimerDxe/Timer.c > create mode 100644 OvmfPkg/LoongArchVirt/Drivers/StableTimerDxe/Timer.h > create mode 100644 OvmfPkg/LoongArchVirt/Drivers/StableTimerDxe/TimerDx= e.inf > create mode 100644 OvmfPkg/LoongArchVirt/Library/CollectApResouceLibNul= l/CollectApResourceLibNull.c > create mode 100644 OvmfPkg/LoongArchVirt/Library/CollectApResouceLibNul= l/CollectApResourceLibNull.inf > create mode 100644 OvmfPkg/LoongArchVirt/Library/CollectApResouceLibNul= l/CollectApResourceLibNull.uni > create mode 100644 OvmfPkg/LoongArchVirt/Library/EarlyFdtSerialPortLib1= 6550/EarlyFdtSerialPortLib16550.c > create mode 100644 OvmfPkg/LoongArchVirt/Library/EarlyFdtSerialPortLib1= 6550/EarlyFdtSerialPortLib16550.inf > create mode 100644 OvmfPkg/LoongArchVirt/Library/Fdt16550SerialPortHook= Lib/EarlyFdt16550SerialPortHookLib.c > create mode 100644 OvmfPkg/LoongArchVirt/Library/Fdt16550SerialPortHook= Lib/EarlyFdt16550SerialPortHookLib.inf > create mode 100644 OvmfPkg/LoongArchVirt/Library/Fdt16550SerialPortHook= Lib/Fdt16550SerialPortHookLib.c > create mode 100644 OvmfPkg/LoongArchVirt/Library/Fdt16550SerialPortHook= Lib/Fdt16550SerialPortHookLib.inf > create mode 100644 OvmfPkg/LoongArchVirt/Library/Fdt16550SerialPortHook= Lib/Fdt16550SerialPortHookLib.uni > create mode 100644 OvmfPkg/LoongArchVirt/Library/FdtQemuFwCfgLib/FdtQem= uFwCfgPeiLib.c > create mode 100644 OvmfPkg/LoongArchVirt/Library/FdtQemuFwCfgLib/FdtQem= uFwCfgPeiLib.inf > create mode 100644 OvmfPkg/LoongArchVirt/Library/FdtQemuFwCfgLib/QemuFw= CfgLibInternal.h > create mode 100644 OvmfPkg/LoongArchVirt/Library/FdtQemuFwCfgLib/QemuFw= CfgPei.c > create mode 100644 OvmfPkg/LoongArchVirt/Library/LsRealTimeClockLib/Dxe= LsRealTimeClockLib.c > create mode 100644 OvmfPkg/LoongArchVirt/Library/LsRealTimeClockLib/Dxe= LsRealTimeClockLib.inf > create mode 100644 OvmfPkg/LoongArchVirt/Library/LsRealTimeClockLib/LsR= ealTimeClock.h > create mode 100644 OvmfPkg/LoongArchVirt/Library/LsRealTimeClockLib/Pei= LsRealTimeClockLib.c > create mode 100644 OvmfPkg/LoongArchVirt/Library/LsRealTimeClockLib/Pei= LsRealTimeClockLib.inf > create mode 100644 OvmfPkg/LoongArchVirt/Library/NorFlashQemuLib/NorFla= shQemuLib.c > create mode 100644 OvmfPkg/LoongArchVirt/Library/NorFlashQemuLib/NorFla= shQemuLib.inf > create mode 100644 OvmfPkg/LoongArchVirt/Library/ResetSystemAcpiLib/Bas= eResetSystemAcpiGed.c > create mode 100644 OvmfPkg/LoongArchVirt/Library/ResetSystemAcpiLib/Bas= eResetSystemAcpiGedLib.inf > create mode 100644 OvmfPkg/LoongArchVirt/Library/ResetSystemAcpiLib/Dxe= ResetSystemAcpiGed.c > create mode 100644 OvmfPkg/LoongArchVirt/Library/ResetSystemAcpiLib/Dxe= ResetSystemAcpiGedLib.inf > create mode 100644 OvmfPkg/LoongArchVirt/Library/ResetSystemAcpiLib/Res= etSystemAcpiGed.c > create mode 100644 OvmfPkg/LoongArchVirt/Library/ResetSystemAcpiLib/Res= etSystemAcpiGed.h > create mode 100644 OvmfPkg/LoongArchVirt/LoongArchVirt.fdf.inc > create mode 100644 OvmfPkg/LoongArchVirt/LoongArchVirtQemu.dsc > create mode 100644 OvmfPkg/LoongArchVirt/LoongArchVirtQemu.fdf > create mode 100644 OvmfPkg/LoongArchVirt/PlatformPei/Fv.c > create mode 100644 OvmfPkg/LoongArchVirt/PlatformPei/MemDetect.c > create mode 100644 OvmfPkg/LoongArchVirt/PlatformPei/Platform.c > create mode 100644 OvmfPkg/LoongArchVirt/PlatformPei/Platform.h > create mode 100644 OvmfPkg/LoongArchVirt/PlatformPei/PlatformPei.inf > create mode 100644 OvmfPkg/LoongArchVirt/Readme.md > create mode 100644 OvmfPkg/LoongArchVirt/Sec/LoongArch64/Start.S > create mode 100644 OvmfPkg/LoongArchVirt/Sec/SecMain.c > create mode 100644 OvmfPkg/LoongArchVirt/Sec/SecMain.inf > create mode 100644 OvmfPkg/LoongArchVirt/VarStore.fdf.inc > create mode 100644 UefiCpuPkg/CpuDxe/LoongArch64/CpuDxe.c > create mode 100644 UefiCpuPkg/CpuDxe/LoongArch64/CpuDxe.h > create mode 100644 UefiCpuPkg/CpuDxe/LoongArch64/CpuMp.c > create mode 100644 UefiCpuPkg/CpuDxe/LoongArch64/Exception.c > create mode 100644 UefiCpuPkg/Include/Library/CpuMmuInitLib.h > create mode 100644 UefiCpuPkg/Include/Library/CpuMmuLib.h > create mode 100644 UefiCpuPkg/Library/CpuExceptionHandlerLib/LoongArch/= DxeExceptionLib.c > create mode 100644 UefiCpuPkg/Library/CpuExceptionHandlerLib/LoongArch/= ExceptionCommon.c > create mode 100644 UefiCpuPkg/Library/CpuExceptionHandlerLib/LoongArch/= ExceptionCommon.h > create mode 100644 UefiCpuPkg/Library/CpuExceptionHandlerLib/LoongArch/= LoongArch64/ArchExceptionHandler.c > create mode 100644 UefiCpuPkg/Library/CpuExceptionHandlerLib/LoongArch/= LoongArch64/ExceptionHandlerAsm.S > create mode 100644 UefiCpuPkg/Library/CpuExceptionHandlerLib/LoongArch/= SecPeiExceptionLib.c > create mode 100644 UefiCpuPkg/Library/CpuMmuInitLib/CpuMmuInitLib.inf > create mode 100644 UefiCpuPkg/Library/CpuMmuInitLib/CpuMmuInitLib.uni > create mode 100644 UefiCpuPkg/Library/CpuMmuInitLib/LoongArch64/CpuMmuI= nit.c > create mode 100644 UefiCpuPkg/Library/CpuMmuInitLib/LoongArch64/TlbExce= ptionHandle.S > create mode 100644 UefiCpuPkg/Library/CpuMmuInitLib/LoongArch64/TlbExce= ptionHandle.h > create mode 100644 UefiCpuPkg/Library/CpuMmuLib/CpuMmuLib.inf > create mode 100644 UefiCpuPkg/Library/CpuMmuLib/CpuMmuLib.uni > create mode 100644 UefiCpuPkg/Library/CpuMmuLib/LoongArch64/CpuMmu.c > create mode 100644 UefiCpuPkg/Library/CpuMmuLib/LoongArch64/Page.h > create mode 100644 UefiCpuPkg/Library/CpuMmuLib/LoongArch64/TlbInvalid.= S > create mode 100644 UefiCpuPkg/Library/CpuMmuLib/LoongArch64/TlbInvalid.= h > create mode 100644 UefiCpuPkg/Library/CpuTimerLib/LoongArch64/CpuTimerL= ib.c > create mode 100644 UefiCpuPkg/Library/MpInitLib/LoongArch64/DxeMpLib.c > create mode 100644 UefiCpuPkg/Library/MpInitLib/LoongArch64/MpLib.c > create mode 100644 UefiCpuPkg/Library/MpInitLib/LoongArch64/MpLib.h > create mode 100644 UefiCpuPkg/Library/MpInitLib/LoongArch64/PeiMpLib.c > -=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 (#116724): https://edk2.groups.io/g/devel/message/116724 Mute This Topic: https://groups.io/mt/104859849/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- --------------0nuicQqd00Y8xTmlbEDdmJdC Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

Hi All,

I submitted this version a few days ago and any comments are very welcome, can you review this series?


=
Thanks,
Chao
On 2024/3/11 17:36, Chao Li wrote:
This patch set is the part 2 o=
f enable LoongArch virtual machine and is
a continuation of the first patch series v8 submitted at:
https://edk2.groups.io/g/devel/message/114526.

Patch1-Patch4: Reorder some INF files located in UefiCpuPkg
alphabetically.

Patch5-Patch14: Added Timer, CpuMmuLib, CpuMmuInitLib, MpInitLib, CpuDxe
for LoongArch, and added some PCD and header files requested by the
above libraries and drivers.

Patch15-Patch25: LoongArch QEMU virtual machine private code, include
SEC and PEI phase, some libraries and drivers.

Patch26: Added LoongArchVirt's self introduction-file.

Modfied modules: UefiCpuPkg and OvmfPkg

BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=
=3D4584

PR: https://github.com/tianocore/edk2/pull/5208

Cc: Ray Ni <ray.ni@intel.com>
Cc: Rahul Kumar <rahul1.kumar@intel.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Leif Lindholm <quic_llindhol@quicinc.com>
Cc: Sami Mujawar <sami.mujawar@arm.com>
Cc: Sunil V L <sunilvl@ventanamicro.com>
Cc: Bibo Mao <maobibo@loongson.cn>
Cc: Dongyan Qian <qiandongyan@loongson.cn>

Chao Li (26):
  UefiCpuPkg/CpuTimerLib: Reorder the INF file alphabetically
  UefiCpuPkg/CpuExceptionHandlerLib: Reorder the INF files
    alphabetically
  UefiCpuPkg/MpInitLib: Reorder the INF files alphabetically
  UefiCpuPkg/CpuDxe: Reorder the INF file alphabetically
  UefiCpuPkg: Add LoongArch64 CPU Timer instance
  UefiCpuPkg: Add CPU exception library for LoongArch
  UefiCpuPkg: Add CpuMmuLib.h to UefiCpuPkg
  UefiCpuPkg: Added a new PCD named PcdCpuExceptionVectorBaseAddress
  UefiCpuPkg: Added a new PCD named PcdCpuMmuIsEnabled
  UefiCpuPkg: Add CpuMmuLib to UefiCpuPkg
  UefiCpuPkg: Add CpuMmuInitLib.h to UefiCpuPkg
  UefiCpuPkg: Add CpuMmuInitLib to UefiCpuPkg
  UefiCpuPkg: Add multiprocessor library for LoongArch64
  UefiCpuPkg: Add CpuDxe driver for LoongArch64
  OvmfPkg/LoongArchVirt: Add stable timer driver
  OvmfPkg/LoongArchVirt: Add a NULL library named
    CollectApResouceLibNull
  OvmfPkg/LoongArchVirt: Add serial port hook library
  OvmfPkg/LoongArchVirt: Add the early serial port output library
  OvmfPkg/LoongArchVirt: Add real time clock library
  OvmfPkg/LoongArchVirt: Add NorFlashQemuLib
  OvmfPkg/LoongArchVirt: Add FdtQemuFwCfgLib
  OvmfPkg/LoongArchVirt: Add reset system library
  OvmfPkg/LoongArchVirt: Support SEC phase
  OvmfPkg/LoongArchVirt: Support PEI phase
  OvmfPkg/LoongArchVirt: Add build file
  OvmfPkg/LoongArchVirt: Add self introduction file

 .../Drivers/StableTimerDxe/Timer.c            |  381 ++++
 .../Drivers/StableTimerDxe/Timer.h            |  127 ++
 .../Drivers/StableTimerDxe/TimerDxe.inf       |   41 +
 .../CollectApResourceLibNull.c                |   38 +
 .../CollectApResourceLibNull.inf              |   31 +
 .../CollectApResourceLibNull.uni              |    9 +
 .../EarlyFdtSerialPortLib16550.c              |  815 +++++++++
 .../EarlyFdtSerialPortLib16550.inf            |   46 +
 .../EarlyFdt16550SerialPortHookLib.c          |   52 +
 .../EarlyFdt16550SerialPortHookLib.inf        |   37 +
 .../Fdt16550SerialPortHookLib.c               |   39 +
 .../Fdt16550SerialPortHookLib.inf             |   33 +
 .../Fdt16550SerialPortHookLib.uni             |   14 +
 .../FdtQemuFwCfgLib/FdtQemuFwCfgPeiLib.c      |  504 +++++
 .../FdtQemuFwCfgLib/FdtQemuFwCfgPeiLib.inf    |   42 +
 .../FdtQemuFwCfgLib/QemuFwCfgLibInternal.h    |   73 +
 .../Library/FdtQemuFwCfgLib/QemuFwCfgPei.c    |  117 ++
 .../DxeLsRealTimeClockLib.c                   |  327 ++++
 .../DxeLsRealTimeClockLib.inf                 |   41 +
 .../LsRealTimeClockLib/LsRealTimeClock.h      |   47 +
 .../PeiLsRealTimeClockLib.c                   |   31 +
 .../PeiLsRealTimeClockLib.inf                 |   29 +
 .../Library/NorFlashQemuLib/NorFlashQemuLib.c |  140 ++
 .../NorFlashQemuLib/NorFlashQemuLib.inf       |   43 +
 .../BaseResetSystemAcpiGed.c                  |  148 ++
 .../BaseResetSystemAcpiGedLib.inf             |   36 +
 .../DxeResetSystemAcpiGed.c                   |  259 +++
 .../DxeResetSystemAcpiGedLib.inf              |   41 +
 .../ResetSystemAcpiLib/ResetSystemAcpiGed.c   |  125 ++
 .../ResetSystemAcpiLib/ResetSystemAcpiGed.h   |   23 +
 OvmfPkg/LoongArchVirt/LoongArchVirt.fdf.inc   |   34 +
 OvmfPkg/LoongArchVirt/LoongArchVirtQemu.dsc   |  680 +++++++
 OvmfPkg/LoongArchVirt/LoongArchVirtQemu.fdf   |  313 ++++
 OvmfPkg/LoongArchVirt/PlatformPei/Fv.c        |   39 +
 OvmfPkg/LoongArchVirt/PlatformPei/MemDetect.c |  202 ++
 OvmfPkg/LoongArchVirt/PlatformPei/Platform.c  |  393 ++++
 OvmfPkg/LoongArchVirt/PlatformPei/Platform.h  |  128 ++
 .../LoongArchVirt/PlatformPei/PlatformPei.inf |   72 +
 OvmfPkg/LoongArchVirt/Readme.md               |   69 +
 OvmfPkg/LoongArchVirt/Sec/LoongArch64/Start.S |  184 ++
 OvmfPkg/LoongArchVirt/Sec/SecMain.c           |  506 +++++
 OvmfPkg/LoongArchVirt/Sec/SecMain.inf         |   53 +
 OvmfPkg/LoongArchVirt/VarStore.fdf.inc        |   67 +
 UefiCpuPkg/CpuDxe/CpuDxe.inf                  |   37 +-
 UefiCpuPkg/CpuDxe/LoongArch64/CpuDxe.c        |  426 +++++
 UefiCpuPkg/CpuDxe/LoongArch64/CpuDxe.h        |  288 +++
 UefiCpuPkg/CpuDxe/LoongArch64/CpuMp.c         |  544 ++++++
 UefiCpuPkg/CpuDxe/LoongArch64/Exception.c     |  159 ++
 UefiCpuPkg/Include/Library/CpuMmuInitLib.h    |   34 +
 UefiCpuPkg/Include/Library/CpuMmuLib.h        |   55 +
 .../DxeCpuExceptionHandlerLib.inf             |   37 +-
 .../LoongArch/DxeExceptionLib.c               |  198 ++
 .../LoongArch/ExceptionCommon.c               |  171 ++
 .../LoongArch/ExceptionCommon.h               |  131 ++
 .../LoongArch64/ArchExceptionHandler.c        |  268 +++
 .../LoongArch64/ExceptionHandlerAsm.S         |  366 ++++
 .../LoongArch/SecPeiExceptionLib.c            |  102 ++
 .../PeiCpuExceptionHandlerLib.inf             |   16 +-
 .../SecPeiCpuExceptionHandlerLib.inf          |   31 +-
 .../SmmCpuExceptionHandlerLib.inf             |   16 +-
 .../Library/CpuMmuInitLib/CpuMmuInitLib.inf   |   42 +
 .../Library/CpuMmuInitLib/CpuMmuInitLib.uni   |   14 +
 .../CpuMmuInitLib/LoongArch64/CpuMmuInit.c    |  242 +++
 .../LoongArch64/TlbExceptionHandle.S          |   51 +
 .../LoongArch64/TlbExceptionHandle.h          |   36 +
 UefiCpuPkg/Library/CpuMmuLib/CpuMmuLib.inf    |   38 +
 UefiCpuPkg/Library/CpuMmuLib/CpuMmuLib.uni    |   14 +
 .../Library/CpuMmuLib/LoongArch64/CpuMmu.c    |  614 +++++++
 .../Library/CpuMmuLib/LoongArch64/Page.h      |   24 +
 .../CpuMmuLib/LoongArch64/TlbInvalid.S        |   24 +
 .../CpuMmuLib/LoongArch64/TlbInvalid.h        |   24 +
 .../Library/CpuTimerLib/BaseCpuTimerLib.inf   |   17 +-
 .../CpuTimerLib/LoongArch64/CpuTimerLib.c     |  251 +++
 UefiCpuPkg/Library/MpInitLib/DxeMpInitLib.inf |   39 +-
 .../Library/MpInitLib/LoongArch64/DxeMpLib.c  |  480 +++++
 .../Library/MpInitLib/LoongArch64/MpLib.c     | 1621 +++++++++++++++++
 .../Library/MpInitLib/LoongArch64/MpLib.h     |  361 ++++
 .../Library/MpInitLib/LoongArch64/PeiMpLib.c  |  404 ++++
 UefiCpuPkg/Library/MpInitLib/PeiMpInitLib.inf |   37 +-
 UefiCpuPkg/UefiCpuPkg.dec                     |   17 +
 UefiCpuPkg/UefiCpuPkg.dsc                     |    7 +
 81 files changed, 13586 insertions(+), 79 deletions(-)
 create mode 100644 OvmfPkg/LoongArchVirt/Drivers/StableTimerDxe/Timer.c
 create mode 100644 OvmfPkg/LoongArchVirt/Drivers/StableTimerDxe/Timer.h
 create mode 100644 OvmfPkg/LoongArchVirt/Drivers/StableTimerDxe/TimerDxe.i=
nf
 create mode 100644 OvmfPkg/LoongArchVirt/Library/CollectApResouceLibNull/C=
ollectApResourceLibNull.c
 create mode 100644 OvmfPkg/LoongArchVirt/Library/CollectApResouceLibNull/C=
ollectApResourceLibNull.inf
 create mode 100644 OvmfPkg/LoongArchVirt/Library/CollectApResouceLibNull/C=
ollectApResourceLibNull.uni
 create mode 100644 OvmfPkg/LoongArchVirt/Library/EarlyFdtSerialPortLib1655=
0/EarlyFdtSerialPortLib16550.c
 create mode 100644 OvmfPkg/LoongArchVirt/Library/EarlyFdtSerialPortLib1655=
0/EarlyFdtSerialPortLib16550.inf
 create mode 100644 OvmfPkg/LoongArchVirt/Library/Fdt16550SerialPortHookLib=
/EarlyFdt16550SerialPortHookLib.c
 create mode 100644 OvmfPkg/LoongArchVirt/Library/Fdt16550SerialPortHookLib=
/EarlyFdt16550SerialPortHookLib.inf
 create mode 100644 OvmfPkg/LoongArchVirt/Library/Fdt16550SerialPortHookLib=
/Fdt16550SerialPortHookLib.c
 create mode 100644 OvmfPkg/LoongArchVirt/Library/Fdt16550SerialPortHookLib=
/Fdt16550SerialPortHookLib.inf
 create mode 100644 OvmfPkg/LoongArchVirt/Library/Fdt16550SerialPortHookLib=
/Fdt16550SerialPortHookLib.uni
 create mode 100644 OvmfPkg/LoongArchVirt/Library/FdtQemuFwCfgLib/FdtQemuFw=
CfgPeiLib.c
 create mode 100644 OvmfPkg/LoongArchVirt/Library/FdtQemuFwCfgLib/FdtQemuFw=
CfgPeiLib.inf
 create mode 100644 OvmfPkg/LoongArchVirt/Library/FdtQemuFwCfgLib/QemuFwCfg=
LibInternal.h
 create mode 100644 OvmfPkg/LoongArchVirt/Library/FdtQemuFwCfgLib/QemuFwCfg=
Pei.c
 create mode 100644 OvmfPkg/LoongArchVirt/Library/LsRealTimeClockLib/DxeLsR=
ealTimeClockLib.c
 create mode 100644 OvmfPkg/LoongArchVirt/Library/LsRealTimeClockLib/DxeLsR=
ealTimeClockLib.inf
 create mode 100644 OvmfPkg/LoongArchVirt/Library/LsRealTimeClockLib/LsReal=
TimeClock.h
 create mode 100644 OvmfPkg/LoongArchVirt/Library/LsRealTimeClockLib/PeiLsR=
ealTimeClockLib.c
 create mode 100644 OvmfPkg/LoongArchVirt/Library/LsRealTimeClockLib/PeiLsR=
ealTimeClockLib.inf
 create mode 100644 OvmfPkg/LoongArchVirt/Library/NorFlashQemuLib/NorFlashQ=
emuLib.c
 create mode 100644 OvmfPkg/LoongArchVirt/Library/NorFlashQemuLib/NorFlashQ=
emuLib.inf
 create mode 100644 OvmfPkg/LoongArchVirt/Library/ResetSystemAcpiLib/BaseRe=
setSystemAcpiGed.c
 create mode 100644 OvmfPkg/LoongArchVirt/Library/ResetSystemAcpiLib/BaseRe=
setSystemAcpiGedLib.inf
 create mode 100644 OvmfPkg/LoongArchVirt/Library/ResetSystemAcpiLib/DxeRes=
etSystemAcpiGed.c
 create mode 100644 OvmfPkg/LoongArchVirt/Library/ResetSystemAcpiLib/DxeRes=
etSystemAcpiGedLib.inf
 create mode 100644 OvmfPkg/LoongArchVirt/Library/ResetSystemAcpiLib/ResetS=
ystemAcpiGed.c
 create mode 100644 OvmfPkg/LoongArchVirt/Library/ResetSystemAcpiLib/ResetS=
ystemAcpiGed.h
 create mode 100644 OvmfPkg/LoongArchVirt/LoongArchVirt.fdf.inc
 create mode 100644 OvmfPkg/LoongArchVirt/LoongArchVirtQemu.dsc
 create mode 100644 OvmfPkg/LoongArchVirt/LoongArchVirtQemu.fdf
 create mode 100644 OvmfPkg/LoongArchVirt/PlatformPei/Fv.c
 create mode 100644 OvmfPkg/LoongArchVirt/PlatformPei/MemDetect.c
 create mode 100644 OvmfPkg/LoongArchVirt/PlatformPei/Platform.c
 create mode 100644 OvmfPkg/LoongArchVirt/PlatformPei/Platform.h
 create mode 100644 OvmfPkg/LoongArchVirt/PlatformPei/PlatformPei.inf
 create mode 100644 OvmfPkg/LoongArchVirt/Readme.md
 create mode 100644 OvmfPkg/LoongArchVirt/Sec/LoongArch64/Start.S
 create mode 100644 OvmfPkg/LoongArchVirt/Sec/SecMain.c
 create mode 100644 OvmfPkg/LoongArchVirt/Sec/SecMain.inf
 create mode 100644 OvmfPkg/LoongArchVirt/VarStore.fdf.inc
 create mode 100644 UefiCpuPkg/CpuDxe/LoongArch64/CpuDxe.c
 create mode 100644 UefiCpuPkg/CpuDxe/LoongArch64/CpuDxe.h
 create mode 100644 UefiCpuPkg/CpuDxe/LoongArch64/CpuMp.c
 create mode 100644 UefiCpuPkg/CpuDxe/LoongArch64/Exception.c
 create mode 100644 UefiCpuPkg/Include/Library/CpuMmuInitLib.h
 create mode 100644 UefiCpuPkg/Include/Library/CpuMmuLib.h
 create mode 100644 UefiCpuPkg/Library/CpuExceptionHandlerLib/LoongArch/Dxe=
ExceptionLib.c
 create mode 100644 UefiCpuPkg/Library/CpuExceptionHandlerLib/LoongArch/Exc=
eptionCommon.c
 create mode 100644 UefiCpuPkg/Library/CpuExceptionHandlerLib/LoongArch/Exc=
eptionCommon.h
 create mode 100644 UefiCpuPkg/Library/CpuExceptionHandlerLib/LoongArch/Loo=
ngArch64/ArchExceptionHandler.c
 create mode 100644 UefiCpuPkg/Library/CpuExceptionHandlerLib/LoongArch/Loo=
ngArch64/ExceptionHandlerAsm.S
 create mode 100644 UefiCpuPkg/Library/CpuExceptionHandlerLib/LoongArch/Sec=
PeiExceptionLib.c
 create mode 100644 UefiCpuPkg/Library/CpuMmuInitLib/CpuMmuInitLib.inf
 create mode 100644 UefiCpuPkg/Library/CpuMmuInitLib/CpuMmuInitLib.uni
 create mode 100644 UefiCpuPkg/Library/CpuMmuInitLib/LoongArch64/CpuMmuInit=
.c
 create mode 100644 UefiCpuPkg/Library/CpuMmuInitLib/LoongArch64/TlbExcepti=
onHandle.S
 create mode 100644 UefiCpuPkg/Library/CpuMmuInitLib/LoongArch64/TlbExcepti=
onHandle.h
 create mode 100644 UefiCpuPkg/Library/CpuMmuLib/CpuMmuLib.inf
 create mode 100644 UefiCpuPkg/Library/CpuMmuLib/CpuMmuLib.uni
 create mode 100644 UefiCpuPkg/Library/CpuMmuLib/LoongArch64/CpuMmu.c
 create mode 100644 UefiCpuPkg/Library/CpuMmuLib/LoongArch64/Page.h
 create mode 100644 UefiCpuPkg/Library/CpuMmuLib/LoongArch64/TlbInvalid.S
 create mode 100644 UefiCpuPkg/Library/CpuMmuLib/LoongArch64/TlbInvalid.h
 create mode 100644 UefiCpuPkg/Library/CpuTimerLib/LoongArch64/CpuTimerLib.=
c
 create mode 100644 UefiCpuPkg/Library/MpInitLib/LoongArch64/DxeMpLib.c
 create mode 100644 UefiCpuPkg/Library/MpInitLib/LoongArch64/MpLib.c
 create mode 100644 UefiCpuPkg/Library/MpInitLib/LoongArch64/MpLib.h
 create mode 100644 UefiCpuPkg/Library/MpInitLib/LoongArch64/PeiMpLib.c

_._,_._,_

Groups.io Links:

=20 You receive all messages sent to this group. =20 =20

View/Reply Online (#116724) | =20 | Mute= This Topic | New Topic
Your Subscriptio= n | Contact Group Owner | Unsubscribe [rebecca@openfw.io]

_._,_._,_
--------------0nuicQqd00Y8xTmlbEDdmJdC--