mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-27 15:44:04 +02:00
Ring3: Added dummy functions for ARM, AARCH64.
This commit is contained in:
parent
1fdcce93d4
commit
00df7fc81e
@ -236,6 +236,7 @@
|
|||||||
ExtractGuidedSectionLib|MdePkg/Library/DxeExtractGuidedSectionLib/DxeExtractGuidedSectionLib.inf
|
ExtractGuidedSectionLib|MdePkg/Library/DxeExtractGuidedSectionLib/DxeExtractGuidedSectionLib.inf
|
||||||
PerformanceLib|MdeModulePkg/Library/DxeCorePerformanceLib/DxeCorePerformanceLib.inf
|
PerformanceLib|MdeModulePkg/Library/DxeCorePerformanceLib/DxeCorePerformanceLib.inf
|
||||||
CpuArchLib|ArmPkg/Library/CpuArchLib/CpuArchLib.inf
|
CpuArchLib|ArmPkg/Library/CpuArchLib/CpuArchLib.inf
|
||||||
|
MemoryPoolLib|MdeModulePkg/Library/MemoryPoolLib/MemoryPoolLib.inf
|
||||||
|
|
||||||
[LibraryClasses.common.DXE_DRIVER]
|
[LibraryClasses.common.DXE_DRIVER]
|
||||||
SecurityManagementLib|MdeModulePkg/Library/DxeSecurityManagementLib/DxeSecurityManagementLib.inf
|
SecurityManagementLib|MdeModulePkg/Library/DxeSecurityManagementLib/DxeSecurityManagementLib.inf
|
||||||
|
@ -471,6 +471,10 @@
|
|||||||
MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf
|
MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf
|
||||||
MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf
|
MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf
|
||||||
FatPkg/EnhancedFatDxe/Fat.inf
|
FatPkg/EnhancedFatDxe/Fat.inf
|
||||||
|
MdeModulePkg/Core/Dxe/DxeRing3/DxeRing3.inf {
|
||||||
|
<LibraryClasses>
|
||||||
|
MemoryPoolLib|MdeModulePkg/Library/MemoryPoolLib/MemoryPoolLib.inf
|
||||||
|
}
|
||||||
MdeModulePkg/Universal/Disk/UdfDxe/UdfDxe.inf
|
MdeModulePkg/Universal/Disk/UdfDxe/UdfDxe.inf
|
||||||
OvmfPkg/VirtioFsDxe/VirtioFsDxe.inf
|
OvmfPkg/VirtioFsDxe/VirtioFsDxe.inf
|
||||||
|
|
||||||
|
@ -38,6 +38,10 @@ READ_STATUS = TRUE
|
|||||||
READ_LOCK_CAP = TRUE
|
READ_LOCK_CAP = TRUE
|
||||||
READ_LOCK_STATUS = TRUE
|
READ_LOCK_STATUS = TRUE
|
||||||
|
|
||||||
|
APRIORI DXE {
|
||||||
|
INF MdeModulePkg/Core/Dxe/DxeRing3/DxeRing3.inf
|
||||||
|
}
|
||||||
|
|
||||||
INF MdeModulePkg/Core/Dxe/DxeMain.inf
|
INF MdeModulePkg/Core/Dxe/DxeMain.inf
|
||||||
INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf
|
INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf
|
||||||
INF OvmfPkg/Fdt/VirtioFdtDxe/VirtioFdtDxe.inf
|
INF OvmfPkg/Fdt/VirtioFdtDxe/VirtioFdtDxe.inf
|
||||||
@ -82,6 +86,7 @@ READ_LOCK_STATUS = TRUE
|
|||||||
INF MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIoDxe.inf
|
INF MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIoDxe.inf
|
||||||
INF MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf
|
INF MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf
|
||||||
INF FatPkg/EnhancedFatDxe/Fat.inf
|
INF FatPkg/EnhancedFatDxe/Fat.inf
|
||||||
|
INF MdeModulePkg/Core/Dxe/DxeRing3/DxeRing3.inf
|
||||||
INF MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf
|
INF MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf
|
||||||
INF MdeModulePkg/Universal/Disk/UdfDxe/UdfDxe.inf
|
INF MdeModulePkg/Universal/Disk/UdfDxe/UdfDxe.inf
|
||||||
INF OvmfPkg/VirtioFsDxe/VirtioFsDxe.inf
|
INF OvmfPkg/VirtioFsDxe/VirtioFsDxe.inf
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
#
|
#
|
||||||
# The following information is for reference only and not required by the build tools.
|
# The following information is for reference only and not required by the build tools.
|
||||||
#
|
#
|
||||||
# VALID_ARCHITECTURES = IA32 X64 EBC (EBC is for build only)
|
# VALID_ARCHITECTURES = IA32 X64 EBC (EBC is for build only) ARM AARCH64
|
||||||
#
|
#
|
||||||
|
|
||||||
[Sources]
|
[Sources]
|
||||||
@ -78,11 +78,20 @@
|
|||||||
SysCall/X64/InitializeMsr.c
|
SysCall/X64/InitializeMsr.c
|
||||||
SysCall/X64/CoreBootServices.nasm
|
SysCall/X64/CoreBootServices.nasm
|
||||||
|
|
||||||
|
[Sources.ARM]
|
||||||
|
SysCall/ARM/InitializeMsr.c
|
||||||
|
SysCall/ARM/CoreBootServices.S
|
||||||
|
|
||||||
|
[Sources.AARCH64]
|
||||||
|
SysCall/AARCH64/InitializeMsr.c
|
||||||
|
SysCall/AARCH64/CoreBootServices.S
|
||||||
|
|
||||||
[Packages]
|
[Packages]
|
||||||
MdePkg/MdePkg.dec
|
MdePkg/MdePkg.dec
|
||||||
MdeModulePkg/MdeModulePkg.dec
|
MdeModulePkg/MdeModulePkg.dec
|
||||||
UefiCpuPkg/UefiCpuPkg.dec
|
UefiCpuPkg/UefiCpuPkg.dec
|
||||||
OvmfPkg/OvmfPkg.dec
|
OvmfPkg/OvmfPkg.dec
|
||||||
|
ArmPkg/ArmPkg.dec
|
||||||
|
|
||||||
[LibraryClasses]
|
[LibraryClasses]
|
||||||
BaseMemoryLib
|
BaseMemoryLib
|
||||||
|
32
MdeModulePkg/Core/Dxe/DxeRing3/AARCH64/SysCall.S
Normal file
32
MdeModulePkg/Core/Dxe/DxeRing3/AARCH64/SysCall.S
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// Copyright (c) 2024, Mikhail Krichanov. All rights reserved.
|
||||||
|
// SPDX-License-Identifier: BSD-3-Clause
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#include <AsmMacroIoLibV8.h>
|
||||||
|
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// EFI_STATUS
|
||||||
|
// EFIAPI
|
||||||
|
// SysCall (
|
||||||
|
// IN UINT8 Type,
|
||||||
|
// ...
|
||||||
|
// );
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
ASM_FUNC(SysCall)
|
||||||
|
|
||||||
|
ret
|
||||||
|
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// VOID
|
||||||
|
// EFIAPI
|
||||||
|
// Ring3EntryPoint (
|
||||||
|
// IN RING3_CALL_DATA *Data
|
||||||
|
// );
|
||||||
|
//
|
||||||
|
// (rcx) RIP of Ring3EntryPoint saved for SYSRET in CallRing3().
|
||||||
|
// (rdx) Data
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
ASM_FUNC(Ring3EntryPoint)
|
||||||
|
|
||||||
|
ret
|
32
MdeModulePkg/Core/Dxe/DxeRing3/ARM/SysCall.S
Normal file
32
MdeModulePkg/Core/Dxe/DxeRing3/ARM/SysCall.S
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// Copyright (c) 2024, Mikhail Krichanov. All rights reserved.
|
||||||
|
// SPDX-License-Identifier: BSD-3-Clause
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#include <AsmMacroIoLib.h>
|
||||||
|
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// EFI_STATUS
|
||||||
|
// EFIAPI
|
||||||
|
// SysCall (
|
||||||
|
// IN UINT8 Type,
|
||||||
|
// ...
|
||||||
|
// );
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
ASM_FUNC(SysCall)
|
||||||
|
|
||||||
|
bx LR
|
||||||
|
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// VOID
|
||||||
|
// EFIAPI
|
||||||
|
// Ring3EntryPoint (
|
||||||
|
// IN RING3_CALL_DATA *Data
|
||||||
|
// );
|
||||||
|
//
|
||||||
|
// (rcx) RIP of Ring3EntryPoint saved for SYSRET in CallRing3().
|
||||||
|
// (rdx) Data
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
ASM_FUNC(Ring3EntryPoint)
|
||||||
|
|
||||||
|
bx LR
|
@ -18,7 +18,7 @@
|
|||||||
#
|
#
|
||||||
# The following information is for reference only and not required by the build tools.
|
# The following information is for reference only and not required by the build tools.
|
||||||
#
|
#
|
||||||
# VALID_ARCHITECTURES = IA32 X64
|
# VALID_ARCHITECTURES = IA32 X64 ARM AARCH64
|
||||||
#
|
#
|
||||||
|
|
||||||
[Sources]
|
[Sources]
|
||||||
@ -34,9 +34,16 @@
|
|||||||
[Sources.X64]
|
[Sources.X64]
|
||||||
X64/SysCall.nasm
|
X64/SysCall.nasm
|
||||||
|
|
||||||
|
[Sources.ARM]
|
||||||
|
ARM/SysCall.S
|
||||||
|
|
||||||
|
[Sources.AARCH64]
|
||||||
|
AARCH64/SysCall.S
|
||||||
|
|
||||||
[Packages]
|
[Packages]
|
||||||
MdePkg/MdePkg.dec
|
MdePkg/MdePkg.dec
|
||||||
MdeModulePkg/MdeModulePkg.dec
|
MdeModulePkg/MdeModulePkg.dec
|
||||||
|
ArmPkg/ArmPkg.dec
|
||||||
|
|
||||||
[LibraryClasses]
|
[LibraryClasses]
|
||||||
BaseLib
|
BaseLib
|
||||||
|
73
MdeModulePkg/Core/Dxe/SysCall/AARCH64/CoreBootServices.S
Normal file
73
MdeModulePkg/Core/Dxe/SysCall/AARCH64/CoreBootServices.S
Normal file
@ -0,0 +1,73 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Copyright (c) 2024, Mikhail Krichanov. All rights reserved.
|
||||||
|
// SPDX-License-Identifier: BSD-3-Clause
|
||||||
|
//
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#include <AsmMacroIoLibV8.h>
|
||||||
|
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// VOID
|
||||||
|
// EFIAPI
|
||||||
|
// DisableSMAP (
|
||||||
|
// VOID
|
||||||
|
// );
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
ASM_FUNC(DisableSMAP)
|
||||||
|
ret
|
||||||
|
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// VOID
|
||||||
|
// EFIAPI
|
||||||
|
// EnableSMAP (
|
||||||
|
// VOID
|
||||||
|
// );
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
ASM_FUNC(EnableSMAP)
|
||||||
|
ret
|
||||||
|
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// EFI_STATUS
|
||||||
|
// EFIAPI
|
||||||
|
// CallInstallMultipleProtocolInterfaces (
|
||||||
|
// IN EFI_HANDLE *Handle,
|
||||||
|
// IN VOID **ArgList,
|
||||||
|
// IN UINT32 ArgListSize,
|
||||||
|
// IN VOID *Function
|
||||||
|
// );
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
ASM_FUNC(CallInstallMultipleProtocolInterfaces)
|
||||||
|
ret
|
||||||
|
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// EFI_STATUS
|
||||||
|
// EFIAPI
|
||||||
|
// CoreBootServices (
|
||||||
|
// IN UINT8 Type,
|
||||||
|
// ...
|
||||||
|
// );
|
||||||
|
//
|
||||||
|
// (rcx) RIP of the next instruction saved by SYSCALL in SysCall().
|
||||||
|
// (rdx) Argument 1 of the called function.
|
||||||
|
// (r8) Argument 2 of the called function.
|
||||||
|
// (r9) Argument 3 of the called function.
|
||||||
|
// (r10) Type.
|
||||||
|
// (r11) RFLAGS saved by SYSCALL in SysCall().
|
||||||
|
//
|
||||||
|
// (On User Stack) Argument 4, 5, ...
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
ASM_FUNC(CoreBootServices)
|
||||||
|
ret
|
||||||
|
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// EFI_STATUS
|
||||||
|
// EFIAPI
|
||||||
|
// CallRing3 (
|
||||||
|
// IN RING3_CALL_DATA *Data
|
||||||
|
// );
|
||||||
|
//
|
||||||
|
// (rcx) Data
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
ASM_FUNC(CallRing3)
|
||||||
|
ret
|
17
MdeModulePkg/Core/Dxe/SysCall/AARCH64/InitializeMsr.c
Normal file
17
MdeModulePkg/Core/Dxe/SysCall/AARCH64/InitializeMsr.c
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
/** @file
|
||||||
|
|
||||||
|
Copyright (c) 2024, Mikhail Krichanov. All rights reserved.
|
||||||
|
SPDX-License-Identifier: BSD-3-Clause
|
||||||
|
|
||||||
|
**/
|
||||||
|
|
||||||
|
#include "DxeMain.h"
|
||||||
|
|
||||||
|
VOID
|
||||||
|
EFIAPI
|
||||||
|
InitializeMsr (
|
||||||
|
VOID
|
||||||
|
)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
73
MdeModulePkg/Core/Dxe/SysCall/ARM/CoreBootServices.S
Normal file
73
MdeModulePkg/Core/Dxe/SysCall/ARM/CoreBootServices.S
Normal file
@ -0,0 +1,73 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Copyright (c) 2024, Mikhail Krichanov. All rights reserved.
|
||||||
|
// SPDX-License-Identifier: BSD-3-Clause
|
||||||
|
//
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#include <AsmMacroIoLib.h>
|
||||||
|
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// VOID
|
||||||
|
// EFIAPI
|
||||||
|
// DisableSMAP (
|
||||||
|
// VOID
|
||||||
|
// );
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
ASM_FUNC(DisableSMAP)
|
||||||
|
bx LR
|
||||||
|
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// VOID
|
||||||
|
// EFIAPI
|
||||||
|
// EnableSMAP (
|
||||||
|
// VOID
|
||||||
|
// );
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
ASM_FUNC(EnableSMAP)
|
||||||
|
bx LR
|
||||||
|
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// EFI_STATUS
|
||||||
|
// EFIAPI
|
||||||
|
// CallInstallMultipleProtocolInterfaces (
|
||||||
|
// IN EFI_HANDLE *Handle,
|
||||||
|
// IN VOID **ArgList,
|
||||||
|
// IN UINT32 ArgListSize,
|
||||||
|
// IN VOID *Function
|
||||||
|
// );
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
ASM_FUNC(CallInstallMultipleProtocolInterfaces)
|
||||||
|
bx LR
|
||||||
|
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// EFI_STATUS
|
||||||
|
// EFIAPI
|
||||||
|
// CoreBootServices (
|
||||||
|
// IN UINT8 Type,
|
||||||
|
// ...
|
||||||
|
// );
|
||||||
|
//
|
||||||
|
// (rcx) RIP of the next instruction saved by SYSCALL in SysCall().
|
||||||
|
// (rdx) Argument 1 of the called function.
|
||||||
|
// (r8) Argument 2 of the called function.
|
||||||
|
// (r9) Argument 3 of the called function.
|
||||||
|
// (r10) Type.
|
||||||
|
// (r11) RFLAGS saved by SYSCALL in SysCall().
|
||||||
|
//
|
||||||
|
// (On User Stack) Argument 4, 5, ...
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
ASM_FUNC(CoreBootServices)
|
||||||
|
bx LR
|
||||||
|
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// EFI_STATUS
|
||||||
|
// EFIAPI
|
||||||
|
// CallRing3 (
|
||||||
|
// IN RING3_CALL_DATA *Data
|
||||||
|
// );
|
||||||
|
//
|
||||||
|
// (rcx) Data
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
ASM_FUNC(CallRing3)
|
||||||
|
bx LR
|
17
MdeModulePkg/Core/Dxe/SysCall/ARM/InitializeMsr.c
Normal file
17
MdeModulePkg/Core/Dxe/SysCall/ARM/InitializeMsr.c
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
/** @file
|
||||||
|
|
||||||
|
Copyright (c) 2024, Mikhail Krichanov. All rights reserved.
|
||||||
|
SPDX-License-Identifier: BSD-3-Clause
|
||||||
|
|
||||||
|
**/
|
||||||
|
|
||||||
|
#include "DxeMain.h"
|
||||||
|
|
||||||
|
VOID
|
||||||
|
EFIAPI
|
||||||
|
InitializeMsr (
|
||||||
|
VOID
|
||||||
|
)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
@ -329,9 +329,7 @@ CoreFileSetPosition (
|
|||||||
File->Ring3File,
|
File->Ring3File,
|
||||||
Position
|
Position
|
||||||
);
|
);
|
||||||
#endif
|
#elif defined (MDE_CPU_IA32)
|
||||||
|
|
||||||
#if defined (MDE_CPU_IA32)
|
|
||||||
//
|
//
|
||||||
// UINT64 Position is passed as 2 double words on stack.
|
// UINT64 Position is passed as 2 double words on stack.
|
||||||
//
|
//
|
||||||
@ -341,6 +339,13 @@ CoreFileSetPosition (
|
|||||||
File->Ring3File,
|
File->Ring3File,
|
||||||
Position
|
Position
|
||||||
);
|
);
|
||||||
|
#else
|
||||||
|
return GoToRing3 (
|
||||||
|
2,
|
||||||
|
(VOID *)mRing3FileProtocol.SetPosition,
|
||||||
|
File->Ring3File,
|
||||||
|
Position
|
||||||
|
);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -607,9 +612,7 @@ CoreFileOpen (
|
|||||||
OpenMode,
|
OpenMode,
|
||||||
Attributes
|
Attributes
|
||||||
);
|
);
|
||||||
#endif
|
#elif defined (MDE_CPU_IA32)
|
||||||
|
|
||||||
#if defined (MDE_CPU_IA32)
|
|
||||||
//
|
//
|
||||||
// UINT64 OpenMode and Attributes are each passed as 2 double words on stack.
|
// UINT64 OpenMode and Attributes are each passed as 2 double words on stack.
|
||||||
//
|
//
|
||||||
@ -622,6 +625,16 @@ CoreFileOpen (
|
|||||||
OpenMode,
|
OpenMode,
|
||||||
Attributes
|
Attributes
|
||||||
);
|
);
|
||||||
|
#else
|
||||||
|
Status = GoToRing3 (
|
||||||
|
5,
|
||||||
|
(VOID *)mRing3FileProtocol.Open,
|
||||||
|
File->Ring3File,
|
||||||
|
Ring3NewHandle,
|
||||||
|
Ring3FileName,
|
||||||
|
OpenMode,
|
||||||
|
Attributes
|
||||||
|
);
|
||||||
#endif
|
#endif
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
*NewHandle = NULL;
|
*NewHandle = NULL;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user