[edk2-devel] [PATCH v4 0/7] RISC-V: Add MMU support

Tuan Phan posted 7 patches 10 months, 1 week ago
Failed in applying to current master (apply log)
MdePkg/Include/Library/BaseLib.h              |   5 +
.../Include/Register/RiscV64/RiscVEncoding.h  |   7 +-
MdePkg/Library/BaseLib/RiscV64/RiscVMmu.S     |   8 +
.../VirtNorFlashStaticLib.c                   |   3 +-
OvmfPkg/RiscVVirt/RiscVVirt.dsc.inc           |   1 +
OvmfPkg/RiscVVirt/RiscVVirtQemu.fdf           |  10 +
OvmfPkg/RiscVVirt/Sec/Memory.c                |  18 +-
OvmfPkg/RiscVVirt/Sec/Platform.c              |  62 ++
UefiCpuPkg/CpuDxeRiscV64/CpuDxe.c             |   9 +-
UefiCpuPkg/CpuDxeRiscV64/CpuDxe.h             |   2 +
UefiCpuPkg/CpuDxeRiscV64/CpuDxeRiscV64.inf    |   2 +
UefiCpuPkg/Include/Library/BaseRiscVMmuLib.h  |  39 ++
.../Library/BaseRiscVMmuLib/BaseRiscVMmuLib.c | 569 ++++++++++++++++++
.../BaseRiscVMmuLib/BaseRiscVMmuLib.inf       |  26 +
.../Library/BaseRiscVMmuLib/RiscVMmuCore.S    |  31 +
15 files changed, 770 insertions(+), 22 deletions(-)
create mode 100644 UefiCpuPkg/Include/Library/BaseRiscVMmuLib.h
create mode 100644 UefiCpuPkg/Library/BaseRiscVMmuLib/BaseRiscVMmuLib.c
create mode 100644 UefiCpuPkg/Library/BaseRiscVMmuLib/BaseRiscVMmuLib.inf
create mode 100644 UefiCpuPkg/Library/BaseRiscVMmuLib/RiscVMmuCore.S
[edk2-devel] [PATCH v4 0/7] RISC-V: Add MMU support
Posted by Tuan Phan 10 months, 1 week ago
This series adds MMU support for RISC-V. Only SV39/48/57 modes
are supported and tested. The MMU is required to support setting
page attribute which is the first basic step to support security
booting on RISC-V.

There are two parts:
1. Add MMU base library. MMU will be enabled during
CpuDxe initialization.
2. Fix all resources should be populated in HOB
or added to GCD by driver before accessing when MMU enabled.

All changes can be found in the branch tphan/riscv_mmu at:
https://github.com/pttuan/edk2.git

Changes in v4:
  - Rebased master.
  - Added VirtNorFlashDxe to APRIORI DXE list.

Changes in v3:
  - Move MMU library to UefiCpuPkg.
  - Add Andrei reviewed-by.

Changes in v2:
  - Move MMU core to a library.
  - Setup SATP mode as highest possible that HW supports.

Tuan Phan (7):
  MdePkg/BaseLib: RISC-V: Support getting satp register value
  MdePkg/Register: RISC-V: Add satp mode bits shift definition
  OvmfPkg/RiscVVirt: VirtNorFlashPlatformLib: Fix wrong flash size
  OvmfPkg/RiscVVirt: SEC: Add IO memory resource hob for platform
    devices
  OvmfPkg/RiscVVirt: Add VirtNorFlashDxe to APRIORI list
  OvmfPkg: RiscVVirt: Remove satp bare mode setting
  UefiCpuPkg: RISC-V: Support MMU with SV39/48/57 mode

 MdePkg/Include/Library/BaseLib.h              |   5 +
 .../Include/Register/RiscV64/RiscVEncoding.h  |   7 +-
 MdePkg/Library/BaseLib/RiscV64/RiscVMmu.S     |   8 +
 .../VirtNorFlashStaticLib.c                   |   3 +-
 OvmfPkg/RiscVVirt/RiscVVirt.dsc.inc           |   1 +
 OvmfPkg/RiscVVirt/RiscVVirtQemu.fdf           |  10 +
 OvmfPkg/RiscVVirt/Sec/Memory.c                |  18 +-
 OvmfPkg/RiscVVirt/Sec/Platform.c              |  62 ++
 UefiCpuPkg/CpuDxeRiscV64/CpuDxe.c             |   9 +-
 UefiCpuPkg/CpuDxeRiscV64/CpuDxe.h             |   2 +
 UefiCpuPkg/CpuDxeRiscV64/CpuDxeRiscV64.inf    |   2 +
 UefiCpuPkg/Include/Library/BaseRiscVMmuLib.h  |  39 ++
 .../Library/BaseRiscVMmuLib/BaseRiscVMmuLib.c | 569 ++++++++++++++++++
 .../BaseRiscVMmuLib/BaseRiscVMmuLib.inf       |  26 +
 .../Library/BaseRiscVMmuLib/RiscVMmuCore.S    |  31 +
 15 files changed, 770 insertions(+), 22 deletions(-)
 create mode 100644 UefiCpuPkg/Include/Library/BaseRiscVMmuLib.h
 create mode 100644 UefiCpuPkg/Library/BaseRiscVMmuLib/BaseRiscVMmuLib.c
 create mode 100644 UefiCpuPkg/Library/BaseRiscVMmuLib/BaseRiscVMmuLib.inf
 create mode 100644 UefiCpuPkg/Library/BaseRiscVMmuLib/RiscVMmuCore.S

-- 
2.25.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#106302): https://edk2.groups.io/g/devel/message/106302
Mute This Topic: https://groups.io/mt/99724468/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [PATCH v4 0/7] RISC-V: Add MMU support
Posted by Sunil V L 9 months, 2 weeks ago
Reviewed-by: Sunil V L <sunilvl@ventanamicro.com>

On Fri, Jun 23, 2023 at 11:39:27AM -0700, Tuan Phan wrote:
> This series adds MMU support for RISC-V. Only SV39/48/57 modes
> are supported and tested. The MMU is required to support setting
> page attribute which is the first basic step to support security
> booting on RISC-V.
> 
> There are two parts:
> 1. Add MMU base library. MMU will be enabled during
> CpuDxe initialization.
> 2. Fix all resources should be populated in HOB
> or added to GCD by driver before accessing when MMU enabled.
> 
> All changes can be found in the branch tphan/riscv_mmu at:
> https://github.com/pttuan/edk2.git
> 
> Changes in v4:
>   - Rebased master.
>   - Added VirtNorFlashDxe to APRIORI DXE list.
> 
> Changes in v3:
>   - Move MMU library to UefiCpuPkg.
>   - Add Andrei reviewed-by.
> 
> Changes in v2:
>   - Move MMU core to a library.
>   - Setup SATP mode as highest possible that HW supports.
> 
> Tuan Phan (7):
>   MdePkg/BaseLib: RISC-V: Support getting satp register value
>   MdePkg/Register: RISC-V: Add satp mode bits shift definition
>   OvmfPkg/RiscVVirt: VirtNorFlashPlatformLib: Fix wrong flash size
>   OvmfPkg/RiscVVirt: SEC: Add IO memory resource hob for platform
>     devices
>   OvmfPkg/RiscVVirt: Add VirtNorFlashDxe to APRIORI list
>   OvmfPkg: RiscVVirt: Remove satp bare mode setting
>   UefiCpuPkg: RISC-V: Support MMU with SV39/48/57 mode
> 
>  MdePkg/Include/Library/BaseLib.h              |   5 +
>  .../Include/Register/RiscV64/RiscVEncoding.h  |   7 +-
>  MdePkg/Library/BaseLib/RiscV64/RiscVMmu.S     |   8 +
>  .../VirtNorFlashStaticLib.c                   |   3 +-
>  OvmfPkg/RiscVVirt/RiscVVirt.dsc.inc           |   1 +
>  OvmfPkg/RiscVVirt/RiscVVirtQemu.fdf           |  10 +
>  OvmfPkg/RiscVVirt/Sec/Memory.c                |  18 +-
>  OvmfPkg/RiscVVirt/Sec/Platform.c              |  62 ++
>  UefiCpuPkg/CpuDxeRiscV64/CpuDxe.c             |   9 +-
>  UefiCpuPkg/CpuDxeRiscV64/CpuDxe.h             |   2 +
>  UefiCpuPkg/CpuDxeRiscV64/CpuDxeRiscV64.inf    |   2 +
>  UefiCpuPkg/Include/Library/BaseRiscVMmuLib.h  |  39 ++
>  .../Library/BaseRiscVMmuLib/BaseRiscVMmuLib.c | 569 ++++++++++++++++++
>  .../BaseRiscVMmuLib/BaseRiscVMmuLib.inf       |  26 +
>  .../Library/BaseRiscVMmuLib/RiscVMmuCore.S    |  31 +
>  15 files changed, 770 insertions(+), 22 deletions(-)
>  create mode 100644 UefiCpuPkg/Include/Library/BaseRiscVMmuLib.h
>  create mode 100644 UefiCpuPkg/Library/BaseRiscVMmuLib/BaseRiscVMmuLib.c
>  create mode 100644 UefiCpuPkg/Library/BaseRiscVMmuLib/BaseRiscVMmuLib.inf
>  create mode 100644 UefiCpuPkg/Library/BaseRiscVMmuLib/RiscVMmuCore.S
> 
> -- 
> 2.25.1
> 


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#106948): https://edk2.groups.io/g/devel/message/106948
Mute This Topic: https://groups.io/mt/99724468/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] UsbNetworkPkg not find in UDK 202305 stable version
Posted by Yoshinoya 10 months, 1 week ago
Hello,
I have a question about UsbNetworkPkg.
UsbNetworkPkg not find in UDK 202305 stable version, so where could download it?


Here is a sample paste about UsbNetworkPkg
https://edk2.groups.io/g/devel/message/102688?p=%2C%2C%2C20%2C0%2C0%2C0%3A%3Acreated%2C0%2Cusb+lan%2C20%2C2%2C0%2C98122714


Thanks

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#106321): https://edk2.groups.io/g/devel/message/106321
Mute This Topic: https://groups.io/mt/99766185/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-