Skip to content

Commit

Permalink
Ring3: Fixed line endings.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikhail Krichanov committed Jan 13, 2025
1 parent befe005 commit 0f9e888
Show file tree
Hide file tree
Showing 3 changed files with 117 additions and 117 deletions.
178 changes: 89 additions & 89 deletions MdeModulePkg/Core/Dxe/DxeMain.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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
48 changes: 24 additions & 24 deletions MdeModulePkg/Core/Dxe/SysCall/IA32/CoreBootServices.nasm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
8 changes: 4 additions & 4 deletions MdeModulePkg/Core/Dxe/SysCall/X64/CoreBootServices.nasm
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 0f9e888

Please sign in to comment.