From 0f9e8888601db172e8ec52beac0d38db73192290 Mon Sep 17 00:00:00 2001 From: Mikhail Krichanov Date: Mon, 13 Jan 2025 13:31:06 +0300 Subject: [PATCH] Ring3: Fixed line endings. --- MdeModulePkg/Core/Dxe/DxeMain.h | 178 +++++++++--------- .../Dxe/SysCall/IA32/CoreBootServices.nasm | 48 ++--- .../Dxe/SysCall/X64/CoreBootServices.nasm | 8 +- 3 files changed, 117 insertions(+), 117 deletions(-) diff --git a/MdeModulePkg/Core/Dxe/DxeMain.h b/MdeModulePkg/Core/Dxe/DxeMain.h index 8b06fd17ee..4791070995 100644 --- a/MdeModulePkg/Core/Dxe/DxeMain.h +++ b/MdeModulePkg/Core/Dxe/DxeMain.h @@ -2646,10 +2646,10 @@ UnprotectUefiImage ( IN EFI_DEVICE_PATH_PROTOCOL *LoadedImageDevicePath ); -UEFI_IMAGE_RECORD * -GetUefiImageRecord ( - IN LOADED_IMAGE_PRIVATE_DATA *Image - ); +UEFI_IMAGE_RECORD * +GetUefiImageRecord ( + IN LOADED_IMAGE_PRIVATE_DATA *Image + ); /** ExitBootServices Callback function for memory protection. @@ -2701,90 +2701,90 @@ MergeMemoryMap ( IN UINTN DescriptorSize ); -/** - Set UEFI image memory attributes. - - @param[in] BaseAddress Specified start address - @param[in] Length Specified length - @param[in] Attributes Specified attributes -**/ -VOID -SetUefiImageMemoryAttributes ( - IN UINT64 BaseAddress, - IN UINT64 Length, - IN UINT64 Attributes - ); - -/** - Set UEFI image protection attributes. - - @param[in] ImageRecord A UEFI image record - @param[in] IsUser Whether UEFI image record is User Image. -**/ -VOID -SetUefiImageProtectionAttributes ( - IN UEFI_IMAGE_RECORD *ImageRecord, - IN BOOLEAN IsUser - ); - -EFI_STATUS -EFIAPI -CoreBootServices ( - IN UINT8 Type, - ... - ); - -EFI_STATUS -EFIAPI -CallBootService ( - IN UINT8 Type, - IN CORE_STACK *CoreRbp, - IN RING3_STACK *UserRsp - ); - -VOID -EFIAPI -AllowSupervisorAccessToUserMemory ( - VOID - ); - -VOID -EFIAPI -ForbidSupervisorAccessToUserMemory ( - VOID - ); - -EFI_STATUS -EFIAPI -GoToRing3 ( - IN UINT8 Number, - IN VOID *EntryPoint, - IN UINTN UserStackTop, - IN UINTN SysCallStackTop, - ... - ); - -EFI_STATUS -EFIAPI -InitializeRing3 ( - IN EFI_HANDLE ImageHandle, - IN LOADED_IMAGE_PRIVATE_DATA *Image - ); - -VOID -EFIAPI -FreeProtocolsList ( - VOID - ); - -UINTN -EFIAPI -InitializeUserPageTable ( - IN LOADED_IMAGE_PRIVATE_DATA *Image, - IN UINTN SysCallStackBase, - IN UINTN SysCallStackSize, - IN UINTN UserStackBase, - IN UINTN UserStackSize - ); +/** + Set UEFI image memory attributes. + + @param[in] BaseAddress Specified start address + @param[in] Length Specified length + @param[in] Attributes Specified attributes +**/ +VOID +SetUefiImageMemoryAttributes ( + IN UINT64 BaseAddress, + IN UINT64 Length, + IN UINT64 Attributes + ); + +/** + Set UEFI image protection attributes. + + @param[in] ImageRecord A UEFI image record + @param[in] IsUser Whether UEFI image record is User Image. +**/ +VOID +SetUefiImageProtectionAttributes ( + IN UEFI_IMAGE_RECORD *ImageRecord, + IN BOOLEAN IsUser + ); + +EFI_STATUS +EFIAPI +CoreBootServices ( + IN UINT8 Type, + ... + ); + +EFI_STATUS +EFIAPI +CallBootService ( + IN UINT8 Type, + IN CORE_STACK *CoreRbp, + IN RING3_STACK *UserRsp + ); + +VOID +EFIAPI +AllowSupervisorAccessToUserMemory ( + VOID + ); + +VOID +EFIAPI +ForbidSupervisorAccessToUserMemory ( + VOID + ); + +EFI_STATUS +EFIAPI +GoToRing3 ( + IN UINT8 Number, + IN VOID *EntryPoint, + IN UINTN UserStackTop, + IN UINTN SysCallStackTop, + ... + ); + +EFI_STATUS +EFIAPI +InitializeRing3 ( + IN EFI_HANDLE ImageHandle, + IN LOADED_IMAGE_PRIVATE_DATA *Image + ); + +VOID +EFIAPI +FreeProtocolsList ( + VOID + ); + +UINTN +EFIAPI +InitializeUserPageTable ( + IN LOADED_IMAGE_PRIVATE_DATA *Image, + IN UINTN SysCallStackBase, + IN UINTN SysCallStackSize, + IN UINTN UserStackBase, + IN UINTN UserStackSize + ); #endif diff --git a/MdeModulePkg/Core/Dxe/SysCall/IA32/CoreBootServices.nasm b/MdeModulePkg/Core/Dxe/SysCall/IA32/CoreBootServices.nasm index 303a18360d..0421d4a07f 100644 --- a/MdeModulePkg/Core/Dxe/SysCall/IA32/CoreBootServices.nasm +++ b/MdeModulePkg/Core/Dxe/SysCall/IA32/CoreBootServices.nasm @@ -96,9 +96,9 @@ copy: pop eax %endmacro -ALIGN 4096 -global ASM_PFX(SysCallBase) -ASM_PFX(SysCallBase): +ALIGN 4096 +global ASM_PFX(SysCallBase) +ASM_PFX(SysCallBase): ;------------------------------------------------------------------------------ ; EFI_STATUS @@ -220,9 +220,9 @@ ASM_PFX(CallRing3): sti sysexit -ALIGN 4096 -global ASM_PFX(SysCallEnd) -ASM_PFX(SysCallEnd): +ALIGN 4096 +global ASM_PFX(SysCallEnd) +ASM_PFX(SysCallEnd): ;------------------------------------------------------------------------------ ; VOID @@ -245,24 +245,24 @@ ASM_PFX(ReturnToCore): ret SECTION .data -ALIGN 4096 - -global ASM_PFX(gCorePageTable) -ASM_PFX(gCorePageTable): - resd 1 - -global ASM_PFX(gUserPageTable) -ASM_PFX(gUserPageTable): - resd 1 - -ALIGN 4096 +ALIGN 4096 + +global ASM_PFX(gCorePageTable) +ASM_PFX(gCorePageTable): + resd 1 + +global ASM_PFX(gUserPageTable) +ASM_PFX(gUserPageTable): + resd 1 + +ALIGN 4096 ASM_PFX(CoreEsp): resd 1 -global ASM_PFX(mRing3CallStackTop) -ASM_PFX(mRing3CallStackTop): - resd 1 - -global ASM_PFX(mCoreSysCallStackTop) -ASM_PFX(mCoreSysCallStackTop): - resd 1 +global ASM_PFX(mRing3CallStackTop) +ASM_PFX(mRing3CallStackTop): + resd 1 + +global ASM_PFX(mCoreSysCallStackTop) +ASM_PFX(mCoreSysCallStackTop): + resd 1 diff --git a/MdeModulePkg/Core/Dxe/SysCall/X64/CoreBootServices.nasm b/MdeModulePkg/Core/Dxe/SysCall/X64/CoreBootServices.nasm index 349708f761..2f98fbd223 100644 --- a/MdeModulePkg/Core/Dxe/SysCall/X64/CoreBootServices.nasm +++ b/MdeModulePkg/Core/Dxe/SysCall/X64/CoreBootServices.nasm @@ -281,10 +281,10 @@ ALIGN 4096 ASM_PFX(CoreRsp): resq 1 -global ASM_PFX(mRing3CallStackTop) +global ASM_PFX(mRing3CallStackTop) ASM_PFX(mRing3CallStackTop): resq 1 -global ASM_PFX(mCoreSysCallStackTop) -ASM_PFX(mCoreSysCallStackTop): - resq 1 +global ASM_PFX(mCoreSysCallStackTop) +ASM_PFX(mCoreSysCallStackTop): + resq 1