mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-29 16:44:10 +02:00
SysCall: Fixed line endings.
This commit is contained in:
parent
56d7030ede
commit
f323165c69
@ -232,36 +232,36 @@ InitializeUserPageTable (
|
|||||||
EFI_MEMORY_XP | EFI_MEMORY_USER
|
EFI_MEMORY_XP | EFI_MEMORY_USER
|
||||||
);
|
);
|
||||||
|
|
||||||
gCpu->SetUserMemoryAttributes (
|
gCpu->SetUserMemoryAttributes (
|
||||||
gCpu,
|
gCpu,
|
||||||
UserPageTable,
|
UserPageTable,
|
||||||
(UINTN)gRing3Interfaces,
|
(UINTN)gRing3Interfaces,
|
||||||
EFI_PAGES_TO_SIZE (RING3_INTERFACES_PAGES),
|
EFI_PAGES_TO_SIZE (RING3_INTERFACES_PAGES),
|
||||||
EFI_MEMORY_XP | EFI_MEMORY_USER
|
EFI_MEMORY_XP | EFI_MEMORY_USER
|
||||||
);
|
);
|
||||||
|
|
||||||
gCpu->SetUserMemoryAttributes (
|
gCpu->SetUserMemoryAttributes (
|
||||||
gCpu,
|
gCpu,
|
||||||
UserPageTable,
|
UserPageTable,
|
||||||
(UINTN)gRing3CallStackBase,
|
(UINTN)gRing3CallStackBase,
|
||||||
EFI_SIZE_TO_PAGES (USER_STACK_SIZE) * EFI_PAGE_SIZE,
|
EFI_SIZE_TO_PAGES (USER_STACK_SIZE) * EFI_PAGE_SIZE,
|
||||||
EFI_MEMORY_XP | EFI_MEMORY_USER
|
EFI_MEMORY_XP | EFI_MEMORY_USER
|
||||||
);
|
);
|
||||||
|
|
||||||
SectionAddress = mDxeRing3->StartAddress;
|
SectionAddress = mDxeRing3->StartAddress;
|
||||||
for (Index = 0; Index < mDxeRing3->NumSegments; Index++) {
|
for (Index = 0; Index < mDxeRing3->NumSegments; Index++) {
|
||||||
ImageRecordSegment = &mDxeRing3->Segments[Index];
|
ImageRecordSegment = &mDxeRing3->Segments[Index];
|
||||||
|
|
||||||
gCpu->SetUserMemoryAttributes (
|
gCpu->SetUserMemoryAttributes (
|
||||||
gCpu,
|
gCpu,
|
||||||
UserPageTable,
|
UserPageTable,
|
||||||
SectionAddress,
|
SectionAddress,
|
||||||
ImageRecordSegment->Size,
|
ImageRecordSegment->Size,
|
||||||
ImageRecordSegment->Attributes | EFI_MEMORY_USER
|
ImageRecordSegment->Attributes | EFI_MEMORY_USER
|
||||||
);
|
);
|
||||||
|
|
||||||
SectionAddress += ImageRecordSegment->Size;
|
SectionAddress += ImageRecordSegment->Size;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Map CoreBootServices, gCoreSysCallStackBase
|
// Map CoreBootServices, gCoreSysCallStackBase
|
||||||
@ -274,61 +274,61 @@ InitializeUserPageTable (
|
|||||||
EFI_MEMORY_RO
|
EFI_MEMORY_RO
|
||||||
);
|
);
|
||||||
|
|
||||||
gCpu->SetUserMemoryAttributes (
|
gCpu->SetUserMemoryAttributes (
|
||||||
gCpu,
|
gCpu,
|
||||||
UserPageTable,
|
UserPageTable,
|
||||||
(UINTN)gCoreSysCallStackBase,
|
(UINTN)gCoreSysCallStackBase,
|
||||||
EFI_SIZE_TO_PAGES (USER_STACK_SIZE) * EFI_PAGE_SIZE,
|
EFI_SIZE_TO_PAGES (USER_STACK_SIZE) * EFI_PAGE_SIZE,
|
||||||
EFI_MEMORY_XP
|
EFI_MEMORY_XP
|
||||||
);
|
);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Map ExceptionHandlers, ExceptionStacks, Idt
|
// Map ExceptionHandlers, ExceptionStacks, Idt
|
||||||
//
|
//
|
||||||
gCpu->SetUserMemoryAttributes (
|
gCpu->SetUserMemoryAttributes (
|
||||||
gCpu,
|
gCpu,
|
||||||
UserPageTable,
|
UserPageTable,
|
||||||
mExceptionAddresses->ExceptionHandlerBase,
|
mExceptionAddresses->ExceptionHandlerBase,
|
||||||
mExceptionAddresses->ExceptionHandlerSize,
|
mExceptionAddresses->ExceptionHandlerSize,
|
||||||
EFI_MEMORY_RO
|
EFI_MEMORY_RO
|
||||||
);
|
);
|
||||||
|
|
||||||
gCpu->SetUserMemoryAttributes (
|
gCpu->SetUserMemoryAttributes (
|
||||||
gCpu,
|
gCpu,
|
||||||
UserPageTable,
|
UserPageTable,
|
||||||
mExceptionAddresses->ExceptionDataBase,
|
mExceptionAddresses->ExceptionDataBase,
|
||||||
SIZE_4KB,
|
SIZE_4KB,
|
||||||
EFI_MEMORY_XP
|
EFI_MEMORY_XP
|
||||||
);
|
);
|
||||||
|
|
||||||
#if defined (MDE_CPU_X64) || defined (MDE_CPU_IA32)
|
#if defined (MDE_CPU_X64) || defined (MDE_CPU_IA32)
|
||||||
IA32_DESCRIPTOR IdtDescriptor;
|
IA32_DESCRIPTOR IdtDescriptor;
|
||||||
|
|
||||||
gCpu->SetUserMemoryAttributes (
|
gCpu->SetUserMemoryAttributes (
|
||||||
gCpu,
|
gCpu,
|
||||||
UserPageTable,
|
UserPageTable,
|
||||||
(UINTN)&gCorePageTable,
|
(UINTN)&gCorePageTable,
|
||||||
SIZE_4KB,
|
SIZE_4KB,
|
||||||
EFI_MEMORY_RO | EFI_MEMORY_XP
|
EFI_MEMORY_RO | EFI_MEMORY_XP
|
||||||
);
|
);
|
||||||
|
|
||||||
gCpu->SetUserMemoryAttributes (
|
gCpu->SetUserMemoryAttributes (
|
||||||
gCpu,
|
gCpu,
|
||||||
UserPageTable,
|
UserPageTable,
|
||||||
mExceptionAddresses->ExceptionStackBase,
|
mExceptionAddresses->ExceptionStackBase,
|
||||||
mExceptionAddresses->ExceptionStackSize,
|
mExceptionAddresses->ExceptionStackSize,
|
||||||
EFI_MEMORY_XP
|
EFI_MEMORY_XP
|
||||||
);
|
);
|
||||||
|
|
||||||
AsmReadIdtr (&IdtDescriptor);
|
AsmReadIdtr (&IdtDescriptor);
|
||||||
gCpu->SetUserMemoryAttributes (
|
gCpu->SetUserMemoryAttributes (
|
||||||
gCpu,
|
gCpu,
|
||||||
UserPageTable,
|
UserPageTable,
|
||||||
IdtDescriptor.Base,
|
IdtDescriptor.Base,
|
||||||
SIZE_4KB,
|
SIZE_4KB,
|
||||||
EFI_MEMORY_RO | EFI_MEMORY_XP
|
EFI_MEMORY_RO | EFI_MEMORY_XP
|
||||||
);
|
);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Necessary fix for ProcessLibraryConstructorList() -> DxeCcProbeLibConstructor()
|
// Necessary fix for ProcessLibraryConstructorList() -> DxeCcProbeLibConstructor()
|
||||||
//
|
//
|
||||||
@ -340,23 +340,23 @@ InitializeUserPageTable (
|
|||||||
EFI_MEMORY_XP | EFI_MEMORY_USER
|
EFI_MEMORY_XP | EFI_MEMORY_USER
|
||||||
);
|
);
|
||||||
#elif defined (MDE_CPU_AARCH64) || defined (MDE_CPU_ARM)
|
#elif defined (MDE_CPU_AARCH64) || defined (MDE_CPU_ARM)
|
||||||
gCpu->SetUserMemoryAttributes (
|
gCpu->SetUserMemoryAttributes (
|
||||||
gCpu,
|
gCpu,
|
||||||
UserPageTable,
|
UserPageTable,
|
||||||
mConfigurationTable,
|
mConfigurationTable,
|
||||||
ALIGN_VALUE (mConfigurationTableSize, EFI_PAGE_SIZE),
|
ALIGN_VALUE (mConfigurationTableSize, EFI_PAGE_SIZE),
|
||||||
EFI_MEMORY_XP | EFI_MEMORY_USER
|
EFI_MEMORY_XP | EFI_MEMORY_USER
|
||||||
);
|
);
|
||||||
//
|
//
|
||||||
// Necessary fix for DEBUG printings.
|
// Necessary fix for DEBUG printings.
|
||||||
//
|
//
|
||||||
gCpu->SetUserMemoryAttributes (
|
gCpu->SetUserMemoryAttributes (
|
||||||
gCpu,
|
gCpu,
|
||||||
UserPageTable,
|
UserPageTable,
|
||||||
gUartBaseAddress,
|
gUartBaseAddress,
|
||||||
SIZE_4KB,
|
SIZE_4KB,
|
||||||
EFI_MEMORY_XP | EFI_MEMORY_USER
|
EFI_MEMORY_XP | EFI_MEMORY_USER
|
||||||
);
|
);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//
|
//
|
||||||
|
Loading…
x
Reference in New Issue
Block a user