From 4ba967e79af4c240f2e3adeb19f187e964e1f2fd Mon Sep 17 00:00:00 2001 From: vanjeff Date: Wed, 3 Sep 2008 08:34:34 +0000 Subject: 1.Updated EFI_FVB_ATTRIBUTES to EFI_FVB_ATTRIBUTES_2 to follow PI spec. 2.Changed parameter FvHeader into DriverName to follow PI spec. 3.Updated DXE services functions header to follow PI spec. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5796 6f19259b-4bc3-4df7-8a09-765794883524 --- MdePkg/Include/Pi/PiDxeCis.h | 286 ++++++++++++++++++++++++++--------- MdePkg/Include/Pi/PiFirmwareVolume.h | 4 +- MdePkg/Include/Pi/PiPeiCis.h | 35 ++--- 3 files changed, 223 insertions(+), 102 deletions(-) (limited to 'MdePkg/Include/Pi') diff --git a/MdePkg/Include/Pi/PiDxeCis.h b/MdePkg/Include/Pi/PiDxeCis.h index cfcefb9857..574ee464f9 100644 --- a/MdePkg/Include/Pi/PiDxeCis.h +++ b/MdePkg/Include/Pi/PiDxeCis.h @@ -115,7 +115,9 @@ typedef struct { /// EFI_PHYSICAL_ADDRESS BaseAddress; + /// /// Number of bytes in the I/O region. + /// UINT64 Length; /// @@ -147,12 +149,31 @@ typedef struct { Adds reserved memory, system memory, or memory-mapped I/O resources to the global coherency domain of the processor. - @param GcdMemoryType Memory type of the memory space. - @param BaseAddress Base address of the memory space. - @param Length Length of the memory space. - @param Capabilities alterable attributes of the memory space. - - @retval EFI_SUCCESS Merged this memory space into GCD map. + @param GcdMemoryType The type of memory resource being added. + @param BaseAddress The physical address that is the start address + of the memory resource being added. + @param Length The size, in bytes, of the memory resource that + is being added. + @param Capabilities The bit mask of attributes that the memory + resource region supports. + + @retval EFI_SUCCESS The memory resource was added to the global + coherency domain of the processor. + @retval EFI_INVALID_PARAMETER GcdMemoryType is invalid. + @retval EFI_INVALID_PARAMETER Length is zero. + @retval EFI_OUT_OF_RESOURCES There are not enough system resources to add + the memory resource to the global coherency + domain of the processor. + @retval EFI_UNSUPPORTED The processor does not support one or more bytes + of the memory resource range specified by + BaseAddress and Length. + @retval EFI_ACCESS_DENIED One or more bytes of the memory resource range + specified by BaseAddress and Length conflicts + with a memory resource range that was previously + added to the global coherency domain of the processor. + @retval EFI_ACCESS_DENIED One or more bytes of the memory resource range + specified by BaseAddress and Length was allocated + in a prior call to AllocateMemorySpace().. **/ typedef @@ -169,17 +190,30 @@ EFI_STATUS Allocates nonexistent memory, reserved memory, system memory, or memorymapped I/O resources from the global coherency domain of the processor. - @param GcdAllocateType The type of allocate operation - @param GcdMemoryType The desired memory type - @param Alignment Align with 2^Alignment - @param Length Length to allocate - @param BaseAddress Base address to allocate - @param Imagehandle The image handle consume the allocated space. - @param DeviceHandle The device handle consume the allocated space. + @param GcdAllocateType The type of allocation to perform. + @param GcdMemoryType The type of memory resource being allocated. + @param Alignment The log base 2 of the boundary that BaseAddress must + be aligned on output. Align with 2^Alignment. + @param Length The size in bytes of the memory resource range that + is being allocated. + @param BaseAddress A pointer to a physical address to allocate. + @param Imagehandle The image handle of the agent that is allocating + the memory resource. + @param DeviceHandle The device handle for which the memory resource + is being allocated. + + @retval EFI_INVALID_PARAMETER GcdAllocateType is invalid. + @retval EFI_INVALID_PARAMETER GcdMemoryType is invalid. + @retval EFI_INVALID_PARAMETER Length is zero. + @retval EFI_INVALID_PARAMETER BaseAddress is NULL. + @retval EFI_INVALID_PARAMETER ImageHandle is NULL. + @retval EFI_NOT_FOUND The memory resource request could not be satisfied. + No descriptor contains the desired space. + @retval EFI_OUT_OF_RESOURCES There are not enough system resources to allocate the memory + resource from the global coherency domain of the processor. + @retval EFI_SUCCESS The memory resource was allocated from the global coherency + domain of the processor. - @retval EFI_INVALID_PARAMETER Invalid parameter. - @retval EFI_NOT_FOUND No descriptor contains the desired space. - @retval EFI_SUCCESS Memory space successfully allocated. **/ typedef @@ -199,10 +233,18 @@ EFI_STATUS Frees nonexistent memory, reserved memory, system memory, or memory-mapped I/O resources from the global coherency domain of the processor. - @param BaseAddress Base address of the segment. - @param Length Length of the segment. + @param BaseAddress The physical address that is the start address of the memory resource being freed. + @param Length The size in bytes of the memory resource range that is being freed. - @retval EFI_SUCCESS Space successfully freed. + @retval EFI_SUCCESS The memory resource was freed from the global coherency domain of + the processor. + @retval EFI_INVALID_PARAMETER Length is zero. + @retval EFI_UNSUPPORTED The processor does not support one or more bytes of the memory + resource range specified by BaseAddress and Length. + @retval EFI_NOT_FOUND The memory resource range specified by BaseAddress and + Length was not allocated with previous calls to AllocateMemorySpace(). + @retval EFI_OUT_OF_RESOURCES There are not enough system resources to free the memory resource + from the global coherency domain of the processor. **/ typedef @@ -217,10 +259,21 @@ EFI_STATUS Removes reserved memory, system memory, or memory-mapped I/O resources from the global coherency domain of the processor. - @param BaseAddress Base address of the memory space. - @param Length Length of the memory space. - - @retval EFI_SUCCESS Successfully remove a segment of memory space. + @param BaseAddress The physical address that is the start address of the memory resource being removed. + @param Length The size in bytes of the memory resource that is being removed. + + @retval EFI_SUCCESS The memory resource was removed from the global coherency + domain of the processor. + @retval EFI_INVALID_PARAMETER Length is zero. + @retval EFI_UNSUPPORTED The processor does not support one or more bytes of the memory + resource range specified by BaseAddress and Length. + @retval EFI_NOT_FOUND One or more bytes of the memory resource range specified by + BaseAddress and Length was not added with previous calls to + AddMemorySpace(). + @retval EFI_ACCESS_DEFINED One or more bytes of the memory resource range specified by + BaseAddress and Length has been allocated with AllocateMemorySpace(). + @retval EFI_OUT_OF_RESOURCES There are not enough system resources to remove the memory + resource from the global coherency domain of the processor. **/ typedef @@ -234,11 +287,13 @@ EFI_STATUS /** Retrieves the descriptor for a memory region containing a specified address. - @param BaseAddress Specified start address - @param Descriptor Specified length + @param BaseAddress The physical address that is the start address of a memory region. + @param Descriptor A pointer to a caller allocated descriptor. - @retval EFI_INVALID_PARAMETER Invalid parameter - @retval EFI_SUCCESS Successfully get memory space descriptor. + @retval EFI_SUCCESS The descriptor for the memory resource region containing + BaseAddress was returned in Descriptor. + @retval EFI_INVALID_PARAMETER Descriptor is NULL. + @retval EFI_NOT_FOUND A memory resource range containing BaseAddress was not found. **/ typedef @@ -253,11 +308,20 @@ EFI_STATUS Modifies the attributes for a memory region in the global coherency domain of the processor. - @param BaseAddress Specified start address - @param Length Specified length - @param Attributes Specified attributes - - @retval EFI_SUCCESS Successfully set attribute of a segment of memory space. + @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 Attributes The bit mask of attributes to set for the memory region. + + @retval EFI_SUCCESS The attributes were set for the memory region. + @retval EFI_INVALID_PARAMETER Length is zero. + @retval EFI_UNSUPPORTED The processor does not support one or more bytes of the memory + resource range specified by BaseAddress and Length. + @retval EFI_UNSUPPORTED The bit mask of attributes is not support for the memory resource + range specified by BaseAddress and Length. + @retval EFI_ACCESS_DEFINED The attributes 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 attributes of + the memory resource range. **/ typedef @@ -273,12 +337,15 @@ EFI_STATUS Returns a map of the memory resources in the global coherency domain of the processor. - @param NumberOfDescriptors Number of descriptors. - @param MemorySpaceMap Descriptor array + @param NumberOfDescriptors A pointer to number of descriptors returned in the MemorySpaceMap buffer. + @param MemorySpaceMap A pointer to the array of EFI_GCD_MEMORY_SPACE_DESCRIPTORs. - @retval EFI_INVALID_PARAMETER Invalid parameter - @retval EFI_OUT_OF_RESOURCES No enough buffer to allocate - @retval EFI_SUCCESS Successfully get memory space map. + @retval EFI_SUCCESS The memory space map was returned in the MemorySpaceMap + buffer, and the number of descriptors in MemorySpaceMap was + returned in NumberOfDescriptors. + @retval EFI_INVALID_PARAMETER NumberOfDescriptors is NULL. + @retval EFI_INVALID_PARAMETER MemorySpaceMap is NULL. + @retval EFI_OUT_OF_RESOURCES There are not enough resources to allocate MemorySpaceMap. **/ typedef @@ -292,11 +359,25 @@ EFI_STATUS /** Adds reserved I/O or I/O resources to the global coherency domain of the processor. - @param GcdIoType IO type of the segment. - @param BaseAddress Base address of the segment. - @param Length Length of the segment. - - @retval EFI_SUCCESS Merged this segment into GCD map. + @param GcdIoType The type of I/O resource being added. + @param BaseAddress The physical address that is the start address of the I/O resource being added. + @param Length The size in bytes of the I/O resource that is being added. + + @retval EFI_SUCCESS The I/O resource was added to the global coherency domain of + the processor. + @retval EFI_INVALID_PARAMETER GcdIoType is invalid. + @retval EFI_INVALID_PARAMETER Length is zero. + @retval EFI_OUT_OF_RESOURCES There are not enough system resources to add the I/O resource to + the global coherency domain of the processor. + @retval EFI_UNSUPPORTED The processor does not support one or more bytes of the I/O + resource range specified by BaseAddress and Length. + @retval EFI_ACCESS_DENIED One or more bytes of the I/O resource range specified by + BaseAddress and Length conflicts with an I/O resource + range that was previously added to the global coherency domain + of the processor. + @retval EFI_ACCESS_DENIED One or more bytes of the I/O resource range specified by + BaseAddress and Length was allocated in a prior call to + AllocateIoSpace(). **/ typedef @@ -312,17 +393,24 @@ EFI_STATUS Allocates nonexistent I/O, reserved I/O, or I/O resources from the global coherency domain of the processor. - @param GcdAllocateType The type of allocate operation - @param GcdIoType The desired IO type - @param Alignment Align with 2^Alignment - @param Length Length to allocate - @param BaseAddress Base address to allocate - @param Imagehandle The image handle consume the allocated space. - @param DeviceHandle The device handle consume the allocated space. - - @retval EFI_INVALID_PARAMETER Invalid parameter. - @retval EFI_NOT_FOUND No descriptor contains the desired space. - @retval EFI_SUCCESS IO space successfully allocated. + @param GcdAllocateType The type of allocation to perform. + @param GcdIoType The type of I/O resource being allocated. + @param Alignment The log base 2 of the boundary that BaseAddress must be aligned on output. + @param Length The size in bytes of the I/O resource range that is being allocated. + @param BaseAddress A pointer to a physical address. + @param Imagehandle The image handle of the agent that is allocating the I/O resource. + @param DeviceHandle The device handle for which the I/O resource is being allocated. + + @retval EFI_SUCCESS The I/O resource was allocated from the global coherency domain + of the processor. + @retval EFI_INVALID_PARAMETER GcdAllocateType is invalid. + @retval EFI_INVALID_PARAMETER GcdIoType is invalid. + @retval EFI_INVALID_PARAMETER Length is zero. + @retval EFI_INVALID_PARAMETER BaseAddress is NULL. + @retval EFI_INVALID_PARAMETER ImageHandle is NULL. + @retval EFI_OUT_OF_RESOURCES There are not enough system resources to allocate the I/O + resource from the global coherency domain of the processor. + @retval EFI_NOT_FOUND The I/O resource request could not be satisfied. **/ typedef @@ -342,10 +430,18 @@ EFI_STATUS Frees nonexistent I/O, reserved I/O, or I/O resources from the global coherency domain of the processor. - @param BaseAddress Base address of the segment. - @param Length Length of the segment. + @param BaseAddress The physical address that is the start address of the I/O resource being freed. + @param Length The size in bytes of the I/O resource range that is being freed. - @retval EFI_SUCCESS Space successfully freed. + @retval EFI_SUCCESS The I/O resource was freed from the global coherency domain of the + processor. + @retval EFI_INVALID_PARAMETER Length is zero. + @retval EFI_UNSUPPORTED The processor does not support one or more bytes of the I/O resource + range specified by BaseAddress and Length. + @retval EFI_NOT_FOUND The I/O resource range specified by BaseAddress and Length + was not allocated with previous calls to AllocateIoSpace(). + @retval EFI_OUT_OF_RESOURCES There are not enough system resources to free the I/O resource from + the global coherency domain of the processor. **/ typedef @@ -360,10 +456,23 @@ EFI_STATUS Removes reserved I/O or I/O resources from the global coherency domain of the processor. - @param BaseAddress Base address of the segment. - @param Length Length of the segment. - - @retval EFI_SUCCESS Successfully removed a segment of IO space. + @param BaseAddress A pointer to a physical address that is the start address of the I/O resource being + removed. + @param Length The size in bytes of the I/O resource that is being removed. + + @retval EFI_SUCCESS The I/O resource was removed from the global coherency domain + of the processor. + @retval EFI_INVALID_PARAMETER Length is zero. + @retval EFI_UNSUPPORTED The processor does not support one or more bytes of the I/O + resource range specified by BaseAddress and Length. + @retval EFI_NOT_FOUND One or more bytes of the I/O resource range specified by + BaseAddress and Length was not added with previous + calls to AddIoSpace(). + @retval EFI_ACCESS_DENIED One or more bytes of the I/O resource range specified by + BaseAddress and Length has been allocated with + AllocateIoSpace(). + @retval EFI_OUT_OF_RESOURCES There are not enough system resources to remove the I/O + resource from the global coherency domain of the processor. **/ typedef @@ -377,11 +486,13 @@ EFI_STATUS /** Retrieves the descriptor for an I/O region containing a specified address. - @param BaseAddress Specified start address - @param Descriptor Specified length + @param BaseAddress The physical address that is the start address of an I/O region. + @param Descriptor A pointer to a caller allocated descriptor. + @retval EFI_SUCCESS The descriptor for the I/O resource region containing + BaseAddress was returned in Descriptor. @retval EFI_INVALID_PARAMETER Descriptor is NULL. - @retval EFI_SUCCESS Successfully get the IO space descriptor. + @retval EFI_NOT_FOUND An I/O resource range containing BaseAddress was not found. **/ typedef @@ -395,12 +506,16 @@ EFI_STATUS /** Returns a map of the I/O resources in the global coherency domain of the processor. - @param NumberOfDescriptors Number of descriptors. - @param MemorySpaceMap Descriptor array + @param NumberOfDescriptors A pointer to number of descriptors returned in the IoSpaceMap buffer. + @param MemorySpaceMap A pointer to the array of EFI_GCD_IO_SPACE_DESCRIPTORs. + + @retval EFI_SUCCESS The I/O space map was returned in the IoSpaceMap buffer, and + the number of descriptors in IoSpaceMap was returned in + NumberOfDescriptors. + @retval EFI_INVALID_PARAMETER NumberOfDescriptors is NULL. + @retval EFI_INVALID_PARAMETER IoSpaceMap is NULL. + @retval EFI_OUT_OF_RESOURCES There are not enough resources to allocate IoSpaceMap. - @retval EFI_INVALID_PARAMETER Invalid parameter - @retval EFI_OUT_OF_RESOURCES No enough buffer to allocate - @retval EFI_SUCCESS Successfully get IO space map. **/ typedef @@ -416,7 +531,17 @@ EFI_STATUS /** Loads and executed DXE drivers from firmware volumes. - @return Status of dispatching and execution DXE drivers. + The Dispatch() function searches for DXE drivers in firmware volumes that have been + installed since the last time the Dispatch() service was called. It then evaluates + the dependency expressions of all the DXE drivers and loads and executes those DXE + drivers whose dependency expression evaluate to TRUE. This service must interact with + the Security Architectural Protocol to authenticate DXE drivers before they are executed. + This process is continued until no more DXE drivers can be executed. + + @retval EFI_SUCCESS One or more DXE driver were dispatched. + @retval EFI_NOT_FOUND No DXE drivers were dispatched. + @retval EFI_ALREADY_STARTED An attempt is being made to start the DXE Dispatcher recursively. + Thus no action was taken. **/ typedef @@ -430,16 +555,18 @@ EFI_STATUS Clears the Schedule on Request (SOR) flag for a component that is stored in a firmware volume. @param FirmwareVolumeHandle The handle of the firmware volume that contains the file specified by FileName. - @param DriverName A pointer to the name of the file in a firmware volume. + @param FileName A pointer to the name of the file in a firmware volume. - @return Status of clearing SOR. + @retval EFI_SUCCESS The DXE driver was found and its SOR bit was cleared. + @retval EFI_NOT_FOUND The DXE driver does not exist, or the DXE driver exists and its SOR + bit is not set. **/ typedef EFI_STATUS (EFIAPI *EFI_SCHEDULE)( IN EFI_HANDLE FirmwareVolumeHandle, - IN EFI_GUID *DriverName + IN CONST EFI_GUID *FileName ) ; @@ -451,13 +578,14 @@ EFI_STATUS @return Status of promoting FFS from untrusted to trusted state. + @retval EFI_NOT_FOUND The file was not found in the untrusted state. **/ typedef EFI_STATUS (EFIAPI *EFI_TRUST)( IN EFI_HANDLE FirmwareVolumeHandle, - IN EFI_GUID *DriverName + IN CONST EFI_GUID *FileName ) ; @@ -468,13 +596,21 @@ EFI_STATUS @param Size The size, in bytes, of the firmware volume. @param FirmwareVolumeHandle On output, a pointer to the created handle. - @return Status of processing FV. + @retval EFI_SUCCESS The EFI_FIRMWARE_VOLUME_PROTOCOL and + EFI_DEVICE_PATH_PROTOCOL were installed onto + FirmwareVolumeHandle for the firmware volume described + by FirmwareVolumeHeader and Size. + @retval EFI_VOLUME_CORRUPTED The firmware volume described by FirmwareVolumeHeader + and Size is corrupted. + @retval EFI_OUT_OF_RESOURCES There are not enough system resources available to produce the + EFI_FIRMWARE_VOLUME_PROTOCOL and EFI_DEVICE_PATH_PROTOCOL + for the firmware volume described by FirmwareVolumeHeader and Size. **/ typedef EFI_STATUS (EFIAPI *EFI_PROCESS_FIRMWARE_VOLUME)( - IN VOID *FvHeader, + IN CONST VOID *FirmwareVolumeHeader, IN UINTN Size, OUT EFI_HANDLE *FirmwareVolumeHandle ) diff --git a/MdePkg/Include/Pi/PiFirmwareVolume.h b/MdePkg/Include/Pi/PiFirmwareVolume.h index 050d80fa73..a79e144aa8 100644 --- a/MdePkg/Include/Pi/PiFirmwareVolume.h +++ b/MdePkg/Include/Pi/PiFirmwareVolume.h @@ -35,7 +35,7 @@ typedef UINT32 EFI_FV_FILE_ATTRIBUTES; /// /// type of EFI FVB attribute /// -typedef UINT32 EFI_FVB_ATTRIBUTES; +typedef UINT32 EFI_FVB_ATTRIBUTES_2; // // Attributes bit definitions @@ -103,7 +103,7 @@ typedef struct { EFI_GUID FileSystemGuid; UINT64 FvLength; UINT32 Signature; - EFI_FVB_ATTRIBUTES Attributes; + EFI_FVB_ATTRIBUTES_2 Attributes; UINT16 HeaderLength; UINT16 Checksum; UINT16 ExtHeaderOffset; diff --git a/MdePkg/Include/Pi/PiPeiCis.h b/MdePkg/Include/Pi/PiPeiCis.h index 89bc24220d..e866a16da5 100644 --- a/MdePkg/Include/Pi/PiPeiCis.h +++ b/MdePkg/Include/Pi/PiPeiCis.h @@ -513,15 +513,12 @@ EFI_STATUS @param FileName A pointer to the name of the file to find within the firmware volume. - @param VolumeHandle The firmware volume to search FileHandle Upon exit, points to the found file's handle or NULL if it could not be found. @retval EFI_SUCCESS File was found. - @retval EFI_NOT_FOUND File was not found. - @retval EFI_INVALID_PARAMETER VolumeHandle or FileHandle or FileName was NULL. @@ -538,20 +535,16 @@ EFI_STATUS /** @param FileName Name of the file. - @param FileType File type. See EFI_FV_FILETYPE, which is defined in the Platform Initialization Firmware Storage Specification. - @param FileAttributes Attributes of the file. Type EFI_FV_FILE_ATTRIBUTES is defined in the Platform Initialization Firmware Storage Specification. - @param Buffer Points to the file's data (not the header). Not valid if EFI_FV_FILE_ATTRIB_MEMORY_MAPPED is zero. - @param BufferSize Size of the file's data. **/ @@ -564,22 +557,18 @@ typedef struct { } EFI_FV_FILE_INFO; /** - This function returns information about a specific file, including its file name, type, attributes, starting address and size. If the firmware volume is not memory mapped then the Buffer member will be NULL. @param FileHandle Handle of the file. - @param FileInfo Upon exit, points to the file's information. @retval EFI_SUCCESS File information returned. - @retval EFI_INVALID_PARAMETER If FileHandle does not represent a valid file. - @retval EFI_INVALID_PARAMETER If FileInfo is NULL. **/ @@ -594,7 +583,7 @@ EFI_STATUS /** @param FvAttributes Attributes of the firmware volume. Type - EFI_FVB_ATTRIBUTES is defined in the + EFI_FVB_ATTRIBUTES_2 is defined in the Platform Initialization Firmware Storage Specficiation. @@ -616,11 +605,11 @@ EFI_STATUS **/ typedef struct { - EFI_FVB_ATTRIBUTES FvAttributes; - EFI_GUID FvFormat; - EFI_GUID FvName; - VOID *FvStart; - UINT64 FvSize; + EFI_FVB_ATTRIBUTES_2 FvAttributes; + EFI_GUID FvFormat; + EFI_GUID FvName; + VOID *FvStart; + UINT64 FvSize; } EFI_FV_INFO; /** @@ -635,10 +624,8 @@ typedef struct { information. @retval EFI_SUCCESS File information returned. - @retval EFI_INVALID_PARAMETER If FileHandle does not represent a valid file. - @retval EFI_INVALID_PARAMETER If FileInfo is NULL. **/ @@ -664,14 +651,12 @@ EFI_STATUS @param FileHandle PEIM's file handle. Must be the currently executing PEIM. - @retval EFI_SUCCESS The PEIM was successfully registered for - shadowing. - + @retval EFI_SUCCESS The PEIM was successfully registered for + shadowing. @retval EFI_ALREADY_STARTED The PEIM was previously registered for shadowing. - - @retval EFI_NOT_FOUND The FileHandle does not refer to a - valid file handle. + @retval EFI_NOT_FOUND The FileHandle does not refer to a + valid file handle. **/ typedef -- cgit v1.2.3