mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-29 16:44:10 +02:00
MdePkg/MdeModulePkg: Implement the missing SetMemorySpaceCapabilities function.
It is defined in the PI Specification version 1.3. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Eugene Cohen <eugene@hp.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16409 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
48af14fd14
commit
771ee5017b
@ -1863,7 +1863,7 @@ CoreGetMemorySpaceDescriptor (
|
|||||||
resource range specified by BaseAddress and Length.
|
resource range specified by BaseAddress and Length.
|
||||||
@retval EFI_UNSUPPORTED The bit mask of attributes is not support for the memory resource
|
@retval EFI_UNSUPPORTED The bit mask of attributes is not support for the memory resource
|
||||||
range specified by BaseAddress and Length.
|
range specified by BaseAddress and Length.
|
||||||
@retval EFI_ACCESS_DEFINED The attributes for the memory resource range specified by
|
@retval EFI_ACCESS_DENIED The attributes for the memory resource range specified by
|
||||||
BaseAddress and Length cannot be modified.
|
BaseAddress and Length cannot be modified.
|
||||||
@retval EFI_OUT_OF_RESOURCES There are not enough system resources to modify the attributes of
|
@retval EFI_OUT_OF_RESOURCES There are not enough system resources to modify the attributes of
|
||||||
the memory resource range.
|
the memory resource range.
|
||||||
@ -1880,6 +1880,32 @@ CoreSetMemorySpaceAttributes (
|
|||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
Modifies the capabilities for a memory region in the global coherency domain of the
|
||||||
|
processor.
|
||||||
|
|
||||||
|
@param BaseAddress The physical address that is the start address of a memory region.
|
||||||
|
@param Length The size in bytes of the memory region.
|
||||||
|
@param Capabilities The bit mask of capabilities that the memory region supports.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS The capabilities were set for the memory region.
|
||||||
|
@retval EFI_INVALID_PARAMETER Length is zero.
|
||||||
|
@retval EFI_UNSUPPORTED The capabilities specified by Capabilities do not include the
|
||||||
|
memory region attributes currently in use.
|
||||||
|
@retval EFI_ACCESS_DENIED The capabilities for the memory resource range specified by
|
||||||
|
BaseAddress and Length cannot be modified.
|
||||||
|
@retval EFI_OUT_OF_RESOURCES There are not enough system resources to modify the capabilities
|
||||||
|
of the memory resource range.
|
||||||
|
**/
|
||||||
|
EFI_STATUS
|
||||||
|
EFIAPI
|
||||||
|
CoreSetMemorySpaceCapabilities (
|
||||||
|
IN EFI_PHYSICAL_ADDRESS BaseAddress,
|
||||||
|
IN UINT64 Length,
|
||||||
|
IN UINT64 Capabilities
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Returns a map of the memory resources in the global coherency domain of the
|
Returns a map of the memory resources in the global coherency domain of the
|
||||||
processor.
|
processor.
|
||||||
@ -2816,4 +2842,26 @@ CoreUpdateProfile (
|
|||||||
IN VOID *Buffer
|
IN VOID *Buffer
|
||||||
);
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
Internal function. Converts a memory range to use new attributes.
|
||||||
|
|
||||||
|
@param Start The first address of the range Must be page
|
||||||
|
aligned
|
||||||
|
@param NumberOfPages The number of pages to convert
|
||||||
|
@param NewAttributes The new attributes value for the range.
|
||||||
|
|
||||||
|
@retval EFI_INVALID_PARAMETER Invalid parameter
|
||||||
|
@retval EFI_NOT_FOUND Could not find a descriptor cover the specified
|
||||||
|
range or convertion not allowed.
|
||||||
|
@retval EFI_SUCCESS Successfully converts the memory range to the
|
||||||
|
specified attributes.
|
||||||
|
|
||||||
|
**/
|
||||||
|
VOID
|
||||||
|
CoreUpdateMemoryAttributes (
|
||||||
|
IN EFI_PHYSICAL_ADDRESS Start,
|
||||||
|
IN UINT64 NumberOfPages,
|
||||||
|
IN UINT64 NewAttributes
|
||||||
|
);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -123,6 +123,7 @@ EFI_DXE_SERVICES mDxeServices = {
|
|||||||
(EFI_SCHEDULE) CoreSchedule, // Schedule
|
(EFI_SCHEDULE) CoreSchedule, // Schedule
|
||||||
(EFI_TRUST) CoreTrust, // Trust
|
(EFI_TRUST) CoreTrust, // Trust
|
||||||
(EFI_PROCESS_FIRMWARE_VOLUME) CoreProcessFirmwareVolume, // ProcessFirmwareVolume
|
(EFI_PROCESS_FIRMWARE_VOLUME) CoreProcessFirmwareVolume, // ProcessFirmwareVolume
|
||||||
|
(EFI_SET_MEMORY_SPACE_CAPABILITIES)CoreSetMemorySpaceCapabilities, // SetMemorySpaceCapabilities
|
||||||
};
|
};
|
||||||
|
|
||||||
EFI_SYSTEM_TABLE mEfiSystemTableTemplate = {
|
EFI_SYSTEM_TABLE mEfiSystemTableTemplate = {
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
The GCD services are used to manage the memory and I/O regions that
|
The GCD services are used to manage the memory and I/O regions that
|
||||||
are accessible to the CPU that is executing the DXE core.
|
are accessible to the CPU that is executing the DXE core.
|
||||||
|
|
||||||
Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
which accompanies this distribution. The full text of the license may be found at
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -798,7 +798,7 @@ CoreConvertSpace (
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
//
|
//
|
||||||
// Set attribute operations
|
// Set attributes operation
|
||||||
//
|
//
|
||||||
case GCD_SET_ATTRIBUTES_MEMORY_OPERATION:
|
case GCD_SET_ATTRIBUTES_MEMORY_OPERATION:
|
||||||
if ((Attributes & EFI_MEMORY_RUNTIME) != 0) {
|
if ((Attributes & EFI_MEMORY_RUNTIME) != 0) {
|
||||||
@ -812,6 +812,23 @@ CoreConvertSpace (
|
|||||||
goto Done;
|
goto Done;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
//
|
||||||
|
// Set capabilities operation
|
||||||
|
//
|
||||||
|
case GCD_SET_CAPABILITIES_MEMORY_OPERATION:
|
||||||
|
if ((BaseAddress & EFI_PAGE_MASK) != 0 || (Length & EFI_PAGE_MASK) != 0) {
|
||||||
|
Status = EFI_INVALID_PARAMETER;
|
||||||
|
|
||||||
|
goto Done;
|
||||||
|
}
|
||||||
|
//
|
||||||
|
// Current attributes must still be supported with new capabilities
|
||||||
|
//
|
||||||
|
if ((Capabilities & Entry->Attributes) != Entry->Attributes) {
|
||||||
|
Status = EFI_UNSUPPORTED;
|
||||||
|
goto Done;
|
||||||
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
Link = Link->ForwardLink;
|
Link = Link->ForwardLink;
|
||||||
}
|
}
|
||||||
@ -891,11 +908,17 @@ CoreConvertSpace (
|
|||||||
Entry->GcdIoType = EfiGcdIoTypeNonExistent;
|
Entry->GcdIoType = EfiGcdIoTypeNonExistent;
|
||||||
break;
|
break;
|
||||||
//
|
//
|
||||||
// Set attribute operations
|
// Set attributes operation
|
||||||
//
|
//
|
||||||
case GCD_SET_ATTRIBUTES_MEMORY_OPERATION:
|
case GCD_SET_ATTRIBUTES_MEMORY_OPERATION:
|
||||||
Entry->Attributes = Attributes;
|
Entry->Attributes = Attributes;
|
||||||
break;
|
break;
|
||||||
|
//
|
||||||
|
// Set capabilities operation
|
||||||
|
//
|
||||||
|
case GCD_SET_CAPABILITIES_MEMORY_OPERATION:
|
||||||
|
Entry->Capabilities = Capabilities;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
Link = Link->ForwardLink;
|
Link = Link->ForwardLink;
|
||||||
}
|
}
|
||||||
@ -1558,6 +1581,45 @@ CoreSetMemorySpaceAttributes (
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
Modifies the capabilities for a memory region in the global coherency domain of the
|
||||||
|
processor.
|
||||||
|
|
||||||
|
@param BaseAddress The physical address that is the start address of a memory region.
|
||||||
|
@param Length The size in bytes of the memory region.
|
||||||
|
@param Capabilities The bit mask of capabilities that the memory region supports.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS The capabilities were set for the memory region.
|
||||||
|
@retval EFI_INVALID_PARAMETER Length is zero.
|
||||||
|
@retval EFI_UNSUPPORTED The capabilities specified by Capabilities do not include the
|
||||||
|
memory region attributes currently in use.
|
||||||
|
@retval EFI_ACCESS_DENIED The capabilities for the memory resource range specified by
|
||||||
|
BaseAddress and Length cannot be modified.
|
||||||
|
@retval EFI_OUT_OF_RESOURCES There are not enough system resources to modify the capabilities
|
||||||
|
of the memory resource range.
|
||||||
|
**/
|
||||||
|
EFI_STATUS
|
||||||
|
EFIAPI
|
||||||
|
CoreSetMemorySpaceCapabilities (
|
||||||
|
IN EFI_PHYSICAL_ADDRESS BaseAddress,
|
||||||
|
IN UINT64 Length,
|
||||||
|
IN UINT64 Capabilities
|
||||||
|
)
|
||||||
|
{
|
||||||
|
EFI_STATUS Status;
|
||||||
|
|
||||||
|
DEBUG ((DEBUG_GCD, "GCD:CoreSetMemorySpaceCapabilities(Base=%016lx,Length=%016lx)\n", BaseAddress, Length));
|
||||||
|
DEBUG ((DEBUG_GCD, " Capabilities = %016lx\n", Capabilities));
|
||||||
|
|
||||||
|
Status = CoreConvertSpace (GCD_SET_CAPABILITIES_MEMORY_OPERATION, (EFI_GCD_MEMORY_TYPE) 0, (EFI_GCD_IO_TYPE) 0, BaseAddress, Length, Capabilities, 0);
|
||||||
|
if (!EFI_ERROR(Status)) {
|
||||||
|
CoreUpdateMemoryAttributes(BaseAddress, RShiftU64(Length, EFI_PAGE_SHIFT), Capabilities);
|
||||||
|
}
|
||||||
|
|
||||||
|
return Status;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Returns a map of the memory resources in the global coherency domain of the
|
Returns a map of the memory resources in the global coherency domain of the
|
||||||
processor.
|
processor.
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
GCD Operations and data structure used to
|
GCD Operations and data structure used to
|
||||||
convert from GCD attributes to EFI Memory Map attributes.
|
convert from GCD attributes to EFI Memory Map attributes.
|
||||||
|
|
||||||
Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
which accompanies this distribution. The full text of the license may be found at
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -27,6 +27,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|||||||
#define GCD_FREE_MEMORY_OPERATION (GCD_MEMORY_SPACE_OPERATION | 2)
|
#define GCD_FREE_MEMORY_OPERATION (GCD_MEMORY_SPACE_OPERATION | 2)
|
||||||
#define GCD_REMOVE_MEMORY_OPERATION (GCD_MEMORY_SPACE_OPERATION | 3)
|
#define GCD_REMOVE_MEMORY_OPERATION (GCD_MEMORY_SPACE_OPERATION | 3)
|
||||||
#define GCD_SET_ATTRIBUTES_MEMORY_OPERATION (GCD_MEMORY_SPACE_OPERATION | 4)
|
#define GCD_SET_ATTRIBUTES_MEMORY_OPERATION (GCD_MEMORY_SPACE_OPERATION | 4)
|
||||||
|
#define GCD_SET_CAPABILITIES_MEMORY_OPERATION (GCD_MEMORY_SPACE_OPERATION | 5)
|
||||||
|
|
||||||
#define GCD_ADD_IO_OPERATION (GCD_IO_SPACE_OPERATION | 0)
|
#define GCD_ADD_IO_OPERATION (GCD_IO_SPACE_OPERATION | 0)
|
||||||
#define GCD_ALLOCATE_IO_OPERATION (GCD_IO_SPACE_OPERATION | 1)
|
#define GCD_ALLOCATE_IO_OPERATION (GCD_IO_SPACE_OPERATION | 1)
|
||||||
|
@ -671,13 +671,17 @@ CoreAddMemoryDescriptor (
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Internal function. Converts a memory range to the specified type.
|
Internal function. Converts a memory range to the specified type or attributes.
|
||||||
The range must exist in the memory map.
|
The range must exist in the memory map. Either ChangingType or
|
||||||
|
ChangingAttributes must be set, but not both.
|
||||||
|
|
||||||
@param Start The first address of the range Must be page
|
@param Start The first address of the range Must be page
|
||||||
aligned
|
aligned
|
||||||
@param NumberOfPages The number of pages to convert
|
@param NumberOfPages The number of pages to convert
|
||||||
|
@param ChangingType Boolean indicating that type value should be changed
|
||||||
@param NewType The new type for the memory range
|
@param NewType The new type for the memory range
|
||||||
|
@param ChangingAttributes Boolean indicating that attributes value should be changed
|
||||||
|
@param NewAttributes The new attributes for the memory range
|
||||||
|
|
||||||
@retval EFI_INVALID_PARAMETER Invalid parameter
|
@retval EFI_INVALID_PARAMETER Invalid parameter
|
||||||
@retval EFI_NOT_FOUND Could not find a descriptor cover the specified
|
@retval EFI_NOT_FOUND Could not find a descriptor cover the specified
|
||||||
@ -687,10 +691,13 @@ CoreAddMemoryDescriptor (
|
|||||||
|
|
||||||
**/
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
CoreConvertPages (
|
CoreConvertPagesEx (
|
||||||
IN UINT64 Start,
|
IN UINT64 Start,
|
||||||
IN UINT64 NumberOfPages,
|
IN UINT64 NumberOfPages,
|
||||||
IN EFI_MEMORY_TYPE NewType
|
IN BOOLEAN ChangingType,
|
||||||
|
IN EFI_MEMORY_TYPE NewType,
|
||||||
|
IN BOOLEAN ChangingAttributes,
|
||||||
|
IN UINT64 NewAttributes
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -698,6 +705,7 @@ CoreConvertPages (
|
|||||||
UINT64 End;
|
UINT64 End;
|
||||||
UINT64 RangeEnd;
|
UINT64 RangeEnd;
|
||||||
UINT64 Attribute;
|
UINT64 Attribute;
|
||||||
|
EFI_MEMORY_TYPE MemType;
|
||||||
LIST_ENTRY *Link;
|
LIST_ENTRY *Link;
|
||||||
MEMORY_MAP *Entry;
|
MEMORY_MAP *Entry;
|
||||||
|
|
||||||
@ -709,6 +717,7 @@ CoreConvertPages (
|
|||||||
ASSERT ((Start & EFI_PAGE_MASK) == 0);
|
ASSERT ((Start & EFI_PAGE_MASK) == 0);
|
||||||
ASSERT (End > Start) ;
|
ASSERT (End > Start) ;
|
||||||
ASSERT_LOCKED (&gMemoryLock);
|
ASSERT_LOCKED (&gMemoryLock);
|
||||||
|
ASSERT ( (ChangingType == FALSE) || (ChangingAttributes == FALSE) );
|
||||||
|
|
||||||
if (NumberOfPages == 0 || ((Start & EFI_PAGE_MASK) != 0) || (Start > (Start + NumberOfBytes))) {
|
if (NumberOfPages == 0 || ((Start & EFI_PAGE_MASK) != 0) || (Start > (Start + NumberOfBytes))) {
|
||||||
return EFI_INVALID_PARAMETER;
|
return EFI_INVALID_PARAMETER;
|
||||||
@ -747,8 +756,14 @@ CoreConvertPages (
|
|||||||
RangeEnd = Entry->End;
|
RangeEnd = Entry->End;
|
||||||
}
|
}
|
||||||
|
|
||||||
DEBUG ((DEBUG_PAGE, "ConvertRange: %lx-%lx to %d\n", Start, RangeEnd, NewType));
|
if (ChangingType) {
|
||||||
|
DEBUG ((DEBUG_PAGE, "ConvertRange: %lx-%lx to type %d\n", Start, RangeEnd, NewType));
|
||||||
|
}
|
||||||
|
if (ChangingAttributes) {
|
||||||
|
DEBUG ((DEBUG_PAGE, "ConvertRange: %lx-%lx to attr %lx\n", Start, RangeEnd, NewAttributes));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ChangingType) {
|
||||||
//
|
//
|
||||||
// Debug code - verify conversion is allowed
|
// Debug code - verify conversion is allowed
|
||||||
//
|
//
|
||||||
@ -780,6 +795,7 @@ CoreConvertPages (
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Pull range out of descriptor
|
// Pull range out of descriptor
|
||||||
@ -830,9 +846,15 @@ CoreConvertPages (
|
|||||||
|
|
||||||
//
|
//
|
||||||
// The new range inherits the same Attribute as the Entry
|
// The new range inherits the same Attribute as the Entry
|
||||||
//it is being cut out of
|
// it is being cut out of unless attributes are being changed
|
||||||
//
|
//
|
||||||
|
if (ChangingType) {
|
||||||
Attribute = Entry->Attribute;
|
Attribute = Entry->Attribute;
|
||||||
|
MemType = NewType;
|
||||||
|
} else {
|
||||||
|
Attribute = NewAttributes;
|
||||||
|
MemType = Entry->Type;
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// If the descriptor is empty, then remove it from the map
|
// If the descriptor is empty, then remove it from the map
|
||||||
@ -845,8 +867,8 @@ CoreConvertPages (
|
|||||||
//
|
//
|
||||||
// Add our new range in
|
// Add our new range in
|
||||||
//
|
//
|
||||||
CoreAddRange (NewType, Start, RangeEnd, Attribute);
|
CoreAddRange (MemType, Start, RangeEnd, Attribute);
|
||||||
if (NewType == EfiConventionalMemory) {
|
if (ChangingType && (MemType == EfiConventionalMemory)) {
|
||||||
//
|
//
|
||||||
// Avoid calling DEBUG_CLEAR_MEMORY() for an address of 0 because this
|
// Avoid calling DEBUG_CLEAR_MEMORY() for an address of 0 because this
|
||||||
// macro will ASSERT() if address is 0. Instead, CoreAddRange() guarantees
|
// macro will ASSERT() if address is 0. Instead, CoreAddRange() guarantees
|
||||||
@ -880,6 +902,65 @@ CoreConvertPages (
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
Internal function. Converts a memory range to the specified type.
|
||||||
|
The range must exist in the memory map.
|
||||||
|
|
||||||
|
@param Start The first address of the range Must be page
|
||||||
|
aligned
|
||||||
|
@param NumberOfPages The number of pages to convert
|
||||||
|
@param NewType The new type for the memory range
|
||||||
|
|
||||||
|
@retval EFI_INVALID_PARAMETER Invalid parameter
|
||||||
|
@retval EFI_NOT_FOUND Could not find a descriptor cover the specified
|
||||||
|
range or convertion not allowed.
|
||||||
|
@retval EFI_SUCCESS Successfully converts the memory range to the
|
||||||
|
specified type.
|
||||||
|
|
||||||
|
**/
|
||||||
|
EFI_STATUS
|
||||||
|
CoreConvertPages (
|
||||||
|
IN UINT64 Start,
|
||||||
|
IN UINT64 NumberOfPages,
|
||||||
|
IN EFI_MEMORY_TYPE NewType
|
||||||
|
)
|
||||||
|
{
|
||||||
|
return CoreConvertPagesEx(Start, NumberOfPages, TRUE, NewType, FALSE, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
Internal function. Converts a memory range to use new attributes.
|
||||||
|
|
||||||
|
@param Start The first address of the range Must be page
|
||||||
|
aligned
|
||||||
|
@param NumberOfPages The number of pages to convert
|
||||||
|
@param NewAttributes The new attributes value for the range.
|
||||||
|
|
||||||
|
@retval EFI_INVALID_PARAMETER Invalid parameter
|
||||||
|
@retval EFI_NOT_FOUND Could not find a descriptor cover the specified
|
||||||
|
range or convertion not allowed.
|
||||||
|
@retval EFI_SUCCESS Successfully converts the memory range to the
|
||||||
|
specified attributes.
|
||||||
|
|
||||||
|
**/
|
||||||
|
VOID
|
||||||
|
CoreUpdateMemoryAttributes (
|
||||||
|
IN EFI_PHYSICAL_ADDRESS Start,
|
||||||
|
IN UINT64 NumberOfPages,
|
||||||
|
IN UINT64 NewAttributes
|
||||||
|
)
|
||||||
|
{
|
||||||
|
CoreAcquireMemoryLock ();
|
||||||
|
|
||||||
|
//
|
||||||
|
// Update the attributes to the new value
|
||||||
|
//
|
||||||
|
CoreConvertPagesEx(Start, NumberOfPages, FALSE, (EFI_MEMORY_TYPE)0, TRUE, NewAttributes);
|
||||||
|
|
||||||
|
CoreReleaseMemoryLock ();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Internal function. Finds a consecutive free page range below
|
Internal function. Finds a consecutive free page range below
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
Include file matches things in PI.
|
Include file matches things in PI.
|
||||||
|
|
||||||
Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials are licensed and made available under
|
This program and the accompanying materials are licensed and made available under
|
||||||
the terms and conditions of the BSD License that accompanies this distribution.
|
the terms and conditions of the BSD License that accompanies this distribution.
|
||||||
The full text of the license may be found at
|
The full text of the license may be found at
|
||||||
@ -365,7 +365,7 @@ EFI_STATUS
|
|||||||
resource range specified by BaseAddress and Length.
|
resource range specified by BaseAddress and Length.
|
||||||
@retval EFI_UNSUPPORTED The bit mask of attributes is not support for the memory resource
|
@retval EFI_UNSUPPORTED The bit mask of attributes is not support for the memory resource
|
||||||
range specified by BaseAddress and Length.
|
range specified by BaseAddress and Length.
|
||||||
@retval EFI_ACCESS_DEFINED The attributes for the memory resource range specified by
|
@retval EFI_ACCESS_DENIED The attributes for the memory resource range specified by
|
||||||
BaseAddress and Length cannot be modified.
|
BaseAddress and Length cannot be modified.
|
||||||
@retval EFI_OUT_OF_RESOURCES There are not enough system resources to modify the attributes of
|
@retval EFI_OUT_OF_RESOURCES There are not enough system resources to modify the attributes of
|
||||||
the memory resource range.
|
the memory resource range.
|
||||||
@ -380,6 +380,31 @@ EFI_STATUS
|
|||||||
IN UINT64 Attributes
|
IN UINT64 Attributes
|
||||||
);
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
Modifies the capabilities for a memory region in the global coherency domain of the
|
||||||
|
processor.
|
||||||
|
|
||||||
|
@param BaseAddress The physical address that is the start address of a memory region.
|
||||||
|
@param Length The size in bytes of the memory region.
|
||||||
|
@param Capabilities The bit mask of capabilities that the memory region supports.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS The capabilities were set for the memory region.
|
||||||
|
@retval EFI_INVALID_PARAMETER Length is zero.
|
||||||
|
@retval EFI_UNSUPPORTED The capabilities specified by Capabilities do not include the
|
||||||
|
memory region attributes currently in use.
|
||||||
|
@retval EFI_ACCESS_DENIED The capabilities for the memory resource range specified by
|
||||||
|
BaseAddress and Length cannot be modified.
|
||||||
|
@retval EFI_OUT_OF_RESOURCES There are not enough system resources to modify the capabilities
|
||||||
|
of the memory resource range.
|
||||||
|
**/
|
||||||
|
typedef
|
||||||
|
EFI_STATUS
|
||||||
|
(EFIAPI *EFI_SET_MEMORY_SPACE_CAPABILITIES) (
|
||||||
|
IN EFI_PHYSICAL_ADDRESS BaseAddress,
|
||||||
|
IN UINT64 Length,
|
||||||
|
IN UINT64 Capabilities
|
||||||
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Returns a map of the memory resources in the global coherency domain of the
|
Returns a map of the memory resources in the global coherency domain of the
|
||||||
processor.
|
processor.
|
||||||
@ -694,6 +719,10 @@ typedef struct {
|
|||||||
// Service to process a single firmware volume found in a capsule
|
// Service to process a single firmware volume found in a capsule
|
||||||
//
|
//
|
||||||
EFI_PROCESS_FIRMWARE_VOLUME ProcessFirmwareVolume;
|
EFI_PROCESS_FIRMWARE_VOLUME ProcessFirmwareVolume;
|
||||||
|
//
|
||||||
|
// Extensions to Global Coherency Domain Services
|
||||||
|
//
|
||||||
|
EFI_SET_MEMORY_SPACE_CAPABILITIES SetMemorySpaceCapabilities;
|
||||||
} DXE_SERVICES;
|
} DXE_SERVICES;
|
||||||
|
|
||||||
typedef DXE_SERVICES EFI_DXE_SERVICES;
|
typedef DXE_SERVICES EFI_DXE_SERVICES;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user