Remove the dependence to MdePkg
1. add Include folder which contain the *.h file which used by Tiano tools. 2. Change ${evn.WORKSPACE}/MdePkg to ${PACKAGE_DIR} in build.xml. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@509 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@ -82,9 +82,9 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
outtype="static"
|
||||
optimize="speed">
|
||||
|
||||
<includepath path="${env.WORKSPACE}/MdePkg/Include"/>
|
||||
<includepath path="${env.WORKSPACE}/MdePkg/Include/Common"/>
|
||||
<includepath path="${env.WORKSPACE}/MdePkg/Include/Ia32"/>
|
||||
<includepath path="${PACKAGE_DIR}/Include"/>
|
||||
<includepath path="${PACKAGE_DIR}/Include/Common"/>
|
||||
<includepath path="${PACKAGE_DIR}/Include/Ia32"/>
|
||||
|
||||
<fileset dir="${basedir}/Common"
|
||||
includes="*.c" />
|
||||
|
@ -81,9 +81,9 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
outputfileproperty="result"
|
||||
>
|
||||
<fileset dir="${ToolName}" includes="${LibFileSet}" defaultexcludes="TRUE" excludes="*.xml *.inf"/>
|
||||
<includepath path="${env.WORKSPACE}/MdePkg/Include"/>
|
||||
<includepath path="${env.WORKSPACE}/MdePkg/Include/Ia32"/>
|
||||
<includepath path="${env.WORKSPACE}/MdePkg/Include/Common"/>
|
||||
<includepath path="${PACKAGE_DIR}/Include"/>
|
||||
<includepath path="${PACKAGE_DIR}/Include/Ia32"/>
|
||||
<includepath path="${PACKAGE_DIR}/Include/Common"/>
|
||||
<includepath path="${PACKAGE_DIR}/Common"/>
|
||||
<includepath path="${env.JAVA_HOME}/include"/>
|
||||
<includepath path="${env.JAVA_HOME}/include/win32" if="windows"/>
|
||||
|
@ -91,10 +91,10 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
defaultexcludes="TRUE"
|
||||
excludes="*.xml *.inf"/>
|
||||
|
||||
<includepath path="${env.WORKSPACE}/MdePkg/Include"/>
|
||||
<includepath path="${env.WORKSPACE}/MdePkg/Include/Ia32"/>
|
||||
<includepath path="${env.WORKSPACE}/MdePkg/Include/Common"/>
|
||||
<includepath path="${env.WORKSPACE}/MdePkg/Include/Protocol"/>
|
||||
<includepath path="${PACKAGE_DIR}/Include"/>
|
||||
<includepath path="${PACKAGE_DIR}/Include/Ia32"/>
|
||||
<includepath path="${PACKAGE_DIR}/Include/Common"/>
|
||||
<includepath path="${PACKAGE_DIR}/Include/Protocol"/>
|
||||
<includepath path="${PACKAGE_DIR}/Common"/>
|
||||
<libset dir="${LIB_DIR}" libs="CommonTools CustomizedCompress"/>
|
||||
</cc>
|
||||
|
@ -90,9 +90,9 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
defaultexcludes="TRUE"
|
||||
excludes="*.xml *.inf"/>
|
||||
|
||||
<includepath path="${env.WORKSPACE}/MdePkg/Include"/>
|
||||
<includepath path="${env.WORKSPACE}/MdePkg/Include/Common"/>
|
||||
<includepath path="${env.WORKSPACE}/MdePkg/Include/Ia32"/>
|
||||
<includepath path="${PACKAGE_DIR}/Include"/>
|
||||
<includepath path="${PACKAGE_DIR}/Include/Common"/>
|
||||
<includepath path="${PACKAGE_DIR}/Include/Ia32"/>
|
||||
</cc>
|
||||
<if>
|
||||
<os family="dos"/>
|
||||
|
@ -91,10 +91,10 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
defaultexcludes="TRUE"
|
||||
excludes="*.xml *.inf"/>
|
||||
|
||||
<includepath path="${env.WORKSPACE}/MdePkg/Include"/>
|
||||
<includepath path="${env.WORKSPACE}/MdePkg/Include/Ia32"/>
|
||||
<includepath path="${env.WORKSPACE}/MdePkg/Include/Common"/>
|
||||
<includepath path="${env.WORKSPACE}/MdePkg/Include/Protocol"/>
|
||||
<includepath path="${PACKAGE_DIR}/Include"/>
|
||||
<includepath path="${PACKAGE_DIR}/Include/Ia32"/>
|
||||
<includepath path="${PACKAGE_DIR}/Include/Common"/>
|
||||
<includepath path="${PACKAGE_DIR}/Include/Protocol"/>
|
||||
<includepath path="${PACKAGE_DIR}/Common"/>
|
||||
<libset dir="${LIB_DIR}" libs="CommonTools CustomizedCompress"/>
|
||||
</cc>
|
||||
|
@ -91,11 +91,11 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
defaultexcludes="TRUE"
|
||||
excludes="*.xml *.inf"/>
|
||||
|
||||
<includepath path="${env.WORKSPACE}/MdePkg/Include"/>
|
||||
<includepath path="${env.WORKSPACE}/MdePkg/Include/Ia32"/>
|
||||
<includepath path="${env.WORKSPACE}/MdePkg/Include/Common"/>
|
||||
<includepath path="${env.WORKSPACE}/MdePkg/Include/Protocol"/>
|
||||
<includepath path="${env.WORKSPACE}/MdePkg/Include/IndustryStandard"/>
|
||||
<includepath path="${PACKAGE_DIR}/Include"/>
|
||||
<includepath path="${PACKAGE_DIR}/Include/Ia32"/>
|
||||
<includepath path="${PACKAGE_DIR}/Include/Common"/>
|
||||
<includepath path="${PACKAGE_DIR}/Include/Protocol"/>
|
||||
<includepath path="${PACKAGE_DIR}/Include/IndustryStandard"/>
|
||||
<includepath path="${PACKAGE_DIR}/Common"/>
|
||||
<libset dir="${LIB_DIR}" libs="CommonTools CustomizedCompress"/>
|
||||
</cc>
|
||||
|
@ -96,10 +96,10 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
defaultexcludes="TRUE"
|
||||
excludes="*.xml *.inf"/>
|
||||
|
||||
<includepath path="${env.WORKSPACE}/MdePkg/Include"/>
|
||||
<includepath path="${env.WORKSPACE}/MdePkg/Include/Ia32"/>
|
||||
<includepath path="${env.WORKSPACE}/MdePkg/Include/Common"/>
|
||||
<includepath path="${env.WORKSPACE}/MdePkg/Include/Protocol"/>
|
||||
<includepath path="${PACKAGE_DIR}/Include"/>
|
||||
<includepath path="${PACKAGE_DIR}/Include/Ia32"/>
|
||||
<includepath path="${PACKAGE_DIR}/Include/Common"/>
|
||||
<includepath path="${PACKAGE_DIR}/Include/Protocol"/>
|
||||
<includepath path="${PACKAGE_DIR}/Common"/>
|
||||
<libset dir="${LIB_DIR}" libs="CommonTools CustomizedCompress"/>
|
||||
</cc>
|
||||
|
@ -90,9 +90,9 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
defaultexcludes="TRUE"
|
||||
excludes="*.xml *.inf"/>
|
||||
|
||||
<includepath path="${env.WORKSPACE}/MdePkg/Include"/>
|
||||
<includepath path="${env.WORKSPACE}/MdePkg/Include/Common"/>
|
||||
<includepath path="${env.WORKSPACE}/MdePkg/Include/Ia32"/>
|
||||
<includepath path="${PACKAGE_DIR}/Include"/>
|
||||
<includepath path="${PACKAGE_DIR}/Include/Common"/>
|
||||
<includepath path="${PACKAGE_DIR}/Include/Ia32"/>
|
||||
<includepath path="${PACKAGE_DIR}/Common"/>
|
||||
<libset dir="${LIB_DIR}" libs="CommonTools"/>
|
||||
</cc>
|
||||
|
@ -91,10 +91,10 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
defaultexcludes="TRUE"
|
||||
excludes="*.xml *.inf"/>
|
||||
|
||||
<includepath path="${env.WORKSPACE}/MdePkg/Include"/>
|
||||
<includepath path="${env.WORKSPACE}/MdePkg/Include/Ia32"/>
|
||||
<includepath path="${env.WORKSPACE}/MdePkg/Include/Common"/>
|
||||
<includepath path="${env.WORKSPACE}/MdePkg/Include/Protocol"/>
|
||||
<includepath path="${PACKAGE_DIR}/Include"/>
|
||||
<includepath path="${PACKAGE_DIR}/Include/Ia32"/>
|
||||
<includepath path="${PACKAGE_DIR}/Include/Common"/>
|
||||
<includepath path="${PACKAGE_DIR}/Include/Protocol"/>
|
||||
<includepath path="${PACKAGE_DIR}/Common"/>
|
||||
<libset dir="${LIB_DIR}" libs="CommonTools CustomizedCompress"/>
|
||||
</cc>
|
||||
|
@ -88,9 +88,9 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
<fileset dir="${basedir}/${ToolName}"
|
||||
includes="${FileSet}"/>
|
||||
|
||||
<includepath path="${env.WORKSPACE}/MdePkg/Include"/>
|
||||
<includepath path="${env.WORKSPACE}/MdePkg/Include/Common"/>
|
||||
<includepath path="${env.WORKSPACE}/MdePkg/Include/Ia32"/>
|
||||
<includepath path="${PACKAGE_DIR}/Include"/>
|
||||
<includepath path="${PACKAGE_DIR}/Include/Common"/>
|
||||
<includepath path="${PACKAGE_DIR}/Include/Ia32"/>
|
||||
<includepath path="${PACKAGE_DIR}/Common"/>
|
||||
<libset dir="${LIB_DIR}" libs="CommonTools"/>
|
||||
|
||||
|
@ -91,10 +91,10 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
defaultexcludes="TRUE"
|
||||
excludes="*.xml *.inf"/>
|
||||
|
||||
<includepath path="${env.WORKSPACE}/MdePkg/Include"/>
|
||||
<includepath path="${env.WORKSPACE}/MdePkg/Include/Ia32"/>
|
||||
<includepath path="${env.WORKSPACE}/MdePkg/Include/Common"/>
|
||||
<includepath path="${env.WORKSPACE}/MdePkg/Include/Protocol"/>
|
||||
<includepath path="${PACKAGE_DIR}/Include"/>
|
||||
<includepath path="${PACKAGE_DIR}/Include/Ia32"/>
|
||||
<includepath path="${PACKAGE_DIR}/Include/Common"/>
|
||||
<includepath path="${PACKAGE_DIR}/Include/Protocol"/>
|
||||
<includepath path="${PACKAGE_DIR}/Common"/>
|
||||
<libset dir="${LIB_DIR}" libs="CommonTools CustomizedCompress"/>
|
||||
</cc>
|
||||
|
@ -89,9 +89,9 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
<fileset dir="${basedir}/${ToolName}"
|
||||
includes="${FileSet}" />
|
||||
|
||||
<includepath path="${env.WORKSPACE}/MdePkg/Include"/>
|
||||
<includepath path="${env.WORKSPACE}/MdePkg/Include/Common"/>
|
||||
<includepath path="${env.WORKSPACE}/MdePkg/Include/Ia32"/>
|
||||
<includepath path="${PACKAGE_DIR}/Include"/>
|
||||
<includepath path="${PACKAGE_DIR}/Include/Common"/>
|
||||
<includepath path="${PACKAGE_DIR}/Include/Ia32"/>
|
||||
<includepath path="${PACKAGE_DIR}/Common"/>
|
||||
<libset dir="${LIB_DIR}" libs="CommonTools"/>
|
||||
</cc>
|
||||
|
@ -91,10 +91,10 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
defaultexcludes="TRUE"
|
||||
excludes="*.xml *.inf"/>
|
||||
|
||||
<includepath path="${env.WORKSPACE}/MdePkg/Include"/>
|
||||
<includepath path="${env.WORKSPACE}/MdePkg/Include/Ia32"/>
|
||||
<includepath path="${env.WORKSPACE}/MdePkg/Include/Common"/>
|
||||
<includepath path="${env.WORKSPACE}/MdePkg/Include/Protocol"/>
|
||||
<includepath path="${PACKAGE_DIR}/Include"/>
|
||||
<includepath path="${PACKAGE_DIR}/Include/Ia32"/>
|
||||
<includepath path="${PACKAGE_DIR}/Include/Common"/>
|
||||
<includepath path="${PACKAGE_DIR}/Include/Protocol"/>
|
||||
<includepath path="${PACKAGE_DIR}/Common"/>
|
||||
<libset dir="${LIB_DIR}" libs="CommonTools CustomizedCompress"/>
|
||||
</cc>
|
||||
|
@ -122,13 +122,13 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
includes="${FileSet}"/>
|
||||
|
||||
<includepath path="${PACKAGE_DIR}/${ToolName}"/>
|
||||
<includepath path="${env.WORKSPACE}/MdePkg/Include"/>
|
||||
<includepath path="${env.WORKSPACE}/MdePkg/Include"/>
|
||||
<includepath path="${env.WORKSPACE}/MdePkg/Include/Ia32"/>
|
||||
<includepath path="${env.WORKSPACE}/MdePkg/Include/Common"/>
|
||||
<includepath path="${env.WORKSPACE}/MdePkg/Include/Protocol"/>
|
||||
<includepath path="${env.WORKSPACE}/MdePkg/Include/Library"/>
|
||||
<includepath path="${env.WORKSPACE}/MdePkg/Include/ToBeRemoved"/>
|
||||
<includepath path="${PACKAGE_DIR}/Include"/>
|
||||
<includepath path="${PACKAGE_DIR}/Include"/>
|
||||
<includepath path="${PACKAGE_DIR}/Include/Ia32"/>
|
||||
<includepath path="${PACKAGE_DIR}/Include/Common"/>
|
||||
<includepath path="${PACKAGE_DIR}/Include/Protocol"/>
|
||||
<includepath path="${PACKAGE_DIR}/Include/Library"/>
|
||||
<includepath path="${PACKAGE_DIR}/Include/ToBeRemoved"/>
|
||||
<includepath path="${PACKAGE_DIR}/Common"/>
|
||||
<libset dir="${LIB_DIR}" libs="CommonTools CustomizedCompress"/>
|
||||
<linkerarg value="/nodefaultlib:libc.lib" unless="gcc"/>
|
||||
|
@ -91,10 +91,10 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
defaultexcludes="TRUE"
|
||||
excludes="*.xml *.inf"/>
|
||||
|
||||
<includepath path="${env.WORKSPACE}/MdePkg/Include"/>
|
||||
<includepath path="${env.WORKSPACE}/MdePkg/Include/Ia32"/>
|
||||
<includepath path="${env.WORKSPACE}/MdePkg/Include/Common"/>
|
||||
<includepath path="${env.WORKSPACE}/MdePkg/Include/Protocol"/>
|
||||
<includepath path="${PACKAGE_DIR}/Include"/>
|
||||
<includepath path="${PACKAGE_DIR}/Include/Ia32"/>
|
||||
<includepath path="${PACKAGE_DIR}/Include/Common"/>
|
||||
<includepath path="${PACKAGE_DIR}/Include/Protocol"/>
|
||||
<includepath path="${PACKAGE_DIR}/Common"/>
|
||||
<libset dir="${LIB_DIR}" libs="CommonTools CustomizedCompress"/>
|
||||
</cc>
|
||||
|
@ -91,10 +91,10 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
defaultexcludes="TRUE"
|
||||
excludes="*.xml *.inf"/>
|
||||
|
||||
<includepath path="${env.WORKSPACE}/MdePkg/Include"/>
|
||||
<includepath path="${env.WORKSPACE}/MdePkg/Include/Ia32"/>
|
||||
<includepath path="${env.WORKSPACE}/MdePkg/Include/Common"/>
|
||||
<includepath path="${env.WORKSPACE}/MdePkg/Include/Protocol"/>
|
||||
<includepath path="${PACKAGE_DIR}/Include"/>
|
||||
<includepath path="${PACKAGE_DIR}/Include/Ia32"/>
|
||||
<includepath path="${PACKAGE_DIR}/Include/Common"/>
|
||||
<includepath path="${PACKAGE_DIR}/Include/Protocol"/>
|
||||
<includepath path="${PACKAGE_DIR}/Common"/>
|
||||
<libset dir="${LIB_DIR}" libs="CommonTools CustomizedCompress"/>
|
||||
</cc>
|
||||
|
@ -91,11 +91,11 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
defaultexcludes="TRUE"
|
||||
excludes="*.xml *.inf"/>
|
||||
|
||||
<includepath path="${env.WORKSPACE}/MdePkg/Include"/>
|
||||
<includepath path="${env.WORKSPACE}/MdePkg/Include/Ia32"/>
|
||||
<includepath path="${env.WORKSPACE}/MdePkg/Include/Common"/>
|
||||
<includepath path="${env.WORKSPACE}/MdePkg/Include/Guid"/>
|
||||
<includepath path="${env.WORKSPACE}/MdePkg/Include/Protocol"/>
|
||||
<includepath path="${PACKAGE_DIR}/Include"/>
|
||||
<includepath path="${PACKAGE_DIR}/Include/Ia32"/>
|
||||
<includepath path="${PACKAGE_DIR}/Include/Common"/>
|
||||
<includepath path="${PACKAGE_DIR}/Include/Guid"/>
|
||||
<includepath path="${PACKAGE_DIR}/Include/Protocol"/>
|
||||
<includepath path="${PACKAGE_DIR}/Common"/>
|
||||
<linkerarg value="${LIB_DIR}/CommonTools.lib"/>
|
||||
<linkerarg value="${LIB_DIR}/CustomizedCompress.lib"/>
|
||||
|
28
Tools/Source/TianoTools/Include/Base.h
Normal file
28
Tools/Source/TianoTools/Include/Base.h
Normal file
@ -0,0 +1,28 @@
|
||||
/** @file
|
||||
|
||||
Root include file for Mde Package Base type modules
|
||||
|
||||
This is the include file for any module of type base. Base modules only use
|
||||
types defined via this include file and can be ported easily to any
|
||||
environment. There are a set of base libraries in the Mde Package that can
|
||||
be used to implement base modules.
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
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
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
**/
|
||||
|
||||
|
||||
#ifndef __BASE_H__
|
||||
#define __BASE_H__
|
||||
|
||||
#include <Common/BaseTypes.h>
|
||||
#include <Common/EfiImage.h>
|
||||
|
||||
#endif
|
206
Tools/Source/TianoTools/Include/Common/BaseTypes.h
Normal file
206
Tools/Source/TianoTools/Include/Common/BaseTypes.h
Normal file
@ -0,0 +1,206 @@
|
||||
/** @file
|
||||
Processor or Compiler specific defines for all supported processors.
|
||||
|
||||
This file is stand alone self consistent set of definitions.
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
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
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
Module Name: BaseTypes.h
|
||||
|
||||
**/
|
||||
|
||||
#ifndef __BASE_TYPES_H__
|
||||
#define __BASE_TYPES_H__
|
||||
|
||||
//
|
||||
// Include processor specific binding
|
||||
//
|
||||
#include <ProcessorBind.h>
|
||||
|
||||
#define MEMORY_FENCE() MemoryFence ()
|
||||
#define BREAKPOINT() CpuBreakpoint ()
|
||||
#define DEADLOOP() CpuDeadLoop ()
|
||||
|
||||
typedef struct {
|
||||
UINT32 Data1;
|
||||
UINT16 Data2;
|
||||
UINT16 Data3;
|
||||
UINT8 Data4[8];
|
||||
} GUID;
|
||||
|
||||
|
||||
//
|
||||
// Modifiers to absract standard types to aid in debug of problems
|
||||
//
|
||||
#define CONST const
|
||||
#define STATIC static
|
||||
#define VOID void
|
||||
|
||||
//
|
||||
// Modifiers for Data Types used to self document code.
|
||||
// This concept is borrowed for UEFI specification.
|
||||
//
|
||||
#ifndef IN
|
||||
//
|
||||
// Some other envirnments use this construct, so #ifndef to prevent
|
||||
// mulitple definition.
|
||||
//
|
||||
#define IN
|
||||
#define OUT
|
||||
#define OPTIONAL
|
||||
#endif
|
||||
|
||||
//
|
||||
// Constants. They may exist in other build structures, so #ifndef them.
|
||||
//
|
||||
#ifndef TRUE
|
||||
//
|
||||
// BugBug: UEFI specification claims 1 and 0. We are concerned about the
|
||||
// complier portability so we did it this way.
|
||||
//
|
||||
#define TRUE ((BOOLEAN)(1==1))
|
||||
#endif
|
||||
|
||||
#ifndef FALSE
|
||||
#define FALSE ((BOOLEAN)(0==1))
|
||||
#endif
|
||||
|
||||
#ifndef NULL
|
||||
#define NULL ((VOID *) 0)
|
||||
#endif
|
||||
|
||||
//
|
||||
// Support for variable length argument lists using the ANSI standard.
|
||||
//
|
||||
// Since we are using the ANSI standard we used the standard nameing and
|
||||
// did not folow the coding convention
|
||||
//
|
||||
// VA_LIST - typedef for argument list.
|
||||
// VA_START (VA_LIST Marker, argument before the ...) - Init Marker for use.
|
||||
// VA_END (VA_LIST Marker) - Clear Marker
|
||||
// VA_ARG (VA_LIST Marker, var arg size) - Use Marker to get an argumnet from
|
||||
// the ... list. You must know the size and pass it in this macro.
|
||||
//
|
||||
// example:
|
||||
//
|
||||
// UINTN
|
||||
// ExampleVarArg (
|
||||
// IN UINTN NumberOfArgs,
|
||||
// ...
|
||||
// )
|
||||
// {
|
||||
// VA_LIST Marker;
|
||||
// UINTN Index;
|
||||
// UINTN Result;
|
||||
//
|
||||
// //
|
||||
// // Initialize the Marker
|
||||
// //
|
||||
// VA_START (Marker, NumberOfArgs);
|
||||
// for (Index = 0, Result = 0; Index < NumberOfArgs; Index++) {
|
||||
// //
|
||||
// // The ... list is a series of UINTN values, so average them up.
|
||||
// //
|
||||
// Result += VA_ARG (Marker, UINTN);
|
||||
// }
|
||||
//
|
||||
// VA_END (Marker);
|
||||
// return Result
|
||||
// }
|
||||
//
|
||||
|
||||
#define _INT_SIZE_OF(n) ((sizeof (n) + sizeof (UINTN) - 1) &~(sizeof (UINTN) - 1))
|
||||
|
||||
//
|
||||
// Also support coding convention rules for var arg macros
|
||||
//
|
||||
#ifndef VA_START
|
||||
|
||||
typedef CHAR8 *VA_LIST;
|
||||
#define VA_START(ap, v) (ap = (VA_LIST) & (v) + _INT_SIZE_OF (v))
|
||||
#define VA_ARG(ap, t) (*(t *) ((ap += _INT_SIZE_OF (t)) - _INT_SIZE_OF (t)))
|
||||
#define VA_END(ap) (ap = (VA_LIST) 0)
|
||||
|
||||
#endif
|
||||
|
||||
///
|
||||
/// CONTAINING_RECORD - returns a pointer to the structure
|
||||
/// from one of it's elements.
|
||||
///
|
||||
#define _CR(Record, TYPE, Field) ((TYPE *) ((CHAR8 *) (Record) - (CHAR8 *) &(((TYPE *) 0)->Field)))
|
||||
|
||||
///
|
||||
/// ALIGN_POINTER - aligns a pointer to the lowest boundry
|
||||
///
|
||||
#define ALIGN_POINTER(p, s) ((VOID *) ((p) + (((s) - ((UINTN) (p))) & ((s) - 1))))
|
||||
|
||||
///
|
||||
/// ALIGN_VARIABLE - aligns a variable up to the next natural boundry for int size of a processor
|
||||
///
|
||||
#define ALIGN_VARIABLE(Value, Adjustment) \
|
||||
Adjustment = 0U; \
|
||||
if ((UINTN) (Value) % sizeof (UINTN)) { \
|
||||
(Adjustment) = (UINTN)(sizeof (UINTN) - ((UINTN) (Value) % sizeof (UINTN))); \
|
||||
} \
|
||||
(Value) = (UINTN)((UINTN) (Value) + (UINTN) (Adjustment))
|
||||
|
||||
//
|
||||
// EFI Error Codes common to all execution phases
|
||||
//
|
||||
|
||||
typedef INTN RETURN_STATUS;
|
||||
|
||||
///
|
||||
/// Set the upper bit to indicate EFI Error.
|
||||
///
|
||||
#define ENCODE_ERROR(a) (MAX_BIT | (a))
|
||||
|
||||
#define ENCODE_WARNING(a) (a)
|
||||
#define RETURN_ERROR(a) ((a) < 0)
|
||||
|
||||
#define RETURN_SUCCESS 0
|
||||
#define RETURN_LOAD_ERROR ENCODE_ERROR (1)
|
||||
#define RETURN_INVALID_PARAMETER ENCODE_ERROR (2)
|
||||
#define RETURN_UNSUPPORTED ENCODE_ERROR (3)
|
||||
#define RETURN_BAD_BUFFER_SIZE ENCODE_ERROR (4)
|
||||
#define RETURN_BUFFER_TOO_SMALL ENCODE_ERROR (5)
|
||||
#define RETURN_NOT_READY ENCODE_ERROR (6)
|
||||
#define RETURN_DEVICE_ERROR ENCODE_ERROR (7)
|
||||
#define RETURN_WRITE_PROTECTED ENCODE_ERROR (8)
|
||||
#define RETURN_OUT_OF_RESOURCES ENCODE_ERROR (9)
|
||||
#define RETURN_VOLUME_CORRUPTED ENCODE_ERROR (10)
|
||||
#define RETURN_VOLUME_FULL ENCODE_ERROR (11)
|
||||
#define RETURN_NO_MEDIA ENCODE_ERROR (12)
|
||||
#define RETURN_MEDIA_CHANGED ENCODE_ERROR (13)
|
||||
#define RETURN_NOT_FOUND ENCODE_ERROR (14)
|
||||
#define RETURN_ACCESS_DENIED ENCODE_ERROR (15)
|
||||
#define RETURN_NO_RESPONSE ENCODE_ERROR (16)
|
||||
#define RETURN_NO_MAPPING ENCODE_ERROR (17)
|
||||
#define RETURN_TIMEOUT ENCODE_ERROR (18)
|
||||
#define RETURN_NOT_STARTED ENCODE_ERROR (19)
|
||||
#define RETURN_ALREADY_STARTED ENCODE_ERROR (20)
|
||||
#define RETURN_ABORTED ENCODE_ERROR (21)
|
||||
#define RETURN_ICMP_ERROR ENCODE_ERROR (22)
|
||||
#define RETURN_TFTP_ERROR ENCODE_ERROR (23)
|
||||
#define RETURN_PROTOCOL_ERROR ENCODE_ERROR (24)
|
||||
#define RETURN_INCOMPATIBLE_VERSION ENCODE_ERROR (25)
|
||||
#define RETURN_SECURITY_VIOLATION ENCODE_ERROR (26)
|
||||
#define RETURN_CRC_ERROR ENCODE_ERROR (27)
|
||||
#define RETURN_END_OF_MEDIA ENCODE_ERROR (28)
|
||||
#define RETURN_END_OF_FILE ENCODE_ERROR (31)
|
||||
|
||||
#define RETURN_WARN_UNKNOWN_GLYPH ENCODE_WARNING (1)
|
||||
#define RETURN_WARN_DELETE_FAILURE ENCODE_WARNING (2)
|
||||
#define RETURN_WARN_WRITE_FAILURE ENCODE_WARNING (3)
|
||||
#define RETURN_WARN_BUFFER_TOO_SMALL ENCODE_WARNING (4)
|
||||
|
||||
typedef UINT64 PHYSICAL_ADDRESS;
|
||||
|
||||
#endif
|
37
Tools/Source/TianoTools/Include/Common/BootMode.h
Normal file
37
Tools/Source/TianoTools/Include/Common/BootMode.h
Normal file
@ -0,0 +1,37 @@
|
||||
/** @file
|
||||
This includes for the Boot mode information.
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
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
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
Module Name: BootMode.h
|
||||
|
||||
@par Revision Reference:
|
||||
These definitions are from PeiCis 0.91 spec.
|
||||
|
||||
**/
|
||||
|
||||
#ifndef __EFI_BOOT_MODE_H__
|
||||
#define __EFI_BOOT_MODE_H__
|
||||
|
||||
#define BOOT_WITH_FULL_CONFIGURATION 0x00
|
||||
#define BOOT_WITH_MINIMAL_CONFIGURATION 0x01
|
||||
#define BOOT_ASSUMING_NO_CONFIGURATION_CHANGES 0x02
|
||||
#define BOOT_WITH_FULL_CONFIGURATION_PLUS_DIAGNOSTICS 0x03
|
||||
#define BOOT_WITH_DEFAULT_SETTINGS 0x04
|
||||
#define BOOT_ON_S4_RESUME 0x05
|
||||
#define BOOT_ON_S5_RESUME 0x06
|
||||
#define BOOT_ON_S2_RESUME 0x10
|
||||
#define BOOT_ON_S3_RESUME 0x11
|
||||
#define BOOT_ON_FLASH_UPDATE 0x12
|
||||
#define BOOT_IN_RECOVERY_MODE 0x20
|
||||
#define BOOT_IN_RECOVERY_MODE_MASK 0x40
|
||||
#define BOOT_SPECIAL_MASK 0x80
|
||||
|
||||
#endif
|
198
Tools/Source/TianoTools/Include/Common/BootScript.h
Normal file
198
Tools/Source/TianoTools/Include/Common/BootScript.h
Normal file
@ -0,0 +1,198 @@
|
||||
/** @file
|
||||
This file declares the related BootScript definitions and some SMBus definitions.
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
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
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
Module Name: BootScript.h
|
||||
|
||||
@par Revision Reference:
|
||||
These definitions are defined in BootScript Spec 0.91 and SmBus PPI spec 0.9.
|
||||
|
||||
**/
|
||||
|
||||
#ifndef _EFI_SCRIPT_H_
|
||||
#define _EFI_SCRIPT_H_
|
||||
|
||||
#define EFI_ACPI_S3_RESUME_SCRIPT_TABLE 0x00
|
||||
|
||||
//
|
||||
// Boot Script Opcode Definitions
|
||||
//
|
||||
|
||||
#define EFI_BOOT_SCRIPT_IO_WRITE_OPCODE 0x00
|
||||
#define EFI_BOOT_SCRIPT_IO_READ_WRITE_OPCODE 0x01
|
||||
#define EFI_BOOT_SCRIPT_MEM_WRITE_OPCODE 0x02
|
||||
#define EFI_BOOT_SCRIPT_MEM_READ_WRITE_OPCODE 0x03
|
||||
#define EFI_BOOT_SCRIPT_PCI_CONFIG_WRITE_OPCODE 0x04
|
||||
#define EFI_BOOT_SCRIPT_PCI_CONFIG_READ_WRITE_OPCODE 0x05
|
||||
#define EFI_BOOT_SCRIPT_SMBUS_EXECUTE_OPCODE 0x06
|
||||
#define EFI_BOOT_SCRIPT_STALL_OPCODE 0x07
|
||||
#define EFI_BOOT_SCRIPT_DISPATCH_OPCODE 0x08
|
||||
|
||||
#define EFI_BOOT_SCRIPT_TABLE_OPCODE 0xAA
|
||||
#define EFI_BOOT_SCRIPT_TERMINATE_OPCODE 0xFF
|
||||
|
||||
//
|
||||
// EFI Boot Script Width
|
||||
//
|
||||
typedef enum {
|
||||
EfiBootScriptWidthUint8,
|
||||
EfiBootScriptWidthUint16,
|
||||
EfiBootScriptWidthUint32,
|
||||
EfiBootScriptWidthUint64,
|
||||
EfiBootScriptWidthFifoUint8,
|
||||
EfiBootScriptWidthFifoUint16,
|
||||
EfiBootScriptWidthFifoUint32,
|
||||
EfiBootScriptWidthFifoUint64,
|
||||
EfiBootScriptWidthFillUint8,
|
||||
EfiBootScriptWidthFillUint16,
|
||||
EfiBootScriptWidthFillUint32,
|
||||
EfiBootScriptWidthFillUint64,
|
||||
EfiBootScriptWidthMaximum
|
||||
} EFI_BOOT_SCRIPT_WIDTH;
|
||||
|
||||
//
|
||||
// EFI Smbus Device Address, Smbus Device Command, Smbus Operation
|
||||
//
|
||||
typedef struct {
|
||||
UINTN SmbusDeviceAddress : 7;
|
||||
} EFI_SMBUS_DEVICE_ADDRESS;
|
||||
|
||||
typedef UINTN EFI_SMBUS_DEVICE_COMMAND;
|
||||
|
||||
typedef enum _EFI_SMBUS_OPERATION
|
||||
{
|
||||
EfiSmbusQuickRead,
|
||||
EfiSmbusQuickWrite,
|
||||
EfiSmbusReceiveByte,
|
||||
EfiSmbusSendByte,
|
||||
EfiSmbusReadByte,
|
||||
EfiSmbusWriteByte,
|
||||
EfiSmbusReadWord,
|
||||
EfiSmbusWriteWord,
|
||||
EfiSmbusReadBlock,
|
||||
EfiSmbusWriteBlock,
|
||||
EfiSmbusProcessCall,
|
||||
EfiSmbusBWBRProcessCall
|
||||
} EFI_SMBUS_OPERATION;
|
||||
|
||||
//
|
||||
// Boot Script Opcode Header Structure Definitions
|
||||
//
|
||||
|
||||
typedef struct {
|
||||
UINT16 OpCode;
|
||||
UINT8 Length;
|
||||
} EFI_BOOT_SCRIPT_GENERIC_HEADER;
|
||||
|
||||
typedef struct {
|
||||
UINT16 OpCode;
|
||||
UINT8 Length;
|
||||
UINT16 Version;
|
||||
UINT32 TableLength;
|
||||
UINT16 Reserved[2];
|
||||
} EFI_BOOT_SCRIPT_TABLE_HEADER;
|
||||
|
||||
typedef struct {
|
||||
UINT16 OpCode;
|
||||
UINT8 Length;
|
||||
EFI_BOOT_SCRIPT_WIDTH Width;
|
||||
} EFI_BOOT_SCRIPT_COMMON_HEADER;
|
||||
|
||||
typedef struct {
|
||||
UINT16 OpCode;
|
||||
UINT8 Length;
|
||||
EFI_BOOT_SCRIPT_WIDTH Width;
|
||||
UINTN Count;
|
||||
UINT64 Address;
|
||||
} EFI_BOOT_SCRIPT_IO_WRITE;
|
||||
|
||||
typedef struct {
|
||||
UINT16 OpCode;
|
||||
UINT8 Length;
|
||||
EFI_BOOT_SCRIPT_WIDTH Width;
|
||||
UINT64 Address;
|
||||
} EFI_BOOT_SCRIPT_IO_READ_WRITE;
|
||||
|
||||
typedef struct {
|
||||
UINT16 OpCode;
|
||||
UINT8 Length;
|
||||
EFI_BOOT_SCRIPT_WIDTH Width;
|
||||
UINTN Count;
|
||||
UINT64 Address;
|
||||
} EFI_BOOT_SCRIPT_MEM_WRITE;
|
||||
|
||||
typedef struct {
|
||||
UINT16 OpCode;
|
||||
UINT8 Length;
|
||||
EFI_BOOT_SCRIPT_WIDTH Width;
|
||||
UINT64 Address;
|
||||
} EFI_BOOT_SCRIPT_MEM_READ_WRITE;
|
||||
|
||||
typedef struct {
|
||||
UINT16 OpCode;
|
||||
UINT8 Length;
|
||||
EFI_BOOT_SCRIPT_WIDTH Width;
|
||||
UINTN Count;
|
||||
UINT64 Address;
|
||||
} EFI_BOOT_SCRIPT_PCI_CONFIG_WRITE;
|
||||
|
||||
typedef struct {
|
||||
UINT16 OpCode;
|
||||
UINT8 Length;
|
||||
EFI_BOOT_SCRIPT_WIDTH Width;
|
||||
UINT64 Address;
|
||||
} EFI_BOOT_SCRIPT_PCI_CONFIG_READ_WRITE;
|
||||
|
||||
typedef struct {
|
||||
UINT16 OpCode;
|
||||
UINT8 Length;
|
||||
EFI_SMBUS_DEVICE_ADDRESS SlaveAddress;
|
||||
EFI_SMBUS_DEVICE_COMMAND Command;
|
||||
EFI_SMBUS_OPERATION Operation;
|
||||
BOOLEAN PecCheck;
|
||||
UINTN DataSize;
|
||||
} EFI_BOOT_SCRIPT_SMBUS_EXECUTE;
|
||||
|
||||
typedef struct {
|
||||
UINT16 OpCode;
|
||||
UINT8 Length;
|
||||
UINTN Duration;
|
||||
} EFI_BOOT_SCRIPT_STALL;
|
||||
|
||||
typedef struct {
|
||||
UINT16 OpCode;
|
||||
UINT8 Length;
|
||||
EFI_PHYSICAL_ADDRESS EntryPoint;
|
||||
} EFI_BOOT_SCRIPT_DISPATCH;
|
||||
|
||||
typedef struct {
|
||||
UINT16 OpCode;
|
||||
UINT8 Length;
|
||||
} EFI_BOOT_SCRIPT_TERMINATE;
|
||||
|
||||
typedef union {
|
||||
EFI_BOOT_SCRIPT_GENERIC_HEADER *Header;
|
||||
EFI_BOOT_SCRIPT_TABLE_HEADER *TableInfo;
|
||||
EFI_BOOT_SCRIPT_IO_WRITE *IoWrite;
|
||||
EFI_BOOT_SCRIPT_IO_READ_WRITE *IoReadWrite;
|
||||
EFI_BOOT_SCRIPT_MEM_WRITE *MemWrite;
|
||||
EFI_BOOT_SCRIPT_MEM_READ_WRITE *MemReadWrite;
|
||||
EFI_BOOT_SCRIPT_PCI_CONFIG_WRITE *PciWrite;
|
||||
EFI_BOOT_SCRIPT_PCI_CONFIG_READ_WRITE *PciReadWrite;
|
||||
EFI_BOOT_SCRIPT_SMBUS_EXECUTE *SmbusExecute;
|
||||
EFI_BOOT_SCRIPT_STALL *Stall;
|
||||
EFI_BOOT_SCRIPT_DISPATCH *Dispatch;
|
||||
EFI_BOOT_SCRIPT_TERMINATE *Terminate;
|
||||
EFI_BOOT_SCRIPT_COMMON_HEADER *CommonHeader;
|
||||
UINT8 *Raw;
|
||||
} BOOT_SCRIPT_POINTERS;
|
||||
|
||||
#endif
|
67
Tools/Source/TianoTools/Include/Common/Capsule.h
Normal file
67
Tools/Source/TianoTools/Include/Common/Capsule.h
Normal file
@ -0,0 +1,67 @@
|
||||
/** @file
|
||||
Defines for the EFI Capsule functionality.
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
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
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
Module Name: Capsule.h
|
||||
|
||||
@par Revision Reference:
|
||||
These definitions are from Capsule Spec Version 0.9.
|
||||
|
||||
**/
|
||||
|
||||
#ifndef _EFI_CAPSULE_H_
|
||||
#define _EFI_CAPSULE_H_
|
||||
|
||||
//
|
||||
// Bits in the flags field of the capsule header
|
||||
//
|
||||
#define EFI_CAPSULE_HEADER_FLAG_SETUP 0x00000001 // supports setup changes
|
||||
|
||||
|
||||
#define CAPSULE_BLOCK_DESCRIPTOR_SIGNATURE EFI_SIGNATURE_32 ('C', 'B', 'D', 'S')
|
||||
|
||||
//
|
||||
// An array of these describe the blocks that make up a capsule for
|
||||
// a capsule update.
|
||||
//
|
||||
typedef struct {
|
||||
UINT64 Length; // length of the data block
|
||||
EFI_PHYSICAL_ADDRESS Data; // physical address of the data block
|
||||
UINT32 Signature; // CBDS
|
||||
UINT32 CheckSum; // to sum this structure to 0
|
||||
} EFI_CAPSULE_BLOCK_DESCRIPTOR;
|
||||
|
||||
typedef struct {
|
||||
EFI_GUID OemGuid;
|
||||
UINT32 HeaderSize;
|
||||
//
|
||||
// UINT8 OemHdrData[];
|
||||
//
|
||||
} EFI_CAPSULE_OEM_HEADER;
|
||||
|
||||
typedef struct {
|
||||
EFI_GUID CapsuleGuid;
|
||||
UINT32 HeaderSize;
|
||||
UINT32 Flags;
|
||||
UINT32 CapsuleImageSize;
|
||||
UINT32 SequenceNumber;
|
||||
EFI_GUID InstanceId;
|
||||
UINT32 OffsetToSplitInformation;
|
||||
UINT32 OffsetToCapsuleBody;
|
||||
UINT32 OffsetToOemDefinedHeader;
|
||||
UINT32 OffsetToAuthorInformation;
|
||||
UINT32 OffsetToRevisionInformation;
|
||||
UINT32 OffsetToShortDescription;
|
||||
UINT32 OffsetToLongDescription;
|
||||
UINT32 OffsetToApplicableDevices;
|
||||
} EFI_CAPSULE_HEADER;
|
||||
|
||||
#endif // #ifndef _EFI_CAPSULE_H_
|
1847
Tools/Source/TianoTools/Include/Common/DataHubRecords.h
Normal file
1847
Tools/Source/TianoTools/Include/Common/DataHubRecords.h
Normal file
File diff suppressed because it is too large
Load Diff
50
Tools/Source/TianoTools/Include/Common/Dependency.h
Normal file
50
Tools/Source/TianoTools/Include/Common/Dependency.h
Normal file
@ -0,0 +1,50 @@
|
||||
/** @file
|
||||
This module contains data specific to dependency expressions
|
||||
and local function prototypes.
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
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
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
Module Name: Dependency.h
|
||||
|
||||
**/
|
||||
|
||||
#ifndef __DEPENDENCY_H__
|
||||
#define __DEPENDENCY_H__
|
||||
|
||||
/// EFI_DEP_BEFORE - If present, this must be the first and only opcode
|
||||
#define EFI_DEP_BEFORE 0x00
|
||||
|
||||
/// EFI_DEP_AFTER - If present, this must be the first and only opcode
|
||||
#define EFI_DEP_AFTER 0x01
|
||||
|
||||
#define EFI_DEP_PUSH 0x02
|
||||
#define EFI_DEP_AND 0x03
|
||||
#define EFI_DEP_OR 0x04
|
||||
#define EFI_DEP_NOT 0x05
|
||||
#define EFI_DEP_TRUE 0x06
|
||||
#define EFI_DEP_FALSE 0x07
|
||||
#define EFI_DEP_END 0x08
|
||||
|
||||
/// EFI_DEP_SOR - If present, this must be the first opcode
|
||||
#define EFI_DEP_SOR 0x09
|
||||
|
||||
///
|
||||
/// EFI_DEP_REPLACE_TRUE - Used to dynamically patch the dependecy expression
|
||||
/// to save time. A EFI_DEP_PUSH is evauated one an
|
||||
/// replaced with EFI_DEP_REPLACE_TRUE
|
||||
///
|
||||
#define EFI_DEP_REPLACE_TRUE 0xff
|
||||
|
||||
///
|
||||
/// Define the initial size of the dependency expression evaluation stack
|
||||
///
|
||||
#define DEPEX_STACK_SIZE_INCREMENT 0x1000
|
||||
|
||||
#endif
|
698
Tools/Source/TianoTools/Include/Common/EfiImage.h
Normal file
698
Tools/Source/TianoTools/Include/Common/EfiImage.h
Normal file
@ -0,0 +1,698 @@
|
||||
/** @file
|
||||
EFI image format for PE32+. Please note some data structures are different
|
||||
for IA-32 and Itanium-based images, look for UINTN and the #ifdef EFI_IA64
|
||||
|
||||
@bug Fix text - doc as defined in MSFT EFI specification.
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
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
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
Module Name: EfiImage.h
|
||||
|
||||
**/
|
||||
|
||||
#ifndef __EFI_IMAGE_H__
|
||||
#define __EFI_IMAGE_H__
|
||||
|
||||
//
|
||||
// PE32+ Subsystem type for EFI images
|
||||
//
|
||||
#define EFI_IMAGE_SUBSYSTEM_EFI_APPLICATION 10
|
||||
#define EFI_IMAGE_SUBSYSTEM_EFI_BOOT_SERVICE_DRIVER 11
|
||||
#define EFI_IMAGE_SUBSYSTEM_EFI_RUNTIME_DRIVER 12
|
||||
#define EFI_IMAGE_SUBSYSTEM_SAL_RUNTIME_DRIVER 13
|
||||
|
||||
//
|
||||
// BugBug: Need to get a real answer for this problem. This is not in the
|
||||
// PE specification.
|
||||
//
|
||||
// A SAL runtime driver does not get fixed up when a transition to
|
||||
// virtual mode is made. In all other cases it should be treated
|
||||
// like a EFI_IMAGE_SUBSYSTEM_EFI_RUNTIME_DRIVER image
|
||||
//
|
||||
#define EFI_IMAGE_SUBSYSTEM_SAL_RUNTIME_DRIVER 13
|
||||
|
||||
//
|
||||
// PE32+ Machine type for EFI images
|
||||
//
|
||||
#define IMAGE_FILE_MACHINE_I386 0x014c
|
||||
#define IMAGE_FILE_MACHINE_IA64 0x0200
|
||||
#define IMAGE_FILE_MACHINE_EBC 0x0EBC
|
||||
#define IMAGE_FILE_MACHINE_X64 0x8664
|
||||
//
|
||||
// Support old names for backward compatible
|
||||
//
|
||||
#define EFI_IMAGE_MACHINE_IA32 IMAGE_FILE_MACHINE_I386
|
||||
#define EFI_IMAGE_MACHINE_IA64 IMAGE_FILE_MACHINE_IA64
|
||||
#define EFI_IMAGE_MACHINE_IPF IMAGE_FILE_MACHINE_IA64
|
||||
#define EFI_IMAGE_MACHINE_EBC IMAGE_FILE_MACHINE_EBC
|
||||
#define EFI_IMAGE_MACHINE_X64 IMAGE_FILE_MACHINE_X64
|
||||
|
||||
#define EFI_IMAGE_DOS_SIGNATURE 0x5A4D // MZ
|
||||
#define EFI_IMAGE_OS2_SIGNATURE 0x454E // NE
|
||||
#define EFI_IMAGE_OS2_SIGNATURE_LE 0x454C // LE
|
||||
#define EFI_IMAGE_NT_SIGNATURE 0x00004550 // PE00
|
||||
#define EFI_IMAGE_EDOS_SIGNATURE 0x44454550 // PEED
|
||||
|
||||
///
|
||||
/// PE images can start with an optional DOS header, so if an image is run
|
||||
/// under DOS it can print an error message.
|
||||
///
|
||||
typedef struct {
|
||||
UINT16 e_magic; // Magic number
|
||||
UINT16 e_cblp; // Bytes on last page of file
|
||||
UINT16 e_cp; // Pages in file
|
||||
UINT16 e_crlc; // Relocations
|
||||
UINT16 e_cparhdr; // Size of header in paragraphs
|
||||
UINT16 e_minalloc; // Minimum extra paragraphs needed
|
||||
UINT16 e_maxalloc; // Maximum extra paragraphs needed
|
||||
UINT16 e_ss; // Initial (relative) SS value
|
||||
UINT16 e_sp; // Initial SP value
|
||||
UINT16 e_csum; // Checksum
|
||||
UINT16 e_ip; // Initial IP value
|
||||
UINT16 e_cs; // Initial (relative) CS value
|
||||
UINT16 e_lfarlc; // File address of relocation table
|
||||
UINT16 e_ovno; // Overlay number
|
||||
UINT16 e_res[4]; // Reserved words
|
||||
UINT16 e_oemid; // OEM identifier (for e_oeminfo)
|
||||
UINT16 e_oeminfo; // OEM information; e_oemid specific
|
||||
UINT16 e_res2[10]; // Reserved words
|
||||
UINT32 e_lfanew; // File address of new exe header
|
||||
} EFI_IMAGE_DOS_HEADER;
|
||||
|
||||
///
|
||||
/// File header format.
|
||||
///
|
||||
typedef struct {
|
||||
UINT16 Machine;
|
||||
UINT16 NumberOfSections;
|
||||
UINT32 TimeDateStamp;
|
||||
UINT32 PointerToSymbolTable;
|
||||
UINT32 NumberOfSymbols;
|
||||
UINT16 SizeOfOptionalHeader;
|
||||
UINT16 Characteristics;
|
||||
} EFI_IMAGE_FILE_HEADER;
|
||||
|
||||
#define EFI_IMAGE_SIZEOF_FILE_HEADER 20
|
||||
|
||||
#define EFI_IMAGE_FILE_RELOCS_STRIPPED 0x0001 // Relocation info stripped from file.
|
||||
#define EFI_IMAGE_FILE_EXECUTABLE_IMAGE 0x0002 // File is executable (i.e. no unresolved externel references).
|
||||
#define EFI_IMAGE_FILE_LINE_NUMS_STRIPPED 0x0004 // Line nunbers stripped from file.
|
||||
#define EFI_IMAGE_FILE_LOCAL_SYMS_STRIPPED 0x0008 // Local symbols stripped from file.
|
||||
#define EFI_IMAGE_FILE_BYTES_REVERSED_LO 0x0080 // Bytes of machine word are reversed.
|
||||
#define EFI_IMAGE_FILE_32BIT_MACHINE 0x0100 // 32 bit word machine.
|
||||
#define EFI_IMAGE_FILE_DEBUG_STRIPPED 0x0200 // Debugging info stripped from file in .DBG file
|
||||
#define EFI_IMAGE_FILE_SYSTEM 0x1000 // System File.
|
||||
#define EFI_IMAGE_FILE_DLL 0x2000 // File is a DLL.
|
||||
#define EFI_IMAGE_FILE_BYTES_REVERSED_HI 0x8000 // Bytes of machine word are reversed.
|
||||
#define EFI_IMAGE_FILE_MACHINE_UNKNOWN 0
|
||||
#define EFI_IMAGE_FILE_MACHINE_I386 0x14c // Intel 386.
|
||||
#define EFI_IMAGE_FILE_MACHINE_R3000 0x162 // MIPS* little-endian, 0540 big-endian
|
||||
#define EFI_IMAGE_FILE_MACHINE_R4000 0x166 // MIPS* little-endian
|
||||
#define EFI_IMAGE_FILE_MACHINE_ALPHA 0x184 // Alpha_AXP*
|
||||
#define EFI_IMAGE_FILE_MACHINE_POWERPC 0x1F0 // IBM* PowerPC Little-Endian
|
||||
#define EFI_IMAGE_FILE_MACHINE_TAHOE 0x7cc // Intel EM machine
|
||||
//
|
||||
// * Other names and brands may be claimed as the property of others.
|
||||
//
|
||||
|
||||
///
|
||||
/// Directory format.
|
||||
///
|
||||
typedef struct {
|
||||
UINT32 VirtualAddress;
|
||||
UINT32 Size;
|
||||
} EFI_IMAGE_DATA_DIRECTORY;
|
||||
|
||||
#define EFI_IMAGE_NUMBER_OF_DIRECTORY_ENTRIES 16
|
||||
|
||||
typedef struct {
|
||||
UINT16 Magic;
|
||||
UINT8 MajorLinkerVersion;
|
||||
UINT8 MinorLinkerVersion;
|
||||
UINT32 SizeOfCode;
|
||||
UINT32 SizeOfInitializedData;
|
||||
UINT32 SizeOfUninitializedData;
|
||||
UINT32 AddressOfEntryPoint;
|
||||
UINT32 BaseOfCode;
|
||||
UINT32 BaseOfData;
|
||||
UINT32 BaseOfBss;
|
||||
UINT32 GprMask;
|
||||
UINT32 CprMask[4];
|
||||
UINT32 GpValue;
|
||||
} EFI_IMAGE_ROM_OPTIONAL_HEADER;
|
||||
|
||||
#define EFI_IMAGE_ROM_OPTIONAL_HDR_MAGIC 0x107
|
||||
#define EFI_IMAGE_SIZEOF_ROM_OPTIONAL_HEADER sizeof (EFI_IMAGE_ROM_OPTIONAL_HEADER)
|
||||
|
||||
typedef struct {
|
||||
EFI_IMAGE_FILE_HEADER FileHeader;
|
||||
EFI_IMAGE_ROM_OPTIONAL_HEADER OptionalHeader;
|
||||
} EFI_IMAGE_ROM_HEADERS;
|
||||
|
||||
///
|
||||
/// @attention
|
||||
/// EFI_IMAGE_OPTIONAL_HEADER32 and EFI_IMAGE_OPTIONAL_HEADER64
|
||||
/// are for use ONLY by tools. All proper EFI code MUST use
|
||||
/// EFI_IMAGE_OPTIONAL_HEADER ONLY!!!
|
||||
///
|
||||
#define EFI_IMAGE_NT_OPTIONAL_HDR32_MAGIC 0x10b
|
||||
|
||||
typedef struct {
|
||||
//
|
||||
// Standard fields.
|
||||
//
|
||||
UINT16 Magic;
|
||||
UINT8 MajorLinkerVersion;
|
||||
UINT8 MinorLinkerVersion;
|
||||
UINT32 SizeOfCode;
|
||||
UINT32 SizeOfInitializedData;
|
||||
UINT32 SizeOfUninitializedData;
|
||||
UINT32 AddressOfEntryPoint;
|
||||
UINT32 BaseOfCode;
|
||||
UINT32 BaseOfData;
|
||||
//
|
||||
// NT additional fields.
|
||||
//
|
||||
UINT32 ImageBase;
|
||||
UINT32 SectionAlignment;
|
||||
UINT32 FileAlignment;
|
||||
UINT16 MajorOperatingSystemVersion;
|
||||
UINT16 MinorOperatingSystemVersion;
|
||||
UINT16 MajorImageVersion;
|
||||
UINT16 MinorImageVersion;
|
||||
UINT16 MajorSubsystemVersion;
|
||||
UINT16 MinorSubsystemVersion;
|
||||
UINT32 Win32VersionValue;
|
||||
UINT32 SizeOfImage;
|
||||
UINT32 SizeOfHeaders;
|
||||
UINT32 CheckSum;
|
||||
UINT16 Subsystem;
|
||||
UINT16 DllCharacteristics;
|
||||
UINT32 SizeOfStackReserve;
|
||||
UINT32 SizeOfStackCommit;
|
||||
UINT32 SizeOfHeapReserve;
|
||||
UINT32 SizeOfHeapCommit;
|
||||
UINT32 LoaderFlags;
|
||||
UINT32 NumberOfRvaAndSizes;
|
||||
EFI_IMAGE_DATA_DIRECTORY DataDirectory[EFI_IMAGE_NUMBER_OF_DIRECTORY_ENTRIES];
|
||||
} EFI_IMAGE_OPTIONAL_HEADER32;
|
||||
|
||||
///
|
||||
/// @attention
|
||||
/// EFI_IMAGE_OPTIONAL_HEADER32 and EFI_IMAGE_OPTIONAL_HEADER64
|
||||
/// are for use ONLY by tools. All proper EFI code MUST use
|
||||
/// EFI_IMAGE_OPTIONAL_HEADER ONLY!!!
|
||||
///
|
||||
#define EFI_IMAGE_NT_OPTIONAL_HDR64_MAGIC 0x20b
|
||||
|
||||
typedef struct {
|
||||
//
|
||||
// Standard fields.
|
||||
//
|
||||
UINT16 Magic;
|
||||
UINT8 MajorLinkerVersion;
|
||||
UINT8 MinorLinkerVersion;
|
||||
UINT32 SizeOfCode;
|
||||
UINT32 SizeOfInitializedData;
|
||||
UINT32 SizeOfUninitializedData;
|
||||
UINT32 AddressOfEntryPoint;
|
||||
UINT32 BaseOfCode;
|
||||
//
|
||||
// NT additional fields.
|
||||
//
|
||||
UINT64 ImageBase;
|
||||
UINT32 SectionAlignment;
|
||||
UINT32 FileAlignment;
|
||||
UINT16 MajorOperatingSystemVersion;
|
||||
UINT16 MinorOperatingSystemVersion;
|
||||
UINT16 MajorImageVersion;
|
||||
UINT16 MinorImageVersion;
|
||||
UINT16 MajorSubsystemVersion;
|
||||
UINT16 MinorSubsystemVersion;
|
||||
UINT32 Win32VersionValue;
|
||||
UINT32 SizeOfImage;
|
||||
UINT32 SizeOfHeaders;
|
||||
UINT32 CheckSum;
|
||||
UINT16 Subsystem;
|
||||
UINT16 DllCharacteristics;
|
||||
UINT64 SizeOfStackReserve;
|
||||
UINT64 SizeOfStackCommit;
|
||||
UINT64 SizeOfHeapReserve;
|
||||
UINT64 SizeOfHeapCommit;
|
||||
UINT32 LoaderFlags;
|
||||
UINT32 NumberOfRvaAndSizes;
|
||||
EFI_IMAGE_DATA_DIRECTORY DataDirectory[EFI_IMAGE_NUMBER_OF_DIRECTORY_ENTRIES];
|
||||
} EFI_IMAGE_OPTIONAL_HEADER64;
|
||||
|
||||
///
|
||||
/// @attention
|
||||
/// EFI_IMAGE_NT_HEADERS32 and EFI_IMAGE_HEADERS64 are for use ONLY
|
||||
/// by tools. All proper EFI code MUST use EFI_IMAGE_NT_HEADERS ONLY!!!
|
||||
///
|
||||
typedef struct {
|
||||
UINT32 Signature;
|
||||
EFI_IMAGE_FILE_HEADER FileHeader;
|
||||
EFI_IMAGE_OPTIONAL_HEADER32 OptionalHeader;
|
||||
} EFI_IMAGE_NT_HEADERS32;
|
||||
|
||||
#define EFI_IMAGE_SIZEOF_NT_OPTIONAL32_HEADER sizeof (EFI_IMAGE_NT_HEADERS32)
|
||||
|
||||
typedef struct {
|
||||
UINT32 Signature;
|
||||
EFI_IMAGE_FILE_HEADER FileHeader;
|
||||
EFI_IMAGE_OPTIONAL_HEADER64 OptionalHeader;
|
||||
} EFI_IMAGE_NT_HEADERS64;
|
||||
|
||||
#define EFI_IMAGE_SIZEOF_NT_OPTIONAL64_HEADER sizeof (EFI_IMAGE_NT_HEADERS64)
|
||||
|
||||
//
|
||||
// Processor specific definition of EFI_IMAGE_OPTIONAL_HEADER so the
|
||||
// type name EFI_IMAGE_OPTIONAL_HEADER is appropriate to the build. Same for
|
||||
// EFI_IMAGE_NT_HEADERS. These definitions MUST be used by ALL EFI code.
|
||||
//
|
||||
#if defined (MDE_CPU_IA32)
|
||||
|
||||
typedef EFI_IMAGE_OPTIONAL_HEADER32 EFI_IMAGE_OPTIONAL_HEADER;
|
||||
typedef EFI_IMAGE_NT_HEADERS32 EFI_IMAGE_NT_HEADERS;
|
||||
|
||||
#define EFI_IMAGE_NT_OPTIONAL_HDR_MAGIC EFI_IMAGE_NT_OPTIONAL_HDR32_MAGIC
|
||||
#define EFI_IMAGE_MACHINE_TYPE_SUPPORTED(Machine) \
|
||||
(((Machine) == EFI_IMAGE_MACHINE_IA32) || ((Machine) == EFI_IMAGE_MACHINE_EBC))
|
||||
|
||||
#elif defined (MDE_CPU_IPF)
|
||||
|
||||
typedef EFI_IMAGE_OPTIONAL_HEADER64 EFI_IMAGE_OPTIONAL_HEADER;
|
||||
typedef EFI_IMAGE_NT_HEADERS64 EFI_IMAGE_NT_HEADERS;
|
||||
|
||||
#define EFI_IMAGE_NT_OPTIONAL_HDR_MAGIC EFI_IMAGE_NT_OPTIONAL_HDR64_MAGIC
|
||||
#define EFI_IMAGE_MACHINE_TYPE_SUPPORTED(Machine) \
|
||||
(((Machine) == EFI_IMAGE_MACHINE_IPF) || ((Machine) == EFI_IMAGE_MACHINE_EBC))
|
||||
|
||||
#elif defined (MDE_CPU_X64)
|
||||
|
||||
typedef EFI_IMAGE_OPTIONAL_HEADER64 EFI_IMAGE_OPTIONAL_HEADER;
|
||||
typedef EFI_IMAGE_NT_HEADERS64 EFI_IMAGE_NT_HEADERS;
|
||||
|
||||
#define EFI_IMAGE_NT_OPTIONAL_HDR_MAGIC EFI_IMAGE_NT_OPTIONAL_HDR64_MAGIC
|
||||
#define EFI_IMAGE_MACHINE_TYPE_SUPPORTED(Machine) \
|
||||
(((Machine) == EFI_IMAGE_MACHINE_X64) || ((Machine) == EFI_IMAGE_MACHINE_EBC))
|
||||
|
||||
#elif defined (MDE_CPU_EBC)
|
||||
|
||||
//
|
||||
// This is just to make sure you can cross compile with the EBC compiiler.
|
||||
// It does not make sense to have a PE loader coded in EBC. You need to
|
||||
// understand the basic
|
||||
//
|
||||
typedef EFI_IMAGE_OPTIONAL_HEADER64 EFI_IMAGE_OPTIONAL_HEADER;
|
||||
typedef EFI_IMAGE_NT_HEADERS64 EFI_IMAGE_NT_HEADERS;
|
||||
|
||||
#define EFI_IMAGE_NT_OPTIONAL_HDR_MAGIC EFI_IMAGE_NT_OPTIONAL_HDR64_MAGIC
|
||||
#define EFI_IMAGE_MACHINE_TYPE_SUPPORTED(Machine) ((Machine) == EFI_IMAGE_MACHINE_EBC)
|
||||
|
||||
#else
|
||||
#error Unknown Processor Type
|
||||
#endif
|
||||
|
||||
|
||||
#define EFI_IMAGE_FIRST_SECTION(ntheader) \
|
||||
( \
|
||||
(EFI_IMAGE_SECTION_HEADER *) \
|
||||
( \
|
||||
(UINT32) ntheader + \
|
||||
FIELD_OFFSET (EFI_IMAGE_NT_HEADERS, OptionalHeader) + \
|
||||
((EFI_IMAGE_NT_HEADERS *) (ntheader))->FileHeader.SizeOfOptionalHeader \
|
||||
) \
|
||||
)
|
||||
|
||||
//
|
||||
// Subsystem Values
|
||||
//
|
||||
#define EFI_IMAGE_SUBSYSTEM_UNKNOWN 0
|
||||
#define EFI_IMAGE_SUBSYSTEM_NATIVE 1
|
||||
#define EFI_IMAGE_SUBSYSTEM_WINDOWS_GUI 2
|
||||
#define EFI_IMAGE_SUBSYSTEM_WINDOWS_CUI 3.
|
||||
#define EFI_IMAGE_SUBSYSTEM_OS2_CUI 5
|
||||
#define EFI_IMAGE_SUBSYSTEM_POSIX_CUI 7
|
||||
|
||||
//
|
||||
// Directory Entries
|
||||
//
|
||||
#define EFI_IMAGE_DIRECTORY_ENTRY_EXPORT 0
|
||||
#define EFI_IMAGE_DIRECTORY_ENTRY_IMPORT 1
|
||||
#define EFI_IMAGE_DIRECTORY_ENTRY_RESOURCE 2
|
||||
#define EFI_IMAGE_DIRECTORY_ENTRY_EXCEPTION 3
|
||||
#define EFI_IMAGE_DIRECTORY_ENTRY_SECURITY 4
|
||||
#define EFI_IMAGE_DIRECTORY_ENTRY_BASERELOC 5
|
||||
#define EFI_IMAGE_DIRECTORY_ENTRY_DEBUG 6
|
||||
#define EFI_IMAGE_DIRECTORY_ENTRY_COPYRIGHT 7
|
||||
#define EFI_IMAGE_DIRECTORY_ENTRY_GLOBALPTR 8
|
||||
#define EFI_IMAGE_DIRECTORY_ENTRY_TLS 9
|
||||
#define EFI_IMAGE_DIRECTORY_ENTRY_LOAD_CONFIG 10
|
||||
|
||||
//
|
||||
// Section header format.
|
||||
//
|
||||
#define EFI_IMAGE_SIZEOF_SHORT_NAME 8
|
||||
|
||||
typedef struct {
|
||||
UINT8 Name[EFI_IMAGE_SIZEOF_SHORT_NAME];
|
||||
union {
|
||||
UINT32 PhysicalAddress;
|
||||
UINT32 VirtualSize;
|
||||
} Misc;
|
||||
UINT32 VirtualAddress;
|
||||
UINT32 SizeOfRawData;
|
||||
UINT32 PointerToRawData;
|
||||
UINT32 PointerToRelocations;
|
||||
UINT32 PointerToLinenumbers;
|
||||
UINT16 NumberOfRelocations;
|
||||
UINT16 NumberOfLinenumbers;
|
||||
UINT32 Characteristics;
|
||||
} EFI_IMAGE_SECTION_HEADER;
|
||||
|
||||
#define EFI_IMAGE_SIZEOF_SECTION_HEADER 40
|
||||
|
||||
#define EFI_IMAGE_SCN_TYPE_NO_PAD 0x00000008 // Reserved.
|
||||
#define EFI_IMAGE_SCN_CNT_CODE 0x00000020
|
||||
#define EFI_IMAGE_SCN_CNT_INITIALIZED_DATA 0x00000040
|
||||
#define EFI_IMAGE_SCN_CNT_UNINITIALIZED_DATA 0x00000080
|
||||
|
||||
#define EFI_IMAGE_SCN_LNK_OTHER 0x00000100 // Reserved.
|
||||
#define EFI_IMAGE_SCN_LNK_INFO 0x00000200 // Section contains comments or some other type of information.
|
||||
#define EFI_IMAGE_SCN_LNK_REMOVE 0x00000800 // Section contents will not become part of image.
|
||||
#define EFI_IMAGE_SCN_LNK_COMDAT 0x00001000
|
||||
|
||||
#define EFI_IMAGE_SCN_ALIGN_1BYTES 0x00100000
|
||||
#define EFI_IMAGE_SCN_ALIGN_2BYTES 0x00200000
|
||||
#define EFI_IMAGE_SCN_ALIGN_4BYTES 0x00300000
|
||||
#define EFI_IMAGE_SCN_ALIGN_8BYTES 0x00400000
|
||||
#define EFI_IMAGE_SCN_ALIGN_16BYTES 0x00500000
|
||||
#define EFI_IMAGE_SCN_ALIGN_32BYTES 0x00600000
|
||||
#define EFI_IMAGE_SCN_ALIGN_64BYTES 0x00700000
|
||||
|
||||
#define EFI_IMAGE_SCN_MEM_DISCARDABLE 0x02000000
|
||||
#define EFI_IMAGE_SCN_MEM_NOT_CACHED 0x04000000
|
||||
#define EFI_IMAGE_SCN_MEM_NOT_PAGED 0x08000000
|
||||
#define EFI_IMAGE_SCN_MEM_SHARED 0x10000000
|
||||
#define EFI_IMAGE_SCN_MEM_EXECUTE 0x20000000
|
||||
#define EFI_IMAGE_SCN_MEM_READ 0x40000000
|
||||
#define EFI_IMAGE_SCN_MEM_WRITE 0x80000000
|
||||
|
||||
///
|
||||
/// Symbol format.
|
||||
///
|
||||
#define EFI_IMAGE_SIZEOF_SYMBOL 18
|
||||
|
||||
//
|
||||
// Section values.
|
||||
//
|
||||
// Symbols have a section number of the section in which they are
|
||||
// defined. Otherwise, section numbers have the following meanings:
|
||||
//
|
||||
#define EFI_IMAGE_SYM_UNDEFINED (UINT16) 0 // Symbol is undefined or is common.
|
||||
#define EFI_IMAGE_SYM_ABSOLUTE (UINT16) -1 // Symbol is an absolute value.
|
||||
#define EFI_IMAGE_SYM_DEBUG (UINT16) -2 // Symbol is a special debug item.
|
||||
//
|
||||
// Type (fundamental) values.
|
||||
//
|
||||
#define EFI_IMAGE_SYM_TYPE_NULL 0 // no type.
|
||||
#define EFI_IMAGE_SYM_TYPE_VOID 1 //
|
||||
#define EFI_IMAGE_SYM_TYPE_CHAR 2 // type character.
|
||||
#define EFI_IMAGE_SYM_TYPE_SHORT 3 // type short integer.
|
||||
#define EFI_IMAGE_SYM_TYPE_INT 4
|
||||
#define EFI_IMAGE_SYM_TYPE_LONG 5
|
||||
#define EFI_IMAGE_SYM_TYPE_FLOAT 6
|
||||
#define EFI_IMAGE_SYM_TYPE_DOUBLE 7
|
||||
#define EFI_IMAGE_SYM_TYPE_STRUCT 8
|
||||
#define EFI_IMAGE_SYM_TYPE_UNION 9
|
||||
#define EFI_IMAGE_SYM_TYPE_ENUM 10 // enumeration.
|
||||
#define EFI_IMAGE_SYM_TYPE_MOE 11 // member of enumeration.
|
||||
#define EFI_IMAGE_SYM_TYPE_BYTE 12
|
||||
#define EFI_IMAGE_SYM_TYPE_WORD 13
|
||||
#define EFI_IMAGE_SYM_TYPE_UINT 14
|
||||
#define EFI_IMAGE_SYM_TYPE_DWORD 15
|
||||
|
||||
//
|
||||
// Type (derived) values.
|
||||
//
|
||||
#define EFI_IMAGE_SYM_DTYPE_NULL 0 // no derived type.
|
||||
#define EFI_IMAGE_SYM_DTYPE_POINTER 1
|
||||
#define EFI_IMAGE_SYM_DTYPE_FUNCTION 2
|
||||
#define EFI_IMAGE_SYM_DTYPE_ARRAY 3
|
||||
|
||||
//
|
||||
// Storage classes.
|
||||
//
|
||||
#define EFI_IMAGE_SYM_CLASS_END_OF_FUNCTION (UINT8) -1
|
||||
#define EFI_IMAGE_SYM_CLASS_NULL 0
|
||||
#define EFI_IMAGE_SYM_CLASS_AUTOMATIC 1
|
||||
#define EFI_IMAGE_SYM_CLASS_EXTERNAL 2
|
||||
#define EFI_IMAGE_SYM_CLASS_STATIC 3
|
||||
#define EFI_IMAGE_SYM_CLASS_REGISTER 4
|
||||
#define EFI_IMAGE_SYM_CLASS_EXTERNAL_DEF 5
|
||||
#define EFI_IMAGE_SYM_CLASS_LABEL 6
|
||||
#define EFI_IMAGE_SYM_CLASS_UNDEFINED_LABEL 7
|
||||
#define EFI_IMAGE_SYM_CLASS_MEMBER_OF_STRUCT 8
|
||||
#define EFI_IMAGE_SYM_CLASS_ARGUMENT 9
|
||||
#define EFI_IMAGE_SYM_CLASS_STRUCT_TAG 10
|
||||
#define EFI_IMAGE_SYM_CLASS_MEMBER_OF_UNION 11
|
||||
#define EFI_IMAGE_SYM_CLASS_UNION_TAG 12
|
||||
#define EFI_IMAGE_SYM_CLASS_TYPE_DEFINITION 13
|
||||
#define EFI_IMAGE_SYM_CLASS_UNDEFINED_STATIC 14
|
||||
#define EFI_IMAGE_SYM_CLASS_ENUM_TAG 15
|
||||
#define EFI_IMAGE_SYM_CLASS_MEMBER_OF_ENUM 16
|
||||
#define EFI_IMAGE_SYM_CLASS_REGISTER_PARAM 17
|
||||
#define EFI_IMAGE_SYM_CLASS_BIT_FIELD 18
|
||||
#define EFI_IMAGE_SYM_CLASS_BLOCK 100
|
||||
#define EFI_IMAGE_SYM_CLASS_FUNCTION 101
|
||||
#define EFI_IMAGE_SYM_CLASS_END_OF_STRUCT 102
|
||||
#define EFI_IMAGE_SYM_CLASS_FILE 103
|
||||
#define EFI_IMAGE_SYM_CLASS_SECTION 104
|
||||
#define EFI_IMAGE_SYM_CLASS_WEAK_EXTERNAL 105
|
||||
|
||||
//
|
||||
// type packing constants
|
||||
//
|
||||
#define EFI_IMAGE_N_BTMASK 017
|
||||
#define EFI_IMAGE_N_TMASK 060
|
||||
#define EFI_IMAGE_N_TMASK1 0300
|
||||
#define EFI_IMAGE_N_TMASK2 0360
|
||||
#define EFI_IMAGE_N_BTSHFT 4
|
||||
#define EFI_IMAGE_N_TSHIFT 2
|
||||
|
||||
//
|
||||
// Communal selection types.
|
||||
//
|
||||
#define EFI_IMAGE_COMDAT_SELECT_NODUPLICATES 1
|
||||
#define EFI_IMAGE_COMDAT_SELECT_ANY 2
|
||||
#define EFI_IMAGE_COMDAT_SELECT_SAME_SIZE 3
|
||||
#define EFI_IMAGE_COMDAT_SELECT_EXACT_MATCH 4
|
||||
#define EFI_IMAGE_COMDAT_SELECT_ASSOCIATIVE 5
|
||||
|
||||
#define EFI_IMAGE_WEAK_EXTERN_SEARCH_NOLIBRARY 1
|
||||
#define EFI_IMAGE_WEAK_EXTERN_SEARCH_LIBRARY 2
|
||||
#define EFI_IMAGE_WEAK_EXTERN_SEARCH_ALIAS 3
|
||||
|
||||
///
|
||||
/// Relocation format.
|
||||
///
|
||||
typedef struct {
|
||||
UINT32 VirtualAddress;
|
||||
UINT32 SymbolTableIndex;
|
||||
UINT16 Type;
|
||||
} EFI_IMAGE_RELOCATION;
|
||||
|
||||
#define EFI_IMAGE_SIZEOF_RELOCATION 10
|
||||
|
||||
//
|
||||
// I386 relocation types.
|
||||
//
|
||||
#define EFI_IMAGE_REL_I386_ABSOLUTE 0 // Reference is absolute, no relocation is necessary
|
||||
#define EFI_IMAGE_REL_I386_DIR16 01 // Direct 16-bit reference to the symbols virtual address
|
||||
#define EFI_IMAGE_REL_I386_REL16 02 // PC-relative 16-bit reference to the symbols virtual address
|
||||
#define EFI_IMAGE_REL_I386_DIR32 06 // Direct 32-bit reference to the symbols virtual address
|
||||
#define EFI_IMAGE_REL_I386_DIR32NB 07 // Direct 32-bit reference to the symbols virtual address, base not included
|
||||
#define EFI_IMAGE_REL_I386_SEG12 011 // Direct 16-bit reference to the segment-selector bits of a 32-bit virtual address
|
||||
#define EFI_IMAGE_REL_I386_SECTION 012
|
||||
#define EFI_IMAGE_REL_I386_SECREL 013
|
||||
#define EFI_IMAGE_REL_I386_REL32 024 // PC-relative 32-bit reference to the symbols virtual address
|
||||
|
||||
///
|
||||
/// Based relocation format.
|
||||
///
|
||||
typedef struct {
|
||||
UINT32 VirtualAddress;
|
||||
UINT32 SizeOfBlock;
|
||||
} EFI_IMAGE_BASE_RELOCATION;
|
||||
|
||||
#define EFI_IMAGE_SIZEOF_BASE_RELOCATION 8
|
||||
|
||||
//
|
||||
// Based relocation types.
|
||||
//
|
||||
#define EFI_IMAGE_REL_BASED_ABSOLUTE 0
|
||||
#define EFI_IMAGE_REL_BASED_HIGH 1
|
||||
#define EFI_IMAGE_REL_BASED_LOW 2
|
||||
#define EFI_IMAGE_REL_BASED_HIGHLOW 3
|
||||
#define EFI_IMAGE_REL_BASED_HIGHADJ 4
|
||||
#define EFI_IMAGE_REL_BASED_MIPS_JMPADDR 5
|
||||
#define EFI_IMAGE_REL_BASED_IA64_IMM64 9
|
||||
#define EFI_IMAGE_REL_BASED_DIR64 10
|
||||
|
||||
///
|
||||
/// Line number format.
|
||||
///
|
||||
typedef struct {
|
||||
union {
|
||||
UINT32 SymbolTableIndex; // Symbol table index of function name if Linenumber is 0.
|
||||
UINT32 VirtualAddress; // Virtual address of line number.
|
||||
} Type;
|
||||
UINT16 Linenumber; // Line number.
|
||||
} EFI_IMAGE_LINENUMBER;
|
||||
|
||||
#define EFI_IMAGE_SIZEOF_LINENUMBER 6
|
||||
|
||||
//
|
||||
// Archive format.
|
||||
//
|
||||
#define EFI_IMAGE_ARCHIVE_START_SIZE 8
|
||||
#define EFI_IMAGE_ARCHIVE_START "!<arch>\n"
|
||||
#define EFI_IMAGE_ARCHIVE_END "`\n"
|
||||
#define EFI_IMAGE_ARCHIVE_PAD "\n"
|
||||
#define EFI_IMAGE_ARCHIVE_LINKER_MEMBER "/ "
|
||||
#define EFI_IMAGE_ARCHIVE_LONGNAMES_MEMBER "// "
|
||||
|
||||
typedef struct {
|
||||
UINT8 Name[16]; // File member name - `/' terminated.
|
||||
UINT8 Date[12]; // File member date - decimal.
|
||||
UINT8 UserID[6]; // File member user id - decimal.
|
||||
UINT8 GroupID[6]; // File member group id - decimal.
|
||||
UINT8 Mode[8]; // File member mode - octal.
|
||||
UINT8 Size[10]; // File member size - decimal.
|
||||
UINT8 EndHeader[2]; // String to end header.
|
||||
} EFI_IMAGE_ARCHIVE_MEMBER_HEADER;
|
||||
|
||||
#define EFI_IMAGE_SIZEOF_ARCHIVE_MEMBER_HDR 60
|
||||
|
||||
//
|
||||
// DLL support.
|
||||
//
|
||||
|
||||
///
|
||||
/// DLL Export Format
|
||||
///
|
||||
typedef struct {
|
||||
UINT32 Characteristics;
|
||||
UINT32 TimeDateStamp;
|
||||
UINT16 MajorVersion;
|
||||
UINT16 MinorVersion;
|
||||
UINT32 Name;
|
||||
UINT32 Base;
|
||||
UINT32 NumberOfFunctions;
|
||||
UINT32 NumberOfNames;
|
||||
UINT32 AddressOfFunctions;
|
||||
UINT32 AddressOfNames;
|
||||
UINT32 AddressOfNameOrdinals;
|
||||
} EFI_IMAGE_EXPORT_DIRECTORY;
|
||||
|
||||
///
|
||||
/// DLL support.
|
||||
/// Import Format
|
||||
///
|
||||
typedef struct {
|
||||
UINT16 Hint;
|
||||
UINT8 Name[1];
|
||||
} EFI_IMAGE_IMPORT_BY_NAME;
|
||||
|
||||
typedef struct {
|
||||
union {
|
||||
UINT32 Function;
|
||||
UINT32 Ordinal;
|
||||
EFI_IMAGE_IMPORT_BY_NAME *AddressOfData;
|
||||
} u1;
|
||||
} EFI_IMAGE_THUNK_DATA;
|
||||
|
||||
#define EFI_IMAGE_ORDINAL_FLAG 0x80000000
|
||||
#define EFI_IMAGE_SNAP_BY_ORDINAL(Ordinal) ((Ordinal & EFI_IMAGE_ORDINAL_FLAG) != 0)
|
||||
#define EFI_IMAGE_ORDINAL(Ordinal) (Ordinal & 0xffff)
|
||||
|
||||
typedef struct {
|
||||
UINT32 Characteristics;
|
||||
UINT32 TimeDateStamp;
|
||||
UINT32 ForwarderChain;
|
||||
UINT32 Name;
|
||||
EFI_IMAGE_THUNK_DATA *FirstThunk;
|
||||
} EFI_IMAGE_IMPORT_DESCRIPTOR;
|
||||
|
||||
///
|
||||
/// Debug Format
|
||||
///
|
||||
#define EFI_IMAGE_DEBUG_TYPE_CODEVIEW 2
|
||||
|
||||
typedef struct {
|
||||
UINT32 Characteristics;
|
||||
UINT32 TimeDateStamp;
|
||||
UINT16 MajorVersion;
|
||||
UINT16 MinorVersion;
|
||||
UINT32 Type;
|
||||
UINT32 SizeOfData;
|
||||
UINT32 RVA;
|
||||
UINT32 FileOffset;
|
||||
} EFI_IMAGE_DEBUG_DIRECTORY_ENTRY;
|
||||
|
||||
#define CODEVIEW_SIGNATURE_NB10 0x3031424E // "NB10"
|
||||
typedef struct {
|
||||
UINT32 Signature; // "NB10"
|
||||
UINT32 Unknown;
|
||||
UINT32 Unknown2;
|
||||
UINT32 Unknown3;
|
||||
//
|
||||
// Filename of .PDB goes here
|
||||
//
|
||||
} EFI_IMAGE_DEBUG_CODEVIEW_NB10_ENTRY;
|
||||
|
||||
#define CODEVIEW_SIGNATURE_RSDS 0x53445352 // "RSDS"
|
||||
typedef struct {
|
||||
UINT32 Signature; // "RSDS"
|
||||
UINT32 Unknown;
|
||||
UINT32 Unknown2;
|
||||
UINT32 Unknown3;
|
||||
UINT32 Unknown4;
|
||||
UINT32 Unknown5;
|
||||
//
|
||||
// Filename of .PDB goes here
|
||||
//
|
||||
} EFI_IMAGE_DEBUG_CODEVIEW_RSDS_ENTRY;
|
||||
|
||||
///
|
||||
/// Header format for TE images
|
||||
///
|
||||
typedef struct {
|
||||
UINT16 Signature; // signature for TE format = "VZ"
|
||||
UINT16 Machine; // from the original file header
|
||||
UINT8 NumberOfSections; // from the original file header
|
||||
UINT8 Subsystem; // from original optional header
|
||||
UINT16 StrippedSize; // how many bytes we removed from the header
|
||||
UINT32 AddressOfEntryPoint; // offset to entry point -- from original optional header
|
||||
UINT32 BaseOfCode; // from original image -- required for ITP debug
|
||||
UINT64 ImageBase; // from original file header
|
||||
EFI_IMAGE_DATA_DIRECTORY DataDirectory[2]; // only base relocation and debug directory
|
||||
} EFI_TE_IMAGE_HEADER;
|
||||
|
||||
#define EFI_TE_IMAGE_HEADER_SIGNATURE 0x5A56 // "VZ"
|
||||
|
||||
//
|
||||
// Data directory indexes in our TE image header
|
||||
//
|
||||
#define EFI_TE_IMAGE_DIRECTORY_ENTRY_BASERELOC 0
|
||||
#define EFI_TE_IMAGE_DIRECTORY_ENTRY_DEBUG 1
|
||||
|
||||
#endif
|
98
Tools/Source/TianoTools/Include/Common/FirmwareFileSystem.h
Normal file
98
Tools/Source/TianoTools/Include/Common/FirmwareFileSystem.h
Normal file
@ -0,0 +1,98 @@
|
||||
/** @file
|
||||
This file defines the data structures that comprise the FFS file system.
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
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
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
Module Name: FirmwareFileSystem.h
|
||||
|
||||
@par Revision Reference:
|
||||
These definitions are from Firmware File System Spec 0.9.
|
||||
|
||||
**/
|
||||
|
||||
#ifndef __EFI_FFS_FILE_SYSTEM_H__
|
||||
#define __EFI_FFS_FILE_SYSTEM_H__
|
||||
|
||||
///
|
||||
/// FFS specific file types
|
||||
///
|
||||
#define EFI_FV_FILETYPE_FFS_PAD 0xF0
|
||||
|
||||
//
|
||||
// FFS File Attributes
|
||||
//
|
||||
#define FFS_ATTRIB_TAIL_PRESENT 0x01
|
||||
#define FFS_ATTRIB_RECOVERY 0x02
|
||||
#define FFS_ATTRIB_HEADER_EXTENSION 0x04
|
||||
#define FFS_ATTRIB_DATA_ALIGNMENT 0x38
|
||||
#define FFS_ATTRIB_CHECKSUM 0x40
|
||||
|
||||
///
|
||||
/// FFS_FIXED_CHECKSUM is the default checksum value used when the
|
||||
/// FFS_ATTRIB_CHECKSUM attribute bit is clear
|
||||
/// note this is NOT an architecturally defined value, but is in this file for
|
||||
/// implementation convenience
|
||||
///
|
||||
#define FFS_FIXED_CHECKSUM 0x5A
|
||||
|
||||
//
|
||||
// File state definitions
|
||||
//
|
||||
#define EFI_FILE_HEADER_CONSTRUCTION 0x01
|
||||
#define EFI_FILE_HEADER_VALID 0x02
|
||||
#define EFI_FILE_DATA_VALID 0x04
|
||||
#define EFI_FILE_MARKED_FOR_UPDATE 0x08
|
||||
#define EFI_FILE_DELETED 0x10
|
||||
#define EFI_FILE_HEADER_INVALID 0x20
|
||||
|
||||
#define EFI_FILE_ALL_STATE_BITS (EFI_FILE_HEADER_CONSTRUCTION | \
|
||||
EFI_FILE_HEADER_VALID | \
|
||||
EFI_FILE_DATA_VALID | \
|
||||
EFI_FILE_MARKED_FOR_UPDATE | \
|
||||
EFI_FILE_DELETED | \
|
||||
EFI_FILE_HEADER_INVALID \
|
||||
)
|
||||
|
||||
#define EFI_TEST_FFS_ATTRIBUTES_BIT(FvbAttributes, TestAttributes, Bit) \
|
||||
( \
|
||||
(BOOLEAN) ( \
|
||||
(FvbAttributes & EFI_FVB_ERASE_POLARITY) ? (((~TestAttributes) & Bit) == Bit) : ((TestAttributes & Bit) == Bit) \
|
||||
) \
|
||||
)
|
||||
|
||||
typedef UINT16 EFI_FFS_FILE_TAIL;
|
||||
|
||||
///
|
||||
/// FFS file integrity check structure
|
||||
///
|
||||
typedef union {
|
||||
struct {
|
||||
UINT8 Header;
|
||||
UINT8 File;
|
||||
} Checksum;
|
||||
UINT16 TailReference;
|
||||
} EFI_FFS_INTEGRITY_CHECK;
|
||||
|
||||
//
|
||||
// FFS file header definition
|
||||
//
|
||||
typedef UINT8 EFI_FFS_FILE_ATTRIBUTES;
|
||||
typedef UINT8 EFI_FFS_FILE_STATE;
|
||||
|
||||
typedef struct {
|
||||
EFI_GUID Name;
|
||||
EFI_FFS_INTEGRITY_CHECK IntegrityCheck;
|
||||
EFI_FV_FILETYPE Type;
|
||||
EFI_FFS_FILE_ATTRIBUTES Attributes;
|
||||
UINT8 Size[3];
|
||||
EFI_FFS_FILE_STATE State;
|
||||
} EFI_FFS_FILE_HEADER;
|
||||
|
||||
#endif
|
109
Tools/Source/TianoTools/Include/Common/FirmwareVolumeHeader.h
Normal file
109
Tools/Source/TianoTools/Include/Common/FirmwareVolumeHeader.h
Normal file
@ -0,0 +1,109 @@
|
||||
/** @file
|
||||
Defines data structure that is the volume header found at the beginning of
|
||||
all firmware volumes that are either memory mapped, or have an
|
||||
associated FirmwareVolumeBlock protocol.
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
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
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
Module Name: FirmwareVolumeHeader.h
|
||||
|
||||
@par Revision Reference:
|
||||
These definitions are from Firmware Volume Block Spec 0.9.
|
||||
|
||||
**/
|
||||
|
||||
#ifndef __EFI_FIRMWARE_VOLUME_HEADER_H__
|
||||
#define __EFI_FIRMWARE_VOLUME_HEADER_H__
|
||||
|
||||
//
|
||||
// Firmware Volume Block Attributes definition
|
||||
//
|
||||
typedef UINT32 EFI_FVB_ATTRIBUTES;
|
||||
|
||||
//
|
||||
// Firmware Volume Block Attributes bit definitions
|
||||
//
|
||||
#define EFI_FVB_READ_DISABLED_CAP 0x00000001
|
||||
#define EFI_FVB_READ_ENABLED_CAP 0x00000002
|
||||
#define EFI_FVB_READ_STATUS 0x00000004
|
||||
|
||||
#define EFI_FVB_WRITE_DISABLED_CAP 0x00000008
|
||||
#define EFI_FVB_WRITE_ENABLED_CAP 0x00000010
|
||||
#define EFI_FVB_WRITE_STATUS 0x00000020
|
||||
|
||||
#define EFI_FVB_LOCK_CAP 0x00000040
|
||||
#define EFI_FVB_LOCK_STATUS 0x00000080
|
||||
|
||||
#define EFI_FVB_STICKY_WRITE 0x00000200
|
||||
#define EFI_FVB_MEMORY_MAPPED 0x00000400
|
||||
#define EFI_FVB_ERASE_POLARITY 0x00000800
|
||||
|
||||
#define EFI_FVB_ALIGNMENT_CAP 0x00008000
|
||||
#define EFI_FVB_ALIGNMENT_2 0x00010000
|
||||
#define EFI_FVB_ALIGNMENT_4 0x00020000
|
||||
#define EFI_FVB_ALIGNMENT_8 0x00040000
|
||||
#define EFI_FVB_ALIGNMENT_16 0x00080000
|
||||
#define EFI_FVB_ALIGNMENT_32 0x00100000
|
||||
#define EFI_FVB_ALIGNMENT_64 0x00200000
|
||||
#define EFI_FVB_ALIGNMENT_128 0x00400000
|
||||
#define EFI_FVB_ALIGNMENT_256 0x00800000
|
||||
#define EFI_FVB_ALIGNMENT_512 0x01000000
|
||||
#define EFI_FVB_ALIGNMENT_1K 0x02000000
|
||||
#define EFI_FVB_ALIGNMENT_2K 0x04000000
|
||||
#define EFI_FVB_ALIGNMENT_4K 0x08000000
|
||||
#define EFI_FVB_ALIGNMENT_8K 0x10000000
|
||||
#define EFI_FVB_ALIGNMENT_16K 0x20000000
|
||||
#define EFI_FVB_ALIGNMENT_32K 0x40000000
|
||||
#define EFI_FVB_ALIGNMENT_64K 0x80000000
|
||||
|
||||
#define EFI_FVB_CAPABILITIES (EFI_FVB_READ_DISABLED_CAP | \
|
||||
EFI_FVB_READ_ENABLED_CAP | \
|
||||
EFI_FVB_WRITE_DISABLED_CAP | \
|
||||
EFI_FVB_WRITE_ENABLED_CAP | \
|
||||
EFI_FVB_LOCK_CAP \
|
||||
)
|
||||
|
||||
#define EFI_FVB_STATUS (EFI_FVB_READ_STATUS | EFI_FVB_WRITE_STATUS | EFI_FVB_LOCK_STATUS)
|
||||
|
||||
///
|
||||
/// Firmware Volume Header Revision definition
|
||||
///
|
||||
#define EFI_FVH_REVISION 0x01
|
||||
|
||||
///
|
||||
/// Firmware Volume Header Signature definition
|
||||
///
|
||||
#define EFI_FVH_SIGNATURE EFI_SIGNATURE_32 ('_', 'F', 'V', 'H')
|
||||
|
||||
///
|
||||
/// Firmware Volume Header Block Map Entry definition
|
||||
///
|
||||
typedef struct {
|
||||
UINT32 NumBlocks;
|
||||
UINT32 BlockLength;
|
||||
} EFI_FV_BLOCK_MAP_ENTRY;
|
||||
|
||||
///
|
||||
/// Firmware Volume Header definition
|
||||
///
|
||||
typedef struct {
|
||||
UINT8 ZeroVector[16];
|
||||
EFI_GUID FileSystemGuid;
|
||||
UINT64 FvLength;
|
||||
UINT32 Signature;
|
||||
EFI_FVB_ATTRIBUTES Attributes;
|
||||
UINT16 HeaderLength;
|
||||
UINT16 Checksum;
|
||||
UINT8 Reserved[3];
|
||||
UINT8 Revision;
|
||||
EFI_FV_BLOCK_MAP_ENTRY FvBlockMap[1];
|
||||
} EFI_FIRMWARE_VOLUME_HEADER;
|
||||
|
||||
#endif
|
@ -0,0 +1,277 @@
|
||||
/** @file
|
||||
This file defines the data structures that are architecturally defined for file
|
||||
images loaded via the FirmwareVolume protocol. The Firmware Volume specification
|
||||
is the basis for these definitions.
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
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
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
Module Name: FimrwareVolumeImageFormat.h
|
||||
|
||||
@par Revision Reference:
|
||||
These definitions are from Firmware Volume Spec 0.9.
|
||||
|
||||
**/
|
||||
|
||||
#ifndef __FIRMWARE_VOLUME_IMAGE_FORMAT_H__
|
||||
#define __FIRMWARE_VOLUME_IMAGE_FORMAT_H__
|
||||
|
||||
//
|
||||
// pack all data structures since this is actually a binary format and we cannot
|
||||
// allow internal padding in the data structures because of some compilerism..
|
||||
//
|
||||
#pragma pack(1)
|
||||
//
|
||||
// ////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Architectural file types
|
||||
//
|
||||
typedef UINT8 EFI_FV_FILETYPE;
|
||||
|
||||
#define EFI_FV_FILETYPE_ALL 0x00
|
||||
#define EFI_FV_FILETYPE_RAW 0x01
|
||||
#define EFI_FV_FILETYPE_FREEFORM 0x02
|
||||
#define EFI_FV_FILETYPE_SECURITY_CORE 0x03
|
||||
#define EFI_FV_FILETYPE_PEI_CORE 0x04
|
||||
#define EFI_FV_FILETYPE_DXE_CORE 0x05
|
||||
#define EFI_FV_FILETYPE_PEIM 0x06
|
||||
#define EFI_FV_FILETYPE_DRIVER 0x07
|
||||
#define EFI_FV_FILETYPE_COMBINED_PEIM_DRIVER 0x08
|
||||
#define EFI_FV_FILETYPE_APPLICATION 0x09
|
||||
//
|
||||
// File type 0x0A is reserved and should not be used
|
||||
//
|
||||
#define EFI_FV_FILETYPE_FIRMWARE_VOLUME_IMAGE 0x0B
|
||||
|
||||
//
|
||||
// ////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Section types
|
||||
//
|
||||
typedef UINT8 EFI_SECTION_TYPE;
|
||||
|
||||
//
|
||||
// ************************************************************
|
||||
// The section type EFI_SECTION_ALL is a psuedo type. It is
|
||||
// used as a wildcard when retrieving sections. The section
|
||||
// type EFI_SECTION_ALL matches all section types.
|
||||
// ************************************************************
|
||||
//
|
||||
#define EFI_SECTION_ALL 0x00
|
||||
|
||||
//
|
||||
// ************************************************************
|
||||
// Encapsulation section Type values
|
||||
// ************************************************************
|
||||
//
|
||||
#define EFI_SECTION_COMPRESSION 0x01
|
||||
#define EFI_SECTION_GUID_DEFINED 0x02
|
||||
|
||||
//
|
||||
// ************************************************************
|
||||
// Leaf section Type values
|
||||
// ************************************************************
|
||||
//
|
||||
#define EFI_SECTION_FIRST_LEAF_SECTION_TYPE 0x10
|
||||
|
||||
#define EFI_SECTION_PE32 0x10
|
||||
#define EFI_SECTION_PIC 0x11
|
||||
#define EFI_SECTION_TE 0x12
|
||||
#define EFI_SECTION_DXE_DEPEX 0x13
|
||||
#define EFI_SECTION_VERSION 0x14
|
||||
#define EFI_SECTION_USER_INTERFACE 0x15
|
||||
#define EFI_SECTION_COMPATIBILITY16 0x16
|
||||
#define EFI_SECTION_FIRMWARE_VOLUME_IMAGE 0x17
|
||||
#define EFI_SECTION_FREEFORM_SUBTYPE_GUID 0x18
|
||||
#define EFI_SECTION_RAW 0x19
|
||||
#define EFI_SECTION_PEI_DEPEX 0x1B
|
||||
|
||||
#define EFI_SECTION_LAST_LEAF_SECTION_TYPE 0x1B
|
||||
#define EFI_SECTION_LAST_SECTION_TYPE 0x1B
|
||||
|
||||
//
|
||||
// ////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Common section header
|
||||
//
|
||||
typedef struct {
|
||||
UINT8 Size[3];
|
||||
UINT8 Type;
|
||||
} EFI_COMMON_SECTION_HEADER;
|
||||
|
||||
#define SECTION_SIZE(SectionHeaderPtr) \
|
||||
((UINT32) (*((UINT32 *) ((EFI_COMMON_SECTION_HEADER *) SectionHeaderPtr)->Size) & 0x00ffffff))
|
||||
|
||||
//
|
||||
// ////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Compression section
|
||||
//
|
||||
//
|
||||
// CompressionType values
|
||||
//
|
||||
#define EFI_NOT_COMPRESSED 0x00
|
||||
#define EFI_STANDARD_COMPRESSION 0x01
|
||||
#define EFI_CUSTOMIZED_COMPRESSION 0x02
|
||||
|
||||
typedef struct {
|
||||
EFI_COMMON_SECTION_HEADER CommonHeader;
|
||||
UINT32 UncompressedLength;
|
||||
UINT8 CompressionType;
|
||||
} EFI_COMPRESSION_SECTION;
|
||||
|
||||
//
|
||||
// ////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// GUID defined section
|
||||
//
|
||||
typedef struct {
|
||||
EFI_COMMON_SECTION_HEADER CommonHeader;
|
||||
EFI_GUID SectionDefinitionGuid;
|
||||
UINT16 DataOffset;
|
||||
UINT16 Attributes;
|
||||
} EFI_GUID_DEFINED_SECTION;
|
||||
|
||||
//
|
||||
// Bit values for Attributes
|
||||
//
|
||||
#define EFI_GUIDED_SECTION_PROCESSING_REQUIRED 0x01
|
||||
#define EFI_GUIDED_SECTION_AUTH_STATUS_VALID 0x02
|
||||
|
||||
//
|
||||
// Bit values for AuthenticationStatus
|
||||
//
|
||||
#define EFI_AGGREGATE_AUTH_STATUS_PLATFORM_OVERRIDE 0x000001
|
||||
#define EFI_AGGREGATE_AUTH_STATUS_IMAGE_SIGNED 0x000002
|
||||
#define EFI_AGGREGATE_AUTH_STATUS_NOT_TESTED 0x000004
|
||||
#define EFI_AGGREGATE_AUTH_STATUS_TEST_FAILED 0x000008
|
||||
#define EFI_AGGREGATE_AUTH_STATUS_ALL 0x00000f
|
||||
|
||||
#define EFI_LOCAL_AUTH_STATUS_PLATFORM_OVERRIDE 0x010000
|
||||
#define EFI_LOCAL_AUTH_STATUS_IMAGE_SIGNED 0x020000
|
||||
#define EFI_LOCAL_AUTH_STATUS_NOT_TESTED 0x040000
|
||||
#define EFI_LOCAL_AUTH_STATUS_TEST_FAILED 0x080000
|
||||
#define EFI_LOCAL_AUTH_STATUS_ALL 0x0f0000
|
||||
|
||||
//
|
||||
// ////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// PE32+ section
|
||||
//
|
||||
typedef struct {
|
||||
EFI_COMMON_SECTION_HEADER CommonHeader;
|
||||
} EFI_PE32_SECTION;
|
||||
|
||||
//
|
||||
// ////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// PIC section
|
||||
//
|
||||
typedef struct {
|
||||
EFI_COMMON_SECTION_HEADER CommonHeader;
|
||||
} EFI_PIC_SECTION;
|
||||
|
||||
//
|
||||
// ////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// PEIM header section
|
||||
//
|
||||
typedef struct {
|
||||
EFI_COMMON_SECTION_HEADER CommonHeader;
|
||||
} EFI_PEIM_HEADER_SECTION;
|
||||
|
||||
//
|
||||
// ////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// DEPEX section
|
||||
//
|
||||
typedef struct {
|
||||
EFI_COMMON_SECTION_HEADER CommonHeader;
|
||||
} EFI_DEPEX_SECTION;
|
||||
|
||||
//
|
||||
// ////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Version section
|
||||
//
|
||||
typedef struct {
|
||||
EFI_COMMON_SECTION_HEADER CommonHeader;
|
||||
UINT16 BuildNumber;
|
||||
INT16 VersionString[1];
|
||||
} EFI_VERSION_SECTION;
|
||||
|
||||
//
|
||||
// ////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// User interface section
|
||||
//
|
||||
typedef struct {
|
||||
EFI_COMMON_SECTION_HEADER CommonHeader;
|
||||
INT16 FileNameString[1];
|
||||
} EFI_USER_INTERFACE_SECTION;
|
||||
|
||||
//
|
||||
// ////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Code16 section
|
||||
//
|
||||
typedef struct {
|
||||
EFI_COMMON_SECTION_HEADER CommonHeader;
|
||||
} EFI_CODE16_SECTION;
|
||||
|
||||
//
|
||||
// ////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Firmware Volume Image section
|
||||
//
|
||||
typedef struct {
|
||||
EFI_COMMON_SECTION_HEADER CommonHeader;
|
||||
} EFI_FIRMWARE_VOLUME_IMAGE_SECTION;
|
||||
|
||||
//
|
||||
// ////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Freeform subtype GUID section
|
||||
//
|
||||
typedef struct {
|
||||
EFI_COMMON_SECTION_HEADER CommonHeader;
|
||||
EFI_GUID SubTypeGuid;
|
||||
} EFI_FREEFORM_SUBTYPE_GUID_SECTION;
|
||||
|
||||
//
|
||||
// ////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Raw section
|
||||
//
|
||||
typedef struct {
|
||||
EFI_COMMON_SECTION_HEADER CommonHeader;
|
||||
} EFI_RAW_SECTION;
|
||||
|
||||
//
|
||||
// undo the pragma from the beginning...
|
||||
//
|
||||
#pragma pack()
|
||||
|
||||
typedef union {
|
||||
EFI_COMMON_SECTION_HEADER *CommonHeader;
|
||||
EFI_COMPRESSION_SECTION *CompressionSection;
|
||||
EFI_GUID_DEFINED_SECTION *GuidDefinedSection;
|
||||
EFI_PE32_SECTION *Pe32Section;
|
||||
EFI_PIC_SECTION *PicSection;
|
||||
EFI_PEIM_HEADER_SECTION *PeimHeaderSection;
|
||||
EFI_DEPEX_SECTION *DependencySection;
|
||||
EFI_VERSION_SECTION *VersionSection;
|
||||
EFI_USER_INTERFACE_SECTION *UISection;
|
||||
EFI_CODE16_SECTION *Code16Section;
|
||||
EFI_FIRMWARE_VOLUME_IMAGE_SECTION *FVImageSection;
|
||||
EFI_FREEFORM_SUBTYPE_GUID_SECTION *FreeformSubtypeSection;
|
||||
EFI_RAW_SECTION *RawSection;
|
||||
} EFI_FILE_SECTION_POINTER;
|
||||
|
||||
#endif
|
235
Tools/Source/TianoTools/Include/Common/Hob.h
Normal file
235
Tools/Source/TianoTools/Include/Common/Hob.h
Normal file
@ -0,0 +1,235 @@
|
||||
/** @file
|
||||
Hand Off Block (HOB) definition.
|
||||
|
||||
The HOB is a memory data structure used to hand-off system information from
|
||||
PEI to DXE (the next phase).
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
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
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
Module Name: Hob.h
|
||||
|
||||
@par Revision Reference:
|
||||
These definitions are from Hand Off Block (HOB) Spec Version 0.9.
|
||||
|
||||
**/
|
||||
|
||||
#ifndef __HOB_H__
|
||||
#define __HOB_H__
|
||||
|
||||
|
||||
//
|
||||
// Every Hob must start with this data structure.
|
||||
//
|
||||
typedef struct {
|
||||
UINT16 HobType;
|
||||
UINT16 HobLength;
|
||||
UINT32 Reserved;
|
||||
} EFI_HOB_GENERIC_HEADER;
|
||||
|
||||
//
|
||||
// End of HOB List HOB
|
||||
//
|
||||
#define EFI_HOB_TYPE_END_OF_HOB_LIST 0xffff
|
||||
|
||||
//
|
||||
// Handoff Information Table HOB
|
||||
//
|
||||
#define EFI_HOB_TYPE_HANDOFF 0x0001
|
||||
|
||||
#define EFI_HOB_HANDOFF_TABLE_VERSION 0x0009
|
||||
|
||||
typedef UINT32 EFI_BOOT_MODE;
|
||||
|
||||
typedef struct {
|
||||
EFI_HOB_GENERIC_HEADER Header;
|
||||
UINT32 Version;
|
||||
EFI_BOOT_MODE BootMode;
|
||||
EFI_PHYSICAL_ADDRESS EfiMemoryTop;
|
||||
EFI_PHYSICAL_ADDRESS EfiMemoryBottom;
|
||||
EFI_PHYSICAL_ADDRESS EfiFreeMemoryTop;
|
||||
EFI_PHYSICAL_ADDRESS EfiFreeMemoryBottom;
|
||||
EFI_PHYSICAL_ADDRESS EfiEndOfHobList;
|
||||
} EFI_HOB_HANDOFF_INFO_TABLE;
|
||||
|
||||
//
|
||||
// Memory Descriptor HOB
|
||||
//
|
||||
#define EFI_HOB_TYPE_MEMORY_ALLOCATION 0x0002
|
||||
|
||||
typedef struct {
|
||||
EFI_GUID Name;
|
||||
EFI_PHYSICAL_ADDRESS MemoryBaseAddress;
|
||||
UINT64 MemoryLength;
|
||||
EFI_MEMORY_TYPE MemoryType;
|
||||
UINT8 Reserved[4];
|
||||
} EFI_HOB_MEMORY_ALLOCATION_HEADER;
|
||||
|
||||
typedef struct {
|
||||
EFI_HOB_GENERIC_HEADER Header;
|
||||
EFI_HOB_MEMORY_ALLOCATION_HEADER AllocDescriptor;
|
||||
//
|
||||
// Additional data pertaining to the "Name" Guid memory
|
||||
// may go here.
|
||||
//
|
||||
} EFI_HOB_MEMORY_ALLOCATION;
|
||||
|
||||
typedef struct {
|
||||
EFI_HOB_GENERIC_HEADER Header;
|
||||
EFI_HOB_MEMORY_ALLOCATION_HEADER AllocDescriptor;
|
||||
} EFI_HOB_MEMORY_ALLOCATION_BSP_STORE;
|
||||
|
||||
typedef struct {
|
||||
EFI_HOB_GENERIC_HEADER Header;
|
||||
EFI_HOB_MEMORY_ALLOCATION_HEADER AllocDescriptor;
|
||||
} EFI_HOB_MEMORY_ALLOCATION_STACK;
|
||||
|
||||
typedef struct {
|
||||
EFI_HOB_GENERIC_HEADER Header;
|
||||
EFI_HOB_MEMORY_ALLOCATION_HEADER MemoryAllocationHeader;
|
||||
EFI_GUID ModuleName;
|
||||
EFI_PHYSICAL_ADDRESS EntryPoint;
|
||||
} EFI_HOB_MEMORY_ALLOCATION_MODULE;
|
||||
|
||||
#define EFI_HOB_TYPE_RESOURCE_DESCRIPTOR 0x0003
|
||||
|
||||
typedef UINT32 EFI_RESOURCE_TYPE;
|
||||
|
||||
#define EFI_RESOURCE_SYSTEM_MEMORY 0
|
||||
#define EFI_RESOURCE_MEMORY_MAPPED_IO 1
|
||||
#define EFI_RESOURCE_IO 2
|
||||
#define EFI_RESOURCE_FIRMWARE_DEVICE 3
|
||||
#define EFI_RESOURCE_MEMORY_MAPPED_IO_PORT 4
|
||||
#define EFI_RESOURCE_MEMORY_RESERVED 5
|
||||
#define EFI_RESOURCE_IO_RESERVED 6
|
||||
#define EFI_RESOURCE_MAX_MEMORY_TYPE 7
|
||||
|
||||
typedef UINT32 EFI_RESOURCE_ATTRIBUTE_TYPE;
|
||||
|
||||
#define EFI_RESOURCE_ATTRIBUTE_PRESENT 0x00000001
|
||||
#define EFI_RESOURCE_ATTRIBUTE_INITIALIZED 0x00000002
|
||||
#define EFI_RESOURCE_ATTRIBUTE_TESTED 0x00000004
|
||||
#define EFI_RESOURCE_ATTRIBUTE_SINGLE_BIT_ECC 0x00000008
|
||||
#define EFI_RESOURCE_ATTRIBUTE_MULTIPLE_BIT_ECC 0x00000010
|
||||
#define EFI_RESOURCE_ATTRIBUTE_ECC_RESERVED_1 0x00000020
|
||||
#define EFI_RESOURCE_ATTRIBUTE_ECC_RESERVED_2 0x00000040
|
||||
#define EFI_RESOURCE_ATTRIBUTE_READ_PROTECTED 0x00000080
|
||||
#define EFI_RESOURCE_ATTRIBUTE_WRITE_PROTECTED 0x00000100
|
||||
#define EFI_RESOURCE_ATTRIBUTE_EXECUTION_PROTECTED 0x00000200
|
||||
#define EFI_RESOURCE_ATTRIBUTE_UNCACHEABLE 0x00000400
|
||||
#define EFI_RESOURCE_ATTRIBUTE_WRITE_COMBINEABLE 0x00000800
|
||||
#define EFI_RESOURCE_ATTRIBUTE_WRITE_THROUGH_CACHEABLE 0x00001000
|
||||
#define EFI_RESOURCE_ATTRIBUTE_WRITE_BACK_CACHEABLE 0x00002000
|
||||
#define EFI_RESOURCE_ATTRIBUTE_16_BIT_IO 0x00004000
|
||||
#define EFI_RESOURCE_ATTRIBUTE_32_BIT_IO 0x00008000
|
||||
#define EFI_RESOURCE_ATTRIBUTE_64_BIT_IO 0x00010000
|
||||
#define EFI_RESOURCE_ATTRIBUTE_UNCACHED_EXPORTED 0x00020000
|
||||
|
||||
typedef struct {
|
||||
EFI_HOB_GENERIC_HEADER Header;
|
||||
EFI_GUID Owner;
|
||||
EFI_RESOURCE_TYPE ResourceType;
|
||||
EFI_RESOURCE_ATTRIBUTE_TYPE ResourceAttribute;
|
||||
EFI_PHYSICAL_ADDRESS PhysicalStart;
|
||||
UINT64 ResourceLength;
|
||||
} EFI_HOB_RESOURCE_DESCRIPTOR;
|
||||
|
||||
//
|
||||
// GUID Extension HOB
|
||||
// The HobLength is variable as it includes the GUID specific data.
|
||||
//
|
||||
#define EFI_HOB_TYPE_GUID_EXTENSION 0x0004
|
||||
|
||||
typedef struct {
|
||||
EFI_HOB_GENERIC_HEADER Header;
|
||||
EFI_GUID Name;
|
||||
|
||||
//
|
||||
// Guid specific data goes here
|
||||
//
|
||||
} EFI_HOB_GUID_TYPE;
|
||||
|
||||
//
|
||||
// Firmware Volume HOB
|
||||
//
|
||||
#define EFI_HOB_TYPE_FV 0x0005
|
||||
|
||||
typedef struct {
|
||||
EFI_HOB_GENERIC_HEADER Header;
|
||||
EFI_PHYSICAL_ADDRESS BaseAddress;
|
||||
UINT64 Length;
|
||||
} EFI_HOB_FIRMWARE_VOLUME;
|
||||
|
||||
//
|
||||
// CPU HOB
|
||||
//
|
||||
#define EFI_HOB_TYPE_CPU 0x0006
|
||||
|
||||
typedef struct {
|
||||
EFI_HOB_GENERIC_HEADER Header;
|
||||
UINT8 SizeOfMemorySpace;
|
||||
UINT8 SizeOfIoSpace;
|
||||
UINT8 Reserved[6];
|
||||
} EFI_HOB_CPU;
|
||||
|
||||
//
|
||||
// PEI Core Memory Pool HOB
|
||||
// The HobLength is variable as the HOB contains pool allocations by
|
||||
// the PeiServices AllocatePool function
|
||||
//
|
||||
#define EFI_HOB_TYPE_PEI_MEMORY_POOL 0x0007
|
||||
|
||||
typedef struct {
|
||||
EFI_HOB_GENERIC_HEADER Header;
|
||||
} EFI_HOB_MEMORY_POOL;
|
||||
|
||||
//
|
||||
// Capsule volume HOB -- identical to a firmware volume
|
||||
//
|
||||
#define EFI_HOB_TYPE_CV 0x0008
|
||||
|
||||
typedef struct {
|
||||
EFI_HOB_GENERIC_HEADER Header;
|
||||
EFI_PHYSICAL_ADDRESS BaseAddress;
|
||||
UINT64 Length;
|
||||
} EFI_HOB_CAPSULE_VOLUME;
|
||||
|
||||
#define EFI_HOB_TYPE_UNUSED 0xFFFE
|
||||
|
||||
//
|
||||
// Union of all the possible HOB Types
|
||||
//
|
||||
typedef union {
|
||||
EFI_HOB_GENERIC_HEADER *Header;
|
||||
EFI_HOB_HANDOFF_INFO_TABLE *HandoffInformationTable;
|
||||
EFI_HOB_MEMORY_ALLOCATION *MemoryAllocation;
|
||||
EFI_HOB_MEMORY_ALLOCATION_BSP_STORE *MemoryAllocationBspStore;
|
||||
EFI_HOB_MEMORY_ALLOCATION_STACK *MemoryAllocationStack;
|
||||
EFI_HOB_MEMORY_ALLOCATION_MODULE *MemoryAllocationModule;
|
||||
EFI_HOB_RESOURCE_DESCRIPTOR *ResourceDescriptor;
|
||||
EFI_HOB_GUID_TYPE *Guid;
|
||||
EFI_HOB_FIRMWARE_VOLUME *FirmwareVolume;
|
||||
EFI_HOB_CPU *Cpu;
|
||||
EFI_HOB_MEMORY_POOL *Pool;
|
||||
EFI_HOB_CAPSULE_VOLUME *CapsuleVolume;
|
||||
UINT8 *Raw;
|
||||
} EFI_PEI_HOB_POINTERS;
|
||||
|
||||
#define GET_HOB_TYPE(Hob) ((Hob).Header->HobType)
|
||||
#define GET_HOB_LENGTH(Hob) ((Hob).Header->HobLength)
|
||||
#define GET_NEXT_HOB(Hob) ((Hob).Raw + GET_HOB_LENGTH (Hob))
|
||||
#define END_OF_HOB_LIST(Hob) (GET_HOB_TYPE (Hob) == EFI_HOB_TYPE_END_OF_HOB_LIST)
|
||||
|
||||
//
|
||||
// Get the data and data size field of GUID
|
||||
//
|
||||
#define GET_GUID_HOB_DATA(GuidHob) ((VOID *) (((UINT8 *) &((GuidHob)->Name)) + sizeof (EFI_GUID)))
|
||||
#define GET_GUID_HOB_DATA_SIZE(GuidHob) (((GuidHob)->Header).HobLength - sizeof (EFI_HOB_GUID_TYPE))
|
||||
|
||||
#endif
|
@ -0,0 +1,422 @@
|
||||
/** @file
|
||||
This file defines the encoding for the VFR (Visual Form Representation) language.
|
||||
IFR is primarily consumed by the EFI presentation engine, and produced by EFI
|
||||
internal application and drivers as well as all add-in card option-ROM drivers
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
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
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
Module Name: InternalFormRepresentation.h
|
||||
|
||||
@par Revision Reference:
|
||||
These definitions are from Human Interface Infrastructure Spec Version 0.92.
|
||||
|
||||
**/
|
||||
|
||||
#ifndef __EFI_INTERNAL_FORM_REPRESENTATION_H__
|
||||
#define __EFI_INTERNAL_FORM_REPRESENTATION_H__
|
||||
|
||||
//
|
||||
// The following types are currently defined:
|
||||
//
|
||||
typedef UINT32 RELOFST;
|
||||
typedef CHAR16 *EFI_STRING;
|
||||
|
||||
//
|
||||
// IFR Op codes
|
||||
//
|
||||
#define EFI_IFR_FORM_OP 0x01
|
||||
#define EFI_IFR_SUBTITLE_OP 0x02
|
||||
#define EFI_IFR_TEXT_OP 0x03
|
||||
#define EFI_IFR_GRAPHIC_OP 0x04
|
||||
#define EFI_IFR_ONE_OF_OP 0x05
|
||||
#define EFI_IFR_CHECKBOX_OP 0x06
|
||||
#define EFI_IFR_NUMERIC_OP 0x07
|
||||
#define EFI_IFR_PASSWORD_OP 0x08
|
||||
#define EFI_IFR_ONE_OF_OPTION_OP 0x09 // ONEOF OPTION field
|
||||
#define EFI_IFR_SUPPRESS_IF_OP 0x0A
|
||||
#define EFI_IFR_END_FORM_OP 0x0B
|
||||
#define EFI_IFR_HIDDEN_OP 0x0C
|
||||
#define EFI_IFR_END_FORM_SET_OP 0x0D
|
||||
#define EFI_IFR_FORM_SET_OP 0x0E
|
||||
#define EFI_IFR_REF_OP 0x0F
|
||||
#define EFI_IFR_END_ONE_OF_OP 0x10
|
||||
#define EFI_IFR_END_OP EFI_IFR_END_ONE_OF_OP
|
||||
#define EFI_IFR_INCONSISTENT_IF_OP 0x11
|
||||
#define EFI_IFR_EQ_ID_VAL_OP 0x12
|
||||
#define EFI_IFR_EQ_ID_ID_OP 0x13
|
||||
#define EFI_IFR_EQ_ID_LIST_OP 0x14
|
||||
#define EFI_IFR_AND_OP 0x15
|
||||
#define EFI_IFR_OR_OP 0x16
|
||||
#define EFI_IFR_NOT_OP 0x17
|
||||
#define EFI_IFR_END_IF_OP 0x18 // for endif of inconsistentif, suppressif, grayoutif
|
||||
#define EFI_IFR_GRAYOUT_IF_OP 0x19
|
||||
#define EFI_IFR_DATE_OP 0x1A
|
||||
#define EFI_IFR_TIME_OP 0x1B
|
||||
#define EFI_IFR_STRING_OP 0x1C
|
||||
#define EFI_IFR_LABEL_OP 0x1D
|
||||
#define EFI_IFR_SAVE_DEFAULTS_OP 0x1E
|
||||
#define EFI_IFR_RESTORE_DEFAULTS_OP 0x1F
|
||||
#define EFI_IFR_BANNER_OP 0x20
|
||||
#define EFI_IFR_INVENTORY_OP 0x21
|
||||
#define EFI_IFR_EQ_VAR_VAL_OP 0x22
|
||||
#define EFI_IFR_ORDERED_LIST_OP 0x23
|
||||
#define EFI_IFR_VARSTORE_OP 0x24
|
||||
#define EFI_IFR_VARSTORE_SELECT_OP 0x25
|
||||
#define EFI_IFR_VARSTORE_SELECT_PAIR_OP 0x26
|
||||
#define EFI_IFR_TRUE_OP 0x27
|
||||
#define EFI_IFR_FALSE_OP 0x28
|
||||
#define EFI_IFR_GT_OP 0x29
|
||||
#define EFI_IFR_GE_OP 0x2A
|
||||
#define EFI_IFR_OEM_DEFINED_OP 0x2B
|
||||
#define EFI_IFR_LAST_OPCODE EFI_IFR_OEM_DEFINED_OP
|
||||
#define EFI_IFR_OEM_OP 0xFE
|
||||
#define EFI_IFR_NV_ACCESS_COMMAND 0xFF
|
||||
|
||||
//
|
||||
// Define values for the flags fields in some VFR opcodes. These are
|
||||
// bitmasks.
|
||||
//
|
||||
#define EFI_IFR_FLAG_DEFAULT 0x01
|
||||
#define EFI_IFR_FLAG_MANUFACTURING 0x02
|
||||
#define EFI_IFR_FLAG_INTERACTIVE 0x04
|
||||
#define EFI_IFR_FLAG_NV_ACCESS 0x08
|
||||
#define EFI_IFR_FLAG_RESET_REQUIRED 0x10
|
||||
#define EFI_IFR_FLAG_LATE_CHECK 0x20
|
||||
|
||||
#define EFI_NON_DEVICE_CLASS 0x00 // Useful when you do not want something in the Device Manager
|
||||
#define EFI_DISK_DEVICE_CLASS 0x01
|
||||
#define EFI_VIDEO_DEVICE_CLASS 0x02
|
||||
#define EFI_NETWORK_DEVICE_CLASS 0x04
|
||||
#define EFI_INPUT_DEVICE_CLASS 0x08
|
||||
#define EFI_ON_BOARD_DEVICE_CLASS 0x10
|
||||
#define EFI_OTHER_DEVICE_CLASS 0x20
|
||||
|
||||
#define EFI_SETUP_APPLICATION_SUBCLASS 0x00
|
||||
#define EFI_GENERAL_APPLICATION_SUBCLASS 0x01
|
||||
#define EFI_FRONT_PAGE_SUBCLASS 0x02
|
||||
#define EFI_SINGLE_USE_SUBCLASS 0x03 // Used to display a single entity and then exit
|
||||
|
||||
//
|
||||
// Used to flag dynamically created op-codes. This is meaningful to the IFR Library set
|
||||
// and the browser since we need to distinguish between compiled NV map data and created data.
|
||||
// We do not allow new entries to be created in the NV map dynamically however we still need
|
||||
// to display this information correctly. To dynamically create op-codes and assume that their
|
||||
// data will be saved, ensure that the NV starting location they refer to is pre-defined in the
|
||||
// NV map.
|
||||
//
|
||||
#define EFI_IFR_FLAG_CREATED 128
|
||||
|
||||
#pragma pack(1)
|
||||
//
|
||||
// IFR Structure definitions
|
||||
//
|
||||
typedef struct {
|
||||
UINT8 OpCode;
|
||||
UINT8 Length;
|
||||
} EFI_IFR_OP_HEADER;
|
||||
|
||||
typedef struct {
|
||||
EFI_IFR_OP_HEADER Header;
|
||||
EFI_GUID Guid;
|
||||
STRING_REF FormSetTitle;
|
||||
STRING_REF Help;
|
||||
EFI_PHYSICAL_ADDRESS CallbackHandle;
|
||||
UINT16 Class;
|
||||
UINT16 SubClass;
|
||||
UINT16 NvDataSize; // set once, size of the NV data as defined in the script
|
||||
} EFI_IFR_FORM_SET;
|
||||
|
||||
typedef struct {
|
||||
EFI_IFR_OP_HEADER Header;
|
||||
UINT16 FormId;
|
||||
STRING_REF FormTitle;
|
||||
} EFI_IFR_FORM;
|
||||
|
||||
typedef struct {
|
||||
EFI_IFR_OP_HEADER Header;
|
||||
UINT16 LabelId;
|
||||
} EFI_IFR_LABEL;
|
||||
|
||||
typedef struct {
|
||||
EFI_IFR_OP_HEADER Header;
|
||||
STRING_REF SubTitle;
|
||||
} EFI_IFR_SUBTITLE;
|
||||
|
||||
typedef struct {
|
||||
EFI_IFR_OP_HEADER Header;
|
||||
STRING_REF Help;
|
||||
STRING_REF Text;
|
||||
STRING_REF TextTwo;
|
||||
UINT8 Flags; // This is included solely for purposes of interactive/dynamic support.
|
||||
UINT16 Key; // Value to be passed to caller to identify this particular op-code
|
||||
} EFI_IFR_TEXT;
|
||||
|
||||
//
|
||||
// goto
|
||||
//
|
||||
typedef struct {
|
||||
EFI_IFR_OP_HEADER Header;
|
||||
UINT16 FormId;
|
||||
STRING_REF Prompt;
|
||||
STRING_REF Help; // The string Token for the context-help
|
||||
UINT8 Flags; // This is included solely for purposes of interactive/dynamic support.
|
||||
UINT16 Key; // Value to be passed to caller to identify this particular op-code
|
||||
} EFI_IFR_REF;
|
||||
|
||||
typedef struct {
|
||||
EFI_IFR_OP_HEADER Header;
|
||||
} EFI_IFR_END_FORM;
|
||||
|
||||
typedef struct {
|
||||
EFI_IFR_OP_HEADER Header;
|
||||
} EFI_IFR_END_FORM_SET;
|
||||
|
||||
//
|
||||
// Also notice that the IFR_ONE_OF and IFR_CHECK_BOX are identical in structure......code assumes this to be true, if this ever
|
||||
// changes we need to revisit the InitializeTagStructures code
|
||||
//
|
||||
typedef struct {
|
||||
EFI_IFR_OP_HEADER Header;
|
||||
UINT16 QuestionId; // The ID designating what the question is about...sucked in from a #define, likely in the form of a variable name
|
||||
UINT8 Width; // The Size of the Data being saved
|
||||
STRING_REF Prompt; // The String Token for the Prompt
|
||||
STRING_REF Help; // The string Token for the context-help
|
||||
} EFI_IFR_ONE_OF;
|
||||
|
||||
typedef struct {
|
||||
EFI_IFR_OP_HEADER Header;
|
||||
UINT16 QuestionId; // The offset in NV for storage of the data
|
||||
UINT8 MaxEntries; // The maximum number of options in the ordered list (=size of NVStore)
|
||||
STRING_REF Prompt; // The string token for the prompt
|
||||
STRING_REF Help; // The string token for the context-help
|
||||
} EFI_IFR_ORDERED_LIST;
|
||||
|
||||
typedef struct {
|
||||
EFI_IFR_OP_HEADER Header;
|
||||
UINT16 QuestionId; // The ID designating what the question is about...sucked in from a #define, likely in the form of a variable name
|
||||
UINT8 Width; // The Size of the Data being saved
|
||||
STRING_REF Prompt; // The String Token for the Prompt
|
||||
STRING_REF Help; // The string Token for the context-help
|
||||
UINT8 Flags; // For now, if non-zero, means that it is the default option, - further definition likely
|
||||
UINT16 Key; // Value to be passed to caller to identify this particular op-code
|
||||
} EFI_IFR_CHECKBOX, EFI_IFR_CHECK_BOX;
|
||||
|
||||
typedef struct {
|
||||
EFI_IFR_OP_HEADER Header;
|
||||
STRING_REF Option; // The string token describing the option
|
||||
UINT16 Value; // The value associated with this option that is stored in the NVRAM if chosen
|
||||
UINT8 Flags; // For now, if non-zero, means that it is the default option, - further definition likely above
|
||||
UINT16 Key; // Value to be passed to caller to identify this particular op-code
|
||||
} EFI_IFR_ONE_OF_OPTION;
|
||||
|
||||
typedef struct {
|
||||
EFI_IFR_OP_HEADER Header;
|
||||
UINT16 QuestionId; // The ID designating what the question is about...sucked in from a #define, likely in the form of a variable name
|
||||
UINT8 Width; // The Size of the Data being saved
|
||||
STRING_REF Prompt; // The String Token for the Prompt
|
||||
STRING_REF Help; // The string Token for the context-help
|
||||
UINT8 Flags; // This is included solely for purposes of interactive/dynamic support.
|
||||
UINT16 Key; // Value to be passed to caller to identify this particular op-code
|
||||
UINT16 Minimum;
|
||||
UINT16 Maximum;
|
||||
UINT16 Step; // If step is 0, then manual input is specified, otherwise, left/right arrow selection is called for
|
||||
UINT16 Default;
|
||||
} EFI_IFR_NUMERIC;
|
||||
|
||||
//
|
||||
// There is an interesting twist with regards to Time and Date. This is one of the few items which can accept input from
|
||||
// a user, however may or may not need to use storage in the NVRAM space. The decided method for determining if NVRAM space
|
||||
// will be used (only for a TimeOp or DateOp) is: If .QuestionId == 0 && .Width == 0 (normally an impossibility) then use system
|
||||
// resources to store the data away and not NV resources. In other words, the setup engine will call gRT->SetTime, and gRT->SetDate
|
||||
// for the saving of data, and the values displayed will be from the gRT->GetXXXX series of calls.
|
||||
//
|
||||
typedef struct {
|
||||
EFI_IFR_NUMERIC Hour;
|
||||
EFI_IFR_NUMERIC Minute;
|
||||
EFI_IFR_NUMERIC Second;
|
||||
} EFI_IFR_TIME;
|
||||
|
||||
typedef struct {
|
||||
EFI_IFR_NUMERIC Year;
|
||||
EFI_IFR_NUMERIC Month;
|
||||
EFI_IFR_NUMERIC Day;
|
||||
} EFI_IFR_DATE;
|
||||
|
||||
typedef struct {
|
||||
EFI_IFR_OP_HEADER Header;
|
||||
UINT16 QuestionId; // The ID designating what the question is about...sucked in from a #define, likely in the form of a variable name
|
||||
UINT8 Width; // The Size of the Data being saved -- BUGBUG -- remove someday
|
||||
STRING_REF Prompt; // The String Token for the Prompt
|
||||
STRING_REF Help; // The string Token for the context-help
|
||||
UINT8 Flags; // This is included solely for purposes of interactive/dynamic support.
|
||||
UINT16 Key; // Value to be passed to caller to identify this particular op-code
|
||||
UINT8 MinSize; // Minimum allowable sized password
|
||||
UINT8 MaxSize; // Maximum allowable sized password
|
||||
UINT16 Encoding;
|
||||
} EFI_IFR_PASSWORD;
|
||||
|
||||
typedef struct {
|
||||
EFI_IFR_OP_HEADER Header;
|
||||
UINT16 QuestionId; // The ID designating what the question is about...sucked in from a #define, likely in the form of a variable name
|
||||
UINT8 Width; // The Size of the Data being saved -- BUGBUG -- remove someday
|
||||
STRING_REF Prompt; // The String Token for the Prompt
|
||||
STRING_REF Help; // The string Token for the context-help
|
||||
UINT8 Flags; // This is included solely for purposes of interactive/dynamic support.
|
||||
UINT16 Key; // Value to be passed to caller to identify this particular op-code
|
||||
UINT8 MinSize; // Minimum allowable sized password
|
||||
UINT8 MaxSize; // Maximum allowable sized password
|
||||
} EFI_IFR_STRING;
|
||||
|
||||
typedef struct {
|
||||
EFI_IFR_OP_HEADER Header;
|
||||
} EFI_IFR_END_ONE_OF;
|
||||
|
||||
typedef struct {
|
||||
EFI_IFR_OP_HEADER Header;
|
||||
UINT16 Value;
|
||||
UINT16 Key;
|
||||
} EFI_IFR_HIDDEN;
|
||||
|
||||
typedef struct {
|
||||
EFI_IFR_OP_HEADER Header;
|
||||
UINT8 Flags;
|
||||
} EFI_IFR_SUPPRESS;
|
||||
|
||||
typedef struct {
|
||||
EFI_IFR_OP_HEADER Header;
|
||||
UINT8 Flags;
|
||||
} EFI_IFR_GRAY_OUT;
|
||||
|
||||
typedef struct {
|
||||
EFI_IFR_OP_HEADER Header;
|
||||
STRING_REF Popup;
|
||||
UINT8 Flags;
|
||||
} EFI_IFR_INCONSISTENT;
|
||||
|
||||
typedef struct {
|
||||
EFI_IFR_OP_HEADER Header;
|
||||
UINT16 QuestionId; // offset into variable storage
|
||||
UINT8 Width; // size of variable storage
|
||||
UINT16 Value; // value to compare against
|
||||
} EFI_IFR_EQ_ID_VAL;
|
||||
|
||||
typedef struct {
|
||||
EFI_IFR_OP_HEADER Header;
|
||||
UINT16 QuestionId; // offset into variable storage
|
||||
UINT8 Width; // size of variable storage
|
||||
UINT16 ListLength;
|
||||
UINT16 ValueList[1];
|
||||
} EFI_IFR_EQ_ID_LIST;
|
||||
|
||||
typedef struct {
|
||||
EFI_IFR_OP_HEADER Header;
|
||||
UINT16 QuestionId1; // offset into variable storage for first value to compare
|
||||
UINT8 Width; // size of variable storage (must be same for both)
|
||||
UINT16 QuestionId2; // offset into variable storage for second value to compare
|
||||
} EFI_IFR_EQ_ID_ID;
|
||||
|
||||
typedef struct {
|
||||
EFI_IFR_OP_HEADER Header;
|
||||
UINT16 VariableId; // offset into variable storage
|
||||
UINT16 Value; // value to compare against
|
||||
} EFI_IFR_EQ_VAR_VAL;
|
||||
|
||||
typedef struct {
|
||||
EFI_IFR_OP_HEADER Header;
|
||||
} EFI_IFR_AND;
|
||||
|
||||
typedef struct {
|
||||
EFI_IFR_OP_HEADER Header;
|
||||
} EFI_IFR_OR;
|
||||
|
||||
typedef struct {
|
||||
EFI_IFR_OP_HEADER Header;
|
||||
} EFI_IFR_NOT;
|
||||
|
||||
typedef struct {
|
||||
EFI_IFR_OP_HEADER Header;
|
||||
} EFI_IFR_END_EXPR, EFI_IFR_END_IF;
|
||||
|
||||
typedef struct {
|
||||
EFI_IFR_OP_HEADER Header;
|
||||
UINT16 FormId;
|
||||
STRING_REF Prompt;
|
||||
STRING_REF Help;
|
||||
UINT8 Flags;
|
||||
UINT16 Key;
|
||||
} EFI_IFR_SAVE_DEFAULTS;
|
||||
|
||||
typedef struct {
|
||||
EFI_IFR_OP_HEADER Header;
|
||||
STRING_REF Help;
|
||||
STRING_REF Text;
|
||||
STRING_REF TextTwo; // optional text
|
||||
} EFI_IFR_INVENTORY;
|
||||
|
||||
typedef struct {
|
||||
EFI_IFR_OP_HEADER Header;
|
||||
EFI_GUID Guid; // GUID for the variable
|
||||
UINT16 VarId; // variable store ID, as referenced elsewhere in the form
|
||||
UINT16 Size; // size of the variable storage
|
||||
} EFI_IFR_VARSTORE;
|
||||
|
||||
typedef struct {
|
||||
EFI_IFR_OP_HEADER Header;
|
||||
UINT16 VarId; // variable store ID, as referenced elsewhere in the form
|
||||
} EFI_IFR_VARSTORE_SELECT;
|
||||
|
||||
//
|
||||
// Used for the ideqid VFR statement where two variable stores may be referenced in the
|
||||
// same VFR statement.
|
||||
// A browser should treat this as an EFI_IFR_VARSTORE_SELECT statement and assume that all following
|
||||
// IFR opcodes use the VarId as defined here.
|
||||
//
|
||||
typedef struct {
|
||||
EFI_IFR_OP_HEADER Header;
|
||||
UINT16 VarId; // variable store ID, as referenced elsewhere in the form
|
||||
UINT16 SecondaryVarId; // variable store ID, as referenced elsewhere in the form
|
||||
} EFI_IFR_VARSTORE_SELECT_PAIR;
|
||||
|
||||
typedef struct {
|
||||
EFI_IFR_OP_HEADER Header;
|
||||
} EFI_IFR_TRUE;
|
||||
|
||||
typedef struct {
|
||||
EFI_IFR_OP_HEADER Header;
|
||||
} EFI_IFR_FALSE;
|
||||
|
||||
typedef struct {
|
||||
EFI_IFR_OP_HEADER Header;
|
||||
} EFI_IFR_GT;
|
||||
|
||||
typedef struct {
|
||||
EFI_IFR_OP_HEADER Header;
|
||||
} EFI_IFR_GE;
|
||||
|
||||
//
|
||||
// Save defaults and restore defaults have same structure
|
||||
//
|
||||
#define EFI_IFR_RESTORE_DEFAULTS EFI_IFR_SAVE_DEFAULTS
|
||||
|
||||
typedef struct {
|
||||
EFI_IFR_OP_HEADER Header;
|
||||
STRING_REF Title; // The string token for the banner title
|
||||
UINT16 LineNumber; // 1-based line number
|
||||
UINT8 Alignment; // left, center, or right-aligned
|
||||
} EFI_IFR_BANNER;
|
||||
|
||||
#define EFI_IFR_BANNER_ALIGN_LEFT 0
|
||||
#define EFI_IFR_BANNER_ALIGN_CENTER 1
|
||||
#define EFI_IFR_BANNER_ALIGN_RIGHT 2
|
||||
#define EFI_IFR_BANNER_TIMEOUT 0xFF
|
||||
|
||||
#pragma pack()
|
||||
|
||||
#endif
|
84
Tools/Source/TianoTools/Include/Common/MultiPhase.h
Normal file
84
Tools/Source/TianoTools/Include/Common/MultiPhase.h
Normal file
@ -0,0 +1,84 @@
|
||||
/** @file
|
||||
This includes some definitions that will be used in both PEI and DXE phases.
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
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
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
Module Name: MultiPhase.h
|
||||
|
||||
**/
|
||||
|
||||
#ifndef __MULTI_PHASE_H__
|
||||
#define __MULTI_PHASE_H__
|
||||
|
||||
//
|
||||
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
//
|
||||
// Needed EFI defines for PEI
|
||||
//
|
||||
typedef UINT64 EFI_PHYSICAL_ADDRESS;
|
||||
|
||||
typedef enum {
|
||||
EfiReservedMemoryType,
|
||||
EfiLoaderCode,
|
||||
EfiLoaderData,
|
||||
EfiBootServicesCode,
|
||||
EfiBootServicesData,
|
||||
EfiRuntimeServicesCode,
|
||||
EfiRuntimeServicesData,
|
||||
EfiConventionalMemory,
|
||||
EfiUnusableMemory,
|
||||
EfiACPIReclaimMemory,
|
||||
EfiACPIMemoryNVS,
|
||||
EfiMemoryMappedIO,
|
||||
EfiMemoryMappedIOPortSpace,
|
||||
EfiPalCode,
|
||||
EfiMaxMemoryType
|
||||
} EFI_MEMORY_TYPE;
|
||||
|
||||
typedef UINT32 EFI_STATUS_CODE_TYPE;
|
||||
typedef UINT32 EFI_STATUS_CODE_VALUE;
|
||||
|
||||
typedef struct {
|
||||
UINT16 HeaderSize;
|
||||
UINT16 Size;
|
||||
EFI_GUID Type;
|
||||
} EFI_STATUS_CODE_DATA;
|
||||
|
||||
typedef struct {
|
||||
UINT64 Signature;
|
||||
UINT32 Revision;
|
||||
UINT32 HeaderSize;
|
||||
UINT32 CRC32;
|
||||
UINT32 Reserved;
|
||||
} EFI_TABLE_HEADER;
|
||||
|
||||
#define EFI_PAGE_SIZE 4096
|
||||
|
||||
|
||||
typedef VOID *EFI_HANDLE;
|
||||
typedef UINT16 EFI_HII_HANDLE;
|
||||
typedef UINT16 STRING_REF;
|
||||
typedef struct {
|
||||
INT16 Value;
|
||||
INT16 Exponent;
|
||||
} EFI_EXP_BASE10_DATA;
|
||||
|
||||
//
|
||||
// Define macros to build data structure signatures from characters.
|
||||
//
|
||||
#define EFI_SIGNATURE_16(A, B) ((A) | (B << 8))
|
||||
#define EFI_SIGNATURE_32(A, B, C, D) (EFI_SIGNATURE_16 (A, B) | (EFI_SIGNATURE_16 (C, D) << 16))
|
||||
#define EFI_SIGNATURE_64(A, B, C, D, E, F, G, H) \
|
||||
(EFI_SIGNATURE_32 (A, B, C, D) | ((UINT64) (EFI_SIGNATURE_32 (E, F, G, H)) << 32))
|
||||
|
||||
|
||||
#include <Protocol/DevicePath.h>
|
||||
|
||||
#endif
|
912
Tools/Source/TianoTools/Include/Common/StatusCode.h
Normal file
912
Tools/Source/TianoTools/Include/Common/StatusCode.h
Normal file
@ -0,0 +1,912 @@
|
||||
/** @file
|
||||
Status Code Definitions, according to Intel Platform Innovation Framework
|
||||
for EFI Status Codes Specification
|
||||
|
||||
The file is divided into sections for ease of use.
|
||||
|
||||
<pre>
|
||||
Section: Contents:
|
||||
1 General Status Code Definitions
|
||||
2 Class definitions
|
||||
3 Computing Unit Subclasses, Progress and Error Codes
|
||||
4 Peripheral Subclasses, Progress and Error Codes.
|
||||
5 IO Bus Subclasses, Progress and Error Codes.
|
||||
6 Software Subclasses, Progress and Error Codes.
|
||||
7 Debug Codes
|
||||
</pre>
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
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
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
Module Name: StatusCode.h
|
||||
|
||||
@par Revision Reference:
|
||||
Version 0.92.
|
||||
|
||||
**/
|
||||
|
||||
#ifndef _EFI_STATUS_CODE_H_
|
||||
#define _EFI_STATUS_CODE_H_
|
||||
|
||||
|
||||
//
|
||||
// /////////////////////////////////////////////////////////////////////////////
|
||||
// Section 1
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//
|
||||
// A Status Code Type is made up of the code type and severity
|
||||
// All values masked by EFI_STATUS_CODE_RESERVED_MASK are
|
||||
// reserved for use by this specification.
|
||||
//
|
||||
#define EFI_STATUS_CODE_TYPE_MASK 0x000000FF
|
||||
#define EFI_STATUS_CODE_SEVERITY_MASK 0xFF000000
|
||||
#define EFI_STATUS_CODE_RESERVED_MASK 0x00FFFF00
|
||||
|
||||
//
|
||||
// Definition of code types, all other values masked by
|
||||
// EFI_STATUS_CODE_TYPE_MASK are reserved for use by
|
||||
// this specification.
|
||||
//
|
||||
#define EFI_PROGRESS_CODE 0x00000001
|
||||
#define EFI_ERROR_CODE 0x00000002
|
||||
#define EFI_DEBUG_CODE 0x00000003
|
||||
|
||||
//
|
||||
// Definitions of severities, all other values masked by
|
||||
// EFI_STATUS_CODE_SEVERITY_MASK are reserved for use by
|
||||
// this specification.
|
||||
//
|
||||
#define EFI_ERROR_MINOR 0x40000000
|
||||
#define EFI_ERROR_MAJOR 0x80000000
|
||||
#define EFI_ERROR_UNRECOVERED 0x90000000
|
||||
#define EFI_ERROR_UNCONTAINED 0xA0000000
|
||||
|
||||
//
|
||||
// A Status Code Value is made up of the class, subclass, and
|
||||
// an operation. Classes, subclasses, and operations are defined
|
||||
// in the following sections.
|
||||
//
|
||||
#define EFI_STATUS_CODE_CLASS_MASK 0xFF000000
|
||||
#define EFI_STATUS_CODE_SUBCLASS_MASK 0x00FF0000
|
||||
#define EFI_STATUS_CODE_OPERATION_MASK 0x0000FFFF
|
||||
|
||||
//
|
||||
// Data Hub Status Code class record definition
|
||||
//
|
||||
typedef struct {
|
||||
EFI_STATUS_CODE_TYPE CodeType;
|
||||
EFI_STATUS_CODE_VALUE Value;
|
||||
UINT32 Instance;
|
||||
EFI_GUID CallerId;
|
||||
EFI_STATUS_CODE_DATA Data;
|
||||
} DATA_HUB_STATUS_CODE_DATA_RECORD;
|
||||
|
||||
//
|
||||
// /////////////////////////////////////////////////////////////////////////////
|
||||
// Section 2
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Class definitions
|
||||
// Values of 4-127 are reserved for future use by this
|
||||
// specification.
|
||||
// Values in the range 127-255 are reserved for OEM use.
|
||||
//
|
||||
#define EFI_COMPUTING_UNIT 0x00000000
|
||||
#define EFI_PERIPHERAL 0x01000000
|
||||
#define EFI_IO_BUS 0x02000000
|
||||
#define EFI_SOFTWARE 0x03000000
|
||||
|
||||
//
|
||||
// General partitioning scheme for Progress and Error Codes are
|
||||
// 0x0000-0x0FFF - Shared by all sub-classes in a given class
|
||||
// 0x1000-0x7FFF - Subclass Specific
|
||||
// 0x8000-0xFFFF - OEM specific
|
||||
//
|
||||
#define EFI_SUBCLASS_SPECIFIC 0x1000
|
||||
#define EFI_OEM_SPECIFIC 0x8000
|
||||
|
||||
//
|
||||
// /////////////////////////////////////////////////////////////////////////////
|
||||
// Section 3
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Computing Unit Subclass definitions.
|
||||
// Values of 8-127 are reserved for future use by this
|
||||
// specification.
|
||||
// Values of 128-255 are reserved for OEM use.
|
||||
//
|
||||
#define EFI_COMPUTING_UNIT_UNSPECIFIED (EFI_COMPUTING_UNIT | 0x00000000)
|
||||
#define EFI_COMPUTING_UNIT_HOST_PROCESSOR (EFI_COMPUTING_UNIT | 0x00010000)
|
||||
#define EFI_COMPUTING_UNIT_FIRMWARE_PROCESSOR (EFI_COMPUTING_UNIT | 0x00020000)
|
||||
#define EFI_COMPUTING_UNIT_IO_PROCESSOR (EFI_COMPUTING_UNIT | 0x00030000)
|
||||
#define EFI_COMPUTING_UNIT_CACHE (EFI_COMPUTING_UNIT | 0x00040000)
|
||||
#define EFI_COMPUTING_UNIT_MEMORY (EFI_COMPUTING_UNIT | 0x00050000)
|
||||
#define EFI_COMPUTING_UNIT_CHIPSET (EFI_COMPUTING_UNIT | 0x00060000)
|
||||
|
||||
//
|
||||
// Computing Unit Class Progress Code definitions.
|
||||
// These are shared by all subclasses.
|
||||
//
|
||||
#define EFI_CU_PC_INIT_BEGIN 0x00000000
|
||||
#define EFI_CU_PC_INIT_END 0x00000001
|
||||
|
||||
//
|
||||
// Computing Unit Unspecified Subclass Progress Code definitions.
|
||||
//
|
||||
//
|
||||
// Computing Unit Host Processor Subclass Progress Code definitions.
|
||||
//
|
||||
#define EFI_CU_HP_PC_POWER_ON_INIT (EFI_SUBCLASS_SPECIFIC | 0x00000000)
|
||||
#define EFI_CU_HP_PC_CACHE_INIT (EFI_SUBCLASS_SPECIFIC | 0x00000001)
|
||||
#define EFI_CU_HP_PC_RAM_INIT (EFI_SUBCLASS_SPECIFIC | 0x00000002)
|
||||
#define EFI_CU_HP_PC_MEMORY_CONTROLLER_INIT (EFI_SUBCLASS_SPECIFIC | 0x00000003)
|
||||
#define EFI_CU_HP_PC_IO_INIT (EFI_SUBCLASS_SPECIFIC | 0x00000004)
|
||||
#define EFI_CU_HP_PC_BSP_SELECT (EFI_SUBCLASS_SPECIFIC | 0x00000005)
|
||||
#define EFI_CU_HP_PC_BSP_RESELECT (EFI_SUBCLASS_SPECIFIC | 0x00000006)
|
||||
#define EFI_CU_HP_PC_AP_INIT (EFI_SUBCLASS_SPECIFIC | 0x00000007)
|
||||
#define EFI_CU_HP_PC_SMM_INIT (EFI_SUBCLASS_SPECIFIC | 0x00000008)
|
||||
|
||||
//
|
||||
// Computing Unit Firmware Processor Subclass Progress Code definitions.
|
||||
//
|
||||
//
|
||||
// Computing Unit IO Processor Subclass Progress Code definitions.
|
||||
//
|
||||
//
|
||||
// Computing Unit Cache Subclass Progress Code definitions.
|
||||
//
|
||||
#define EFI_CU_CACHE_PC_PRESENCE_DETECT (EFI_SUBCLASS_SPECIFIC | 0x00000000)
|
||||
#define EFI_CU_CACHE_PC_CONFIGURATION (EFI_SUBCLASS_SPECIFIC | 0x00000001)
|
||||
|
||||
//
|
||||
// Computing Unit Memory Subclass Progress Code definitions.
|
||||
//
|
||||
#define EFI_CU_MEMORY_PC_SPD_READ (EFI_SUBCLASS_SPECIFIC | 0x00000000)
|
||||
#define EFI_CU_MEMORY_PC_PRESENCE_DETECT (EFI_SUBCLASS_SPECIFIC | 0x00000001)
|
||||
#define EFI_CU_MEMORY_PC_TIMING (EFI_SUBCLASS_SPECIFIC | 0x00000002)
|
||||
#define EFI_CU_MEMORY_PC_CONFIGURING (EFI_SUBCLASS_SPECIFIC | 0x00000003)
|
||||
#define EFI_CU_MEMORY_PC_OPTIMIZING (EFI_SUBCLASS_SPECIFIC | 0x00000004)
|
||||
#define EFI_CU_MEMORY_PC_INIT (EFI_SUBCLASS_SPECIFIC | 0x00000005)
|
||||
#define EFI_CU_MEMORY_PC_TEST (EFI_SUBCLASS_SPECIFIC | 0x00000006)
|
||||
|
||||
//
|
||||
// Computing Unit Chipset Subclass Progress Code definitions.
|
||||
//
|
||||
//
|
||||
// Computing Unit Class Error Code definitions.
|
||||
// These are shared by all subclasses.
|
||||
//
|
||||
#define EFI_CU_EC_NON_SPECIFIC 0x00000000
|
||||
#define EFI_CU_EC_DISABLED 0x00000001
|
||||
#define EFI_CU_EC_NOT_SUPPORTED 0x00000002
|
||||
#define EFI_CU_EC_NOT_DETECTED 0x00000003
|
||||
#define EFI_CU_EC_NOT_CONFIGURED 0x00000004
|
||||
|
||||
//
|
||||
// Computing Unit Unspecified Subclass Error Code definitions.
|
||||
//
|
||||
//
|
||||
// Computing Unit Host Processor Subclass Error Code definitions.
|
||||
//
|
||||
#define EFI_CU_HP_EC_INVALID_TYPE (EFI_SUBCLASS_SPECIFIC | 0x00000000)
|
||||
#define EFI_CU_HP_EC_INVALID_SPEED (EFI_SUBCLASS_SPECIFIC | 0x00000001)
|
||||
#define EFI_CU_HP_EC_MISMATCH (EFI_SUBCLASS_SPECIFIC | 0x00000002)
|
||||
#define EFI_CU_HP_EC_TIMER_EXPIRED (EFI_SUBCLASS_SPECIFIC | 0x00000003)
|
||||
#define EFI_CU_HP_EC_SELF_TEST (EFI_SUBCLASS_SPECIFIC | 0x00000004)
|
||||
#define EFI_CU_HP_EC_INTERNAL (EFI_SUBCLASS_SPECIFIC | 0x00000005)
|
||||
#define EFI_CU_HP_EC_THERMAL (EFI_SUBCLASS_SPECIFIC | 0x00000006)
|
||||
#define EFI_CU_HP_EC_LOW_VOLTAGE (EFI_SUBCLASS_SPECIFIC | 0x00000007)
|
||||
#define EFI_CU_HP_EC_HIGH_VOLTAGE (EFI_SUBCLASS_SPECIFIC | 0x00000008)
|
||||
#define EFI_CU_HP_EC_CACHE (EFI_SUBCLASS_SPECIFIC | 0x00000009)
|
||||
#define EFI_CU_HP_EC_MICROCODE_UPDATE (EFI_SUBCLASS_SPECIFIC | 0x0000000A)
|
||||
#define EFI_CU_HP_EC_CORRECTABLE (EFI_SUBCLASS_SPECIFIC | 0x0000000B)
|
||||
#define EFI_CU_HP_EC_UNCORRECTABLE (EFI_SUBCLASS_SPECIFIC | 0x0000000C)
|
||||
#define EFI_CU_HP_EC_NO_MICROCODE_UPDATE (EFI_SUBCLASS_SPECIFIC | 0x0000000D)
|
||||
|
||||
//
|
||||
// Computing Unit Firmware Processor Subclass Error Code definitions.
|
||||
//
|
||||
#define EFI_CU_FP_EC_HARD_FAIL (EFI_SUBCLASS_SPECIFIC | 0x00000000)
|
||||
#define EFI_CU_FP_EC_SOFT_FAIL (EFI_SUBCLASS_SPECIFIC | 0x00000001)
|
||||
#define EFI_CU_FP_EC_COMM_ERROR (EFI_SUBCLASS_SPECIFIC | 0x00000002)
|
||||
|
||||
//
|
||||
// Computing Unit IO Processor Subclass Error Code definitions.
|
||||
//
|
||||
//
|
||||
// Computing Unit Cache Subclass Error Code definitions.
|
||||
//
|
||||
#define EFI_CU_CACHE_EC_INVALID_TYPE (EFI_SUBCLASS_SPECIFIC | 0x00000000)
|
||||
#define EFI_CU_CACHE_EC_INVALID_SPEED (EFI_SUBCLASS_SPECIFIC | 0x00000001)
|
||||
#define EFI_CU_CACHE_EC_INVALID_SIZE (EFI_SUBCLASS_SPECIFIC | 0x00000002)
|
||||
#define EFI_CU_CACHE_EC_MISMATCH (EFI_SUBCLASS_SPECIFIC | 0x00000003)
|
||||
|
||||
//
|
||||
// Computing Unit Memory Subclass Error Code definitions.
|
||||
//
|
||||
#define EFI_CU_MEMORY_EC_INVALID_TYPE (EFI_SUBCLASS_SPECIFIC | 0x00000000)
|
||||
#define EFI_CU_MEMORY_EC_INVALID_SPEED (EFI_SUBCLASS_SPECIFIC | 0x00000001)
|
||||
#define EFI_CU_MEMORY_EC_CORRECTABLE (EFI_SUBCLASS_SPECIFIC | 0x00000002)
|
||||
#define EFI_CU_MEMORY_EC_UNCORRECTABLE (EFI_SUBCLASS_SPECIFIC | 0x00000003)
|
||||
#define EFI_CU_MEMORY_EC_SPD_FAIL (EFI_SUBCLASS_SPECIFIC | 0x00000004)
|
||||
#define EFI_CU_MEMORY_EC_INVALID_SIZE (EFI_SUBCLASS_SPECIFIC | 0x00000005)
|
||||
#define EFI_CU_MEMORY_EC_MISMATCH (EFI_SUBCLASS_SPECIFIC | 0x00000006)
|
||||
#define EFI_CU_MEMORY_EC_S3_RESUME_FAIL (EFI_SUBCLASS_SPECIFIC | 0x00000007)
|
||||
#define EFI_CU_MEMORY_EC_UPDATE_FAIL (EFI_SUBCLASS_SPECIFIC | 0x00000008)
|
||||
#define EFI_CU_MEMORY_EC_NONE_DETECTED (EFI_SUBCLASS_SPECIFIC | 0x00000009)
|
||||
#define EFI_CU_MEMORY_EC_NONE_USEFUL (EFI_SUBCLASS_SPECIFIC | 0x0000000A)
|
||||
|
||||
//
|
||||
// Computing Unit Chipset Subclass Error Code definitions.
|
||||
//
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Section 4
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Peripheral Subclass definitions.
|
||||
// Values of 12-127 are reserved for future use by this
|
||||
// specification.
|
||||
// Values of 128-255 are reserved for OEM use.
|
||||
//
|
||||
#define EFI_PERIPHERAL_UNSPECIFIED (EFI_PERIPHERAL | 0x00000000)
|
||||
#define EFI_PERIPHERAL_KEYBOARD (EFI_PERIPHERAL | 0x00010000)
|
||||
#define EFI_PERIPHERAL_MOUSE (EFI_PERIPHERAL | 0x00020000)
|
||||
#define EFI_PERIPHERAL_LOCAL_CONSOLE (EFI_PERIPHERAL | 0x00030000)
|
||||
#define EFI_PERIPHERAL_REMOTE_CONSOLE (EFI_PERIPHERAL | 0x00040000)
|
||||
#define EFI_PERIPHERAL_SERIAL_PORT (EFI_PERIPHERAL | 0x00050000)
|
||||
#define EFI_PERIPHERAL_PARALLEL_PORT (EFI_PERIPHERAL | 0x00060000)
|
||||
#define EFI_PERIPHERAL_FIXED_MEDIA (EFI_PERIPHERAL | 0x00070000)
|
||||
#define EFI_PERIPHERAL_REMOVABLE_MEDIA (EFI_PERIPHERAL | 0x00080000)
|
||||
#define EFI_PERIPHERAL_AUDIO_INPUT (EFI_PERIPHERAL | 0x00090000)
|
||||
#define EFI_PERIPHERAL_AUDIO_OUTPUT (EFI_PERIPHERAL | 0x000A0000)
|
||||
#define EFI_PERIPHERAL_LCD_DEVICE (EFI_PERIPHERAL | 0x000B0000)
|
||||
#define EFI_PERIPHERAL_NETWORK (EFI_PERIPHERAL | 0x000C0000)
|
||||
|
||||
//
|
||||
// Peripheral Class Progress Code definitions.
|
||||
// These are shared by all subclasses.
|
||||
//
|
||||
#define EFI_P_PC_INIT 0x00000000
|
||||
#define EFI_P_PC_RESET 0x00000001
|
||||
#define EFI_P_PC_DISABLE 0x00000002
|
||||
#define EFI_P_PC_PRESENCE_DETECT 0x00000003
|
||||
#define EFI_P_PC_ENABLE 0x00000004
|
||||
#define EFI_P_PC_RECONFIG 0x00000005
|
||||
#define EFI_P_PC_DETECTED 0x00000006
|
||||
|
||||
//
|
||||
// Peripheral Class Unspecified Subclass Progress Code definitions.
|
||||
//
|
||||
//
|
||||
// Peripheral Class Keyboard Subclass Progress Code definitions.
|
||||
//
|
||||
#define EFI_P_KEYBOARD_PC_CLEAR_BUFFER (EFI_SUBCLASS_SPECIFIC | 0x00000000)
|
||||
#define EFI_P_KEYBOARD_PC_SELF_TEST (EFI_SUBCLASS_SPECIFIC | 0x00000001)
|
||||
|
||||
//
|
||||
// Peripheral Class Mouse Subclass Progress Code definitions.
|
||||
//
|
||||
#define EFI_P_MOUSE_PC_SELF_TEST (EFI_SUBCLASS_SPECIFIC | 0x00000000)
|
||||
|
||||
//
|
||||
// Peripheral Class Local Console Subclass Progress Code definitions.
|
||||
//
|
||||
//
|
||||
// Peripheral Class Remote Console Subclass Progress Code definitions.
|
||||
//
|
||||
//
|
||||
// Peripheral Class Serial Port Subclass Progress Code definitions.
|
||||
//
|
||||
#define EFI_P_SERIAL_PORT_PC_CLEAR_BUFFER (EFI_SUBCLASS_SPECIFIC | 0x00000000)
|
||||
|
||||
//
|
||||
// Peripheral Class Parallel Port Subclass Progress Code definitions.
|
||||
//
|
||||
//
|
||||
// Peripheral Class Fixed Media Subclass Progress Code definitions.
|
||||
//
|
||||
//
|
||||
// Peripheral Class Removable Media Subclass Progress Code definitions.
|
||||
//
|
||||
//
|
||||
// Peripheral Class Audio Input Subclass Progress Code definitions.
|
||||
//
|
||||
//
|
||||
// Peripheral Class Audio Output Subclass Progress Code definitions.
|
||||
//
|
||||
//
|
||||
// Peripheral Class LCD Device Subclass Progress Code definitions.
|
||||
//
|
||||
//
|
||||
// Peripheral Class Network Subclass Progress Code definitions.
|
||||
//
|
||||
//
|
||||
// Peripheral Class Error Code definitions.
|
||||
// These are shared by all subclasses.
|
||||
//
|
||||
#define EFI_P_EC_NON_SPECIFIC 0x00000000
|
||||
#define EFI_P_EC_DISABLED 0x00000001
|
||||
#define EFI_P_EC_NOT_SUPPORTED 0x00000002
|
||||
#define EFI_P_EC_NOT_DETECTED 0x00000003
|
||||
#define EFI_P_EC_NOT_CONFIGURED 0x00000004
|
||||
#define EFI_P_EC_INTERFACE_ERROR 0x00000005
|
||||
#define EFI_P_EC_CONTROLLER_ERROR 0x00000006
|
||||
#define EFI_P_EC_INPUT_ERROR 0x00000007
|
||||
#define EFI_P_EC_OUTPUT_ERROR 0x00000008
|
||||
#define EFI_P_EC_RESOURCE_CONFLICT 0x00000009
|
||||
|
||||
//
|
||||
// Peripheral Class Unspecified Subclass Error Code definitions.
|
||||
//
|
||||
//
|
||||
// Peripheral Class Keyboard Subclass Error Code definitions.
|
||||
//
|
||||
#define EFI_P_KEYBOARD_EC_LOCKED (EFI_SUBCLASS_SPECIFIC | 0x00000000)
|
||||
#define EFI_P_KEYBOARD_EC_STUCK_KEY (EFI_SUBCLASS_SPECIFIC | 0x00000001)
|
||||
|
||||
//
|
||||
// Peripheral Class Mouse Subclass Error Code definitions.
|
||||
//
|
||||
#define EFI_P_MOUSE_EC_LOCKED (EFI_SUBCLASS_SPECIFIC | 0x00000000)
|
||||
|
||||
//
|
||||
// Peripheral Class Local Console Subclass Error Code definitions.
|
||||
//
|
||||
//
|
||||
// Peripheral Class Remote Console Subclass Error Code definitions.
|
||||
//
|
||||
//
|
||||
// Peripheral Class Serial Port Subclass Error Code definitions.
|
||||
//
|
||||
//
|
||||
// Peripheral Class Parallel Port Subclass Error Code definitions.
|
||||
//
|
||||
//
|
||||
// Peripheral Class Fixed Media Subclass Error Code definitions.
|
||||
//
|
||||
//
|
||||
// Peripheral Class Removable Media Subclass Error Code definitions.
|
||||
//
|
||||
//
|
||||
// Peripheral Class Audio Input Subclass Error Code definitions.
|
||||
//
|
||||
//
|
||||
// Peripheral Class Audio Output Subclass Error Code definitions.
|
||||
//
|
||||
//
|
||||
// Peripheral Class LCD Device Subclass Error Code definitions.
|
||||
//
|
||||
//
|
||||
// Peripheral Class Network Subclass Error Code definitions.
|
||||
//
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Section 5
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// IO Bus Subclass definitions.
|
||||
// Values of 14-127 are reserved for future use by this
|
||||
// specification.
|
||||
// Values of 128-255 are reserved for OEM use.
|
||||
//
|
||||
#define EFI_IO_BUS_UNSPECIFIED (EFI_IO_BUS | 0x00000000)
|
||||
#define EFI_IO_BUS_PCI (EFI_IO_BUS | 0x00010000)
|
||||
#define EFI_IO_BUS_USB (EFI_IO_BUS | 0x00020000)
|
||||
#define EFI_IO_BUS_IBA (EFI_IO_BUS | 0x00030000)
|
||||
#define EFI_IO_BUS_AGP (EFI_IO_BUS | 0x00040000)
|
||||
#define EFI_IO_BUS_PC_CARD (EFI_IO_BUS | 0x00050000)
|
||||
#define EFI_IO_BUS_LPC (EFI_IO_BUS | 0x00060000)
|
||||
#define EFI_IO_BUS_SCSI (EFI_IO_BUS | 0x00070000)
|
||||
#define EFI_IO_BUS_ATA_ATAPI (EFI_IO_BUS | 0x00080000)
|
||||
#define EFI_IO_BUS_FC (EFI_IO_BUS | 0x00090000)
|
||||
#define EFI_IO_BUS_IP_NETWORK (EFI_IO_BUS | 0x000A0000)
|
||||
#define EFI_IO_BUS_SMBUS (EFI_IO_BUS | 0x000B0000)
|
||||
#define EFI_IO_BUS_I2C (EFI_IO_BUS | 0x000C0000)
|
||||
|
||||
//
|
||||
// IO Bus Class Progress Code definitions.
|
||||
// These are shared by all subclasses.
|
||||
//
|
||||
#define EFI_IOB_PC_INIT 0x00000000
|
||||
#define EFI_IOB_PC_RESET 0x00000001
|
||||
#define EFI_IOB_PC_DISABLE 0x00000002
|
||||
#define EFI_IOB_PC_DETECT 0x00000003
|
||||
#define EFI_IOB_PC_ENABLE 0x00000004
|
||||
#define EFI_IOB_PC_RECONFIG 0x00000005
|
||||
#define EFI_IOB_PC_HOTPLUG 0x00000006
|
||||
|
||||
//
|
||||
// IO Bus Class Unspecified Subclass Progress Code definitions.
|
||||
//
|
||||
//
|
||||
// IO Bus Class PCI Subclass Progress Code definitions.
|
||||
//
|
||||
#define EFI_IOB_PCI_PC_BUS_ENUM (EFI_SUBCLASS_SPECIFIC | 0x00000000)
|
||||
#define EFI_IOB_PCI_PC_RES_ALLOC (EFI_SUBCLASS_SPECIFIC | 0x00000001)
|
||||
#define EFI_IOB_PCI_PC_HPC_INIT (EFI_SUBCLASS_SPECIFIC | 0x00000002)
|
||||
|
||||
//
|
||||
// IO Bus Class USB Subclass Progress Code definitions.
|
||||
//
|
||||
//
|
||||
// IO Bus Class IBA Subclass Progress Code definitions.
|
||||
//
|
||||
//
|
||||
// IO Bus Class AGP Subclass Progress Code definitions.
|
||||
//
|
||||
//
|
||||
// IO Bus Class PC Card Subclass Progress Code definitions.
|
||||
//
|
||||
//
|
||||
// IO Bus Class LPC Subclass Progress Code definitions.
|
||||
//
|
||||
//
|
||||
// IO Bus Class SCSI Subclass Progress Code definitions.
|
||||
//
|
||||
//
|
||||
// IO Bus Class ATA/ATAPI Subclass Progress Code definitions.
|
||||
//
|
||||
#define EFI_IOB_ATA_BUS_SMART_ENABLE (EFI_SUBCLASS_SPECIFIC | 0x00000000)
|
||||
#define EFI_IOB_ATA_BUS_SMART_DISABLE (EFI_SUBCLASS_SPECIFIC | 0x00000001)
|
||||
#define EFI_IOB_ATA_BUS_SMART_OVERTHRESHOLD (EFI_SUBCLASS_SPECIFIC | 0x00000002)
|
||||
#define EFI_IOB_ATA_BUS_SMART_UNDERTHRESHOLD (EFI_SUBCLASS_SPECIFIC | 0x00000003)
|
||||
|
||||
//
|
||||
// IO Bus Class FC Subclass Progress Code definitions.
|
||||
//
|
||||
//
|
||||
// IO Bus Class IP Network Subclass Progress Code definitions.
|
||||
//
|
||||
//
|
||||
// IO Bus Class SMBUS Subclass Progress Code definitions.
|
||||
//
|
||||
//
|
||||
// IO Bus Class I2C Subclass Progress Code definitions.
|
||||
//
|
||||
//
|
||||
// IO Bus Class Error Code definitions.
|
||||
// These are shared by all subclasses.
|
||||
//
|
||||
#define EFI_IOB_EC_NON_SPECIFIC 0x00000000
|
||||
#define EFI_IOB_EC_DISABLED 0x00000001
|
||||
#define EFI_IOB_EC_NOT_SUPPORTED 0x00000002
|
||||
#define EFI_IOB_EC_NOT_DETECTED 0x00000003
|
||||
#define EFI_IOB_EC_NOT_CONFIGURED 0x00000004
|
||||
#define EFI_IOB_EC_INTERFACE_ERROR 0x00000005
|
||||
#define EFI_IOB_EC_CONTROLLER_ERROR 0x00000006
|
||||
#define EFI_IOB_EC_READ_ERROR 0x00000007
|
||||
#define EFI_IOB_EC_WRITE_ERROR 0x00000008
|
||||
#define EFI_IOB_EC_RESOURCE_CONFLICT 0x00000009
|
||||
|
||||
//
|
||||
// IO Bus Class Unspecified Subclass Error Code definitions.
|
||||
//
|
||||
//
|
||||
// IO Bus Class PCI Subclass Error Code definitions.
|
||||
//
|
||||
#define EFI_IOB_PCI_EC_PERR (EFI_SUBCLASS_SPECIFIC | 0x00000000)
|
||||
#define EFI_IOB_PCI_EC_SERR (EFI_SUBCLASS_SPECIFIC | 0x00000001)
|
||||
|
||||
//
|
||||
// IO Bus Class USB Subclass Error Code definitions.
|
||||
//
|
||||
//
|
||||
// IO Bus Class IBA Subclass Error Code definitions.
|
||||
//
|
||||
//
|
||||
// IO Bus Class AGP Subclass Error Code definitions.
|
||||
//
|
||||
//
|
||||
// IO Bus Class PC Card Subclass Error Code definitions.
|
||||
//
|
||||
//
|
||||
// IO Bus Class LPC Subclass Error Code definitions.
|
||||
//
|
||||
//
|
||||
// IO Bus Class SCSI Subclass Error Code definitions.
|
||||
//
|
||||
//
|
||||
// IO Bus Class ATA/ATAPI Subclass Error Code definitions.
|
||||
//
|
||||
#define EFI_IOB_ATA_BUS_SMART_NOTSUPPORTED (EFI_SUBCLASS_SPECIFIC | 0x00000000)
|
||||
#define EFI_IOB_ATA_BUS_SMART_DISABLED (EFI_SUBCLASS_SPECIFIC | 0x00000001)
|
||||
|
||||
//
|
||||
// IO Bus Class FC Subclass Error Code definitions.
|
||||
//
|
||||
//
|
||||
// IO Bus Class IP Network Subclass Error Code definitions.
|
||||
//
|
||||
//
|
||||
// IO Bus Class SMBUS Subclass Error Code definitions.
|
||||
//
|
||||
//
|
||||
// IO Bus Class I2C Subclass Error Code definitions.
|
||||
//
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Section 6
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Software Subclass definitions.
|
||||
// Values of 14-127 are reserved for future use by this
|
||||
// specification.
|
||||
// Values of 128-255 are reserved for OEM use.
|
||||
//
|
||||
#define EFI_SOFTWARE_UNSPECIFIED (EFI_SOFTWARE | 0x00000000)
|
||||
#define EFI_SOFTWARE_SEC (EFI_SOFTWARE | 0x00010000)
|
||||
#define EFI_SOFTWARE_PEI_CORE (EFI_SOFTWARE | 0x00020000)
|
||||
#define EFI_SOFTWARE_PEI_MODULE (EFI_SOFTWARE | 0x00030000)
|
||||
#define EFI_SOFTWARE_DXE_CORE (EFI_SOFTWARE | 0x00040000)
|
||||
#define EFI_SOFTWARE_DXE_BS_DRIVER (EFI_SOFTWARE | 0x00050000)
|
||||
#define EFI_SOFTWARE_DXE_RT_DRIVER (EFI_SOFTWARE | 0x00060000)
|
||||
#define EFI_SOFTWARE_SMM_DRIVER (EFI_SOFTWARE | 0x00070000)
|
||||
#define EFI_SOFTWARE_EFI_APPLICATION (EFI_SOFTWARE | 0x00080000)
|
||||
#define EFI_SOFTWARE_EFI_OS_LOADER (EFI_SOFTWARE | 0x00090000)
|
||||
#define EFI_SOFTWARE_RT (EFI_SOFTWARE | 0x000A0000)
|
||||
#define EFI_SOFTWARE_AL (EFI_SOFTWARE | 0x000B0000)
|
||||
#define EFI_SOFTWARE_EBC_EXCEPTION (EFI_SOFTWARE | 0x000C0000)
|
||||
#define EFI_SOFTWARE_IA32_EXCEPTION (EFI_SOFTWARE | 0x000D0000)
|
||||
#define EFI_SOFTWARE_IPF_EXCEPTION (EFI_SOFTWARE | 0x000E0000)
|
||||
#define EFI_SOFTWARE_PEI_SERVICE (EFI_SOFTWARE | 0x000F0000)
|
||||
#define EFI_SOFTWARE_EFI_BOOT_SERVICE (EFI_SOFTWARE | 0x00100000)
|
||||
#define EFI_SOFTWARE_EFI_RUNTIME_SERVICE (EFI_SOFTWARE | 0x00110000)
|
||||
#define EFI_SOFTWARE_EFI_DXE_SERVICE (EFI_SOFTWARE | 0x00120000)
|
||||
|
||||
//
|
||||
// Software Class Progress Code definitions.
|
||||
// These are shared by all subclasses.
|
||||
//
|
||||
#define EFI_SW_PC_INIT 0x00000000
|
||||
#define EFI_SW_PC_LOAD 0x00000001
|
||||
#define EFI_SW_PC_INIT_BEGIN 0x00000002
|
||||
#define EFI_SW_PC_INIT_END 0x00000003
|
||||
#define EFI_SW_PC_AUTHENTICATE_BEGIN 0x00000004
|
||||
#define EFI_SW_PC_AUTHENTICATE_END 0x00000005
|
||||
#define EFI_SW_PC_INPUT_WAIT 0x00000006
|
||||
#define EFI_SW_PC_USER_SETUP 0x00000007
|
||||
|
||||
//
|
||||
// Software Class Unspecified Subclass Progress Code definitions.
|
||||
//
|
||||
//
|
||||
// Software Class SEC Subclass Progress Code definitions.
|
||||
//
|
||||
#define EFI_SW_SEC_PC_ENTRY_POINT (EFI_SUBCLASS_SPECIFIC | 0x00000000)
|
||||
#define EFI_SW_SEC_PC_HANDOFF_TO_NEXT (EFI_SUBCLASS_SPECIFIC | 0x00000001)
|
||||
|
||||
//
|
||||
// Software Class PEI Core Subclass Progress Code definitions.
|
||||
//
|
||||
#define EFI_SW_PEI_CORE_PC_ENTRY_POINT (EFI_SUBCLASS_SPECIFIC | 0x00000000)
|
||||
#define EFI_SW_PEI_CORE_PC_HANDOFF_TO_NEXT (EFI_SUBCLASS_SPECIFIC | 0x00000001)
|
||||
#define EFI_SW_PEI_CORE_PC_RETURN_TO_LAST (EFI_SUBCLASS_SPECIFIC | 0x00000002)
|
||||
|
||||
//
|
||||
// Software Class PEI Module Subclass Progress Code definitions.
|
||||
//
|
||||
#define EFI_SW_PEIM_PC_RECOVERY_BEGIN (EFI_SUBCLASS_SPECIFIC | 0x00000000)
|
||||
#define EFI_SW_PEIM_PC_CAPSULE_LOAD (EFI_SUBCLASS_SPECIFIC | 0x00000001)
|
||||
#define EFI_SW_PEIM_PC_CAPSULE_START (EFI_SUBCLASS_SPECIFIC | 0x00000001)
|
||||
#define EFI_SW_PEIM_PC_RECOVERY_USER (EFI_SUBCLASS_SPECIFIC | 0x00000003)
|
||||
#define EFI_SW_PEIM_PC_RECOVERY_AUTO (EFI_SUBCLASS_SPECIFIC | 0x00000004)
|
||||
|
||||
//
|
||||
// Software Class DXE Core Subclass Progress Code definitions.
|
||||
//
|
||||
#define EFI_SW_DXE_CORE_PC_ENTRY_POINT (EFI_SUBCLASS_SPECIFIC | 0x00000000)
|
||||
#define EFI_SW_DXE_CORE_PC_HANDOFF_TO_NEXT (EFI_SUBCLASS_SPECIFIC | 0x00000001)
|
||||
#define EFI_SW_DXE_CORE_PC_RETURN_TO_LAST (EFI_SUBCLASS_SPECIFIC | 0x00000002)
|
||||
#define EFI_SW_DXE_CORE_PC_START_DRIVER (EFI_SUBCLASS_SPECIFIC | 0x00000003)
|
||||
|
||||
//
|
||||
// Software Class DXE BS Driver Subclass Progress Code definitions.
|
||||
//
|
||||
#define EFI_SW_DXE_BS_PC_LEGACY_OPROM_INIT (EFI_SUBCLASS_SPECIFIC | 0x00000000)
|
||||
#define EFI_SW_DXE_BS_PC_READY_TO_BOOT_EVENT (EFI_SUBCLASS_SPECIFIC | 0x00000001)
|
||||
#define EFI_SW_DXE_BS_PC_LEGACY_BOOT_EVENT (EFI_SUBCLASS_SPECIFIC | 0x00000002)
|
||||
#define EFI_SW_DXE_BS_PC_EXIT_BOOT_SERVICES_EVENT (EFI_SUBCLASS_SPECIFIC | 0x00000003)
|
||||
#define EFI_SW_DXE_BS_PC_VIRTUAL_ADDRESS_CHANGE_EVENT (EFI_SUBCLASS_SPECIFIC | 0x00000004)
|
||||
#define EFI_SW_DXE_BS_PC_BEGIN_CONNECTING_DRIVERS (EFI_SUBCLASS_SPECIFIC | 0x00000005)
|
||||
#define EFI_SW_DXE_BS_PC_VERIFYING_PASSWORD (EFI_SUBCLASS_SPECIFIC | 0x00000006)
|
||||
|
||||
//
|
||||
// Software Class DXE RT Driver Subclass Progress Code definitions.
|
||||
//
|
||||
#define EFI_SW_DXE_RT_PC_S0 (EFI_SUBCLASS_SPECIFIC | 0x00000000)
|
||||
#define EFI_SW_DXE_RT_PC_S1 (EFI_SUBCLASS_SPECIFIC | 0x00000001)
|
||||
#define EFI_SW_DXE_RT_PC_S2 (EFI_SUBCLASS_SPECIFIC | 0x00000002)
|
||||
#define EFI_SW_DXE_RT_PC_S3 (EFI_SUBCLASS_SPECIFIC | 0x00000003)
|
||||
#define EFI_SW_DXE_RT_PC_S4 (EFI_SUBCLASS_SPECIFIC | 0x00000004)
|
||||
#define EFI_SW_DXE_RT_PC_S5 (EFI_SUBCLASS_SPECIFIC | 0x00000005)
|
||||
|
||||
//
|
||||
// Software Class SMM Driver Subclass Progress Code definitions.
|
||||
//
|
||||
//
|
||||
// Software Class EFI Application Subclass Progress Code definitions.
|
||||
//
|
||||
//
|
||||
// Software Class EFI OS Loader Subclass Progress Code definitions.
|
||||
//
|
||||
//
|
||||
// Software Class EFI RT Subclass Progress Code definitions.
|
||||
//
|
||||
#define EFI_SW_RT_PC_ENTRY_POINT (EFI_SUBCLASS_SPECIFIC | 0x00000000)
|
||||
#define EFI_SW_RT_PC_HANDOFF_TO_NEXT (EFI_SUBCLASS_SPECIFIC | 0x00000001)
|
||||
#define EFI_SW_RT_PC_RETURN_TO_LAST (EFI_SUBCLASS_SPECIFIC | 0x00000002)
|
||||
|
||||
//
|
||||
// Software Class EFI AL Subclass Progress Code definitions.
|
||||
//
|
||||
#define EFI_SW_AL_PC_ENTRY_POINT (EFI_SUBCLASS_SPECIFIC | 0x00000000)
|
||||
#define EFI_SW_AL_PC_RETURN_TO_LAST (EFI_SUBCLASS_SPECIFIC | 0x00000001)
|
||||
|
||||
//
|
||||
// Software Class EBC Exception Subclass Progress Code definitions.
|
||||
//
|
||||
//
|
||||
// Software Class IA32 Exception Subclass Progress Code definitions.
|
||||
//
|
||||
//
|
||||
// Software Class IPF Exception Subclass Progress Code definitions.
|
||||
//
|
||||
//
|
||||
// Software Class PEI Services Subclass Progress Code definitions.
|
||||
//
|
||||
#define EFI_SW_PS_PC_INSTALL_PPI (EFI_SUBCLASS_SPECIFIC | 0x00000000)
|
||||
#define EFI_SW_PS_PC_REINSTALL_PPI (EFI_SUBCLASS_SPECIFIC | 0x00000001)
|
||||
#define EFI_SW_PS_PC_LOCATE_PPI (EFI_SUBCLASS_SPECIFIC | 0x00000002)
|
||||
#define EFI_SW_PS_PC_NOTIFY_PPI (EFI_SUBCLASS_SPECIFIC | 0x00000003)
|
||||
#define EFI_SW_PS_PC_GET_BOOT_MODE (EFI_SUBCLASS_SPECIFIC | 0x00000004)
|
||||
#define EFI_SW_PS_PC_SET_BOOT_MODE (EFI_SUBCLASS_SPECIFIC | 0x00000005)
|
||||
#define EFI_SW_PS_PC_GET_HOB_LIST (EFI_SUBCLASS_SPECIFIC | 0x00000006)
|
||||
#define EFI_SW_PS_PC_CREATE_HOB (EFI_SUBCLASS_SPECIFIC | 0x00000007)
|
||||
#define EFI_SW_PS_PC_FFS_FIND_NEXT_VOLUME (EFI_SUBCLASS_SPECIFIC | 0x00000008)
|
||||
#define EFI_SW_PS_PC_FFS_FIND_NEXT_FILE (EFI_SUBCLASS_SPECIFIC | 0x00000009)
|
||||
#define EFI_SW_PS_PC_FFS_FIND_SECTION_DATA (EFI_SUBCLASS_SPECIFIC | 0x0000000A)
|
||||
#define EFI_SW_PS_PC_INSTALL_PEI_MEMORY (EFI_SUBCLASS_SPECIFIC | 0x0000000B)
|
||||
#define EFI_SW_PS_PC_ALLOCATE_PAGES (EFI_SUBCLASS_SPECIFIC | 0x0000000C)
|
||||
#define EFI_SW_PS_PC_ALLOCATE_POOL (EFI_SUBCLASS_SPECIFIC | 0x0000000D)
|
||||
#define EFI_SW_PS_PC_COPY_MEM (EFI_SUBCLASS_SPECIFIC | 0x0000000E)
|
||||
#define EFI_SW_PS_PC_SET_MEM (EFI_SUBCLASS_SPECIFIC | 0x0000000F)
|
||||
|
||||
//
|
||||
// Software Class EFI Boot Services Subclass Progress Code definitions.
|
||||
//
|
||||
#define EFI_SW_BS_PC_RAISE_TPL (EFI_SUBCLASS_SPECIFIC | 0x00000000)
|
||||
#define EFI_SW_BS_PC_RESTORE_TPL (EFI_SUBCLASS_SPECIFIC | 0x00000001)
|
||||
#define EFI_SW_BS_PC_ALLOCATE_PAGES (EFI_SUBCLASS_SPECIFIC | 0x00000002)
|
||||
#define EFI_SW_BS_PC_FREE_PAGES (EFI_SUBCLASS_SPECIFIC | 0x00000003)
|
||||
#define EFI_SW_BS_PC_GET_MEMORY_MAP (EFI_SUBCLASS_SPECIFIC | 0x00000004)
|
||||
#define EFI_SW_BS_PC_ALLOCATE_POOL (EFI_SUBCLASS_SPECIFIC | 0x00000005)
|
||||
#define EFI_SW_BS_PC_FREE_POOL (EFI_SUBCLASS_SPECIFIC | 0x00000006)
|
||||
#define EFI_SW_BS_PC_CREATE_EVENT (EFI_SUBCLASS_SPECIFIC | 0x00000007)
|
||||
#define EFI_SW_BS_PC_SET_TIMER (EFI_SUBCLASS_SPECIFIC | 0x00000008)
|
||||
#define EFI_SW_BS_PC_WAIT_FOR_EVENT (EFI_SUBCLASS_SPECIFIC | 0x00000009)
|
||||
#define EFI_SW_BS_PC_SIGNAL_EVENT (EFI_SUBCLASS_SPECIFIC | 0x0000000A)
|
||||
#define EFI_SW_BS_PC_CLOSE_EVENT (EFI_SUBCLASS_SPECIFIC | 0x0000000B)
|
||||
#define EFI_SW_BS_PC_CHECK_EVENT (EFI_SUBCLASS_SPECIFIC | 0x0000000C)
|
||||
#define EFI_SW_BS_PC_INSTALL_PROTOCOL_INTERFACE (EFI_SUBCLASS_SPECIFIC | 0x0000000D)
|
||||
#define EFI_SW_BS_PC_REINSTALL_PROTOCOL_INTERFACE (EFI_SUBCLASS_SPECIFIC | 0x0000000E)
|
||||
#define EFI_SW_BS_PC_UNINSTALL_PROTOCOL_INTERFACE (EFI_SUBCLASS_SPECIFIC | 0x0000000F)
|
||||
#define EFI_SW_BS_PC_HANDLE_PROTOCOL (EFI_SUBCLASS_SPECIFIC | 0x00000010)
|
||||
#define EFI_SW_BS_PC_PC_HANDLE_PROTOCOL (EFI_SUBCLASS_SPECIFIC | 0x00000011)
|
||||
#define EFI_SW_BS_PC_REGISTER_PROTOCOL_NOTIFY (EFI_SUBCLASS_SPECIFIC | 0x00000012)
|
||||
#define EFI_SW_BS_PC_LOCATE_HANDLE (EFI_SUBCLASS_SPECIFIC | 0x00000013)
|
||||
#define EFI_SW_BS_PC_INSTALL_CONFIGURATION_TABLE (EFI_SUBCLASS_SPECIFIC | 0x00000014)
|
||||
#define EFI_SW_BS_PC_LOAD_IMAGE (EFI_SUBCLASS_SPECIFIC | 0x00000015)
|
||||
#define EFI_SW_BS_PC_START_IMAGE (EFI_SUBCLASS_SPECIFIC | 0x00000016)
|
||||
#define EFI_SW_BS_PC_EXIT (EFI_SUBCLASS_SPECIFIC | 0x00000017)
|
||||
#define EFI_SW_BS_PC_UNLOAD_IMAGE (EFI_SUBCLASS_SPECIFIC | 0x00000018)
|
||||
#define EFI_SW_BS_PC_EXIT_BOOT_SERVICES (EFI_SUBCLASS_SPECIFIC | 0x00000019)
|
||||
#define EFI_SW_BS_PC_GET_NEXT_MONOTONIC_COUNT (EFI_SUBCLASS_SPECIFIC | 0x0000001A)
|
||||
#define EFI_SW_BS_PC_STALL (EFI_SUBCLASS_SPECIFIC | 0x0000001B)
|
||||
#define EFI_SW_BS_PC_SET_WATCHDOG_TIMER (EFI_SUBCLASS_SPECIFIC | 0x0000001C)
|
||||
#define EFI_SW_BS_PC_CONNECT_CONTROLLER (EFI_SUBCLASS_SPECIFIC | 0x0000001D)
|
||||
#define EFI_SW_BS_PC_DISCONNECT_CONTROLLER (EFI_SUBCLASS_SPECIFIC | 0x0000001E)
|
||||
#define EFI_SW_BS_PC_OPEN_PROTOCOL (EFI_SUBCLASS_SPECIFIC | 0x0000001F)
|
||||
#define EFI_SW_BS_PC_CLOSE_PROTOCOL (EFI_SUBCLASS_SPECIFIC | 0x00000020)
|
||||
#define EFI_SW_BS_PC_OPEN_PROTOCOL_INFORMATION (EFI_SUBCLASS_SPECIFIC | 0x00000021)
|
||||
#define EFI_SW_BS_PC_PROTOCOLS_PER_HANDLE (EFI_SUBCLASS_SPECIFIC | 0x00000022)
|
||||
#define EFI_SW_BS_PC_LOCATE_HANDLE_BUFFER (EFI_SUBCLASS_SPECIFIC | 0x00000023)
|
||||
#define EFI_SW_BS_PC_LOCATE_PROTOCOL (EFI_SUBCLASS_SPECIFIC | 0x00000024)
|
||||
#define EFI_SW_BS_PC_INSTALL_MULTIPLE_INTERFACES (EFI_SUBCLASS_SPECIFIC | 0x00000025)
|
||||
#define EFI_SW_BS_PC_UNINSTALL_MULTIPLE_INTERFACES (EFI_SUBCLASS_SPECIFIC | 0x00000026)
|
||||
#define EFI_SW_BS_PC_CALCULATE_CRC_32 (EFI_SUBCLASS_SPECIFIC | 0x00000027)
|
||||
#define EFI_SW_BS_PC_COPY_MEM (EFI_SUBCLASS_SPECIFIC | 0x00000028)
|
||||
#define EFI_SW_BS_PC_SET_MEM (EFI_SUBCLASS_SPECIFIC | 0x00000029)
|
||||
|
||||
//
|
||||
// Software Class EFI Runtime Services Subclass Progress Code definitions.
|
||||
//
|
||||
#define EFI_SW_RS_PC_GET_TIME (EFI_SUBCLASS_SPECIFIC | 0x00000000)
|
||||
#define EFI_SW_RS_PC_SET_TIME (EFI_SUBCLASS_SPECIFIC | 0x00000001)
|
||||
#define EFI_SW_RS_PC_GET_WAKEUP_TIME (EFI_SUBCLASS_SPECIFIC | 0x00000002)
|
||||
#define EFI_SW_RS_PC_SET_WAKEUP_TIME (EFI_SUBCLASS_SPECIFIC | 0x00000003)
|
||||
#define EFI_SW_RS_PC_SET_VIRTUAL_ADDRESS_MAP (EFI_SUBCLASS_SPECIFIC | 0x00000004)
|
||||
#define EFI_SW_RS_PC_CONVERT_POINTER (EFI_SUBCLASS_SPECIFIC | 0x00000005)
|
||||
#define EFI_SW_RS_PC_GET_VARIABLE (EFI_SUBCLASS_SPECIFIC | 0x00000006)
|
||||
#define EFI_SW_RS_PC_GET_NEXT_VARIABLE_NAME (EFI_SUBCLASS_SPECIFIC | 0x00000007)
|
||||
#define EFI_SW_RS_PC_SET_VARIABLE (EFI_SUBCLASS_SPECIFIC | 0x00000008)
|
||||
#define EFI_SW_RS_PC_GET_NEXT_HIGH_MONOTONIC_COUNT (EFI_SUBCLASS_SPECIFIC | 0x00000009)
|
||||
#define EFI_SW_RS_PC_RESET_SYSTEM (EFI_SUBCLASS_SPECIFIC | 0x0000000A)
|
||||
|
||||
//
|
||||
// Software Class EFI DXE Services Subclass Progress Code definitions
|
||||
//
|
||||
#define EFI_SW_DS_PC_ADD_MEMORY_SPACE (EFI_SUBCLASS_SPECIFIC | 0x00000000)
|
||||
#define EFI_SW_DS_PC_ALLOCATE_MEMORY_SPACE (EFI_SUBCLASS_SPECIFIC | 0x00000001)
|
||||
#define EFI_SW_DS_PC_FREE_MEMORY_SPACE (EFI_SUBCLASS_SPECIFIC | 0x00000002)
|
||||
#define EFI_SW_DS_PC_REMOVE_MEMORY_SPACE (EFI_SUBCLASS_SPECIFIC | 0x00000003)
|
||||
#define EFI_SW_DS_PC_GET_MEMORY_SPACE_DESCRIPTOR (EFI_SUBCLASS_SPECIFIC | 0x00000004)
|
||||
#define EFI_SW_DS_PC_SET_MEMORY_SPACE_ATTRIBUTES (EFI_SUBCLASS_SPECIFIC | 0x00000005)
|
||||
#define EFI_SW_DS_PC_GET_MEMORY_SPACE_MAP (EFI_SUBCLASS_SPECIFIC | 0x00000006)
|
||||
#define EFI_SW_DS_PC_ADD_IO_SPACE (EFI_SUBCLASS_SPECIFIC | 0x00000007)
|
||||
#define EFI_SW_DS_PC_ALLOCATE_IO_SPACE (EFI_SUBCLASS_SPECIFIC | 0x00000008)
|
||||
#define EFI_SW_DS_PC_FREE_IO_SPACE (EFI_SUBCLASS_SPECIFIC | 0x00000009)
|
||||
#define EFI_SW_DS_PC_REMOVE_IO_SPACE (EFI_SUBCLASS_SPECIFIC | 0x0000000A)
|
||||
#define EFI_SW_DS_PC_GET_IO_SPACE_DESCRIPTOR (EFI_SUBCLASS_SPECIFIC | 0x0000000B)
|
||||
#define EFI_SW_DS_PC_GET_IO_SPACE_MAP (EFI_SUBCLASS_SPECIFIC | 0x0000000C)
|
||||
#define EFI_SW_DS_PC_DISPATCH (EFI_SUBCLASS_SPECIFIC | 0x0000000D)
|
||||
#define EFI_SW_DS_PC_SCHEDULE (EFI_SUBCLASS_SPECIFIC | 0x0000000E)
|
||||
#define EFI_SW_DS_PC_TRUST (EFI_SUBCLASS_SPECIFIC | 0x0000000F)
|
||||
#define EFI_SW_DS_PC_PROCESS_FIRMWARE_VOLUME (EFI_SUBCLASS_SPECIFIC | 0x00000010)
|
||||
|
||||
//
|
||||
// Software Class Error Code definitions.
|
||||
// These are shared by all subclasses.
|
||||
//
|
||||
#define EFI_SW_EC_NON_SPECIFIC 0x00000000
|
||||
#define EFI_SW_EC_LOAD_ERROR 0x00000001
|
||||
#define EFI_SW_EC_INVALID_PARAMETER 0x00000002
|
||||
#define EFI_SW_EC_UNSUPPORTED 0x00000003
|
||||
#define EFI_SW_EC_INVALID_BUFFER 0x00000004
|
||||
#define EFI_SW_EC_OUT_OF_RESOURCES 0x00000005
|
||||
#define EFI_SW_EC_ABORTED 0x00000006
|
||||
#define EFI_SW_EC_ILLEGAL_SOFTWARE_STATE 0x00000007
|
||||
#define EFI_SW_EC_ILLEGAL_HARDWARE_STATE 0x00000008
|
||||
#define EFI_SW_EC_START_ERROR 0x00000009
|
||||
#define EFI_SW_EC_BAD_DATE_TIME 0x0000000A
|
||||
#define EFI_SW_EC_CFG_INVALID 0x0000000B
|
||||
#define EFI_SW_EC_CFG_CLR_REQUEST 0x0000000C
|
||||
#define EFI_SW_EC_CFG_DEFAULT 0x0000000D
|
||||
#define EFI_SW_EC_PWD_INVALID 0x0000000E
|
||||
#define EFI_SW_EC_PWD_CLR_REQUEST 0x0000000F
|
||||
#define EFI_SW_EC_PWD_CLEARED 0x00000010
|
||||
#define EFI_SW_EC_EVENT_LOG_FULL 0x00000011
|
||||
|
||||
//
|
||||
// Software Class Unspecified Subclass Error Code definitions.
|
||||
//
|
||||
//
|
||||
// Software Class SEC Subclass Error Code definitions.
|
||||
//
|
||||
//
|
||||
// Software Class PEI Core Subclass Error Code definitions.
|
||||
//
|
||||
#define EFI_SW_PEI_CORE_EC_DXE_CORRUPT (EFI_SUBCLASS_SPECIFIC | 0x00000000)
|
||||
|
||||
//
|
||||
// Software Class PEI Module Subclass Error Code definitions.
|
||||
//
|
||||
#define EFI_SW_PEIM_EC_NO_RECOVERY_CAPSULE (EFI_SUBCLASS_SPECIFIC | 0x00000000)
|
||||
#define EFI_SW_PEIM_EC_INVALID_CAPSULE_DESCRIPTOR (EFI_SUBCLASS_SPECIFIC | 0x00000001)
|
||||
|
||||
//
|
||||
// Software Class DXE Core Subclass Error Code definitions.
|
||||
//
|
||||
#define EFI_SW_CSM_LEGACY_ROM_INIT (EFI_SUBCLASS_SPECIFIC | 0x00000000)
|
||||
//
|
||||
// Software Class DXE Boot Service Driver Subclass Error Code definitions.
|
||||
//
|
||||
#define EFI_SW_DXE_BS_EC_LEGACY_OPROM_NO_SPACE (EFI_SUBCLASS_SPECIFIC | 0x00000000)
|
||||
|
||||
//
|
||||
// Software Class DXE Runtime Service Driver Subclass Error Code definitions.
|
||||
//
|
||||
//
|
||||
// Software Class SMM Driver Subclass Error Code definitions.
|
||||
//
|
||||
//
|
||||
// Software Class EFI Application Subclass Error Code definitions.
|
||||
//
|
||||
//
|
||||
// Software Class EFI OS Loader Subclass Error Code definitions.
|
||||
//
|
||||
//
|
||||
// Software Class EFI RT Subclass Error Code definitions.
|
||||
//
|
||||
//
|
||||
// Software Class EFI AL Subclass Error Code definitions.
|
||||
//
|
||||
//
|
||||
// Software Class EBC Exception Subclass Error Code definitions.
|
||||
// These exceptions are derived from the debug protocol definitions in the EFI
|
||||
// specification.
|
||||
//
|
||||
#define EFI_SW_EC_EBC_UNDEFINED 0x00000000
|
||||
#define EFI_SW_EC_EBC_DIVIDE_ERROR EXCEPT_EBC_DIVIDE_ERROR
|
||||
#define EFI_SW_EC_EBC_DEBUG EXCEPT_EBC_DEBUG
|
||||
#define EFI_SW_EC_EBC_BREAKPOINT EXCEPT_EBC_BREAKPOINT
|
||||
#define EFI_SW_EC_EBC_OVERFLOW EXCEPT_EBC_OVERFLOW
|
||||
#define EFI_SW_EC_EBC_INVALID_OPCODE EXCEPT_EBC_INVALID_OPCODE
|
||||
#define EFI_SW_EC_EBC_STACK_FAULT EXCEPT_EBC_STACK_FAULT
|
||||
#define EFI_SW_EC_EBC_ALIGNMENT_CHECK EXCEPT_EBC_ALIGNMENT_CHECK
|
||||
#define EFI_SW_EC_EBC_INSTRUCTION_ENCODING EXCEPT_EBC_INSTRUCTION_ENCODING
|
||||
#define EFI_SW_EC_EBC_BAD_BREAK EXCEPT_EBC_BAD_BREAK
|
||||
#define EFI_SW_EC_EBC_STEP EXCEPT_EBC_STEP
|
||||
|
||||
//
|
||||
// Software Class IA32 Exception Subclass Error Code definitions.
|
||||
// These exceptions are derived from the debug protocol definitions in the EFI
|
||||
// specification.
|
||||
//
|
||||
#define EFI_SW_EC_IA32_DIVIDE_ERROR EXCEPT_IA32_DIVIDE_ERROR
|
||||
#define EFI_SW_EC_IA32_DEBUG EXCEPT_IA32_DEBUG
|
||||
#define EFI_SW_EC_IA32_NMI EXCEPT_IA32_NMI
|
||||
#define EFI_SW_EC_IA32_BREAKPOINT EXCEPT_IA32_BREAKPOINT
|
||||
#define EFI_SW_EC_IA32_OVERFLOW EXCEPT_IA32_OVERFLOW
|
||||
#define EFI_SW_EC_IA32_BOUND EXCEPT_IA32_BOUND
|
||||
#define EFI_SW_EC_IA32_INVALID_OPCODE EXCEPT_IA32_INVALID_OPCODE
|
||||
#define EFI_SW_EC_IA32_DOUBLE_FAULT EXCEPT_IA32_DOUBLE_FAULT
|
||||
#define EFI_SW_EC_IA32_INVALID_TSS EXCEPT_IA32_INVALID_TSS
|
||||
#define EFI_SW_EC_IA32_SEG_NOT_PRESENT EXCEPT_IA32_SEG_NOT_PRESENT
|
||||
#define EFI_SW_EC_IA32_STACK_FAULT EXCEPT_IA32_STACK_FAULT
|
||||
#define EFI_SW_EC_IA32_GP_FAULT EXCEPT_IA32_GP_FAULT
|
||||
#define EFI_SW_EC_IA32_PAGE_FAULT EXCEPT_IA32_PAGE_FAULT
|
||||
#define EFI_SW_EC_IA32_FP_ERROR EXCEPT_IA32_FP_ERROR
|
||||
#define EFI_SW_EC_IA32_ALIGNMENT_CHECK EXCEPT_IA32_ALIGNMENT_CHECK
|
||||
#define EFI_SW_EC_IA32_MACHINE_CHECK EXCEPT_IA32_MACHINE_CHECK
|
||||
#define EFI_SW_EC_IA32_SIMD EXCEPT_IA32_SIMD
|
||||
|
||||
//
|
||||
// Software Class IPF Exception Subclass Error Code definitions.
|
||||
// These exceptions are derived from the debug protocol definitions in the EFI
|
||||
// specification.
|
||||
//
|
||||
#define EFI_SW_EC_IPF_ALT_DTLB EXCEPT_IPF_ALT_DTLB
|
||||
#define EFI_SW_EC_IPF_DNESTED_TLB EXCEPT_IPF_DNESTED_TLB
|
||||
#define EFI_SW_EC_IPF_BREAKPOINT EXCEPT_IPF_BREAKPOINT
|
||||
#define EFI_SW_EC_IPF_EXTERNAL_INTERRUPT EXCEPT_IPF_EXTERNAL_INTERRUPT
|
||||
#define EFI_SW_EC_IPF_GEN_EXCEPT EXCEPT_IPF_GEN_EXCEPT
|
||||
#define EFI_SW_EC_IPF_NAT_CONSUMPTION EXCEPT_IPF_NAT_CONSUMPTION
|
||||
#define EFI_SW_EC_IPF_DEBUG_EXCEPT EXCEPT_IPF_DEBUG_EXCEPT
|
||||
#define EFI_SW_EC_IPF_UNALIGNED_ACCESS EXCEPT_IPF_UNALIGNED_ACCESS
|
||||
#define EFI_SW_EC_IPF_FP_FAULT EXCEPT_IPF_FP_FAULT
|
||||
#define EFI_SW_EC_IPF_FP_TRAP EXCEPT_IPF_FP_TRAP
|
||||
#define EFI_SW_EC_IPF_TAKEN_BRANCH EXCEPT_IPF_TAKEN_BRANCH
|
||||
#define EFI_SW_EC_IPF_SINGLE_STEP EXCEPT_IPF_SINGLE_STEP
|
||||
|
||||
//
|
||||
// Software Class PEI Service Subclass Error Code definitions.
|
||||
//
|
||||
//
|
||||
// Software Class EFI Boot Service Subclass Error Code definitions.
|
||||
//
|
||||
//
|
||||
// Software Class EFI Runtime Service Subclass Error Code definitions.
|
||||
//
|
||||
//
|
||||
// Software Class EFI DXE Service Subclass Error Code definitions.
|
||||
//
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Section 7
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Debug Code definitions for all classes and subclass
|
||||
// Only one debug code is defined at this point and should
|
||||
// be used for anything that gets sent to debug stream.
|
||||
//
|
||||
#define EFI_DC_UNSPECIFIED 0x0
|
||||
|
||||
#endif
|
336
Tools/Source/TianoTools/Include/Common/StatusCodeDataTypeId.h
Normal file
336
Tools/Source/TianoTools/Include/Common/StatusCodeDataTypeId.h
Normal file
@ -0,0 +1,336 @@
|
||||
/** @file
|
||||
This file defines the data structures to support Status Code Data.
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
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
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
Module Name: StatusCodeDataTypeId.h
|
||||
|
||||
@par Revision Reference:
|
||||
These definitions are from Framework of EFI Status Code Spec
|
||||
Version 0.92.
|
||||
|
||||
**/
|
||||
|
||||
#ifndef __STATUS_CODE_DATA_TYPE_ID_H__
|
||||
#define __STATUS_CODE_DATA_TYPE_ID_H__
|
||||
|
||||
|
||||
///
|
||||
/// The size of string
|
||||
///
|
||||
#define EFI_STATUS_CODE_DATA_MAX_STRING_SIZE 150
|
||||
|
||||
///
|
||||
/// This is the max data size including all the headers which can be passed
|
||||
/// as Status Code data. This data should be multiple of 8 byte
|
||||
/// to avoid any kind of boundary issue. Also, sum of this data size (inclusive
|
||||
/// of size of EFI_STATUS_CODE_DATA should not exceed the max record size of
|
||||
/// data hub
|
||||
///
|
||||
#define EFI_STATUS_CODE_DATA_MAX_SIZE 200
|
||||
|
||||
#pragma pack(1)
|
||||
typedef enum {
|
||||
EfiStringAscii,
|
||||
EfiStringUnicode,
|
||||
EfiStringToken
|
||||
} EFI_STRING_TYPE;
|
||||
|
||||
typedef struct {
|
||||
EFI_HII_HANDLE Handle;
|
||||
STRING_REF Token;
|
||||
} EFI_STATUS_CODE_STRING_TOKEN;
|
||||
|
||||
typedef union {
|
||||
CHAR8 *Ascii;
|
||||
CHAR16 *Unicode;
|
||||
EFI_STATUS_CODE_STRING_TOKEN Hii;
|
||||
} EFI_STATUS_CODE_STRING;
|
||||
|
||||
typedef struct {
|
||||
EFI_STATUS_CODE_DATA DataHeader;
|
||||
EFI_STRING_TYPE StringType;
|
||||
EFI_STATUS_CODE_STRING String;
|
||||
} EFI_STATUS_CODE_STRING_DATA;
|
||||
|
||||
#pragma pack()
|
||||
|
||||
#pragma pack(1)
|
||||
|
||||
typedef struct {
|
||||
UINT32 ErrorLevel;
|
||||
//
|
||||
// 12 * sizeof (UINT64) Var Arg stack
|
||||
//
|
||||
// ascii DEBUG () Format string
|
||||
//
|
||||
} EFI_DEBUG_INFO;
|
||||
|
||||
#pragma pack()
|
||||
|
||||
//
|
||||
// declaration for EFI_EXP_DATA. This may change
|
||||
//
|
||||
// typedef UINTN EFI_EXP_DATA;
|
||||
|
||||
///
|
||||
/// Voltage Extended Error Data
|
||||
///
|
||||
typedef struct {
|
||||
EFI_STATUS_CODE_DATA DataHeader;
|
||||
EFI_EXP_BASE10_DATA Voltage;
|
||||
EFI_EXP_BASE10_DATA Threshold;
|
||||
} EFI_COMPUTING_UNIT_VOLTAGE_ERROR_DATA;
|
||||
|
||||
///
|
||||
/// Microcode Update Extended Error Data
|
||||
///
|
||||
typedef struct {
|
||||
EFI_STATUS_CODE_DATA DataHeader;
|
||||
UINT32 Version;
|
||||
} EFI_COMPUTING_UNIT_MICROCODE_UPDATE_ERROR_DATA;
|
||||
|
||||
///
|
||||
/// Asynchronous Timer Extended Error Data
|
||||
///
|
||||
typedef struct {
|
||||
EFI_STATUS_CODE_DATA DataHeader;
|
||||
EFI_EXP_BASE10_DATA TimerLimit;
|
||||
} EFI_COMPUTING_UNIT_TIMER_EXPIRED_ERROR_DATA;
|
||||
|
||||
///
|
||||
/// Host Processor Mismatch Extended Error Data
|
||||
///
|
||||
typedef struct {
|
||||
EFI_STATUS_CODE_DATA DataHeader;
|
||||
UINT32 Instance;
|
||||
UINT16 Attributes;
|
||||
} EFI_HOST_PROCESSOR_MISMATCH_ERROR_DATA;
|
||||
|
||||
//
|
||||
// EFI_COMPUTING_UNIT_MISMATCH_ATTRIBUTES
|
||||
// All other attributes are reserved for future use and
|
||||
// must be initialized to 0.
|
||||
//
|
||||
#define EFI_COMPUTING_UNIT_MISMATCH_SPEED 0x0001
|
||||
#define EFI_COMPUTING_UNIT_MISMATCH_FSB_SPEED 0x0002
|
||||
#define EFI_COMPUTING_UNIT_MISMATCH_FAMILY 0x0004
|
||||
#define EFI_COMPUTING_UNIT_MISMATCH_MODEL 0x0008
|
||||
#define EFI_COMPUTING_UNIT_MISMATCH_STEPPING 0x0010
|
||||
#define EFI_COMPUTING_UNIT_MISMATCH_CACHE_SIZE 0x0020
|
||||
#define EFI_COMPUTING_UNIT_MISMATCH_OEM1 0x1000
|
||||
#define EFI_COMPUTING_UNIT_MISMATCH_OEM2 0x2000
|
||||
#define EFI_COMPUTING_UNIT_MISMATCH_OEM3 0x4000
|
||||
#define EFI_COMPUTING_UNIT_MISMATCH_OEM4 0x8000
|
||||
|
||||
///
|
||||
/// Thermal Extended Error Data
|
||||
///
|
||||
typedef struct {
|
||||
EFI_STATUS_CODE_DATA DataHeader;
|
||||
EFI_EXP_BASE10_DATA Temperature;
|
||||
EFI_EXP_BASE10_DATA Threshold;
|
||||
} EFI_COMPUTING_UNIT_THERMAL_ERROR_DATA;
|
||||
|
||||
///
|
||||
/// Processor Disabled Extended Error Data
|
||||
///
|
||||
typedef struct {
|
||||
EFI_STATUS_CODE_DATA DataHeader;
|
||||
UINT32 Cause;
|
||||
BOOLEAN SoftwareDisabled;
|
||||
} EFI_COMPUTING_UNIT_CPU_DISABLED_ERROR_DATA;
|
||||
|
||||
typedef enum {
|
||||
EfiInitCacheDataOnly,
|
||||
EfiInitCacheInstrOnly,
|
||||
EfiInitCacheBoth,
|
||||
EfiInitCacheUnspecified
|
||||
} EFI_INIT_CACHE_TYPE;
|
||||
|
||||
///
|
||||
/// Embedded cache init extended data
|
||||
///
|
||||
typedef struct {
|
||||
EFI_STATUS_CODE_DATA DataHeader;
|
||||
UINT32 Level;
|
||||
EFI_INIT_CACHE_TYPE Type;
|
||||
} EFI_CACHE_INIT_DATA;
|
||||
|
||||
//
|
||||
// Memory Extended Error Data
|
||||
//
|
||||
|
||||
///
|
||||
/// Memory Error Granularity Definition
|
||||
///
|
||||
typedef UINT8 EFI_MEMORY_ERROR_GRANULARITY;
|
||||
|
||||
///
|
||||
/// Memory Error Operation Definition
|
||||
///
|
||||
typedef UINT8 EFI_MEMORY_ERROR_OPERATION;
|
||||
|
||||
typedef struct {
|
||||
EFI_STATUS_CODE_DATA DataHeader;
|
||||
EFI_MEMORY_ERROR_GRANULARITY Granularity;
|
||||
EFI_MEMORY_ERROR_OPERATION Operation;
|
||||
UINTN Syndrome;
|
||||
EFI_PHYSICAL_ADDRESS Address;
|
||||
UINTN Resolution;
|
||||
} EFI_MEMORY_EXTENDED_ERROR_DATA;
|
||||
|
||||
//
|
||||
// Memory Error Granularities
|
||||
//
|
||||
#define EFI_MEMORY_ERROR_OTHER 0x01
|
||||
#define EFI_MEMORY_ERROR_UNKNOWN 0x02
|
||||
#define EFI_MEMORY_ERROR_DEVICE 0x03
|
||||
#define EFI_MEMORY_ERROR_PARTITION 0x04
|
||||
|
||||
//
|
||||
// Memory Error Operations
|
||||
//
|
||||
#define EFI_MEMORY_OPERATION_OTHER 0x01
|
||||
#define EFI_MEMORY_OPERATION_UNKNOWN 0x02
|
||||
#define EFI_MEMORY_OPERATION_READ 0x03
|
||||
#define EFI_MEMORY_OPERATION_WRITE 0x04
|
||||
#define EFI_MEMORY_OPERATION_PARTIAL_WRITE 0x05
|
||||
|
||||
//
|
||||
// Define shorthands to describe Group Operations
|
||||
// Many memory init operations are essentially group
|
||||
// operations.
|
||||
|
||||
/// A shorthand to describe that the operation is performed
|
||||
/// on multiple devices within the array
|
||||
///
|
||||
#define EFI_MULTIPLE_MEMORY_DEVICE_OPERATION 0xfffe
|
||||
///
|
||||
/// A shorthand to describe that the operation is performed on all devices within the array
|
||||
///
|
||||
#define EFI_ALL_MEMORY_DEVICE_OPERATION 0xffff
|
||||
///
|
||||
/// A shorthand to describe that the operation is performed on multiple arrays
|
||||
///
|
||||
#define EFI_MULTIPLE_MEMORY_ARRAY_OPERATION 0xfffe
|
||||
///
|
||||
/// A shorthand to describe that the operation is performed on all the arrays
|
||||
///
|
||||
#define EFI_ALL_MEMORY_ARRAY_OPERATION 0xffff
|
||||
|
||||
//
|
||||
// DIMM number
|
||||
//
|
||||
#pragma pack(1)
|
||||
typedef struct {
|
||||
EFI_STATUS_CODE_DATA DataHeader;
|
||||
UINT16 Array;
|
||||
UINT16 Device;
|
||||
} EFI_STATUS_CODE_DIMM_NUMBER;
|
||||
#pragma pack()
|
||||
|
||||
///
|
||||
/// Memory Module Mismatch Extended Error Data
|
||||
///
|
||||
typedef struct {
|
||||
EFI_STATUS_CODE_DATA DataHeader;
|
||||
EFI_STATUS_CODE_DIMM_NUMBER Instance;
|
||||
} EFI_MEMORY_MODULE_MISMATCH_ERROR_DATA;
|
||||
|
||||
///
|
||||
/// Memory Range Extended Data
|
||||
///
|
||||
typedef struct {
|
||||
EFI_STATUS_CODE_DATA DataHeader;
|
||||
EFI_PHYSICAL_ADDRESS Start;
|
||||
EFI_PHYSICAL_ADDRESS Length;
|
||||
} EFI_MEMORY_RANGE_EXTENDED_DATA;
|
||||
|
||||
///
|
||||
/// Device handle Extended Data. Used for many
|
||||
/// errors and progress codes to point to the device.
|
||||
///
|
||||
typedef struct {
|
||||
EFI_STATUS_CODE_DATA DataHeader;
|
||||
EFI_HANDLE Handle;
|
||||
} EFI_DEVICE_HANDLE_EXTENDED_DATA;
|
||||
|
||||
typedef struct {
|
||||
EFI_STATUS_CODE_DATA DataHeader;
|
||||
UINT8 *DevicePath;
|
||||
} EFI_DEVICE_PATH_EXTENDED_DATA;
|
||||
|
||||
typedef struct {
|
||||
EFI_STATUS_CODE_DATA DataHeader;
|
||||
EFI_HANDLE ControllerHandle;
|
||||
EFI_HANDLE DriverBindingHandle;
|
||||
UINT16 DevicePathSize;
|
||||
UINT8 *RemainingDevicePath;
|
||||
} EFI_STATUS_CODE_START_EXTENDED_DATA;
|
||||
|
||||
///
|
||||
/// Resource Allocation Failure Extended Error Data
|
||||
///
|
||||
|
||||
/*
|
||||
typedef struct {
|
||||
EFI_STATUS_CODE_DATA DataHeader;
|
||||
EFI_DEVICE_PATH_PROTOCOL *DevicePath;
|
||||
UINT32 Bar;
|
||||
VOID *ReqRes;
|
||||
VOID *AllocRes;
|
||||
} EFI_RESOURCE_ALLOC_FAILURE_ERROR_DATA;
|
||||
*/
|
||||
typedef struct {
|
||||
EFI_STATUS_CODE_DATA DataHeader;
|
||||
UINT32 Bar;
|
||||
UINT16 DevicePathSize;
|
||||
UINT16 ReqResSize;
|
||||
UINT16 AllocResSize;
|
||||
UINT8 *DevicePath;
|
||||
UINT8 *ReqRes;
|
||||
UINT8 *AllocRes;
|
||||
} EFI_RESOURCE_ALLOC_FAILURE_ERROR_DATA;
|
||||
|
||||
///
|
||||
/// Extended Error Data for Assert
|
||||
///
|
||||
typedef struct {
|
||||
EFI_STATUS_CODE_DATA DataHeader;
|
||||
UINT32 LineNumber;
|
||||
UINT32 FileNameSize;
|
||||
EFI_STATUS_CODE_STRING_DATA *FileName;
|
||||
} EFI_DEBUG_ASSERT_DATA;
|
||||
|
||||
///
|
||||
/// System Context Data EBC/IA32/IPF
|
||||
///
|
||||
typedef union {
|
||||
EFI_SYSTEM_CONTEXT_EBC SystemContextEbc;
|
||||
EFI_SYSTEM_CONTEXT_IA32 SystemContextIa32;
|
||||
EFI_SYSTEM_CONTEXT_IPF SystemContextIpf;
|
||||
} EFI_STATUS_CODE_EXCEP_SYSTEM_CONTEXT;
|
||||
|
||||
typedef struct {
|
||||
EFI_STATUS_CODE_DATA DataHeader;
|
||||
EFI_STATUS_CODE_EXCEP_SYSTEM_CONTEXT Context;
|
||||
} EFI_STATUS_CODE_EXCEP_EXTENDED_DATA;
|
||||
|
||||
///
|
||||
/// Legacy Oprom extended data
|
||||
///
|
||||
typedef struct {
|
||||
EFI_STATUS_CODE_DATA DataHeader;
|
||||
EFI_HANDLE DeviceHandle;
|
||||
EFI_PHYSICAL_ADDRESS RomImageBase;
|
||||
} EFI_LEGACY_OPROM_EXTENDED_DATA;
|
||||
|
||||
#endif
|
85
Tools/Source/TianoTools/Include/Common/UefiBaseTypes.h
Normal file
85
Tools/Source/TianoTools/Include/Common/UefiBaseTypes.h
Normal file
@ -0,0 +1,85 @@
|
||||
/** @file
|
||||
This file makes the BaseTypes.h backward compatible with the ones used in the
|
||||
past for EFI and Tiano development. It's mostly just prepending an EFI_ on the
|
||||
definitions.
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
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
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
Module Name: UefiBaseTypes.h
|
||||
|
||||
**/
|
||||
|
||||
#ifndef __UEFI_BASE_TYPES_H__
|
||||
#define __UEFI_BASE_TYPES_H__
|
||||
|
||||
#include <Common/BaseTypes.h>
|
||||
|
||||
typedef UINT64 EFI_LBA;
|
||||
|
||||
#define EFIERR(_a) ENCODE_ERROR(_a)
|
||||
|
||||
#define EFI_MAX_BIT MAX_BIT
|
||||
#define EFI_MAX_ADDRESS MAX_ADDRESS
|
||||
#define EFI_BREAKPOINT() CpuBreakpoint ()
|
||||
#define EFI_DEADLOOP() CpuDeadLoop ()
|
||||
#define EFI_ERROR(A) RETURN_ERROR(A)
|
||||
|
||||
typedef GUID EFI_GUID;
|
||||
typedef RETURN_STATUS EFI_STATUS;
|
||||
|
||||
#define EFI_SUCCESS RETURN_SUCCESS
|
||||
#define EFI_LOAD_ERROR RETURN_LOAD_ERROR
|
||||
#define EFI_INVALID_PARAMETER RETURN_INVALID_PARAMETER
|
||||
#define EFI_UNSUPPORTED RETURN_UNSUPPORTED
|
||||
#define EFI_BAD_BUFFER_SIZE RETURN_BAD_BUFFER_SIZE
|
||||
#define EFI_BUFFER_TOO_SMALL RETURN_BUFFER_TOO_SMALL
|
||||
#define EFI_NOT_READY RETURN_NOT_READY
|
||||
#define EFI_DEVICE_ERROR RETURN_DEVICE_ERROR
|
||||
#define EFI_WRITE_PROTECTED RETURN_WRITE_PROTECTED
|
||||
#define EFI_OUT_OF_RESOURCES RETURN_OUT_OF_RESOURCES
|
||||
#define EFI_VOLUME_CORRUPTED RETURN_VOLUME_CORRUPTED
|
||||
#define EFI_VOLUME_FULL RETURN_VOLUME_FULL
|
||||
#define EFI_NO_MEDIA RETURN_NO_MEDIA
|
||||
#define EFI_MEDIA_CHANGED RETURN_MEDIA_CHANGED
|
||||
#define EFI_NOT_FOUND RETURN_NOT_FOUND
|
||||
#define EFI_ACCESS_DENIED RETURN_ACCESS_DENIED
|
||||
#define EFI_NO_RESPONSE RETURN_NO_RESPONSE
|
||||
#define EFI_NO_MAPPING RETURN_NO_MAPPING
|
||||
#define EFI_TIMEOUT RETURN_TIMEOUT
|
||||
#define EFI_NOT_STARTED RETURN_NOT_STARTED
|
||||
#define EFI_ALREADY_STARTED RETURN_ALREADY_STARTED
|
||||
#define EFI_ABORTED RETURN_ABORTED
|
||||
#define EFI_ICMP_ERROR RETURN_ICMP_ERROR
|
||||
#define EFI_TFTP_ERROR RETURN_TFTP_ERROR
|
||||
#define EFI_PROTOCOL_ERROR RETURN_PROTOCOL_ERROR
|
||||
#define EFI_INCOMPATIBLE_VERSION RETURN_INCOMPATIBLE_VERSION
|
||||
#define EFI_SECURITY_VIOLATION RETURN_SECURITY_VIOLATION
|
||||
#define EFI_CRC_ERROR RETURN_CRC_ERROR
|
||||
#define EFI_END_OF_MEDIA RETURN_END_OF_MEDIA
|
||||
#define EFI_END_OF_FILE RETURN_END_OF_FILE
|
||||
|
||||
#define EFI_WARN_UNKNOWN_GLYPH RETURN_WARN_UNKNOWN_GLYPH
|
||||
#define EFI_WARN_DELETE_FAILURE RETURN_WARN_DELETE_FAILURE
|
||||
#define EFI_WARN_WRITE_FAILURE RETURN_WARN_WRITE_FAILURE
|
||||
#define EFI_WARN_BUFFER_TOO_SMALL RETURN_WARN_BUFFER_TOO_SMALL
|
||||
|
||||
//
|
||||
// The EFI memory allocation functions work in units of EFI_PAGEs that are
|
||||
// 4K. This should in no way be confused with the page size of the processor.
|
||||
// An EFI_PAGE is just the quanta of memory in EFI.
|
||||
//
|
||||
#define EFI_PAGE_MASK 0xFFF
|
||||
#define EFI_PAGE_SHIFT 12
|
||||
|
||||
#define EFI_SIZE_TO_PAGES(a) (((a) >> EFI_PAGE_SHIFT) + (((a) & EFI_PAGE_MASK) ? 1 : 0))
|
||||
|
||||
#define EFI_PAGES_TO_SIZE(a) ( (a) << EFI_PAGE_SHIFT)
|
||||
|
||||
#endif
|
50
Tools/Source/TianoTools/Include/Dxe.h
Normal file
50
Tools/Source/TianoTools/Include/Dxe.h
Normal file
@ -0,0 +1,50 @@
|
||||
/** @file
|
||||
|
||||
Root include file for Mde Package DXE modules
|
||||
|
||||
DXE modules follow the public Framework specifications and the UEFI
|
||||
specifiations. The build infrastructure must set
|
||||
EFI_SPECIFICATION_VERSION before including this file. To support
|
||||
R9/UEFI2.0 set EFI_SPECIFIATION_VERSION to 0x00020000. To support
|
||||
R8.5/EFI 1.10 set EFI_SPECIFIATION_VERSION to 0x00010010.
|
||||
EDK_RELEASE_VERSION must be set to a non zero value.
|
||||
EFI_SPECIFIATION_VERSION and EDK_RELEASE_VERSION are set automatically
|
||||
by the build infrastructure for every module.
|
||||
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
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
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
**/
|
||||
|
||||
#ifndef __DXE_H__
|
||||
#define __DXE_H__
|
||||
|
||||
//
|
||||
// Check to make sure EFI_SPECIFICATION_VERSION and EDK_RELEASE_VERSION are defined.
|
||||
//
|
||||
#if !defined(EFI_SPECIFICATION_VERSION)
|
||||
#error EFI_SPECIFICATION_VERSION not defined
|
||||
#elif !defined(EDK_RELEASE_VERSION)
|
||||
#error EDK_RELEASE_VERSION not defined
|
||||
#elif (EDK_RELEASE_VERSION == 0)
|
||||
#error EDK_RELEASE_VERSION can not be zero
|
||||
#endif
|
||||
|
||||
|
||||
#include <Common/UefiBaseTypes.h>
|
||||
#include <Dxe/DxeCis.h>
|
||||
#include <Dxe/SmmCis.h>
|
||||
|
||||
#include <Common/DataHubRecords.h>
|
||||
#include <Guid/DataHubRecords.h>
|
||||
|
||||
#include <Protocol/Pcd.h>
|
||||
|
||||
#endif
|
87
Tools/Source/TianoTools/Include/Dxe/ArchProtocol/Bds.h
Normal file
87
Tools/Source/TianoTools/Include/Dxe/ArchProtocol/Bds.h
Normal file
@ -0,0 +1,87 @@
|
||||
/** @file
|
||||
Boot Device Selection Architectural Protocol as defined in DXE CIS
|
||||
|
||||
When the DXE core is done it calls the BDS via this protocol.
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
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
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
Module Name: Bds.h
|
||||
|
||||
@par Revision Reference:
|
||||
Version 0.91B.
|
||||
|
||||
**/
|
||||
|
||||
#ifndef __ARCH_PROTOCOL_BDS_H__
|
||||
#define __ARCH_PROTOCOL_BDS_H__
|
||||
|
||||
//
|
||||
// Global ID for the BDS Architectural Protocol
|
||||
//
|
||||
#define EFI_BDS_ARCH_PROTOCOL_GUID \
|
||||
{ 0x665E3FF6, 0x46CC, 0x11d4, {0x9A, 0x38, 0x00, 0x90, 0x27, 0x3F, 0xC1, 0x4D } }
|
||||
|
||||
//
|
||||
// Declare forward reference for the BDS Architectural Protocol
|
||||
//
|
||||
typedef struct _EFI_BDS_ARCH_PROTOCOL EFI_BDS_ARCH_PROTOCOL;
|
||||
|
||||
/**
|
||||
This function uses policy data from the platform to determine what operating
|
||||
system or system utility should be loaded and invoked. This function call
|
||||
also optionally make the use of user input to determine the operating system
|
||||
or system utility to be loaded and invoked. When the DXE Core has dispatched
|
||||
all the drivers on the dispatch queue, this function is called. This
|
||||
function will attempt to connect the boot devices required to load and invoke
|
||||
the selected operating system or system utility. During this process,
|
||||
additional firmware volumes may be discovered that may contain addition DXE
|
||||
drivers that can be dispatched by the DXE Core. If a boot device cannot be
|
||||
fully connected, this function calls the DXE Service Dispatch() to allow the
|
||||
DXE drivers from any newly discovered firmware volumes to be dispatched.
|
||||
Then the boot device connection can be attempted again. If the same boot
|
||||
device connection operation fails twice in a row, then that boot device has
|
||||
failed, and should be skipped. This function should never return.
|
||||
|
||||
@param This The EFI_BDS_ARCH_PROTOCOL instance.
|
||||
|
||||
@return None.
|
||||
|
||||
**/
|
||||
typedef
|
||||
VOID
|
||||
(EFIAPI *EFI_BDS_ENTRY) (
|
||||
IN EFI_BDS_ARCH_PROTOCOL *This
|
||||
);
|
||||
|
||||
/**
|
||||
Interface stucture for the BDS Architectural Protocol.
|
||||
|
||||
@par Protocol Description:
|
||||
The EFI_BDS_ARCH_PROTOCOL transfers control from DXE to an operating
|
||||
system or a system utility. If there are not enough drivers initialized
|
||||
when this protocol is used to access the required boot device(s), then
|
||||
this protocol should add drivers to the dispatch queue and return control
|
||||
back to the dispatcher. Once the required boot devices are available, then
|
||||
the boot device can be used to load and invoke an OS or a system utility.
|
||||
|
||||
@par Protocol Parameters:
|
||||
Entry - The entry point to BDS. This call does not take any parameters,
|
||||
and the return value can be ignored. If it returns, then the
|
||||
dispatcher must be invoked again, if it never returns, then an
|
||||
operating system or a system utility have been invoked.
|
||||
|
||||
**/
|
||||
struct _EFI_BDS_ARCH_PROTOCOL {
|
||||
EFI_BDS_ENTRY Entry;
|
||||
};
|
||||
|
||||
extern EFI_GUID gEfiBdsArchProtocolGuid;
|
||||
|
||||
#endif
|
326
Tools/Source/TianoTools/Include/Dxe/ArchProtocol/Cpu.h
Normal file
326
Tools/Source/TianoTools/Include/Dxe/ArchProtocol/Cpu.h
Normal file
@ -0,0 +1,326 @@
|
||||
/** @file
|
||||
CPU Architectural Protocol as defined in DXE CIS
|
||||
|
||||
This code abstracts the DXE core from processor implementation details.
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
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
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
Module Name: Cpu.h
|
||||
|
||||
@par Revision Reference:
|
||||
Version 0.91B.
|
||||
|
||||
**/
|
||||
|
||||
#ifndef __ARCH_PROTOCOL_CPU_H__
|
||||
#define __ARCH_PROTOCOL_CPU_H__
|
||||
|
||||
|
||||
#define EFI_CPU_ARCH_PROTOCOL_GUID \
|
||||
{ 0x26baccb1, 0x6f42, 0x11d4, {0xbc, 0xe7, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81 } }
|
||||
|
||||
typedef struct _EFI_CPU_ARCH_PROTOCOL EFI_CPU_ARCH_PROTOCOL;
|
||||
|
||||
typedef enum {
|
||||
EfiCpuFlushTypeWriteBackInvalidate,
|
||||
EfiCpuFlushTypeWriteBack,
|
||||
EfiCpuFlushTypeInvalidate,
|
||||
EfiCpuMaxFlushType
|
||||
} EFI_CPU_FLUSH_TYPE;
|
||||
|
||||
typedef enum {
|
||||
EfiCpuInit,
|
||||
EfiCpuMaxInitType
|
||||
} EFI_CPU_INIT_TYPE;
|
||||
|
||||
/**
|
||||
EFI_CPU_INTERRUPT_HANDLER that is called when a processor interrupt occurs.
|
||||
|
||||
@param InterruptType Defines the type of interrupt or exception that
|
||||
occurred on the processor.This parameter is processor architecture specific.
|
||||
|
||||
@param SystemContext A pointer to the processor context when
|
||||
the interrupt occurred on the processor.
|
||||
|
||||
@return None
|
||||
|
||||
**/
|
||||
typedef
|
||||
VOID
|
||||
(*EFI_CPU_INTERRUPT_HANDLER) (
|
||||
IN EFI_EXCEPTION_TYPE InterruptType,
|
||||
IN EFI_SYSTEM_CONTEXT SystemContext
|
||||
);
|
||||
|
||||
/**
|
||||
This function flushes the range of addresses from Start to Start+Length
|
||||
from the processor's data cache. If Start is not aligned to a cache line
|
||||
boundary, then the bytes before Start to the preceding cache line boundary
|
||||
are also flushed. If Start+Length is not aligned to a cache line boundary,
|
||||
then the bytes past Start+Length to the end of the next cache line boundary
|
||||
are also flushed. The FlushType of EfiCpuFlushTypeWriteBackInvalidate must be
|
||||
supported. If the data cache is fully coherent with all DMA operations, then
|
||||
this function can just return EFI_SUCCESS. If the processor does not support
|
||||
flushing a range of the data cache, then the entire data cache can be flushed.
|
||||
|
||||
@param This The EFI_CPU_ARCH_PROTOCOL instance.
|
||||
@param Start The beginning physical address to flush from the processor's data
|
||||
cache.
|
||||
@param Length The number of bytes to flush from the processor's data cache. This
|
||||
function may flush more bytes than Length specifies depending upon
|
||||
the granularity of the flush operation that the processor supports.
|
||||
@param FlushType Specifies the type of flush operation to perform.
|
||||
|
||||
@retval EFI_SUCCESS The address range from Start to Start+Length was flushed from
|
||||
the processor's data cache.
|
||||
@retval EFI_UNSUPPORTEDT The processor does not support the cache flush type specified
|
||||
by FlushType.
|
||||
@retval EFI_DEVICE_ERROR The address range from Start to Start+Length could not be flushed
|
||||
from the processor's data cache.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_CPU_FLUSH_DATA_CACHE) (
|
||||
IN EFI_CPU_ARCH_PROTOCOL *This,
|
||||
IN EFI_PHYSICAL_ADDRESS Start,
|
||||
IN UINT64 Length,
|
||||
IN EFI_CPU_FLUSH_TYPE FlushType
|
||||
);
|
||||
|
||||
|
||||
/**
|
||||
This function enables interrupt processing by the processor.
|
||||
|
||||
@param This The EFI_CPU_ARCH_PROTOCOL instance.
|
||||
|
||||
@retval EFI_SUCCESS Interrupts are enabled on the processor.
|
||||
@retval EFI_DEVICE_ERROR Interrupts could not be enabled on the processor.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_CPU_ENABLE_INTERRUPT) (
|
||||
IN EFI_CPU_ARCH_PROTOCOL *This
|
||||
);
|
||||
|
||||
|
||||
/**
|
||||
This function disables interrupt processing by the processor.
|
||||
|
||||
@param This The EFI_CPU_ARCH_PROTOCOL instance.
|
||||
|
||||
@retval EFI_SUCCESS Interrupts are disabled on the processor.
|
||||
@retval EFI_DEVICE_ERROR Interrupts could not be disabled on the processor.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_CPU_DISABLE_INTERRUPT) (
|
||||
IN EFI_CPU_ARCH_PROTOCOL *This
|
||||
);
|
||||
|
||||
|
||||
/**
|
||||
This function retrieves the processor's current interrupt state a returns it in
|
||||
State. If interrupts are currently enabled, then TRUE is returned. If interrupts
|
||||
are currently disabled, then FALSE is returned.
|
||||
|
||||
@param This The EFI_CPU_ARCH_PROTOCOL instance.
|
||||
@param State A pointer to the processor's current interrupt state. Set to TRUE if
|
||||
interrupts are enabled and FALSE if interrupts are disabled.
|
||||
|
||||
@retval EFI_SUCCESS The processor's current interrupt state was returned in State.
|
||||
@retval EFI_INVALID_PARAMETER State is NULL.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_CPU_GET_INTERRUPT_STATE) (
|
||||
IN EFI_CPU_ARCH_PROTOCOL *This,
|
||||
OUT BOOLEAN *State
|
||||
);
|
||||
|
||||
|
||||
/**
|
||||
This function generates an INIT on the processor. If this function succeeds, then the
|
||||
processor will be reset, and control will not be returned to the caller. If InitType is
|
||||
not supported by this processor, or the processor cannot programmatically generate an
|
||||
INIT without help from external hardware, then EFI_UNSUPPORTED is returned. If an error
|
||||
occurs attempting to generate an INIT, then EFI_DEVICE_ERROR is returned.
|
||||
|
||||
@param This The EFI_CPU_ARCH_PROTOCOL instance.
|
||||
@param InitType The type of processor INIT to perform.
|
||||
|
||||
@retval EFI_SUCCESS The processor INIT was performed. This return code should never be seen.
|
||||
@retval EFI_UNSUPPORTED The processor INIT operation specified by InitType is not supported
|
||||
by this processor.
|
||||
@retval EFI_DEVICE_ERROR The processor INIT failed.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_CPU_INIT) (
|
||||
IN EFI_CPU_ARCH_PROTOCOL *This,
|
||||
IN EFI_CPU_INIT_TYPE InitType
|
||||
);
|
||||
|
||||
|
||||
/**
|
||||
This function registers and enables the handler specified by InterruptHandler for a processor
|
||||
interrupt or exception type specified by InterruptType. If InterruptHandler is NULL, then the
|
||||
handler for the processor interrupt or exception type specified by InterruptType is uninstalled.
|
||||
The installed handler is called once for each processor interrupt or exception.
|
||||
|
||||
@param This The EFI_CPU_ARCH_PROTOCOL instance.
|
||||
@param InterruptType A pointer to the processor's current interrupt state. Set to TRUE if interrupts
|
||||
are enabled and FALSE if interrupts are disabled.
|
||||
@param InterruptHandler A pointer to a function of type EFI_CPU_INTERRUPT_HANDLER that is called
|
||||
when a processor interrupt occurs. If this parameter is NULL, then the handler
|
||||
will be uninstalled.
|
||||
|
||||
@retval EFI_SUCCESS The handler for the processor interrupt was successfully installed or uninstalled.
|
||||
@retval EFI_ALREADY_STARTED InterruptHandler is not NULL, and a handler for InterruptType was
|
||||
previously installed.
|
||||
@retval EFI_INVALID_PARAMETER InterruptHandler is NULL, and a handler for InterruptType was not
|
||||
previously installed.
|
||||
@retval EFI_UNSUPPORTED The interrupt specified by InterruptType is not supported.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_CPU_REGISTER_INTERRUPT_HANDLER) (
|
||||
IN EFI_CPU_ARCH_PROTOCOL *This,
|
||||
IN EFI_EXCEPTION_TYPE InterruptType,
|
||||
IN EFI_CPU_INTERRUPT_HANDLER InterruptHandler
|
||||
);
|
||||
|
||||
|
||||
/**
|
||||
This function reads the processor timer specified by TimerIndex and returns it in TimerValue.
|
||||
|
||||
@param This The EFI_CPU_ARCH_PROTOCOL instance.
|
||||
@param TimerIndex Specifies which processor timer is to be returned in TimerValue. This parameter
|
||||
must be between 0 and NumberOfTimers-1.
|
||||
@param TimerValue Pointer to the returned timer value.
|
||||
@param TimerPeriod A pointer to the amount of time that passes in femtoseconds for each increment
|
||||
of TimerValue.
|
||||
|
||||
@retval EFI_SUCCESS The processor timer value specified by TimerIndex was returned in TimerValue.
|
||||
@retval EFI_DEVICE_ERROR An error occurred attempting to read one of the processor's timers.
|
||||
@retval EFI_INVALID_PARAMETER TimerValue is NULL or TimerIndex is not valid.
|
||||
@retval EFI_UNSUPPORTED The processor does not have any readable timers.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_CPU_GET_TIMER_VALUE) (
|
||||
IN EFI_CPU_ARCH_PROTOCOL *This,
|
||||
IN UINT32 TimerIndex,
|
||||
OUT UINT64 *TimerValue,
|
||||
OUT UINT64 *TimerPeriod OPTIONAL
|
||||
);
|
||||
|
||||
|
||||
/**
|
||||
This function modifies the attributes for the memory region specified by BaseAddress and
|
||||
Length from their current attributes to the attributes specified by Attributes.
|
||||
|
||||
@param This The EFI_CPU_ARCH_PROTOCOL instance.
|
||||
@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_ACCESS_DENIED The attributes for the memory resource range specified by
|
||||
BaseAddress and Length cannot be modified.
|
||||
@retval EFI_INVALID_PARAMETER Length is zero.
|
||||
@retval EFI_OUT_OF_RESOURCES There are not enough system resources to modify the attributes of
|
||||
the memory resource range.
|
||||
@retval EFI_UNSUPPORTED The processor does not support one or more bytes of the memory
|
||||
resource range specified by BaseAddress and Length.
|
||||
The bit mask of attributes is not support for the memory resource
|
||||
range specified by BaseAddress and Length.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_CPU_SET_MEMORY_ATTRIBUTES) (
|
||||
IN EFI_CPU_ARCH_PROTOCOL *This,
|
||||
IN EFI_PHYSICAL_ADDRESS BaseAddress,
|
||||
IN UINT64 Length,
|
||||
IN UINT64 Attributes
|
||||
);
|
||||
|
||||
|
||||
/**
|
||||
@par Protocol Description:
|
||||
The EFI_CPU_ARCH_PROTOCOL is used to abstract processor-specific functions from the DXE
|
||||
Foundation. This includes flushing caches, enabling and disabling interrupts, hooking interrupt
|
||||
vectors and exception vectors, reading internal processor timers, resetting the processor, and
|
||||
determining the processor frequency.
|
||||
|
||||
@param FlushDataCache
|
||||
Flushes a range of the processor's data cache. If the processor does
|
||||
not contain a data cache, or the data cache is fully coherent, then this
|
||||
function can just return EFI_SUCCESS. If the processor does not support
|
||||
flushing a range of addresses from the data cache, then the entire data
|
||||
cache must be flushed.
|
||||
|
||||
@param EnableInterrupt Enables interrupt processing by the processor.
|
||||
|
||||
@param DisableInterrupt Disables interrupt processing by the processor.
|
||||
|
||||
@param GetInterruptState Retrieves the processor's current interrupt state.
|
||||
|
||||
@param Init
|
||||
Generates an INIT on the processor. If a processor cannot programmatically
|
||||
generate an INIT without help from external hardware, then this function
|
||||
returns EFI_UNSUPPORTED.
|
||||
|
||||
@param RegisterInterruptHandler
|
||||
Associates an interrupt service routine with one of the processor's interrupt
|
||||
vectors. This function is typically used by the EFI_TIMER_ARCH_PROTOCOL to
|
||||
hook the timer interrupt in a system. It can also be used by the debugger to
|
||||
hook exception vectors.
|
||||
|
||||
@param GetTimerValue Returns the value of one of the processor's internal timers.
|
||||
|
||||
@param SetMemoryAttributes Attempts to set the attributes of a memory region.
|
||||
|
||||
@param NumberOfTimers
|
||||
The number of timers that are available in a processor. The value in this
|
||||
field is a constant that must not be modified after the CPU Architectural
|
||||
Protocol is installed. All consumers must treat this as a read-only field.
|
||||
|
||||
@param DmaBufferAlignment
|
||||
The size, in bytes, of the alignment required for DMA buffer allocations.
|
||||
This is typically the size of the largest data cache line in the platform.
|
||||
The value in this field is a constant that must not be modified after the
|
||||
CPU Architectural Protocol is installed. All consumers must treat this as
|
||||
a read-only field.
|
||||
|
||||
**/
|
||||
struct _EFI_CPU_ARCH_PROTOCOL {
|
||||
EFI_CPU_FLUSH_DATA_CACHE FlushDataCache;
|
||||
EFI_CPU_ENABLE_INTERRUPT EnableInterrupt;
|
||||
EFI_CPU_DISABLE_INTERRUPT DisableInterrupt;
|
||||
EFI_CPU_GET_INTERRUPT_STATE GetInterruptState;
|
||||
EFI_CPU_INIT Init;
|
||||
EFI_CPU_REGISTER_INTERRUPT_HANDLER RegisterInterruptHandler;
|
||||
EFI_CPU_GET_TIMER_VALUE GetTimerValue;
|
||||
EFI_CPU_SET_MEMORY_ATTRIBUTES SetMemoryAttributes;
|
||||
UINT32 NumberOfTimers;
|
||||
UINT32 DmaBufferAlignment;
|
||||
};
|
||||
|
||||
extern EFI_GUID gEfiCpuArchProtocolGuid;
|
||||
|
||||
#endif
|
100
Tools/Source/TianoTools/Include/Dxe/ArchProtocol/Metronome.h
Normal file
100
Tools/Source/TianoTools/Include/Dxe/ArchProtocol/Metronome.h
Normal file
@ -0,0 +1,100 @@
|
||||
/** @file
|
||||
Metronome Architectural Protocol as defined in DXE CIS
|
||||
|
||||
This code abstracts the DXE core to provide delay services.
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
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
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
Module Name: Metronome.h
|
||||
|
||||
@par Revision Reference:
|
||||
Version 0.91B.
|
||||
|
||||
**/
|
||||
|
||||
#ifndef __ARCH_PROTOCOL_METRONOME_H__
|
||||
#define __ARCH_PROTOCOL_METRONOME_H__
|
||||
|
||||
//
|
||||
// Global ID for the Metronome Architectural Protocol
|
||||
//
|
||||
#define EFI_METRONOME_ARCH_PROTOCOL_GUID \
|
||||
{ 0x26baccb2, 0x6f42, 0x11d4, {0xbc, 0xe7, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81 } }
|
||||
|
||||
//
|
||||
// Declare forward reference for the Metronome Architectural Protocol
|
||||
//
|
||||
typedef struct _EFI_METRONOME_ARCH_PROTOCOL EFI_METRONOME_ARCH_PROTOCOL;
|
||||
|
||||
/**
|
||||
The WaitForTick() function waits for the number of ticks specified by
|
||||
TickNumber from a known time source in the platform. If TickNumber of
|
||||
ticks are detected, then EFI_SUCCESS is returned. The actual time passed
|
||||
between entry of this function and the first tick is between 0 and
|
||||
TickPeriod 100 nS units. If you want to guarantee that at least TickPeriod
|
||||
time has elapsed, wait for two ticks. This function waits for a hardware
|
||||
event to determine when a tick occurs. It is possible for interrupt
|
||||
processing, or exception processing to interrupt the execution of the
|
||||
WaitForTick() function. Depending on the hardware source for the ticks, it
|
||||
is possible for a tick to be missed. This function cannot guarantee that
|
||||
ticks will not be missed. If a timeout occurs waiting for the specified
|
||||
number of ticks, then EFI_TIMEOUT is returned.
|
||||
|
||||
@param This The EFI_METRONOME_ARCH_PROTOCOL instance.
|
||||
|
||||
@param TickNumber Number of ticks to wait.
|
||||
|
||||
@retval EFI_SUCCESS The wait for the number of ticks specified by TickNumber
|
||||
succeeded.
|
||||
|
||||
@retval EFI_TIMEOUT A timeout occurred waiting for the specified number of ticks.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_METRONOME_WAIT_FOR_TICK) (
|
||||
IN EFI_METRONOME_ARCH_PROTOCOL *This,
|
||||
IN UINT32 TickNumber
|
||||
);
|
||||
|
||||
//
|
||||
//
|
||||
|
||||
/**
|
||||
Interface stucture for the Metronome Architectural Protocol.
|
||||
|
||||
@par Protocol Description:
|
||||
This protocol provides access to a known time source in the platform to the
|
||||
core. The core uses this known time source to produce core services that
|
||||
require calibrated delays.
|
||||
|
||||
@param WaitForTick
|
||||
Waits for a specified number of ticks from a known time source
|
||||
in the platform. The actual time passed between entry of this
|
||||
function and the first tick is between 0 and TickPeriod 100 nS
|
||||
units. If you want to guarantee that at least TickPeriod time
|
||||
has elapsed, wait for two ticks.
|
||||
|
||||
@param TickPeriod
|
||||
The period of platform's known time source in 100 nS units.
|
||||
This value on any platform must be at least 10 uS, and must not
|
||||
exceed 200 uS. The value in this field is a constant that must
|
||||
not be modified after the Metronome architectural protocol is
|
||||
installed. All consumers must treat this as a read-only field.
|
||||
|
||||
**/
|
||||
struct _EFI_METRONOME_ARCH_PROTOCOL {
|
||||
EFI_METRONOME_WAIT_FOR_TICK WaitForTick;
|
||||
UINT32 TickPeriod;
|
||||
};
|
||||
|
||||
extern EFI_GUID gEfiMetronomeArchProtocolGuid;
|
||||
|
||||
#endif
|
@ -0,0 +1,33 @@
|
||||
/** @file
|
||||
Monotonic Counter Architectural Protocol as defined in DXE CIS
|
||||
|
||||
This code provides the services required to access the systems monotonic counter
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
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
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
Module Name: MonotonicCounter.h
|
||||
|
||||
@par Revision Reference:
|
||||
Version 0.91B.
|
||||
|
||||
**/
|
||||
|
||||
#ifndef __ARCH_PROTOCOL_MONTONIC_COUNTER_H__
|
||||
#define __ARCH_PROTOCOL_MONTONIC_COUNTER_H__
|
||||
|
||||
///
|
||||
/// Global ID for the Monotonic Counter Architectural Protocol
|
||||
///
|
||||
#define EFI_MONTONIC_COUNTER_ARCH_PROTOCOL_GUID \
|
||||
{0x1da97072, 0xbddc, 0x4b30, {0x99, 0xf1, 0x72, 0xa0, 0xb5, 0x6f, 0xff, 0x2a} }
|
||||
|
||||
extern EFI_GUID gEfiMonotonicCounterArchProtocolGuid;
|
||||
|
||||
#endif
|
@ -0,0 +1,41 @@
|
||||
/** @file
|
||||
Real Time clock Architectural Protocol as defined in DXE CIS
|
||||
|
||||
This code abstracts time and data functions. Used to provide
|
||||
Time and date related EFI runtime services.
|
||||
|
||||
The GetTime (), SetTime (), GetWakeupTime (), and SetWakeupTime () EFI 1.0
|
||||
services are added to the EFI system table and the
|
||||
EFI_REAL_TIME_CLOCK_ARCH_PROTOCOL_GUID protocol is registered with a NULL
|
||||
pointer.
|
||||
|
||||
No CRC of the EFI system table is required, as it is done in the DXE core.
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
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
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
Module Name: RealTimeClock.h
|
||||
|
||||
@par Revision Reference:
|
||||
Version 0.91B.
|
||||
|
||||
**/
|
||||
|
||||
#ifndef __ARCH_PROTOCOL_REAL_TIME_CLOCK_H__
|
||||
#define __ARCH_PROTOCOL_REAL_TIME_CLOCK_H__
|
||||
|
||||
//
|
||||
// Global ID for the Real Time Clock Architectural Protocol
|
||||
//
|
||||
#define EFI_REAL_TIME_CLOCK_ARCH_PROTOCOL_GUID \
|
||||
{ 0x27CFAC87, 0x46CC, 0x11d4, {0x9A, 0x38, 0x00, 0x90, 0x27, 0x3F, 0xC1, 0x4D } }
|
||||
|
||||
extern EFI_GUID gEfiRealTimeClockArchProtocolGuid;
|
||||
|
||||
#endif
|
38
Tools/Source/TianoTools/Include/Dxe/ArchProtocol/Reset.h
Normal file
38
Tools/Source/TianoTools/Include/Dxe/ArchProtocol/Reset.h
Normal file
@ -0,0 +1,38 @@
|
||||
/** @file
|
||||
Reset Architectural Protocol as defined in the DXE CIS
|
||||
|
||||
Used to provide ResetSystem runtime services
|
||||
|
||||
The ResetSystem () EFI 1.0 service is added to the EFI system table and the
|
||||
EFI_RESET_ARCH_PROTOCOL_GUID protocol is registered with a NULL pointer.
|
||||
|
||||
No CRC of the EFI system table is required, as it is done in the DXE core.
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
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
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
Module Name: Reset.h
|
||||
|
||||
@par Revision Reference:
|
||||
Version 0.91B.
|
||||
|
||||
**/
|
||||
|
||||
#ifndef __ARCH_PROTOCOL_RESET_H__
|
||||
#define __ARCH_PROTOCOL_RESET_H__
|
||||
|
||||
//
|
||||
// Global ID for the Reset Architectural Protocol
|
||||
//
|
||||
#define EFI_RESET_ARCH_PROTOCOL_GUID \
|
||||
{ 0x27CFAC88, 0x46CC, 0x11d4, {0x9A, 0x38, 0x00, 0x90, 0x27, 0x3F, 0xC1, 0x4D } }
|
||||
|
||||
extern EFI_GUID gEfiResetArchProtocolGuid;
|
||||
|
||||
#endif
|
162
Tools/Source/TianoTools/Include/Dxe/ArchProtocol/Runtime.h
Normal file
162
Tools/Source/TianoTools/Include/Dxe/ArchProtocol/Runtime.h
Normal file
@ -0,0 +1,162 @@
|
||||
/** @file
|
||||
Runtime Architectural Protocol as defined in DXE CIS
|
||||
|
||||
This code is used to produce the EFI 1.0 runtime virtual switch over
|
||||
|
||||
This driver must add SetVirtualAddressMap () and ConvertPointer () to
|
||||
the EFI system table. This driver is not responcible for CRCing the
|
||||
EFI system table.
|
||||
|
||||
This driver will add EFI_RUNTIME_ARCH_PROTOCOL_GUID protocol with a
|
||||
pointer to the Runtime Arch Protocol instance structure. The protocol
|
||||
member functions are used by the DXE core to export information need
|
||||
by this driver to produce the runtime transition to virtual mode
|
||||
calling.
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
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
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
Module Name: Runtime.h
|
||||
|
||||
@par Revision Reference:
|
||||
Version 0.90.
|
||||
|
||||
**/
|
||||
|
||||
#ifndef __ARCH_PROTOCOL_RUNTIME_H__
|
||||
#define __ARCH_PROTOCOL_RUNTIME_H__
|
||||
|
||||
//
|
||||
// Global ID for the Runtime Architectural Protocol
|
||||
//
|
||||
#define EFI_RUNTIME_ARCH_PROTOCOL_GUID \
|
||||
{ 0x96d08253, 0x8483, 0x11d4, {0xbc, 0xf1, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81 } }
|
||||
|
||||
typedef struct _EFI_RUNTIME_ARCH_PROTOCOL EFI_RUNTIME_ARCH_PROTOCOL;
|
||||
|
||||
/**
|
||||
When a SetVirtualAddressMap() is performed all the runtime images loaded by
|
||||
DXE must be fixed up with the new virtual address map. To facilitate this the
|
||||
Runtime Architectural Protocol needs to be informed of every runtime driver
|
||||
that is registered. All the runtime images loaded by DXE should be registered
|
||||
with this service by the DXE Core when ExitBootServices() is called. The
|
||||
images that are registered with this service must have successfully been
|
||||
loaded into memory with the Boot Service LoadImage(). As a result, no
|
||||
parameter checking needs to be performed.
|
||||
|
||||
@param This The EFI_RUNTIME_ARCH_PROTOCOL instance.
|
||||
|
||||
@param ImageBase Start of image that has been loaded in memory. It is either
|
||||
a pointer to the DOS or PE header of the image.
|
||||
|
||||
@param ImageSize Size of the image in bytes.
|
||||
|
||||
@param RelocationData Information about the fixups that were performed on ImageBase
|
||||
when it was loaded into memory. This information is needed
|
||||
when the virtual mode fix-ups are reapplied so that data that
|
||||
has been programmatically updated will not be fixed up. If
|
||||
code updates a global variable the code is responsible for
|
||||
fixing up the variable for virtual mode.
|
||||
|
||||
@retval EFI_SUCCESS The ImageBase has been registered.
|
||||
|
||||
@retval EFI_OUT_OF_RESOURCES There are not enough resources to register ImageBase.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_RUNTIME_REGISTER_IMAGE) (
|
||||
IN EFI_RUNTIME_ARCH_PROTOCOL *This,
|
||||
IN EFI_PHYSICAL_ADDRESS ImageBase,
|
||||
IN UINTN ImageSize,
|
||||
IN VOID *RelocationData
|
||||
);
|
||||
|
||||
|
||||
/**
|
||||
This function is used to support the required runtime events. Currently only
|
||||
runtime events of type EFI_EVENT_SIGNAL_VIRTUAL_ADDRESS_CHANGE needs to be
|
||||
registered with this service. All the runtime events that exist in the DXE
|
||||
Core should be registered with this service when ExitBootServices() is called.
|
||||
All the events that are registered with this service must have been created
|
||||
with the Boot Service CreateEvent(). As a result, no parameter checking needs
|
||||
to be performed.
|
||||
|
||||
@param This The EFI_RUNTIME_ARCH_PROTOCOL instance.
|
||||
|
||||
@param Type The same as Type passed into CreateEvent().
|
||||
|
||||
@param NotifyTpl The same as NotifyTpl passed into CreateEvent().
|
||||
|
||||
@param NotifyFunction The same as NotifyFunction passed into CreateEvent().
|
||||
|
||||
@param NotifyContext The same as NotifyContext passed into CreateEvent().
|
||||
|
||||
@param Event The EFI_EVENT returned by CreateEvent(). Event must be in
|
||||
runtime memory.
|
||||
|
||||
@retval EFI_SUCCESS The Event has been registered.
|
||||
|
||||
@retval EFI_OUT_OF_RESOURCES There are not enough resources to register Event.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_RUNTIME_REGISTER_EVENT) (
|
||||
IN EFI_RUNTIME_ARCH_PROTOCOL *This,
|
||||
IN UINT32 Type,
|
||||
IN EFI_TPL NotifyTpl,
|
||||
IN EFI_EVENT_NOTIFY NotifyFunction,
|
||||
IN VOID *NotifyContext,
|
||||
IN EFI_EVENT *Event
|
||||
);
|
||||
|
||||
//
|
||||
// Interface stucture for the Runtime Architectural Protocol
|
||||
//
|
||||
/**
|
||||
@par Protocol Description:
|
||||
The DXE driver that produces this protocol must be a runtime driver. This
|
||||
driver is responsible for initializing the SetVirtualAddressMap() and
|
||||
ConvertPointer() fields of the EFI Runtime Services Table and the
|
||||
CalculateCrc32() field of the EFI Boot Services Table. See the Runtime
|
||||
Services chapter and the Boot Services chapter for details on these services.
|
||||
After the two fields of the EFI Runtime Services Table and the one field of
|
||||
the EFI Boot Services Table have been initialized, the driver must install
|
||||
the EFI_RUNTIME_ARCH_PROTOCOL_GUID on a new handle with an EFI_RUNTIME_ARCH_
|
||||
PROTOCOL interface pointer. The installation of this protocol informs the
|
||||
DXE core that the virtual memory services and the 32-bit CRC services are
|
||||
now available, and the DXE core must update the 32-bit CRC of the EFI Runtime
|
||||
Services Table and the 32-bit CRC of the EFI Boot Services Table.
|
||||
|
||||
All runtime core services are provided by the EFI_RUNTIME_ARCH_PROTOCOL.
|
||||
This includes the support for registering runtime images that must be
|
||||
re-fixed up when a transition is made from physical mode to virtual mode.
|
||||
This protocol also supports all events that are defined to fire at runtime.
|
||||
This protocol also contains a CRC-32 function that will be used by the DXE
|
||||
core as a boot service. The EFI_RUNTIME_ARCH_PROTOCOL needs the CRC-32
|
||||
function when a transition is made from physical mode to virtual mode and
|
||||
the EFI System Table and EFI Runtime Table are fixed up with virtual pointers.
|
||||
|
||||
@param RegisterRuntimeImage
|
||||
Register a runtime image so it can be converted to virtual mode if the EFI Runtime Services
|
||||
SetVirtualAddressMap() is called.
|
||||
|
||||
@param RegisterRuntimeEvent
|
||||
Register an event than needs to be notified at runtime.
|
||||
|
||||
**/
|
||||
struct _EFI_RUNTIME_ARCH_PROTOCOL {
|
||||
EFI_RUNTIME_REGISTER_IMAGE RegisterImage;
|
||||
EFI_RUNTIME_REGISTER_EVENT RegisterEvent;
|
||||
};
|
||||
|
||||
extern EFI_GUID gEfiRuntimeArchProtocolGuid;
|
||||
|
||||
#endif
|
136
Tools/Source/TianoTools/Include/Dxe/ArchProtocol/Security.h
Normal file
136
Tools/Source/TianoTools/Include/Dxe/ArchProtocol/Security.h
Normal file
@ -0,0 +1,136 @@
|
||||
/** @file
|
||||
Security Architectural Protocol as defined in the DXE CIS
|
||||
|
||||
Used to provide Security services. Specifically, dependening upon the
|
||||
authentication state of a discovered driver in a Firmware Volume, the
|
||||
portable DXE Core Dispatcher will call into the Security Architectural
|
||||
Protocol (SAP) with the authentication state of the driver.
|
||||
|
||||
This call-out allows for OEM-specific policy decisions to be made, such
|
||||
as event logging for attested boots, locking flash in response to discovering
|
||||
an unsigned driver or failed signature check, or other exception response.
|
||||
|
||||
The SAP can also change system behavior by having the DXE core put a driver
|
||||
in the Schedule-On-Request (SOR) state. This will allow for later disposition
|
||||
of the driver by platform agent, such as Platform BDS.
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
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
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
Module Name: Security.h
|
||||
|
||||
@par Revision Reference:
|
||||
Version 0.91B.
|
||||
|
||||
**/
|
||||
|
||||
#ifndef __ARCH_PROTOCOL_SECURITY_H__
|
||||
#define __ARCH_PROTOCOL_SECURITY_H__
|
||||
|
||||
//
|
||||
// Global ID for the Security Code Architectural Protocol
|
||||
//
|
||||
#define EFI_SECURITY_ARCH_PROTOCOL_GUID \
|
||||
{ 0xA46423E3, 0x4617, 0x49f1, {0xB9, 0xFF, 0xD1, 0xBF, 0xA9, 0x11, 0x58, 0x39 } }
|
||||
|
||||
typedef struct _EFI_SECURITY_ARCH_PROTOCOL EFI_SECURITY_ARCH_PROTOCOL;
|
||||
|
||||
/**
|
||||
The EFI_SECURITY_ARCH_PROTOCOL (SAP) is used to abstract platform-specific
|
||||
policy from the DXE core response to an attempt to use a file that returns a
|
||||
given status for the authentication check from the section extraction protocol.
|
||||
|
||||
The possible responses in a given SAP implementation may include locking
|
||||
flash upon failure to authenticate, attestation logging for all signed drivers,
|
||||
and other exception operations. The File parameter allows for possible logging
|
||||
within the SAP of the driver.
|
||||
|
||||
If File is NULL, then EFI_INVALID_PARAMETER is returned.
|
||||
|
||||
If the file specified by File with an authentication status specified by
|
||||
AuthenticationStatus is safe for the DXE Core to use, then EFI_SUCCESS is returned.
|
||||
|
||||
If the file specified by File with an authentication status specified by
|
||||
AuthenticationStatus is not safe for the DXE Core to use under any circumstances,
|
||||
then EFI_ACCESS_DENIED is returned.
|
||||
|
||||
If the file specified by File with an authentication status specified by
|
||||
AuthenticationStatus is not safe for the DXE Core to use right now, but it
|
||||
might be possible to use it at a future time, then EFI_SECURITY_VIOLATION is
|
||||
returned.
|
||||
|
||||
@param This The EFI_SECURITY_ARCH_PROTOCOL instance.
|
||||
|
||||
@param AuthenticationStatus This is the authentication type returned from the Section
|
||||
Extraction protocol. See the Section Extraction Protocol
|
||||
Specification for details on this type.
|
||||
|
||||
@param File This is a pointer to the device path of the file that is
|
||||
being dispatched. This will optionally be used for logging.
|
||||
|
||||
@retval EFI_SUCCESS The file specified by File did authenticate, and the
|
||||
platform policy dictates that the DXE Core may use File.
|
||||
|
||||
@retval EFI_INVALID_PARAMETER Driver is NULL.
|
||||
|
||||
@retval EFI_SECURITY_VIOLATION The file specified by File did not authenticate, and
|
||||
the platform policy dictates that File should be placed
|
||||
in the untrusted state. A file may be promoted from
|
||||
the untrusted to the trusted state at a future time
|
||||
with a call to the Trust() DXE Service.
|
||||
|
||||
@retval EFI_ACCESS_DENIED The file specified by File did not authenticate, and
|
||||
the platform policy dictates that File should not be
|
||||
used for any purpose.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_SECURITY_FILE_AUTHENTICATION_STATE) (
|
||||
IN EFI_SECURITY_ARCH_PROTOCOL *This,
|
||||
IN UINT32 AuthenticationStatus,
|
||||
IN EFI_DEVICE_PATH_PROTOCOL *File
|
||||
)
|
||||
;
|
||||
|
||||
//
|
||||
// Interface stucture for the Timer Architectural Protocol
|
||||
//
|
||||
/**
|
||||
@par Protocol Description:
|
||||
|
||||
The EFI_SECURITY_ARCH_PROTOCOL is used to abstract platform-specific policy
|
||||
from the DXE core. This includes locking flash upon failure to authenticate,
|
||||
attestation logging, and other exception operations.
|
||||
|
||||
The driver that produces the EFI_SECURITY_ARCH_PROTOCOL may also optionally
|
||||
install the EFI_SECURITY_POLICY_PROTOCOL_GUID onto a new handle with a NULL
|
||||
interface. The existence of this GUID in the protocol database means that
|
||||
the GUIDed Section Extraction Protocol should authenticate the contents of
|
||||
an Authentication Section. The expectation is that the GUIDed Section
|
||||
Extraction protocol will look for the existence of the EFI_SECURITY_POLICY_
|
||||
PROTOCOL_GUID in the protocol database. If it exists, then the publication
|
||||
thereof is taken as an injunction to attempt an authentication of any section
|
||||
wrapped in an Authentication Section. See the Firmware File System
|
||||
Specification for details on the GUIDed Section Extraction Protocol and
|
||||
Authentication Sections.
|
||||
|
||||
@par Protocol Parameters:
|
||||
|
||||
FileAuthenticationState - This service is called upon fault with respect to
|
||||
the authentication of a section of a file.
|
||||
|
||||
**/
|
||||
struct _EFI_SECURITY_ARCH_PROTOCOL {
|
||||
EFI_SECURITY_FILE_AUTHENTICATION_STATE FileAuthenticationState;
|
||||
};
|
||||
|
||||
extern EFI_GUID gEfiSecurityArchProtocolGuid;
|
||||
|
||||
#endif
|
@ -0,0 +1,31 @@
|
||||
/** @file
|
||||
Security Policy protocol as defined in the DXE CIS
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
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
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
Module Name: SecurityPolicy.h
|
||||
|
||||
@par Revision Reference:
|
||||
Version 0.91B.
|
||||
|
||||
**/
|
||||
|
||||
#ifndef _SECURITY_POLICY_H_
|
||||
#define _SECURITY_POLICY_H_
|
||||
|
||||
//
|
||||
// Security policy protocol GUID definition
|
||||
//
|
||||
#define EFI_SECURITY_POLICY_PROTOCOL_GUID \
|
||||
{0x78E4D245, 0xCD4D, 0x4a05, {0xA2, 0xBA, 0x47, 0x43, 0xE8, 0x6C, 0xFC, 0xAB} }
|
||||
|
||||
extern EFI_GUID gEfiSecurityPolicyProtocolGuid;
|
||||
|
||||
#endif
|
@ -0,0 +1,82 @@
|
||||
/** @file
|
||||
Status code Runtime Protocol as defined in the DXE CIS
|
||||
|
||||
The StatusCode () Tiano service is added to the EFI system table and the
|
||||
EFI_STATUS_CODE_ARCH_PROTOCOL_GUID protocol is registered with a NULL
|
||||
pointer.
|
||||
|
||||
No CRC of the EFI system table is required, as it is done in the DXE core.
|
||||
|
||||
This code abstracts Status Code reporting.
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
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
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
Module Name: StatusCode.h
|
||||
|
||||
@par Revision Reference:
|
||||
Version 0.91B.
|
||||
|
||||
**/
|
||||
|
||||
#ifndef __STATUS_CODE_RUNTIME_PROTOCOL_H__
|
||||
#define __STATUS_CODE_RUNTIME_PROTOCOL_H__
|
||||
|
||||
#define EFI_STATUS_CODE_RUNTIME_PROTOCOL_GUID \
|
||||
{ 0xd2b2b828, 0x826, 0x48a7, { 0xb3, 0xdf, 0x98, 0x3c, 0x0, 0x60, 0x24, 0xf0 } }
|
||||
|
||||
/**
|
||||
Provides an interface that a software module can call to report a status code.
|
||||
|
||||
@param Type Indicates the type of status code being reported.
|
||||
|
||||
@param Value Describes the current status of a hardware or software entity.
|
||||
This included information about the class and subclass that is used to
|
||||
classify the entity as well as an operation.
|
||||
|
||||
@param Instance The enumeration of a hardware or software entity within
|
||||
the system. Valid instance numbers start with 1.
|
||||
|
||||
@param CallerId This optional parameter may be used to identify the caller.
|
||||
This parameter allows the status code driver to apply different rules to
|
||||
different callers.
|
||||
|
||||
@param Data This optional parameter may be used to pass additional data.
|
||||
|
||||
@retval EFI_SUCCESS The function completed successfully
|
||||
|
||||
@retval EFI_DEVICE_ERROR The function should not be completed due to a device error.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_REPORT_STATUS_CODE) (
|
||||
IN EFI_STATUS_CODE_TYPE Type,
|
||||
IN EFI_STATUS_CODE_VALUE Value,
|
||||
IN UINT32 Instance,
|
||||
IN EFI_GUID *CallerId OPTIONAL,
|
||||
IN EFI_STATUS_CODE_DATA *Data OPTIONAL
|
||||
);
|
||||
|
||||
/**
|
||||
@par Protocol Description:
|
||||
Provides the service required to report a status code to the platform firmware.
|
||||
This protocol must be produced by a runtime DXE driver and may be consumed
|
||||
only by the DXE Foundation.
|
||||
|
||||
@param ReportStatusCode Emit a status code.
|
||||
|
||||
**/
|
||||
typedef struct _EFI_STATUS_CODE_PROTOCOL {
|
||||
EFI_REPORT_STATUS_CODE ReportStatusCode;
|
||||
} EFI_STATUS_CODE_PROTOCOL;
|
||||
|
||||
extern EFI_GUID gEfiStatusCodeRuntimeProtocolGuid;
|
||||
|
||||
#endif
|
222
Tools/Source/TianoTools/Include/Dxe/ArchProtocol/Timer.h
Normal file
222
Tools/Source/TianoTools/Include/Dxe/ArchProtocol/Timer.h
Normal file
@ -0,0 +1,222 @@
|
||||
/** @file
|
||||
Timer Architectural Protocol as defined in the DXE CIS
|
||||
|
||||
This code is used to provide the timer tick for the DXE core.
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
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
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
Module Name: Timer.h
|
||||
|
||||
@par Revision Reference:
|
||||
Version 0.91B.
|
||||
|
||||
**/
|
||||
|
||||
#ifndef __ARCH_PROTOCOL_TIMER_H__
|
||||
#define __ARCH_PROTOCOL_TIMER_H__
|
||||
|
||||
//
|
||||
// Global ID for the Timer Architectural Protocol
|
||||
//
|
||||
#define EFI_TIMER_ARCH_PROTOCOL_GUID \
|
||||
{ 0x26baccb3, 0x6f42, 0x11d4, {0xbc, 0xe7, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81 } }
|
||||
|
||||
//
|
||||
// Declare forward reference for the Timer Architectural Protocol
|
||||
//
|
||||
typedef struct _EFI_TIMER_ARCH_PROTOCOL EFI_TIMER_ARCH_PROTOCOL;
|
||||
|
||||
/**
|
||||
This function of this type is called when a timer interrupt fires. This
|
||||
function executes at TPL_HIGH_LEVEL. The DXE Core will register a funtion
|
||||
of tyis type to be called for the timer interrupt, so it can know how much
|
||||
time has passed. This information is used to signal timer based events.
|
||||
|
||||
@param Time Time since the last timer interrupt in 100 ns units. This will
|
||||
typically be TimerPeriod, but if a timer interrupt is missed, and the
|
||||
EFI_TIMER_ARCH_PROTOCOL driver can detect missed interrupts, then Time
|
||||
will contain the actual amount of time since the last interrupt.
|
||||
|
||||
None.
|
||||
|
||||
**/
|
||||
typedef
|
||||
VOID
|
||||
(EFIAPI *EFI_TIMER_NOTIFY) (
|
||||
IN UINT64 Time
|
||||
);
|
||||
|
||||
/**
|
||||
This function registers the handler NotifyFunction so it is called every time
|
||||
the timer interrupt fires. It also passes the amount of time since the last
|
||||
handler call to the NotifyFunction. If NotifyFunction is NULL, then the
|
||||
handler is unregistered. If the handler is registered, then EFI_SUCCESS is
|
||||
returned. If the CPU does not support registering a timer interrupt handler,
|
||||
then EFI_UNSUPPORTED is returned. If an attempt is made to register a handler
|
||||
when a handler is already registered, then EFI_ALREADY_STARTED is returned.
|
||||
If an attempt is made to unregister a handler when a handler is not registered,
|
||||
then EFI_INVALID_PARAMETER is returned. If an error occurs attempting to
|
||||
register the NotifyFunction with the timer interrupt, then EFI_DEVICE_ERROR
|
||||
is returned.
|
||||
|
||||
@param This The EFI_TIMER_ARCH_PROTOCOL instance.
|
||||
|
||||
@param NotifyFunction The function to call when a timer interrupt fires. This
|
||||
function executes at TPL_HIGH_LEVEL. The DXE Core will
|
||||
register a handler for the timer interrupt, so it can know
|
||||
how much time has passed. This information is used to
|
||||
signal timer based events. NULL will unregister the handler.
|
||||
|
||||
@retval EFI_SUCCESS The timer handler was registered.
|
||||
|
||||
@retval EFI_UNSUPPORTED The platform does not support timer interrupts.
|
||||
|
||||
@retval EFI_ALREADY_STARTED NotifyFunction is not NULL, and a handler is already
|
||||
registered.
|
||||
|
||||
@retval EFI_INVALID_PARAMETER NotifyFunction is NULL, and a handler was not
|
||||
previously registered.
|
||||
|
||||
@retval EFI_DEVICE_ERROR The timer handler could not be registered.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_TIMER_REGISTER_HANDLER) (
|
||||
IN EFI_TIMER_ARCH_PROTOCOL *This,
|
||||
IN EFI_TIMER_NOTIFY NotifyFunction
|
||||
);
|
||||
|
||||
/**
|
||||
This function adjusts the period of timer interrupts to the value specified
|
||||
by TimerPeriod. If the timer period is updated, then the selected timer
|
||||
period is stored in EFI_TIMER.TimerPeriod, and EFI_SUCCESS is returned. If
|
||||
the timer hardware is not programmable, then EFI_UNSUPPORTED is returned.
|
||||
If an error occurs while attempting to update the timer period, then the
|
||||
timer hardware will be put back in its state prior to this call, and
|
||||
EFI_DEVICE_ERROR is returned. If TimerPeriod is 0, then the timer interrupt
|
||||
is disabled. This is not the same as disabling the CPU's interrupts.
|
||||
Instead, it must either turn off the timer hardware, or it must adjust the
|
||||
interrupt controller so that a CPU interrupt is not generated when the timer
|
||||
interrupt fires.
|
||||
|
||||
@param This The EFI_TIMER_ARCH_PROTOCOL instance.
|
||||
|
||||
@param TimerPeriod The rate to program the timer interrupt in 100 nS units. If
|
||||
the timer hardware is not programmable, then EFI_UNSUPPORTED is
|
||||
returned. If the timer is programmable, then the timer period
|
||||
will be rounded up to the nearest timer period that is supported
|
||||
by the timer hardware. If TimerPeriod is set to 0, then the
|
||||
timer interrupts will be disabled.
|
||||
|
||||
@retval EFI_SUCCESS The timer period was changed.
|
||||
|
||||
@retval EFI_UNSUPPORTED The platform cannot change the period of the timer interrupt.
|
||||
|
||||
@retval EFI_DEVICE_ERROR The timer period could not be changed due to a device error.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_TIMER_SET_TIMER_PERIOD) (
|
||||
IN EFI_TIMER_ARCH_PROTOCOL *This,
|
||||
IN UINT64 TimerPeriod
|
||||
);
|
||||
|
||||
/**
|
||||
This function retrieves the period of timer interrupts in 100 ns units,
|
||||
returns that value in TimerPeriod, and returns EFI_SUCCESS. If TimerPeriod
|
||||
is NULL, then EFI_INVALID_PARAMETER is returned. If a TimerPeriod of 0 is
|
||||
returned, then the timer is currently disabled.
|
||||
|
||||
@param This The EFI_TIMER_ARCH_PROTOCOL instance.
|
||||
|
||||
@param TimerPeriod A pointer to the timer period to retrieve in 100 ns units. If
|
||||
0 is returned, then the timer is currently disabled.
|
||||
|
||||
@retval EFI_SUCCESS The timer period was returned in TimerPeriod.
|
||||
|
||||
@retval EFI_INVALID_PARAMETER TimerPeriod is NULL.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_TIMER_GET_TIMER_PERIOD) (
|
||||
IN EFI_TIMER_ARCH_PROTOCOL *This,
|
||||
OUT UINT64 *TimerPeriod
|
||||
);
|
||||
|
||||
/**
|
||||
This function generates a soft timer interrupt. If the platform does not support soft
|
||||
timer interrupts, then EFI_UNSUPPORTED is returned. Otherwise, EFI_SUCCESS is returned.
|
||||
If a handler has been registered through the EFI_TIMER_ARCH_PROTOCOL.RegisterHandler()
|
||||
service, then a soft timer interrupt will be generated. If the timer interrupt is
|
||||
enabled when this service is called, then the registered handler will be invoked. The
|
||||
registered handler should not be able to distinguish a hardware-generated timer
|
||||
interrupt from a software-generated timer interrupt.
|
||||
|
||||
@param This The EFI_TIMER_ARCH_PROTOCOL instance.
|
||||
|
||||
@retval EFI_SUCCESS The soft timer interrupt was generated.
|
||||
|
||||
@retval EFI_UNSUPPORTEDT The platform does not support the generation of soft timer interrupts.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_TIMER_GENERATE_SOFT_INTERRUPT) (
|
||||
IN EFI_TIMER_ARCH_PROTOCOL *This
|
||||
);
|
||||
|
||||
|
||||
/**
|
||||
Interface stucture for the Timer Architectural Protocol.
|
||||
|
||||
@par Protocol Description:
|
||||
This protocol provides the services to initialize a periodic timer
|
||||
interrupt, and to register a handler that is called each time the timer
|
||||
interrupt fires. It may also provide a service to adjust the rate of the
|
||||
periodic timer interrupt. When a timer interrupt occurs, the handler is
|
||||
passed the amount of time that has passed since the previous timer
|
||||
interrupt.
|
||||
|
||||
@param RegisterHandler
|
||||
Registers a handler that will be called each time the
|
||||
timer interrupt fires. TimerPeriod defines the minimum
|
||||
time between timer interrupts, so TimerPeriod will also
|
||||
be the minimum time between calls to the registered
|
||||
handler.
|
||||
|
||||
@param SetTimerPeriod
|
||||
Sets the period of the timer interrupt in 100 nS units.
|
||||
This function is optional, and may return EFI_UNSUPPORTED.
|
||||
If this function is supported, then the timer period will
|
||||
be rounded up to the nearest supported timer period.
|
||||
|
||||
@param GetTimerPeriod
|
||||
Retrieves the period of the timer interrupt in 100 nS units.
|
||||
|
||||
@param GenerateSoftInterrupt
|
||||
Generates a soft timer interrupt that simulates the firing of
|
||||
the timer interrupt. This service can be used to invoke the
|
||||
registered handler if the timer interrupt has been masked for
|
||||
a period of time.
|
||||
|
||||
**/
|
||||
struct _EFI_TIMER_ARCH_PROTOCOL {
|
||||
EFI_TIMER_REGISTER_HANDLER RegisterHandler;
|
||||
EFI_TIMER_SET_TIMER_PERIOD SetTimerPeriod;
|
||||
EFI_TIMER_GET_TIMER_PERIOD GetTimerPeriod;
|
||||
EFI_TIMER_GENERATE_SOFT_INTERRUPT GenerateSoftInterrupt;
|
||||
};
|
||||
|
||||
extern EFI_GUID gEfiTimerArchProtocolGuid;
|
||||
|
||||
#endif
|
39
Tools/Source/TianoTools/Include/Dxe/ArchProtocol/Variable.h
Normal file
39
Tools/Source/TianoTools/Include/Dxe/ArchProtocol/Variable.h
Normal file
@ -0,0 +1,39 @@
|
||||
/** @file
|
||||
Variable Architectural Protocol as defined in the DXE CIS
|
||||
|
||||
This code is used to produce the EFI 1.0 runtime variable services
|
||||
|
||||
The GetVariable (), GetNextVariableName (), and SetVariable () EFI 1.0
|
||||
services are added to the EFI system table and the
|
||||
EFI_VARIABLE_ARCH_PROTOCOL_GUID protocol is registered with a NULL pointer.
|
||||
|
||||
No CRC of the EFI system table is required, as it is done in the DXE core.
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
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
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
Module Name: Variable.h
|
||||
|
||||
@par Revision Reference:
|
||||
Version 0.91B.
|
||||
|
||||
**/
|
||||
|
||||
#ifndef __ARCH_PROTOCOL_VARIABLE_ARCH_H__
|
||||
#define __ARCH_PROTOCOL_VARIABLE_ARCH_H__
|
||||
|
||||
//
|
||||
// Global ID for the Variable Architectural Protocol
|
||||
//
|
||||
#define EFI_VARIABLE_ARCH_PROTOCOL_GUID \
|
||||
{ 0x1e5668e2, 0x8481, 0x11d4, {0xbc, 0xf1, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81 } }
|
||||
|
||||
extern EFI_GUID gEfiVariableArchProtocolGuid;
|
||||
|
||||
#endif
|
@ -0,0 +1,38 @@
|
||||
/** @file
|
||||
Variable Write Architectural Protocol as defined in the DXE CIS
|
||||
|
||||
This code is used to produce the EFI 1.0 runtime variable services
|
||||
|
||||
The SetVariable () EFI 1.0 services may be updated to the EFI system table and the
|
||||
EFI_VARIABLE_WRITE_ARCH_PROTOCOL_GUID protocol is registered with a NULL pointer.
|
||||
|
||||
No CRC of the EFI system table is required, as it is done in the DXE core.
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
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
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
Module Name: VariableWrite.h
|
||||
|
||||
@par Revision Reference:
|
||||
Version 0.91B.
|
||||
|
||||
**/
|
||||
|
||||
#ifndef __ARCH_PROTOCOL_VARIABLE_WRITE_ARCH_H__
|
||||
#define __ARCH_PROTOCOL_VARIABLE_WRITE_ARCH_H__
|
||||
|
||||
//
|
||||
// Global ID for the Variable Write Architectural Protocol
|
||||
//
|
||||
#define EFI_VARIABLE_WRITE_ARCH_PROTOCOL_GUID \
|
||||
{ 0x6441f818, 0x6362, 0x4e44, {0xb5, 0x70, 0x7d, 0xba, 0x31, 0xdd, 0x24, 0x53 } }
|
||||
|
||||
extern EFI_GUID gEfiVariableWriteArchProtocolGuid;
|
||||
|
||||
#endif
|
172
Tools/Source/TianoTools/Include/Dxe/ArchProtocol/WatchdogTimer.h
Normal file
172
Tools/Source/TianoTools/Include/Dxe/ArchProtocol/WatchdogTimer.h
Normal file
@ -0,0 +1,172 @@
|
||||
/** @file
|
||||
Watchdog Timer Architectural Protocol as defined in the DXE CIS
|
||||
|
||||
Used to provide system watchdog timer services
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
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
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
Module Name: WatchdogTimer.h
|
||||
|
||||
@par Revision Reference:
|
||||
Version 0.91B.
|
||||
|
||||
**/
|
||||
|
||||
#ifndef __ARCH_PROTOCOL_WATCHDOG_TIMER_H__
|
||||
#define __ARCH_PROTOCOL_WATCHDOG_TIMER_H__
|
||||
|
||||
//
|
||||
// Global ID for the Watchdog Timer Architectural Protocol
|
||||
//
|
||||
#define EFI_WATCHDOG_TIMER_ARCH_PROTOCOL_GUID \
|
||||
{ 0x665E3FF5, 0x46CC, 0x11d4, {0x9A, 0x38, 0x00, 0x90, 0x27, 0x3F, 0xC1, 0x4D } }
|
||||
|
||||
//
|
||||
// Declare forward reference for the Timer Architectural Protocol
|
||||
//
|
||||
typedef struct _EFI_WATCHDOG_TIMER_ARCH_PROTOCOL EFI_WATCHDOG_TIMER_ARCH_PROTOCOL;
|
||||
|
||||
/**
|
||||
A function of this type is called when the watchdog timer fires if a
|
||||
handler has been registered.
|
||||
|
||||
@param Time The time in 100 ns units that has passed since the watchdog
|
||||
timer was armed. For the notify function to be called, this
|
||||
must be greater than TimerPeriod.
|
||||
|
||||
@return None.
|
||||
|
||||
**/
|
||||
typedef
|
||||
VOID
|
||||
(EFIAPI *EFI_WATCHDOG_TIMER_NOTIFY) (
|
||||
IN UINT64 Time
|
||||
);
|
||||
|
||||
/**
|
||||
This function registers a handler that is to be invoked when the watchdog
|
||||
timer fires. By default, the EFI_WATCHDOG_TIMER protocol will call the
|
||||
Runtime Service ResetSystem() when the watchdog timer fires. If a
|
||||
NotifyFunction is registered, then the NotifyFunction will be called before
|
||||
the Runtime Service ResetSystem() is called. If NotifyFunction is NULL, then
|
||||
the watchdog handler is unregistered. If a watchdog handler is registered,
|
||||
then EFI_SUCCESS is returned. If an attempt is made to register a handler
|
||||
when a handler is already registered, then EFI_ALREADY_STARTED is returned.
|
||||
If an attempt is made to uninstall a handler when a handler is not installed,
|
||||
then return EFI_INVALID_PARAMETER.
|
||||
|
||||
@param This The EFI_WATCHDOG_TIMER_ARCH_PROTOCOL instance.
|
||||
|
||||
@param NotifyFunction The function to call when the watchdog timer fires. If this
|
||||
is NULL, then the handler will be unregistered.
|
||||
|
||||
@retval EFI_SUCCESS The watchdog timer handler was registered or
|
||||
unregistered.
|
||||
|
||||
@retval EFI_ALREADY_STARTED NotifyFunction is not NULL, and a handler is already
|
||||
registered.
|
||||
|
||||
@retval EFI_INVALID_PARAMETER NotifyFunction is NULL, and a handler was not
|
||||
previously registered.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_WATCHDOG_TIMER_REGISTER_HANDLER) (
|
||||
IN EFI_WATCHDOG_TIMER_ARCH_PROTOCOL *This,
|
||||
IN EFI_WATCHDOG_TIMER_NOTIFY NotifyFunction
|
||||
);
|
||||
|
||||
/**
|
||||
This function sets the amount of time to wait before firing the watchdog
|
||||
timer to TimerPeriod 100 nS units. If TimerPeriod is 0, then the watchdog
|
||||
timer is disabled.
|
||||
|
||||
@param This The EFI_WATCHDOG_TIMER_ARCH_PROTOCOL instance.
|
||||
|
||||
@param TimerPeriod The amount of time in 100 nS units to wait before the watchdog
|
||||
timer is fired. If TimerPeriod is zero, then the watchdog
|
||||
timer is disabled.
|
||||
|
||||
@retval EFI_SUCCESS The watchdog timer has been programmed to fire in Time
|
||||
100 nS units.
|
||||
|
||||
@retval EFI_DEVICE_ERROR A watchdog timer could not be programmed due to a device
|
||||
error.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_WATCHDOG_TIMER_SET_TIMER_PERIOD) (
|
||||
IN EFI_WATCHDOG_TIMER_ARCH_PROTOCOL *This,
|
||||
IN UINT64 TimerPeriod
|
||||
);
|
||||
|
||||
/**
|
||||
This function retrieves the amount of time the system will wait before firing
|
||||
the watchdog timer. This period is returned in TimerPeriod, and EFI_SUCCESS
|
||||
is returned. If TimerPeriod is NULL, then EFI_INVALID_PARAMETER is returned.
|
||||
|
||||
@param This The EFI_WATCHDOG_TIMER_ARCH_PROTOCOL instance.
|
||||
|
||||
@param TimerPeriod A pointer to the amount of time in 100 nS units that the system
|
||||
will wait before the watchdog timer is fired. If TimerPeriod of
|
||||
zero is returned, then the watchdog timer is disabled.
|
||||
|
||||
@retval EFI_SUCCESS The amount of time that the system will wait before
|
||||
firing the watchdog timer was returned in TimerPeriod.
|
||||
|
||||
@retval EFI_INVALID_PARAMETER TimerPeriod is NULL.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_WATCHDOG_TIMER_GET_TIMER_PERIOD) (
|
||||
IN EFI_WATCHDOG_TIMER_ARCH_PROTOCOL *This,
|
||||
OUT UINT64 *TimerPeriod
|
||||
);
|
||||
|
||||
|
||||
/**
|
||||
Interface stucture for the Watchdog Timer Architectural Protocol.
|
||||
|
||||
@par Protocol Description:
|
||||
This protocol provides the services required to implement the Boot Service
|
||||
SetWatchdogTimer(). It provides a service to set the amount of time to wait
|
||||
before firing the watchdog timer, and it also provides a service to register
|
||||
a handler that is invoked when the watchdog timer fires. This protocol can
|
||||
implement the watchdog timer by using the event and timer Boot Services, or
|
||||
it can make use of custom hardware. When the watchdog timer fires, control
|
||||
will be passed to a handler if one has been registered. If no handler has
|
||||
been registered, or the registered handler returns, then the system will be
|
||||
reset by calling the Runtime Service ResetSystem().
|
||||
|
||||
@param RegisterHandler - Registers a handler that is invoked when the watchdog
|
||||
timer fires.
|
||||
|
||||
@param SetTimerPeriod - Sets the amount of time in 100 ns units to wait before the
|
||||
watchdog timer is fired. If this function is supported,
|
||||
then the watchdog timer period will be rounded up to the
|
||||
nearest supported watchdog timer period.
|
||||
|
||||
@param GetTimerPeriod - Retrieves the amount of time in 100 ns units that the
|
||||
system will wait before the watchdog timer is fired.
|
||||
|
||||
**/
|
||||
struct _EFI_WATCHDOG_TIMER_ARCH_PROTOCOL {
|
||||
EFI_WATCHDOG_TIMER_REGISTER_HANDLER RegisterHandler;
|
||||
EFI_WATCHDOG_TIMER_SET_TIMER_PERIOD SetTimerPeriod;
|
||||
EFI_WATCHDOG_TIMER_GET_TIMER_PERIOD GetTimerPeriod;
|
||||
};
|
||||
|
||||
extern EFI_GUID gEfiWatchdogTimerArchProtocolGuid;
|
||||
|
||||
#endif
|
||||
|
589
Tools/Source/TianoTools/Include/Dxe/DxeCis.h
Normal file
589
Tools/Source/TianoTools/Include/Dxe/DxeCis.h
Normal file
@ -0,0 +1,589 @@
|
||||
/** @file
|
||||
Include file matches things in the DXE CIS.
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
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
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
Module Name: DxeCis.h
|
||||
|
||||
@par Revision Reference:
|
||||
Version 0.91B.
|
||||
|
||||
**/
|
||||
|
||||
#ifndef __DXE_CIS__
|
||||
#define __DXE_CIS__
|
||||
|
||||
#include <Uefi/UefiSpec.h>
|
||||
|
||||
|
||||
#define TIANO_ERROR(a) (MAX_2_BITS | (a))
|
||||
|
||||
#if (EFI_SPECIFICATION_VERSION < 0x00020000)
|
||||
//
|
||||
// Tiano added a couple of return types. These are owned by UEFI specification
|
||||
// and Tiano can not use them. Thus for UEFI 2.0/R9 support we moved the values
|
||||
// to a UEFI OEM extension range to conform to UEFI specification.
|
||||
//
|
||||
#define EFI_NOT_AVAILABLE_YET EFIERR (28)
|
||||
#define EFI_UNLOAD_IMAGE EFIERR (29)
|
||||
#else
|
||||
#define EFI_NOT_AVAILABLE_YET TIANO_ERROR (0)
|
||||
#define EFI_UNLOAD_IMAGE TIANO_ERROR (1)
|
||||
#endif
|
||||
|
||||
//
|
||||
// BugBug: Implementation contamination of UEFI 2.0
|
||||
// Pointer to internal runtime pointer
|
||||
//
|
||||
#define EFI_IPF_GP_POINTER 0x00000008
|
||||
|
||||
|
||||
//
|
||||
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
//
|
||||
|
||||
//
|
||||
// attributes for reserved memory before it is promoted to system memory
|
||||
//
|
||||
#define EFI_MEMORY_PRESENT 0x0100000000000000ULL
|
||||
#define EFI_MEMORY_INITIALIZED 0x0200000000000000ULL
|
||||
#define EFI_MEMORY_TESTED 0x0400000000000000ULL
|
||||
|
||||
//
|
||||
// range for memory mapped port I/O on IPF
|
||||
//
|
||||
#define EFI_MEMORY_PORT_IO 0x4000000000000000ULL
|
||||
|
||||
//
|
||||
// Modifier for EFI DXE Services
|
||||
//
|
||||
#define EFI_DXESERVICE
|
||||
|
||||
|
||||
//
|
||||
// Global Coherencey Domain types
|
||||
//
|
||||
typedef enum {
|
||||
EfiGcdMemoryTypeNonExistent,
|
||||
EfiGcdMemoryTypeReserved,
|
||||
EfiGcdMemoryTypeSystemMemory,
|
||||
EfiGcdMemoryTypeMemoryMappedIo,
|
||||
EfiGcdMemoryTypeMaximum
|
||||
} EFI_GCD_MEMORY_TYPE;
|
||||
|
||||
typedef enum {
|
||||
EfiGcdIoTypeNonExistent,
|
||||
EfiGcdIoTypeReserved,
|
||||
EfiGcdIoTypeIo,
|
||||
EfiGcdIoTypeMaximum
|
||||
} EFI_GCD_IO_TYPE;
|
||||
|
||||
typedef enum {
|
||||
EfiGcdAllocateAnySearchBottomUp,
|
||||
EfiGcdAllocateMaxAddressSearchBottomUp,
|
||||
EfiGcdAllocateAddress,
|
||||
EfiGcdAllocateAnySearchTopDown,
|
||||
EfiGcdAllocateMaxAddressSearchTopDown,
|
||||
EfiGcdMaxAllocateType
|
||||
} EFI_GCD_ALLOCATE_TYPE;
|
||||
|
||||
typedef struct {
|
||||
EFI_PHYSICAL_ADDRESS BaseAddress;
|
||||
UINT64 Length;
|
||||
UINT64 Capabilities;
|
||||
UINT64 Attributes;
|
||||
EFI_GCD_MEMORY_TYPE GcdMemoryType;
|
||||
EFI_HANDLE ImageHandle;
|
||||
EFI_HANDLE DeviceHandle;
|
||||
} EFI_GCD_MEMORY_SPACE_DESCRIPTOR;
|
||||
|
||||
typedef struct {
|
||||
EFI_PHYSICAL_ADDRESS BaseAddress;
|
||||
UINT64 Length;
|
||||
EFI_GCD_IO_TYPE GcdIoType;
|
||||
EFI_HANDLE ImageHandle;
|
||||
EFI_HANDLE DeviceHandle;
|
||||
} EFI_GCD_IO_SPACE_DESCRIPTOR;
|
||||
|
||||
/**
|
||||
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.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_ADD_MEMORY_SPACE) (
|
||||
IN EFI_GCD_MEMORY_TYPE GcdMemoryType,
|
||||
IN EFI_PHYSICAL_ADDRESS BaseAddress,
|
||||
IN UINT64 Length,
|
||||
IN UINT64 Capabilities
|
||||
)
|
||||
;
|
||||
|
||||
/**
|
||||
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.
|
||||
|
||||
@retval EFI_INVALID_PARAMETER Invalid parameter.
|
||||
|
||||
@retval EFI_NOT_FOUND No descriptor contains the desired space.
|
||||
|
||||
@retval EFI_SUCCESS Memory space successfully allocated.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_ALLOCATE_MEMORY_SPACE) (
|
||||
IN EFI_GCD_ALLOCATE_TYPE GcdAllocateType,
|
||||
IN EFI_GCD_MEMORY_TYPE GcdMemoryType,
|
||||
IN UINTN Alignment,
|
||||
IN UINT64 Length,
|
||||
IN OUT EFI_PHYSICAL_ADDRESS *BaseAddress,
|
||||
IN EFI_HANDLE ImageHandle,
|
||||
IN EFI_HANDLE DeviceHandle OPTIONAL
|
||||
)
|
||||
;
|
||||
|
||||
/**
|
||||
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.
|
||||
|
||||
@retval EFI_SUCCESS Space successfully freed.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_FREE_MEMORY_SPACE) (
|
||||
IN EFI_PHYSICAL_ADDRESS BaseAddress,
|
||||
IN UINT64 Length
|
||||
)
|
||||
;
|
||||
|
||||
/**
|
||||
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.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_REMOVE_MEMORY_SPACE) (
|
||||
IN EFI_PHYSICAL_ADDRESS BaseAddress,
|
||||
IN UINT64 Length
|
||||
)
|
||||
;
|
||||
|
||||
/**
|
||||
Retrieves the descriptor for a memory region containing a specified address.
|
||||
|
||||
@param BaseAddress Specified start address
|
||||
|
||||
@param Descriptor Specified length
|
||||
|
||||
@retval EFI_INVALID_PARAMETER Invalid parameter
|
||||
|
||||
@retval EFI_SUCCESS Successfully get memory space descriptor.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_GET_MEMORY_SPACE_DESCRIPTOR) (
|
||||
IN EFI_PHYSICAL_ADDRESS BaseAddress,
|
||||
OUT EFI_GCD_MEMORY_SPACE_DESCRIPTOR *Descriptor
|
||||
)
|
||||
;
|
||||
|
||||
/**
|
||||
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.
|
||||
|
||||
**/
|
||||
typedef
|
||||
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_SET_MEMORY_SPACE_ATTRIBUTES) (
|
||||
IN EFI_PHYSICAL_ADDRESS BaseAddress,
|
||||
IN UINT64 Length,
|
||||
IN UINT64 Attributes
|
||||
)
|
||||
;
|
||||
|
||||
/**
|
||||
Returns a map of the memory resources in the global coherency domain of the
|
||||
processor.
|
||||
|
||||
@param NumberOfDescriptors Number of descriptors.
|
||||
|
||||
@param MemorySpaceMap Descriptor array
|
||||
|
||||
@retval EFI_INVALID_PARAMETER Invalid parameter
|
||||
|
||||
@retval EFI_OUT_OF_RESOURCES No enough buffer to allocate
|
||||
|
||||
@retval EFI_SUCCESS Successfully get memory space map.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_GET_MEMORY_SPACE_MAP) (
|
||||
OUT UINTN *NumberOfDescriptors,
|
||||
OUT EFI_GCD_MEMORY_SPACE_DESCRIPTOR **MemorySpaceMap
|
||||
)
|
||||
;
|
||||
|
||||
/**
|
||||
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.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_ADD_IO_SPACE) (
|
||||
IN EFI_GCD_IO_TYPE GcdIoType,
|
||||
IN EFI_PHYSICAL_ADDRESS BaseAddress,
|
||||
IN UINT64 Length
|
||||
)
|
||||
;
|
||||
|
||||
/**
|
||||
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.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_ALLOCATE_IO_SPACE) (
|
||||
IN EFI_GCD_ALLOCATE_TYPE GcdAllocateType,
|
||||
IN EFI_GCD_IO_TYPE GcdIoType,
|
||||
IN UINTN Alignment,
|
||||
IN UINT64 Length,
|
||||
IN OUT EFI_PHYSICAL_ADDRESS *BaseAddress,
|
||||
IN EFI_HANDLE ImageHandle,
|
||||
IN EFI_HANDLE DeviceHandle OPTIONAL
|
||||
)
|
||||
;
|
||||
|
||||
/**
|
||||
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.
|
||||
|
||||
@retval EFI_SUCCESS Space successfully freed.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_FREE_IO_SPACE) (
|
||||
IN EFI_PHYSICAL_ADDRESS BaseAddress,
|
||||
IN UINT64 Length
|
||||
)
|
||||
;
|
||||
|
||||
/**
|
||||
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.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_REMOVE_IO_SPACE) (
|
||||
IN EFI_PHYSICAL_ADDRESS BaseAddress,
|
||||
IN UINT64 Length
|
||||
)
|
||||
;
|
||||
|
||||
/**
|
||||
Retrieves the descriptor for an I/O region containing a specified address.
|
||||
|
||||
@param BaseAddress Specified start address
|
||||
|
||||
@param Descriptor Specified length
|
||||
|
||||
@retval EFI_INVALID_PARAMETER Descriptor is NULL.
|
||||
|
||||
@retval EFI_SUCCESS Successfully get the IO space descriptor.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_GET_IO_SPACE_DESCRIPTOR) (
|
||||
IN EFI_PHYSICAL_ADDRESS BaseAddress,
|
||||
OUT EFI_GCD_IO_SPACE_DESCRIPTOR *Descriptor
|
||||
)
|
||||
;
|
||||
|
||||
/**
|
||||
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
|
||||
|
||||
@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
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_GET_IO_SPACE_MAP) (
|
||||
OUT UINTN *NumberOfDescriptors,
|
||||
OUT EFI_GCD_IO_SPACE_DESCRIPTOR **IoSpaceMap
|
||||
)
|
||||
;
|
||||
|
||||
/**
|
||||
Loads and executed DXE drivers from firmware volumes.
|
||||
|
||||
@return Status code
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_DISPATCH) (VOID)
|
||||
;
|
||||
|
||||
/**
|
||||
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.
|
||||
|
||||
@return Status code
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_SCHEDULE) (
|
||||
IN EFI_HANDLE FirmwareVolumeHandle,
|
||||
IN EFI_GUID *DriverName
|
||||
)
|
||||
;
|
||||
|
||||
/**
|
||||
Promotes a file stored in a firmware volume from the untrusted to the trusted state.
|
||||
|
||||
@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.
|
||||
|
||||
@return Status code
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_TRUST) (
|
||||
IN EFI_HANDLE FirmwareVolumeHandle,
|
||||
IN EFI_GUID *DriverName
|
||||
)
|
||||
;
|
||||
|
||||
/**
|
||||
Creates a firmware volume handle for a firmware volume that is present in system memory.
|
||||
|
||||
@param FirmwareVolumeHeader A pointer to the header of the firmware volume.
|
||||
@param Size The size, in bytes, of the firmware volume.
|
||||
@param FirmwareVolumeHandle On output, a pointer to the created handle.
|
||||
|
||||
@return Status code
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_PROCESS_FIRMWARE_VOLUME) (
|
||||
IN VOID *FvHeader,
|
||||
IN UINTN Size,
|
||||
OUT EFI_HANDLE *FirmwareVolumeHandle
|
||||
)
|
||||
;
|
||||
|
||||
//
|
||||
// DXE Services Table
|
||||
//
|
||||
#define EFI_DXE_SERVICES_SIGNATURE 0x565245535f455844ULL
|
||||
#define EFI_DXE_SERVICES_REVISION ((0 << 16) | (25))
|
||||
|
||||
typedef struct {
|
||||
EFI_TABLE_HEADER Hdr;
|
||||
|
||||
//
|
||||
// Global Coherency Domain Services
|
||||
//
|
||||
EFI_ADD_MEMORY_SPACE AddMemorySpace;
|
||||
EFI_ALLOCATE_MEMORY_SPACE AllocateMemorySpace;
|
||||
EFI_FREE_MEMORY_SPACE FreeMemorySpace;
|
||||
EFI_REMOVE_MEMORY_SPACE RemoveMemorySpace;
|
||||
EFI_GET_MEMORY_SPACE_DESCRIPTOR GetMemorySpaceDescriptor;
|
||||
EFI_SET_MEMORY_SPACE_ATTRIBUTES SetMemorySpaceAttributes;
|
||||
EFI_GET_MEMORY_SPACE_MAP GetMemorySpaceMap;
|
||||
EFI_ADD_IO_SPACE AddIoSpace;
|
||||
EFI_ALLOCATE_IO_SPACE AllocateIoSpace;
|
||||
EFI_FREE_IO_SPACE FreeIoSpace;
|
||||
EFI_REMOVE_IO_SPACE RemoveIoSpace;
|
||||
EFI_GET_IO_SPACE_DESCRIPTOR GetIoSpaceDescriptor;
|
||||
EFI_GET_IO_SPACE_MAP GetIoSpaceMap;
|
||||
|
||||
//
|
||||
// Dispatcher Services
|
||||
//
|
||||
EFI_DISPATCH Dispatch;
|
||||
EFI_SCHEDULE Schedule;
|
||||
EFI_TRUST Trust;
|
||||
//
|
||||
// Service to process a single firmware volume found in a capsule
|
||||
//
|
||||
EFI_PROCESS_FIRMWARE_VOLUME ProcessFirmwareVolume;
|
||||
} EFI_DXE_SERVICES;
|
||||
|
||||
|
||||
#include <Common/BootMode.h>
|
||||
#include <Common/BootScript.h>
|
||||
#include <Common/Capsule.h>
|
||||
#include <Common/Dependency.h>
|
||||
#include <Common/FirmwareVolumeImageFormat.h>
|
||||
#include <Common/FirmwareVolumeHeader.h>
|
||||
#include <Common/FirmwareFileSystem.h>
|
||||
#include <Common/Hob.h>
|
||||
#include <Common/InternalFormRepresentation.h>
|
||||
#include <Common/StatusCode.h>
|
||||
#include <Common/StatusCodeDataTypeId.h>
|
||||
|
||||
#include <Guid/AcpiTableStorage.h>
|
||||
#include <Guid/Apriori.h>
|
||||
#include <Guid/Capsule.h>
|
||||
#include <Guid/DxeServices.h>
|
||||
#include <Guid/EventLegacyBios.h>
|
||||
#include <Guid/FirmwareFileSystem.h>
|
||||
#include <Guid/FrameworkDevicePath.h>
|
||||
#include <Guid/HobList.h>
|
||||
#include <Guid/MemoryAllocationHob.h>
|
||||
#include <Guid/SmramMemoryReserve.h>
|
||||
#include <Guid/StatusCodeDataTypeId.h>
|
||||
|
||||
#include <Dxe/ArchProtocol/Bds.h>
|
||||
#include <Dxe/ArchProtocol/Cpu.h>
|
||||
#include <Dxe/ArchProtocol/Metronome.h>
|
||||
#include <Dxe/ArchProtocol/MonotonicCounter.h>
|
||||
#include <Dxe/ArchProtocol/RealTimeClock.h>
|
||||
#include <Dxe/ArchProtocol/Reset.h>
|
||||
#include <Dxe/ArchProtocol/Runtime.h>
|
||||
#include <Dxe/ArchProtocol/Security.h>
|
||||
#include <Dxe/ArchProtocol/SecurityPolicy.h>
|
||||
#include <Dxe/ArchProtocol/StatusCode.h>
|
||||
#include <Dxe/ArchProtocol/Timer.h>
|
||||
#include <Dxe/ArchProtocol/Variable.h>
|
||||
#include <Dxe/ArchProtocol/VariableWrite.h>
|
||||
#include <Dxe/ArchProtocol/WatchdogTimer.h>
|
||||
|
||||
#include <Protocol/AcpiSupport.h>
|
||||
#include <Protocol/BootScriptSave.h>
|
||||
#include <Protocol/CpuIo.h>
|
||||
#include <Protocol/DataHub.h>
|
||||
#include <Protocol/FirmwareVolume.h>
|
||||
#include <Protocol/FirmwareVolumeBlock.h>
|
||||
#include <Protocol/FirmwareVolumeDispatch.h>
|
||||
#include <Protocol/Hii.h>
|
||||
#include <Protocol/FormBrowser.h>
|
||||
#include <Protocol/FormCallback.h>
|
||||
#include <Protocol/GuidedSectionExtraction.h>
|
||||
#include <Protocol/IdeControllerInit.h>
|
||||
#include <Protocol/IncompatiblePciDeviceSupport.h>
|
||||
#include <Protocol/PciHostBridgeResourceAllocation.h>
|
||||
#include <Protocol/PciHotPlugInit.h>
|
||||
#include <Protocol/PciPlatform.h>
|
||||
#include <Protocol/SectionExtraction.h>
|
||||
#include <Protocol/Smbus.h>
|
||||
#include <Protocol/LegacyBios.h>
|
||||
#include <Protocol/Legacy8259.h>
|
||||
#include <Protocol/LegacyRegion.h>
|
||||
#include <Protocol/LegacyBiosPlatform.h>
|
||||
#include <Protocol/LegacyInterrupt.h>
|
||||
|
||||
#endif
|
526
Tools/Source/TianoTools/Include/Dxe/SmmCis.h
Normal file
526
Tools/Source/TianoTools/Include/Dxe/SmmCis.h
Normal file
@ -0,0 +1,526 @@
|
||||
/** @file
|
||||
Include file matches things in the Smm CIS spec.
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
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
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
Module Name: SmmCis.h
|
||||
|
||||
@par Revision Reference:
|
||||
Version 0.9.
|
||||
|
||||
**/
|
||||
|
||||
#ifndef __SMM_CIS__
|
||||
#define __SMM_CIS__
|
||||
|
||||
#define EFI_SMM_CPU_IO_GUID \
|
||||
{ \
|
||||
0x5f439a0b, 0x45d8, 0x4682, {0xa4, 0xf4, 0xf0, 0x57, 0x6b, 0x51, 0x34, 0x41 } \
|
||||
}
|
||||
|
||||
typedef struct _EFI_SMM_SYSTEM_TABLE EFI_SMM_SYSTEM_TABLE;
|
||||
typedef struct _EFI_SMM_CPU_IO_INTERFACE EFI_SMM_CPU_IO_INTERFACE;
|
||||
|
||||
|
||||
//
|
||||
// SMM Base specification constant and types
|
||||
//
|
||||
#define SMM_SMST_SIGNATURE EFI_SIGNATURE_32 ('S', 'M', 'S', 'T')
|
||||
#define EFI_SMM_SYSTEM_TABLE_REVISION (0 << 16) | (0x09)
|
||||
|
||||
//
|
||||
// *******************************************************
|
||||
// EFI_SMM_IO_WIDTH
|
||||
// *******************************************************
|
||||
//
|
||||
typedef enum {
|
||||
SMM_IO_UINT8 = 0,
|
||||
SMM_IO_UINT16 = 1,
|
||||
SMM_IO_UINT32 = 2,
|
||||
SMM_IO_UINT64 = 3
|
||||
} EFI_SMM_IO_WIDTH;
|
||||
|
||||
/**
|
||||
Provides the basic memory and I/O interfaces that are used to
|
||||
abstract accesses to devices.
|
||||
|
||||
@param This The EFI_SMM_CPU_IO_INTERFACE instance.
|
||||
|
||||
@param Width Signifies the width of the I/O operations.
|
||||
|
||||
@param Address The base address of the I/O operations.
|
||||
|
||||
@param Count The number of I/O operations to perform.
|
||||
|
||||
@param Buffer For read operations, the destination buffer to store the results.
|
||||
For write operations, the source buffer from which to write data.
|
||||
|
||||
@retval EFI_SUCCESS The data was read from or written to the device.
|
||||
|
||||
@retval EFI_UNSUPPORTED The Address is not valid for this system.
|
||||
|
||||
@retval EFI_INVALID_PARAMETER Width or Count, or both, were invalid.
|
||||
|
||||
@retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack of resources.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_SMM_CPU_IO) (
|
||||
IN EFI_SMM_CPU_IO_INTERFACE *This,
|
||||
IN EFI_SMM_IO_WIDTH Width,
|
||||
IN UINT64 Address,
|
||||
IN UINTN Count,
|
||||
IN OUT VOID *Buffer
|
||||
);
|
||||
|
||||
typedef struct {
|
||||
EFI_SMM_CPU_IO Read;
|
||||
EFI_SMM_CPU_IO Write;
|
||||
} EFI_SMM_IO_ACCESS;
|
||||
|
||||
struct _EFI_SMM_CPU_IO_INTERFACE {
|
||||
EFI_SMM_IO_ACCESS Mem;
|
||||
EFI_SMM_IO_ACCESS Io;
|
||||
};
|
||||
|
||||
/**
|
||||
Allocates pool memory from SMRAM for IA-32 or runtime memory for
|
||||
the Itanium processor family.
|
||||
|
||||
@param PoolType The type of pool to allocate.The only supported type is EfiRuntimeServicesData
|
||||
|
||||
@param Size The number of bytes to allocate from the pool.
|
||||
|
||||
@param Buffer A pointer to a pointer to the allocated buffer if the call
|
||||
succeeds; undefined otherwise.
|
||||
|
||||
@retval EFI_SUCCESS The requested number of bytes was allocated.
|
||||
|
||||
@retval EFI_OUT_OF_RESOURCES The pool requested could not be allocated.
|
||||
|
||||
@retval EFI_UNSUPPORTED In runtime.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_SMMCORE_ALLOCATE_POOL) (
|
||||
IN EFI_MEMORY_TYPE PoolType,
|
||||
IN UINTN Size,
|
||||
OUT VOID **Buffer
|
||||
);
|
||||
|
||||
/**
|
||||
Returns pool memory to the system.
|
||||
|
||||
@param Buffer Pointer to the buffer to free.
|
||||
|
||||
@retval EFI_SUCCESS The memory was returned to the system.
|
||||
|
||||
@retval EFI_INVALID_PARAMETER Buffer was invalid.
|
||||
|
||||
@retval EFI_UNSUPPORTED In runtime.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_SMMCORE_FREE_POOL) (
|
||||
IN VOID *Buffer
|
||||
);
|
||||
|
||||
/**
|
||||
Allocates memory pages from the system.
|
||||
|
||||
@param Type The type of allocation to perform.
|
||||
|
||||
@param MemoryType The only supported type is EfiRuntimeServicesData
|
||||
|
||||
@param NumberofPages The number of contiguous 4 KB pages to allocate
|
||||
|
||||
@param Memory Pointer to a physical address. On input, the way in which
|
||||
the address is used depends on the value of Type. On output, the address
|
||||
is set to the base of the page range that was allocated.
|
||||
|
||||
@retval EFI_SUCCESS The requested pages were allocated.
|
||||
|
||||
@retval EFI_OUT_OF_RESOURCES The pages requested could not be allocated.
|
||||
|
||||
@retval EFI_NOT_FOUND The requested pages could not be found.
|
||||
|
||||
@retval EFI_INVALID_PARAMETER Type is not AllocateAnyPages or AllocateMaxAddress
|
||||
or AllocateAddress. Or MemoryType is in the range EfiMaxMemoryType..0x7FFFFFFF.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_SMMCORE_ALLOCATE_PAGES) (
|
||||
IN EFI_ALLOCATE_TYPE Type,
|
||||
IN EFI_MEMORY_TYPE MemoryType,
|
||||
IN UINTN NumberOfPages,
|
||||
OUT EFI_PHYSICAL_ADDRESS *Memory
|
||||
);
|
||||
|
||||
/**
|
||||
Frees memory pages for the system.
|
||||
|
||||
@param Memory The base physical address of the pages to be freed
|
||||
|
||||
@param NumberOfPages The number of contiguous 4 KB pages to free.
|
||||
|
||||
@retval EFI_SUCCESS The requested memory pages were freed.
|
||||
|
||||
@retval EFI_INVALID_PARAMETER Memory is not a page-aligned address or NumberOfPages is invalid.
|
||||
|
||||
@retval EFI_NOT_FOUND The requested memory pages were not allocated with SmmAllocatePages().
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_SMMCORE_FREE_PAGES) (
|
||||
IN EFI_PHYSICAL_ADDRESS Memory,
|
||||
IN UINTN NumberOfPages
|
||||
);
|
||||
|
||||
typedef
|
||||
VOID
|
||||
(EFIAPI *EFI_AP_PROCEDURE) (
|
||||
IN VOID *Buffer
|
||||
);
|
||||
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_SMM_STARTUP_THIS_AP) (
|
||||
IN EFI_AP_PROCEDURE Procedure,
|
||||
IN UINTN CpuNumber,
|
||||
IN OUT VOID *ProcArguments OPTIONAL
|
||||
);
|
||||
|
||||
typedef struct {
|
||||
UINT8 Reserved1[248];
|
||||
UINT32 SMBASE;
|
||||
UINT32 SMMRevId;
|
||||
UINT16 IORestart;
|
||||
UINT16 AutoHALTRestart;
|
||||
UINT8 Reserved2[164];
|
||||
UINT32 ES;
|
||||
UINT32 CS;
|
||||
UINT32 SS;
|
||||
UINT32 DS;
|
||||
UINT32 FS;
|
||||
UINT32 GS;
|
||||
UINT32 LDTBase;
|
||||
UINT32 TR;
|
||||
UINT32 DR7;
|
||||
UINT32 DR6;
|
||||
UINT32 EAX;
|
||||
UINT32 ECX;
|
||||
UINT32 EDX;
|
||||
UINT32 EBX;
|
||||
UINT32 ESP;
|
||||
UINT32 EBP;
|
||||
UINT32 ESI;
|
||||
UINT32 EDI;
|
||||
UINT32 EIP;
|
||||
UINT32 EFLAGS;
|
||||
UINT32 CR3;
|
||||
UINT32 CR0;
|
||||
} EFI_SMI_CPU_SAVE_STATE;
|
||||
|
||||
typedef struct {
|
||||
UINT64 reserved;
|
||||
UINT64 r1;
|
||||
UINT64 r2;
|
||||
UINT64 r3;
|
||||
UINT64 r4;
|
||||
UINT64 r5;
|
||||
UINT64 r6;
|
||||
UINT64 r7;
|
||||
UINT64 r8;
|
||||
UINT64 r9;
|
||||
UINT64 r10;
|
||||
UINT64 r11;
|
||||
UINT64 r12;
|
||||
UINT64 r13;
|
||||
UINT64 r14;
|
||||
UINT64 r15;
|
||||
UINT64 r16;
|
||||
UINT64 r17;
|
||||
UINT64 r18;
|
||||
UINT64 r19;
|
||||
UINT64 r20;
|
||||
UINT64 r21;
|
||||
UINT64 r22;
|
||||
UINT64 r23;
|
||||
UINT64 r24;
|
||||
UINT64 r25;
|
||||
UINT64 r26;
|
||||
UINT64 r27;
|
||||
UINT64 r28;
|
||||
UINT64 r29;
|
||||
UINT64 r30;
|
||||
UINT64 r31;
|
||||
|
||||
UINT64 pr;
|
||||
|
||||
UINT64 b0;
|
||||
UINT64 b1;
|
||||
UINT64 b2;
|
||||
UINT64 b3;
|
||||
UINT64 b4;
|
||||
UINT64 b5;
|
||||
UINT64 b6;
|
||||
UINT64 b7;
|
||||
|
||||
// application registers
|
||||
UINT64 ar_rsc;
|
||||
UINT64 ar_bsp;
|
||||
UINT64 ar_bspstore;
|
||||
UINT64 ar_rnat;
|
||||
|
||||
UINT64 ar_fcr;
|
||||
|
||||
UINT64 ar_eflag;
|
||||
UINT64 ar_csd;
|
||||
UINT64 ar_ssd;
|
||||
UINT64 ar_cflg;
|
||||
UINT64 ar_fsr;
|
||||
UINT64 ar_fir;
|
||||
UINT64 ar_fdr;
|
||||
|
||||
UINT64 ar_ccv;
|
||||
|
||||
UINT64 ar_unat;
|
||||
|
||||
UINT64 ar_fpsr;
|
||||
|
||||
UINT64 ar_pfs;
|
||||
UINT64 ar_lc;
|
||||
UINT64 ar_ec;
|
||||
|
||||
// control registers
|
||||
UINT64 cr_dcr;
|
||||
UINT64 cr_itm;
|
||||
UINT64 cr_iva;
|
||||
UINT64 cr_pta;
|
||||
UINT64 cr_ipsr;
|
||||
UINT64 cr_isr;
|
||||
UINT64 cr_iip;
|
||||
UINT64 cr_ifa;
|
||||
UINT64 cr_itir;
|
||||
UINT64 cr_iipa;
|
||||
UINT64 cr_ifs;
|
||||
UINT64 cr_iim;
|
||||
UINT64 cr_iha;
|
||||
|
||||
// debug registers
|
||||
UINT64 dbr0;
|
||||
UINT64 dbr1;
|
||||
UINT64 dbr2;
|
||||
UINT64 dbr3;
|
||||
UINT64 dbr4;
|
||||
UINT64 dbr5;
|
||||
UINT64 dbr6;
|
||||
UINT64 dbr7;
|
||||
|
||||
UINT64 ibr0;
|
||||
UINT64 ibr1;
|
||||
UINT64 ibr2;
|
||||
UINT64 ibr3;
|
||||
UINT64 ibr4;
|
||||
UINT64 ibr5;
|
||||
UINT64 ibr6;
|
||||
UINT64 ibr7;
|
||||
|
||||
// virtual registers
|
||||
UINT64 int_nat; // nat bits for R1-R31
|
||||
|
||||
} EFI_PMI_SYSTEM_CONTEXT;
|
||||
|
||||
typedef union {
|
||||
EFI_SMI_CPU_SAVE_STATE Ia32SaveState;
|
||||
EFI_PMI_SYSTEM_CONTEXT ItaniumSaveState;
|
||||
} EFI_SMM_CPU_SAVE_STATE;
|
||||
|
||||
typedef struct {
|
||||
UINT16 Fcw;
|
||||
UINT16 Fsw;
|
||||
UINT16 Ftw;
|
||||
UINT16 Opcode;
|
||||
UINT32 Eip;
|
||||
UINT16 Cs;
|
||||
UINT16 Rsvd1;
|
||||
UINT32 DataOffset;
|
||||
UINT16 Ds;
|
||||
UINT8 Rsvd2[10];
|
||||
UINT8 St0Mm0[10], Rsvd3[6];
|
||||
UINT8 St0Mm1[10], Rsvd4[6];
|
||||
UINT8 St0Mm2[10], Rsvd5[6];
|
||||
UINT8 St0Mm3[10], Rsvd6[6];
|
||||
UINT8 St0Mm4[10], Rsvd7[6];
|
||||
UINT8 St0Mm5[10], Rsvd8[6];
|
||||
UINT8 St0Mm6[10], Rsvd9[6];
|
||||
UINT8 St0Mm7[10], Rsvd10[6];
|
||||
UINT8 Rsvd11[22*16];
|
||||
} EFI_SMI_OPTIONAL_FPSAVE_STATE;
|
||||
|
||||
typedef struct {
|
||||
UINT64 f2[2];
|
||||
UINT64 f3[2];
|
||||
UINT64 f4[2];
|
||||
UINT64 f5[2];
|
||||
UINT64 f6[2];
|
||||
UINT64 f7[2];
|
||||
UINT64 f8[2];
|
||||
UINT64 f9[2];
|
||||
UINT64 f10[2];
|
||||
UINT64 f11[2];
|
||||
UINT64 f12[2];
|
||||
UINT64 f13[2];
|
||||
UINT64 f14[2];
|
||||
UINT64 f15[2];
|
||||
UINT64 f16[2];
|
||||
UINT64 f17[2];
|
||||
UINT64 f18[2];
|
||||
UINT64 f19[2];
|
||||
UINT64 f20[2];
|
||||
UINT64 f21[2];
|
||||
UINT64 f22[2];
|
||||
UINT64 f23[2];
|
||||
UINT64 f24[2];
|
||||
UINT64 f25[2];
|
||||
UINT64 f26[2];
|
||||
UINT64 f27[2];
|
||||
UINT64 f28[2];
|
||||
UINT64 f29[2];
|
||||
UINT64 f30[2];
|
||||
UINT64 f31[2];
|
||||
} EFI_PMI_OPTIONAL_FLOATING_POINT_CONTEXT;
|
||||
|
||||
typedef union {
|
||||
EFI_SMI_OPTIONAL_FPSAVE_STATE Ia32FpSave;
|
||||
EFI_PMI_OPTIONAL_FLOATING_POINT_CONTEXT ItaniumFpSave;
|
||||
} EFI_SMM_FLOATING_POINT_SAVE_STATE;
|
||||
|
||||
/**
|
||||
This function is the main entry point for an SMM handler dispatch
|
||||
or communicate-based callback.
|
||||
|
||||
@param SmmImageHandle A unique value returned by the SMM infrastructure
|
||||
in response to registration for a communicate-based callback or dispatch.
|
||||
|
||||
@param CommunicationBuffer An optional buffer that will be populated
|
||||
by the SMM infrastructure in response to a non-SMM agent (preboot or runtime)
|
||||
invoking the EFI_SMM_BASE_PROTOCOL.Communicate() service.
|
||||
|
||||
@param SourceSize If CommunicationBuffer is non-NULL, this field
|
||||
indicates the size of the data payload in this buffer.
|
||||
|
||||
@return Status Code
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_SMM_HANDLER_ENTRY_POINT) (
|
||||
IN EFI_HANDLE SmmImageHandle,
|
||||
IN OUT VOID *CommunicationBuffer OPTIONAL,
|
||||
IN OUT UINTN *SourceSize OPTIONAL
|
||||
);
|
||||
|
||||
/**
|
||||
The SmmInstallConfigurationTable() function is used to maintain the list
|
||||
of configuration tables that are stored in the System Management System
|
||||
Table. The list is stored as an array of (GUID, Pointer) pairs. The list
|
||||
must be allocated from pool memory with PoolType set to EfiRuntimeServicesData.
|
||||
|
||||
@param SystemTable A pointer to the SMM System Table.
|
||||
@param Guid A pointer to the GUID for the entry to add, update, or remove.
|
||||
@param Table A pointer to the buffer of the table to add.
|
||||
@param TableSize The size of the table to install.
|
||||
|
||||
@retval EFI_SUCCESS The (Guid, Table) pair was added, updated, or removed.
|
||||
@retval EFI_INVALID_PARAMETER Guid is not valid.
|
||||
@retval EFI_NOT_FOUND An attempt was made to delete a non-existent entry.
|
||||
@retval EFI_OUT_OF_RESOURCES There is not enough memory available to complete the operation.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_SMM_INSTALL_CONFIGURATION_TABLE) (
|
||||
IN EFI_SMM_SYSTEM_TABLE *SystemTable,
|
||||
IN EFI_GUID *Guid,
|
||||
IN VOID *Table,
|
||||
IN UINTN TableSize
|
||||
)
|
||||
;
|
||||
|
||||
//
|
||||
// System Management System Table (SMST)
|
||||
//
|
||||
struct _EFI_SMM_SYSTEM_TABLE {
|
||||
EFI_TABLE_HEADER Hdr;
|
||||
|
||||
CHAR16 *SmmFirmwareVendor;
|
||||
UINT32 SmmFirmwareRevision;
|
||||
|
||||
EFI_SMM_INSTALL_CONFIGURATION_TABLE SmmInstallConfigurationTable;
|
||||
|
||||
//
|
||||
// I/O Services
|
||||
//
|
||||
EFI_GUID EfiSmmCpuIoGuid;
|
||||
EFI_SMM_CPU_IO_INTERFACE SmmIo;
|
||||
|
||||
//
|
||||
// Runtime memory service
|
||||
//
|
||||
EFI_SMMCORE_ALLOCATE_POOL SmmAllocatePool;
|
||||
EFI_SMMCORE_FREE_POOL SmmFreePool;
|
||||
EFI_SMMCORE_ALLOCATE_PAGES SmmAllocatePages;
|
||||
EFI_SMMCORE_FREE_PAGES SmmFreePages;
|
||||
|
||||
//
|
||||
// MP service
|
||||
//
|
||||
EFI_SMM_STARTUP_THIS_AP SmmStartupThisAp;
|
||||
|
||||
//
|
||||
// CPU information records
|
||||
//
|
||||
UINTN CurrentlyExecutingCpu;
|
||||
UINTN NumberOfCpus;
|
||||
EFI_SMM_CPU_SAVE_STATE *CpuSaveState;
|
||||
EFI_SMM_FLOATING_POINT_SAVE_STATE *CpuOptionalFloatingPointState;
|
||||
|
||||
//
|
||||
// Extensibility table
|
||||
//
|
||||
UINTN NumberOfTableEntries;
|
||||
EFI_CONFIGURATION_TABLE *SmmConfigurationTable;
|
||||
|
||||
};
|
||||
|
||||
#include <Guid/SmmCommunicate.h>
|
||||
#include <Guid/SmramMemoryReserve.h>
|
||||
#include <Protocol/SmmBase.h>
|
||||
#include <Protocol/SmmAccess.h>
|
||||
#include <Protocol/SmmControl.h>
|
||||
#include <Protocol/SmmGpiDispatch.h>
|
||||
#include <Protocol/SmmIchnDispatch.h>
|
||||
#include <Protocol/SmmPeriodicTimerDispatch.h>
|
||||
#include <Protocol/SmmPowerButtonDispatch.h>
|
||||
#include <Protocol/SmmStandbyButtonDispatch.h>
|
||||
#include <Protocol/SmmStatusCode.h>
|
||||
#include <Protocol/SmmSwDispatch.h>
|
||||
#include <Protocol/SmmSxDispatch.h>
|
||||
#include <Protocol/SmmUsbDispatch.h>
|
||||
|
||||
extern EFI_GUID gEfiSmmCpuIoGuid;
|
||||
|
||||
#endif
|
48
Tools/Source/TianoTools/Include/Guid/Acpi.h
Normal file
48
Tools/Source/TianoTools/Include/Guid/Acpi.h
Normal file
@ -0,0 +1,48 @@
|
||||
/** @file
|
||||
GUIDs used for ACPI entries in the EFI 1.0 system table
|
||||
|
||||
These GUIDs point the ACPI tables as defined in the ACPI specifications.
|
||||
ACPI 2.0 specification defines the ACPI 2.0 GUID. UEFI 2.0 defines the
|
||||
ACPI 2.0 Table GUID and ACPI Table GUID.
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
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
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
Module Name: Acpi.h
|
||||
|
||||
@par Revision Reference:
|
||||
GUIDs defined in UEFI 2.0 spec.
|
||||
|
||||
**/
|
||||
|
||||
#ifndef __ACPI_GUID_H__
|
||||
#define __ACPI_GUID_H__
|
||||
|
||||
#define EFI_ACPI_10_TABLE_GUID \
|
||||
{ \
|
||||
0xeb9d2d30, 0x2d88, 0x11d3, {0x9a, 0x16, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d } \
|
||||
}
|
||||
|
||||
#define EFI_ACPI_TABLE_GUID \
|
||||
{ \
|
||||
0x8868e871, 0xe4f1, 0x11d3, {0xbc, 0x22, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81 } \
|
||||
}
|
||||
|
||||
#define ACPI_10_TABLE_GUID EFI_ACPI_10_TABLE_GUID
|
||||
//
|
||||
// ACPI 2.0 or newer tables should use EFI_ACPI_TABLE_GUID.
|
||||
//
|
||||
#define EFI_ACPI_20_TABLE_GUID EFI_ACPI_TABLE_GUID
|
||||
#define EFI_ACPI_30_TABLE_GUID EFI_ACPI_TABLE_GUID
|
||||
|
||||
extern EFI_GUID gEfiAcpi10TableGuid;
|
||||
extern EFI_GUID gEfiAcpi20TableGuid;
|
||||
extern EFI_GUID gEfiAcpi30TableGuid;
|
||||
|
||||
#endif
|
30
Tools/Source/TianoTools/Include/Guid/AcpiTableStorage.h
Normal file
30
Tools/Source/TianoTools/Include/Guid/AcpiTableStorage.h
Normal file
@ -0,0 +1,30 @@
|
||||
/** @file
|
||||
The ACPI table storage file is fully FFS compliant.
|
||||
The file is a number of sections of type EFI_SECTION_RAW.
|
||||
This GUID is used to identify the file as an ACPI table storage file.
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
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
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
Module Name: AcpiTableStorage.h
|
||||
|
||||
@par Revision Reference:
|
||||
GUID defined in ACPI Table Storage Spec Version 0.9.
|
||||
|
||||
**/
|
||||
|
||||
#ifndef _ACPI_TABLE_STORAGE_H_
|
||||
#define _ACPI_TABLE_STORAGE_H_
|
||||
|
||||
#define EFI_ACPI_TABLE_STORAGE_GUID \
|
||||
{ 0x7e374e25, 0x8e01, 0x4fee, {0x87, 0xf2, 0x39, 0xc, 0x23, 0xc6, 0x6, 0xcd } }
|
||||
|
||||
extern EFI_GUID gEfiAcpiTableStorageGuid;
|
||||
|
||||
#endif
|
32
Tools/Source/TianoTools/Include/Guid/Apriori.h
Normal file
32
Tools/Source/TianoTools/Include/Guid/Apriori.h
Normal file
@ -0,0 +1,32 @@
|
||||
/** @file
|
||||
GUID used as an FV filename for A Priori file. The A Priori file contains a
|
||||
list of FV filenames that the DXE dispatcher will schedule reguardless of
|
||||
the dependency grammer.
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
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
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
Module Name: Apriori.h
|
||||
|
||||
@par Revision Reference:
|
||||
GUID defined in DXE CIS spec version 0.91B
|
||||
|
||||
**/
|
||||
|
||||
#ifndef __APRIORI_GUID_H__
|
||||
#define __APRIORI_GUID_H__
|
||||
|
||||
#define EFI_APRIORI_GUID \
|
||||
{ \
|
||||
0xfc510ee7, 0xffdc, 0x11d4, {0xbd, 0x41, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81 } \
|
||||
}
|
||||
|
||||
extern EFI_GUID gAprioriGuid;
|
||||
|
||||
#endif
|
43
Tools/Source/TianoTools/Include/Guid/Capsule.h
Normal file
43
Tools/Source/TianoTools/Include/Guid/Capsule.h
Normal file
@ -0,0 +1,43 @@
|
||||
/** @file
|
||||
GUIDs used for EFI Capsule
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
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
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
Module Name: Capsule.h
|
||||
|
||||
@par Revision Reference:
|
||||
GUIDs defined in Capsule Spec Version 0.9
|
||||
|
||||
**/
|
||||
|
||||
#ifndef __CAPSULE_GUID_H__
|
||||
#define __CAPSULE_GUID_H__
|
||||
|
||||
//
|
||||
// This is the GUID of the capsule header of the image on disk.
|
||||
//
|
||||
#define EFI_CAPSULE_GUID \
|
||||
{ \
|
||||
0x3B6686BD, 0x0D76, 0x4030, {0xB7, 0x0E, 0xB5, 0x51, 0x9E, 0x2F, 0xC5, 0xA0 } \
|
||||
}
|
||||
|
||||
//
|
||||
// This is the GUID of the configuration results file created by the capsule
|
||||
// application.
|
||||
//
|
||||
#define EFI_CONFIG_FILE_NAME_GUID \
|
||||
{ \
|
||||
0x98B8D59B, 0xE8BA, 0x48EE, {0x98, 0xDD, 0xC2, 0x95, 0x39, 0x2F, 0x1E, 0xDB } \
|
||||
}
|
||||
|
||||
extern EFI_GUID gEfiCapsuleGuid;
|
||||
extern EFI_GUID gEfiConfigFileNameGuid;
|
||||
|
||||
#endif
|
66
Tools/Source/TianoTools/Include/Guid/DataHubRecords.h
Normal file
66
Tools/Source/TianoTools/Include/Guid/DataHubRecords.h
Normal file
@ -0,0 +1,66 @@
|
||||
/** @file
|
||||
DataHubRecord.h include all data hub sub class GUID defitions.
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
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
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
Module Name: DataHubRecords.h
|
||||
|
||||
@par Revision Reference:
|
||||
These GUID are from Cache subclass spec 0.9, DataHub SubClass spec 0.9, Memory SubClass Spec 0.9,
|
||||
Processor Subclass spec 0.9, Misc SubClass spec 0.9.
|
||||
|
||||
**/
|
||||
#ifndef _DATAHUB_RECORDS_GUID_H_
|
||||
#define _DATAHUB_RECORDS_GUID_H_
|
||||
|
||||
#define EFI_PROCESSOR_PRODUCER_GUID \
|
||||
{ 0x1bf06aea, 0x5bec, 0x4a8d, {0x95, 0x76, 0x74, 0x9b, 0x09, 0x56, 0x2d, 0x30 } }
|
||||
|
||||
extern EFI_GUID gEfiProcessorProducerGuid;
|
||||
|
||||
|
||||
#define EFI_PROCESSOR_SUBCLASS_GUID \
|
||||
{ 0x26fdeb7e, 0xb8af, 0x4ccf, {0xaa, 0x97, 0x02, 0x63, 0x3c, 0xe4, 0x8c, 0xa7 } }
|
||||
|
||||
extern EFI_GUID gEfiProcessorSubClassGuid;
|
||||
|
||||
|
||||
#define EFI_CACHE_SUBCLASS_GUID \
|
||||
{ 0x7f0013a7, 0xdc79, 0x4b22, {0x80, 0x99, 0x11, 0xf7, 0x5f, 0xdc, 0x82, 0x9d } }
|
||||
|
||||
extern EFI_GUID gEfiCacheSubClassGuid;
|
||||
|
||||
|
||||
#define EFI_MEMORY_PRODUCER_GUID \
|
||||
{ 0x1d7add6e, 0xb2da, 0x4b0b, {0xb2, 0x9f, 0x49, 0xcb, 0x42, 0xf4, 0x63, 0x56 } }
|
||||
|
||||
extern EFI_GUID gEfiMemoryProducerGuid;
|
||||
|
||||
|
||||
#define EFI_MEMORY_SUBCLASS_GUID \
|
||||
{0x4E8F4EBB, 0x64B9, 0x4e05, {0x9B, 0x18, 0x4C, 0xFE, 0x49, 0x23, 0x50, 0x97} }
|
||||
|
||||
extern EFI_GUID gEfiMemorySubClassGuid;
|
||||
|
||||
|
||||
#define EFI_MISC_PRODUCER_GUID \
|
||||
{ 0x62512c92, 0x63c4, 0x4d80, {0x82, 0xb1, 0xc1, 0xa4, 0xdc, 0x44, 0x80, 0xe5 } }
|
||||
|
||||
extern EFI_GUID gEfiMiscProducerGuid;
|
||||
|
||||
|
||||
#define EFI_MISC_SUBCLASS_GUID \
|
||||
{ 0x772484B2, 0x7482, 0x4b91, {0x9F, 0x9A, 0xAD, 0x43, 0xF8, 0x1C, 0x58, 0x81 } }
|
||||
|
||||
extern EFI_GUID gEfiMiscSubClassGuid;
|
||||
|
||||
|
||||
#endif
|
||||
|
58
Tools/Source/TianoTools/Include/Guid/DebugImageInfoTable.h
Normal file
58
Tools/Source/TianoTools/Include/Guid/DebugImageInfoTable.h
Normal file
@ -0,0 +1,58 @@
|
||||
/** @file
|
||||
GUID and related data structures used with the Debug Image Info Table.
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
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
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
Module Name: DebugImageInfoTable.h
|
||||
|
||||
@par Revision Reference:
|
||||
GUID defined in UEFI 2.0 spec.
|
||||
|
||||
**/
|
||||
|
||||
#ifndef __DEBUG_IMAGE_INFO_GUID_H__
|
||||
#define __DEBUG_IMAGE_INFO_GUID_H__
|
||||
|
||||
#define EFI_DEBUG_IMAGE_INFO_TABLE_GUID \
|
||||
{ \
|
||||
0x49152e77, 0x1ada, 0x4764, {0xb7, 0xa2, 0x7a, 0xfe, 0xfe, 0xd9, 0x5e, 0x8b } \
|
||||
}
|
||||
|
||||
extern EFI_GUID gEfiDebugImageInfoTableGuid;
|
||||
|
||||
#define EFI_DEBUG_IMAGE_INFO_UPDATE_IN_PROGRESS 0x01
|
||||
#define EFI_DEBUG_IMAGE_INFO_TABLE_MODIFIED 0x02
|
||||
#define EFI_DEBUG_IMAGE_INFO_INITIAL_SIZE (EFI_PAGE_SIZE / sizeof (UINTN))
|
||||
#define EFI_DEBUG_IMAGE_INFO_TYPE_NORMAL 0x01
|
||||
|
||||
typedef struct {
|
||||
UINT64 Signature;
|
||||
EFI_PHYSICAL_ADDRESS EfiSystemTableBase;
|
||||
UINT32 Crc32;
|
||||
} EFI_SYSTEM_TABLE_POINTER;
|
||||
|
||||
typedef struct {
|
||||
UINT32 ImageInfoType;
|
||||
EFI_LOADED_IMAGE_PROTOCOL *LoadedImageProtocolInstance;
|
||||
EFI_HANDLE ImageHandle;
|
||||
} EFI_DEBUG_IMAGE_INFO_NORMAL;
|
||||
|
||||
typedef union {
|
||||
UINTN *ImageInfoType;
|
||||
EFI_DEBUG_IMAGE_INFO_NORMAL *NormalImage;
|
||||
} EFI_DEBUG_IMAGE_INFO;
|
||||
|
||||
typedef struct {
|
||||
volatile UINT32 UpdateStatus;
|
||||
UINT32 TableSize;
|
||||
EFI_DEBUG_IMAGE_INFO *EfiDebugImageInfoTable;
|
||||
} EFI_DEBUG_IMAGE_INFO_TABLE_HEADER;
|
||||
|
||||
#endif
|
30
Tools/Source/TianoTools/Include/Guid/DxeServices.h
Normal file
30
Tools/Source/TianoTools/Include/Guid/DxeServices.h
Normal file
@ -0,0 +1,30 @@
|
||||
/** @file
|
||||
GUID used to identify the DXE Services Table
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
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
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
Module Name: DxeServices.h
|
||||
|
||||
@par Revision Reference:
|
||||
GUID defined in DXE CIS spec version 0.91B
|
||||
|
||||
**/
|
||||
|
||||
#ifndef __DXE_SERVICES_GUID_H__
|
||||
#define __DXE_SERVICES_GUID_H__
|
||||
|
||||
#define EFI_DXE_SERVICES_TABLE_GUID \
|
||||
{ \
|
||||
0x5ad34ba, 0x6f02, 0x4214, {0x95, 0x2e, 0x4d, 0xa0, 0x39, 0x8e, 0x2b, 0xb9 } \
|
||||
}
|
||||
|
||||
extern EFI_GUID gEfiDxeServicesTableGuid;
|
||||
|
||||
#endif
|
45
Tools/Source/TianoTools/Include/Guid/EventGroup.h
Normal file
45
Tools/Source/TianoTools/Include/Guid/EventGroup.h
Normal file
@ -0,0 +1,45 @@
|
||||
/** @file
|
||||
GUIDs for gBS->CreateEventEx Event Groups. Defined in EFI 2.0.
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
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
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
Module Name: EventGroup.h
|
||||
|
||||
**/
|
||||
|
||||
#ifndef __EVENT_GROUP_GUID__
|
||||
#define __EVENT_GROUP_GUID__
|
||||
|
||||
|
||||
#define EFI_EVENT_GROUP_EXIT_BOOT_SERVICES \
|
||||
{ 0x27abf055, 0xb1b8, 0x4c26, { 0x80, 0x48, 0x74, 0x8f, 0x37, 0xba, 0xa2, 0xdf } }
|
||||
|
||||
extern EFI_GUID gEfiEventExitBootServicesGuid;
|
||||
|
||||
|
||||
#define EFI_EVENT_GROUP_VIRTUAL_ADDRESS_CHANGE \
|
||||
{ 0x13fa7698, 0xc831, 0x49c7, { 0x87, 0xea, 0x8f, 0x43, 0xfc, 0xc2, 0x51, 0x96 } }
|
||||
|
||||
extern EFI_GUID gEfiEventVirtualAddressChangeGuid;
|
||||
|
||||
|
||||
#define EFI_EVENT_GROUP_MEMORY_MAP_CHANGE \
|
||||
{ 0x78bee926, 0x692f, 0x48fd, { 0x9e, 0xdb, 0x1, 0x42, 0x2e, 0xf0, 0xd7, 0xab } }
|
||||
|
||||
extern EFI_GUID gEfiEventMemoryMapChangeGuid;
|
||||
|
||||
|
||||
#define EFI_EVENT_GROUP_READY_TO_BOOT \
|
||||
{ 0x7ce88fb3, 0x4bd7, 0x4679, { 0x87, 0xa8, 0xa8, 0xd8, 0xde, 0xe5, 0x0d, 0x2b } }
|
||||
|
||||
extern EFI_GUID gEfiEventReadyToBootGuid;
|
||||
|
||||
|
||||
#endif
|
28
Tools/Source/TianoTools/Include/Guid/EventLegacyBios.h
Normal file
28
Tools/Source/TianoTools/Include/Guid/EventLegacyBios.h
Normal file
@ -0,0 +1,28 @@
|
||||
/** @file
|
||||
GUID is the name of events used with CreateEventEx in order to be notified when the EFI boot manager is about to boot a legacy boot option. Events of this type are notificated just before Int19h is invoked.
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
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
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
Module Name: EventLegacyBios.h
|
||||
|
||||
@par Revision Reference:
|
||||
GUIDs defined in DXE CIS 0.91b.
|
||||
|
||||
**/
|
||||
|
||||
#ifndef __EVENT_LEGACY_BIOS_GUID_H__
|
||||
#define __EVENT_LEGACY_BIOS_GUID_H__
|
||||
|
||||
#define EFI_EVENT_LEGACY_BOOT_GUID \
|
||||
{ 0x2a571201, 0x4966, 0x47f6, {0x8b, 0x86, 0xf3, 0x1e, 0x41, 0xf3, 0x2f, 0x10 } }
|
||||
|
||||
extern EFI_GUID gEfiEventLegacyBootGuid;
|
||||
|
||||
#endif
|
40
Tools/Source/TianoTools/Include/Guid/FirmwareFileSystem.h
Normal file
40
Tools/Source/TianoTools/Include/Guid/FirmwareFileSystem.h
Normal file
@ -0,0 +1,40 @@
|
||||
/** @file
|
||||
Guid used to define the Firmware File System. See the Framework Firmware
|
||||
File System Specification for more details.
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
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
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
Module Name: FirmwareFileSystem.h
|
||||
|
||||
@par Revision Reference:
|
||||
Guids defined in Firmware File System Spec 0.9
|
||||
|
||||
**/
|
||||
|
||||
#ifndef __FIRMWARE_FILE_SYSTEM_GUID_H__
|
||||
#define __FIRMWARE_FILE_SYSTEM_GUID_H__
|
||||
|
||||
//
|
||||
// GUIDs defined by the FFS specification.
|
||||
//
|
||||
#define EFI_FIRMWARE_FILE_SYSTEM_GUID \
|
||||
{ \
|
||||
0x7A9354D9, 0x0468, 0x444a, {0x81, 0xCE, 0x0B, 0xF6, 0x17, 0xD8, 0x90, 0xDF } \
|
||||
}
|
||||
|
||||
#define EFI_FFS_VOLUME_TOP_FILE_GUID \
|
||||
{ \
|
||||
0x1BA0062E, 0xC779, 0x4582, {0x85, 0x66, 0x33, 0x6A, 0xE8, 0xF7, 0x8F, 0x9 } \
|
||||
}
|
||||
|
||||
extern EFI_GUID gEfiFirmwareFileSystemGuid;
|
||||
extern EFI_GUID gEfiFirmwareVolumeTopFileGuid;
|
||||
|
||||
#endif
|
29
Tools/Source/TianoTools/Include/Guid/FrameworkDevicePath.h
Normal file
29
Tools/Source/TianoTools/Include/Guid/FrameworkDevicePath.h
Normal file
@ -0,0 +1,29 @@
|
||||
/** @file
|
||||
This GUID is used to define a vendor specific device path being owned by the
|
||||
Framework specificaitons.
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
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
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
Module Name: FrameworkDevicePath.h
|
||||
|
||||
@par Revision Reference:
|
||||
Spec Version 0.9
|
||||
|
||||
**/
|
||||
|
||||
#ifndef __FRAMEWORK_DEVICE_PATH_GUID_H__
|
||||
#define __FRAMEWORK_DEVICE_PATH_GUID_H__
|
||||
|
||||
#define EFI_FRAMEWORK_DEVICE_PATH_GUID \
|
||||
{ 0xb7084e63, 0x46b7, 0x4d1a, { 0x86, 0x77, 0xe3, 0x0b, 0x53, 0xdb, 0xf0, 0x50 } }
|
||||
|
||||
extern EFI_GUID gEfiFrameworkDevicePathGuid;
|
||||
|
||||
#endif
|
31
Tools/Source/TianoTools/Include/Guid/GlobalVariable.h
Normal file
31
Tools/Source/TianoTools/Include/Guid/GlobalVariable.h
Normal file
@ -0,0 +1,31 @@
|
||||
/** @file
|
||||
GUID for EFI (NVRAM) Variables.
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
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
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
Module Name: GlobalVariable.h
|
||||
|
||||
@par Revision Reference:
|
||||
GUID defined in UEFI 2.0
|
||||
**/
|
||||
|
||||
#ifndef __GLOBAL_VARIABLE_GUID_H__
|
||||
#define __GLOBAL_VARIABLE_GUID_H__
|
||||
|
||||
#define EFI_GLOBAL_VARIABLE_GUID \
|
||||
{ \
|
||||
0x8BE4DF61, 0x93CA, 0x11d2, {0xAA, 0x0D, 0x00, 0xE0, 0x98, 0x03, 0x2B, 0x8C } \
|
||||
}
|
||||
|
||||
#define EFI_GLOBAL_VARIABLE EFI_GLOBAL_VARIABLE_GUID
|
||||
|
||||
extern EFI_GUID gEfiGlobalVariableGuid;
|
||||
|
||||
#endif
|
45
Tools/Source/TianoTools/Include/Guid/Gpt.h
Normal file
45
Tools/Source/TianoTools/Include/Guid/Gpt.h
Normal file
@ -0,0 +1,45 @@
|
||||
/** @file
|
||||
Guids used for the GPT (GUID Partition Table)
|
||||
|
||||
GPT defines a new disk partitioning scheme and also describes
|
||||
usage of the legacy Master Boot Record (MBR) partitioning scheme.
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
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
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
Module Name: Gpt.h
|
||||
|
||||
@par Revision Reference:
|
||||
GUIDs defined in UEFI 2.0 spec.
|
||||
|
||||
**/
|
||||
|
||||
#ifndef __GPT_GUID_H__
|
||||
#define __GPT_GUID_H__
|
||||
|
||||
#define EFI_PART_TYPE_UNUSED_GUID \
|
||||
{ \
|
||||
0x00000000, 0x0000, 0x0000, {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } \
|
||||
}
|
||||
|
||||
#define EFI_PART_TYPE_EFI_SYSTEM_PART_GUID \
|
||||
{ \
|
||||
0xc12a7328, 0xf81f, 0x11d2, {0xba, 0x4b, 0x00, 0xa0, 0xc9, 0x3e, 0xc9, 0x3b } \
|
||||
}
|
||||
|
||||
#define EFI_PART_TYPE_LEGACY_MBR_GUID \
|
||||
{ \
|
||||
0x024dee41, 0x33e7, 0x11d3, {0x9d, 0x69, 0x00, 0x08, 0xc7, 0x81, 0xf3, 0x9f } \
|
||||
}
|
||||
|
||||
extern EFI_GUID gEfiPartTypeUnusedGuid;
|
||||
extern EFI_GUID gEfiPartTypeSystemPartGuid;
|
||||
extern EFI_GUID gEfiPartTypeLegacyMbrGuid;
|
||||
|
||||
#endif
|
32
Tools/Source/TianoTools/Include/Guid/HobList.h
Normal file
32
Tools/Source/TianoTools/Include/Guid/HobList.h
Normal file
@ -0,0 +1,32 @@
|
||||
/** @file
|
||||
GUIDs used for HOB List entries
|
||||
|
||||
These GUIDs point the HOB List passed from PEI to DXE.
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
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
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
Module Name: HobList.h
|
||||
|
||||
@par Revision Reference:
|
||||
GUID defined in DXE CIS spec version 0.91
|
||||
|
||||
**/
|
||||
|
||||
#ifndef __HOB_LIST_GUID_H__
|
||||
#define __HOB_LIST_GUID_H__
|
||||
|
||||
#define EFI_HOB_LIST_GUID \
|
||||
{ \
|
||||
0x7739f24c, 0x93d7, 0x11d4, {0x9a, 0x3a, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d } \
|
||||
}
|
||||
|
||||
extern EFI_GUID gEfiHobListGuid;
|
||||
|
||||
#endif
|
36
Tools/Source/TianoTools/Include/Guid/MemoryAllocationHob.h
Normal file
36
Tools/Source/TianoTools/Include/Guid/MemoryAllocationHob.h
Normal file
@ -0,0 +1,36 @@
|
||||
/** @file
|
||||
GUIDs for HOBs used in memory allcation
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
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
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
Module Name: MemoryAllocationHob.h
|
||||
|
||||
@par Revision Reference:
|
||||
GUID defined in Hob Spec Version 0.9
|
||||
|
||||
**/
|
||||
|
||||
#ifndef __MEMORY_ALLOCATION_GUID_H__
|
||||
#define __MEMORY_ALLOCATION_GUID_H__
|
||||
|
||||
#define EFI_HOB_MEMORY_ALLOC_BSP_STORE_GUID \
|
||||
{0x564b33cd, 0xc92a, 0x4593, {0x90, 0xbf, 0x24, 0x73, 0xe4, 0x3c, 0x63, 0x22} };
|
||||
|
||||
#define EFI_HOB_MEMORY_ALLOC_STACK_GUID \
|
||||
{0x4ed4bf27, 0x4092, 0x42e9, {0x80, 0x7d, 0x52, 0x7b, 0x1d, 0x0, 0xc9, 0xbd} }
|
||||
|
||||
#define EFI_HOB_MEMORY_ALLOC_MODULE_GUID \
|
||||
{0xf8e21975, 0x899, 0x4f58, {0xa4, 0xbe, 0x55, 0x25, 0xa9, 0xc6, 0xd7, 0x7a} }
|
||||
|
||||
extern EFI_GUID gEfiHobMemoryAllocBspStoreGuid;
|
||||
extern EFI_GUID gEfiHobMemoryAllocStackGuid;
|
||||
extern EFI_GUID gEfiHobMemoryAllocModuleGuid;
|
||||
|
||||
#endif
|
48
Tools/Source/TianoTools/Include/Guid/PcAnsi.h
Normal file
48
Tools/Source/TianoTools/Include/Guid/PcAnsi.h
Normal file
@ -0,0 +1,48 @@
|
||||
/** @file
|
||||
Terminal Device Path Vendor Guid.
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
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
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
Module Name: PcAnsi.h
|
||||
|
||||
@par Revision Reference:
|
||||
GUIDs defined in UEFI 2.0 spec.
|
||||
|
||||
**/
|
||||
|
||||
#ifndef __PC_ANSI_H__
|
||||
#define __PC_ANSI_H__
|
||||
|
||||
#define EFI_PC_ANSI_GUID \
|
||||
{ \
|
||||
0xe0c14753, 0xf9be, 0x11d2, {0x9a, 0x0c, 0x00, 0x90, 0x27, 0x3f, 0xc1, 0x4d } \
|
||||
}
|
||||
|
||||
#define EFI_VT_100_GUID \
|
||||
{ \
|
||||
0xdfa66065, 0xb419, 0x11d3, {0x9a, 0x2d, 0x00, 0x90, 0x27, 0x3f, 0xc1, 0x4d } \
|
||||
}
|
||||
|
||||
#define EFI_VT_100_PLUS_GUID \
|
||||
{ \
|
||||
0x7baec70b, 0x57e0, 0x4c76, {0x8e, 0x87, 0x2f, 0x9e, 0x28, 0x08, 0x83, 0x43 } \
|
||||
}
|
||||
|
||||
#define EFI_VT_UTF8_GUID \
|
||||
{ \
|
||||
0xad15a0d6, 0x8bec, 0x4acf, {0xa0, 0x73, 0xd0, 0x1d, 0xe7, 0x7e, 0x2d, 0x88 } \
|
||||
}
|
||||
|
||||
extern EFI_GUID gEfiPcAnsiGuid;
|
||||
extern EFI_GUID gEfiVT100Guid;
|
||||
extern EFI_GUID gEfiVT100PlusGuid;
|
||||
extern EFI_GUID gEfiVTUTF8Guid;
|
||||
|
||||
#endif
|
38
Tools/Source/TianoTools/Include/Guid/SalSystemTable.h
Normal file
38
Tools/Source/TianoTools/Include/Guid/SalSystemTable.h
Normal file
@ -0,0 +1,38 @@
|
||||
/** @file
|
||||
GUIDs used for SAL system table entries in the EFI system table.
|
||||
|
||||
SAL System Table contains Itanium-based processor centric information about
|
||||
the system.
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
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
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
Module Name: SalSystemTable.h
|
||||
|
||||
@par Revision Reference:
|
||||
GUIDs defined in UEFI 2.0 spec.
|
||||
|
||||
**/
|
||||
|
||||
#ifndef __SAL_SYSTEM_TABLE_GUID_H__
|
||||
#define __SAL_SYSTEM_TABLE_GUID_H__
|
||||
|
||||
#define EFI_SAL_SYSTEM_TABLE_GUID \
|
||||
{ \
|
||||
0xeb9d2d32, 0x2d88, 0x11d3, {0x9a, 0x16, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d } \
|
||||
}
|
||||
|
||||
//
|
||||
// GUID name defined in spec.
|
||||
//
|
||||
#define SAL_SYSTEM_TABLE_GUID EFI_SAL_SYSTEM_TABLE_GUID
|
||||
|
||||
extern EFI_GUID gEfiSalSystemTableGuid;
|
||||
|
||||
#endif
|
68
Tools/Source/TianoTools/Include/Guid/SmBios.h
Normal file
68
Tools/Source/TianoTools/Include/Guid/SmBios.h
Normal file
@ -0,0 +1,68 @@
|
||||
/** @file
|
||||
GUIDs used to locate the SMBIOS tables in the EFI 1.0 system table.
|
||||
|
||||
This GUID in the system table is the only legal way to search for and
|
||||
locate the SMBIOS tables. Do not search the 0xF0000 segment to find SMBIOS
|
||||
tables.
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
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
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
Module Name: SmBios.h
|
||||
|
||||
@par Revision Reference:
|
||||
GUIDs defined in UEFI 2.0 spec.
|
||||
|
||||
**/
|
||||
|
||||
#ifndef __SMBIOS_GUID_H__
|
||||
#define __SMBIOS_GUID_H__
|
||||
|
||||
#define EFI_SMBIOS_TABLE_GUID \
|
||||
{ \
|
||||
0xeb9d2d31, 0x2d88, 0x11d3, {0x9a, 0x16, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d } \
|
||||
}
|
||||
|
||||
#define SMBIOS_TABLE_GUID EFI_SMBIOS_TABLE_GUID
|
||||
|
||||
//
|
||||
// Smbios Table Entry Point Structure
|
||||
//
|
||||
#pragma pack(1)
|
||||
typedef struct {
|
||||
UINT8 AnchorString[4];
|
||||
UINT8 EntryPointStructureChecksum;
|
||||
UINT8 EntryPointLength;
|
||||
UINT8 MajorVersion;
|
||||
UINT8 MinorVersion;
|
||||
UINT16 MaxStructureSize;
|
||||
UINT8 EntryPointRevision;
|
||||
UINT8 FormattedArea[5];
|
||||
UINT8 IntermediateAnchorString[5];
|
||||
UINT8 IntermediateChecksum;
|
||||
UINT16 TableLength;
|
||||
UINT32 TableAddress;
|
||||
UINT16 NumberOfSmbiosStructures;
|
||||
UINT8 SmbiosBcdRevision;
|
||||
} SMBIOS_TABLE_ENTRY_POINT;
|
||||
|
||||
//
|
||||
// The Smbios structure header
|
||||
//
|
||||
typedef struct {
|
||||
UINT8 Type;
|
||||
UINT8 Length;
|
||||
UINT16 Handle;
|
||||
} SMBIOS_STRUCTURE;
|
||||
|
||||
#pragma pack()
|
||||
|
||||
extern EFI_GUID gEfiSmbiosTableGuid;
|
||||
|
||||
#endif
|
39
Tools/Source/TianoTools/Include/Guid/SmmCommunicate.h
Normal file
39
Tools/Source/TianoTools/Include/Guid/SmmCommunicate.h
Normal file
@ -0,0 +1,39 @@
|
||||
/** @file
|
||||
Definitions EFI_SMM_COMMUNICATE_HEADER used by EFI_SMM_BASE_PROTOCOL.Communicate() functions
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
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
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
Module Name: SmmCommunicate.h
|
||||
|
||||
@par Revision Reference:
|
||||
GUIDs defined in SmmCis spec version 0.9
|
||||
|
||||
**/
|
||||
|
||||
#ifndef __SMM_COMMUNICATE_GUID_H__
|
||||
#define __SMM_COMMUNICATE_GUID_H__
|
||||
|
||||
//******************************************************
|
||||
// EFI_SMM_COMMUNICATE_HEADER
|
||||
//******************************************************
|
||||
#define SMM_COMMUNICATE_HEADER_GUID \
|
||||
{ \
|
||||
0xf328e36c, 0x23b6, 0x4a95, {0x85, 0x4b, 0x32, 0xe1, 0x95, 0x34, 0xcd, 0x75 } \
|
||||
}
|
||||
|
||||
typedef struct {
|
||||
EFI_GUID HeaderGuid;
|
||||
UINTN MessageLength;
|
||||
UINT8 Data[1];
|
||||
} EFI_SMM_COMMUNICATE_HEADER;
|
||||
|
||||
extern EFI_GUID gSmmCommunicateHeaderGuid;
|
||||
|
||||
#endif
|
67
Tools/Source/TianoTools/Include/Guid/SmramMemoryReserve.h
Normal file
67
Tools/Source/TianoTools/Include/Guid/SmramMemoryReserve.h
Normal file
@ -0,0 +1,67 @@
|
||||
/** @file
|
||||
GUID for use in reserving SMRAM regions.
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
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
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
Module Name: SmramMemoryReserve.h
|
||||
|
||||
@par Revision Reference:
|
||||
GUIDs defined in SmmCis spec version 0.9
|
||||
|
||||
**/
|
||||
|
||||
#ifndef _EFI_SMM_PEI_SMRAM_MEMORY_RESERVE_H_
|
||||
#define _EFI_SMM_PEI_SMRAM_MEMORY_RESERVE_H_
|
||||
|
||||
#define EFI_SMM_PEI_SMRAM_MEMORY_RESERVE \
|
||||
{ \
|
||||
0x6dadf1d1, 0xd4cc, 0x4910, {0xbb, 0x6e, 0x82, 0xb1, 0xfd, 0x80, 0xff, 0x3d } \
|
||||
}
|
||||
|
||||
//
|
||||
// *******************************************************
|
||||
// EFI_SMRAM_DESCRIPTOR
|
||||
// *******************************************************
|
||||
//
|
||||
typedef struct {
|
||||
EFI_PHYSICAL_ADDRESS PhysicalStart; // Phsyical location in DRAM
|
||||
EFI_PHYSICAL_ADDRESS CpuStart; // Address CPU uses to access the SMI handler
|
||||
// May or may not match PhysicalStart
|
||||
//
|
||||
UINT64 PhysicalSize;
|
||||
UINT64 RegionState;
|
||||
} EFI_SMRAM_DESCRIPTOR;
|
||||
|
||||
//
|
||||
// *******************************************************
|
||||
// EFI_SMRAM_STATE
|
||||
// *******************************************************
|
||||
//
|
||||
#define EFI_SMRAM_OPEN 0x00000001
|
||||
#define EFI_SMRAM_CLOSED 0x00000002
|
||||
#define EFI_SMRAM_LOCKED 0x00000004
|
||||
#define EFI_CACHEABLE 0x00000008
|
||||
#define EFI_ALLOCATED 0x00000010
|
||||
#define EFI_NEEDS_TESTING 0x00000020
|
||||
#define EFI_NEEDS_ECC_INITIALIZATION 0x00000040
|
||||
|
||||
//
|
||||
// *******************************************************
|
||||
// EFI_SMRAM_HOB_DESCRIPTOR_BLOCK
|
||||
// *******************************************************
|
||||
//
|
||||
typedef struct {
|
||||
UINTN NumberOfSmmReservedRegions;
|
||||
EFI_SMRAM_DESCRIPTOR Descriptor[1];
|
||||
} EFI_SMRAM_HOB_DESCRIPTOR_BLOCK;
|
||||
|
||||
extern EFI_GUID gEfiSmmPeiSmramMemoryReserve;
|
||||
|
||||
#endif
|
82
Tools/Source/TianoTools/Include/Guid/StatusCodeDataTypeId.h
Normal file
82
Tools/Source/TianoTools/Include/Guid/StatusCodeDataTypeId.h
Normal file
@ -0,0 +1,82 @@
|
||||
/** @file
|
||||
GUID used to identify id for the caller who is initiating the Status Code.
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
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
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
Module Name: StatusCodeDataTypeId.h
|
||||
|
||||
@par Revision Reference:
|
||||
GUIDs defined in Status Codes Specification 0.92
|
||||
|
||||
**/
|
||||
|
||||
#ifndef __STATUS_CODE_DATA_TYPE_ID_GUID_H__
|
||||
#define __STATUS_CODE_DATA_TYPE_ID_GUID_H__
|
||||
|
||||
//
|
||||
// String Data Type defintion. This is part of Status Code Specification
|
||||
//
|
||||
#define EFI_STATUS_CODE_DATA_TYPE_STRING_GUID \
|
||||
{ 0x92D11080, 0x496F, 0x4D95, { 0xBE, 0x7E, 0x03, 0x74, 0x88, 0x38, 0x2B, 0x0A } }
|
||||
|
||||
extern EFI_GUID gEfiStatusCodeDataTypeStringGuid;
|
||||
|
||||
//
|
||||
// This GUID indicates that the format of the accompanying data depends
|
||||
// upon the Status Code Value, but follows this Specification
|
||||
//
|
||||
#define EFI_STATUS_CODE_SPECIFIC_DATA_GUID \
|
||||
{ 0x335984bd, 0xe805, 0x409a, { 0xb8, 0xf8, 0xd2, 0x7e, 0xce, 0x5f, 0xf7, 0xa6 } }
|
||||
|
||||
extern EFI_GUID gEfiStatusCodeSpecificDataGuid;
|
||||
|
||||
//
|
||||
// Debug Assert Data. This is part of Status Code Specification
|
||||
//
|
||||
#define EFI_STATUS_CODE_DATA_TYPE_ASSERT_GUID \
|
||||
{ 0xDA571595, 0x4D99, 0x487C, { 0x82, 0x7C, 0x26, 0x22, 0x67, 0x7D, 0x33, 0x07 } }
|
||||
|
||||
|
||||
extern EFI_GUID gEfiStatusCodeDataTypeAssertGuid;
|
||||
|
||||
//
|
||||
// Exception Data type (CPU REGS)
|
||||
//
|
||||
#define EFI_STATUS_CODE_DATA_TYPE_EXCEPTION_HANDLER_GUID \
|
||||
{ 0x3BC2BD12, 0xAD2E, 0x11D5, { 0x87, 0xDD, 0x00, 0x06, 0x29, 0x45, 0xC3, 0xB9 } }
|
||||
|
||||
extern EFI_GUID gEfiStatusCodeDataTypeExceptionHandlerGuid;
|
||||
|
||||
//
|
||||
// Debug DataType defintions. User Defined Data Types.
|
||||
//
|
||||
#define EFI_STATUS_CODE_DATA_TYPE_DEBUG_GUID \
|
||||
{ 0x9A4E9246, 0xD553, 0x11D5, { 0x87, 0xE2, 0x00, 0x06, 0x29, 0x45, 0xC3, 0xb9 } }
|
||||
|
||||
extern EFI_GUID gEfiStatusCodeDataTypeDebugGuid;
|
||||
|
||||
//
|
||||
// Progress Code. User Defined Data Type Guid.
|
||||
//
|
||||
#define EFI_STATUS_CODE_DATA_TYPE_ERROR_GUID \
|
||||
0xAB359CE3, 0x99B3, 0xAE18, { 0xC8, 0x9D, 0x95, 0xD3, 0xB0, 0x72, 0xE1, 0x9B } }
|
||||
|
||||
extern EFI_GUID gEfiStatusCodeDataTypeErrorGuid;
|
||||
|
||||
|
||||
//
|
||||
// Progress Code. User Defined Data Type Guid.
|
||||
//
|
||||
#define EFI_STATUS_CODE_DATA_TYPE_PROGRESS_CODE_GUID \
|
||||
{ 0xA356AB39, 0x35C4, 0x35DA, { 0xB3, 0x7A, 0xF8, 0xEA, 0x9E, 0x8B, 0x36, 0xA3 } }
|
||||
|
||||
extern EFI_GUID gEfiStatusCodeDataTypeProgressCodeGuid;
|
||||
|
||||
#endif
|
167
Tools/Source/TianoTools/Include/Ia32/ProcessorBind.h
Normal file
167
Tools/Source/TianoTools/Include/Ia32/ProcessorBind.h
Normal file
@ -0,0 +1,167 @@
|
||||
/** @file
|
||||
Processor or Compiler specific defines and types for x64.
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
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
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
Module Name: ProcessorBind.h
|
||||
|
||||
**/
|
||||
|
||||
#ifndef __PROCESSOR_BIND_H__
|
||||
#define __PROCESSOR_BIND_H__
|
||||
|
||||
//
|
||||
// Define the processor type so other code can make processor based choices
|
||||
//
|
||||
#define MDE_CPU_IA32
|
||||
|
||||
//
|
||||
// Make sure we are useing the correct packing rules per EFI specification
|
||||
//
|
||||
#ifndef __GNUC__
|
||||
#pragma pack()
|
||||
#endif
|
||||
|
||||
#if _MSC_EXTENSIONS
|
||||
|
||||
//
|
||||
// Disable warning that make it impossible to compile at /W4
|
||||
// This only works for Microsoft* tools
|
||||
//
|
||||
|
||||
//
|
||||
// Disabling bitfield type checking warnings.
|
||||
//
|
||||
#pragma warning ( disable : 4214 )
|
||||
|
||||
//
|
||||
// Disabling the unreferenced formal parameter warnings.
|
||||
//
|
||||
#pragma warning ( disable : 4100 )
|
||||
|
||||
//
|
||||
// Disable slightly different base types warning as CHAR8 * can not be set
|
||||
// to a constant string.
|
||||
//
|
||||
#pragma warning ( disable : 4057 )
|
||||
|
||||
//
|
||||
// ASSERT(FALSE) or while (TRUE) are legal constructes so supress this warning
|
||||
//
|
||||
#pragma warning ( disable : 4127 )
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#if !defined(__GNUC__) && (__STDC_VERSION__ < 199901L)
|
||||
//
|
||||
// No ANSI C 2000 stdint.h integer width declarations, so define equivalents
|
||||
//
|
||||
|
||||
#if _MSC_EXTENSIONS
|
||||
|
||||
//
|
||||
// use Microsoft* C complier dependent interger width types
|
||||
//
|
||||
typedef unsigned __int64 UINT64;
|
||||
typedef __int64 INT64;
|
||||
typedef unsigned __int32 UINT32;
|
||||
typedef __int32 INT32;
|
||||
typedef unsigned short UINT16;
|
||||
typedef unsigned short CHAR16;
|
||||
typedef short INT16;
|
||||
typedef unsigned char BOOLEAN;
|
||||
typedef unsigned char UINT8;
|
||||
typedef char CHAR8;
|
||||
typedef char INT8;
|
||||
#else
|
||||
|
||||
//
|
||||
// Assume standard IA-32 alignment.
|
||||
// BugBug: Need to check portability of long long
|
||||
//
|
||||
typedef unsigned long long UINT64;
|
||||
typedef long long INT64;
|
||||
typedef unsigned int UINT32;
|
||||
typedef int INT32;
|
||||
typedef unsigned short UINT16;
|
||||
typedef unsigned short CHAR16;
|
||||
typedef short INT16;
|
||||
typedef unsigned char BOOLEAN;
|
||||
typedef unsigned char UINT8;
|
||||
typedef char CHAR8;
|
||||
typedef char INT8;
|
||||
#endif
|
||||
|
||||
#define UINT8_MAX 0xff
|
||||
|
||||
#else
|
||||
//
|
||||
// Use ANSI C 2000 stdint.h integer width declarations
|
||||
//
|
||||
#include "stdint.h"
|
||||
typedef uint8_t BOOLEAN;
|
||||
typedef int8_t INT8;
|
||||
typedef uint8_t UINT8;
|
||||
typedef int16_t INT16;
|
||||
typedef uint16_t UINT16;
|
||||
typedef int32_t INT32;
|
||||
typedef uint32_t UINT32;
|
||||
typedef int64_t INT64;
|
||||
typedef uint64_t UINT64;
|
||||
typedef char CHAR8;
|
||||
typedef uint16_t CHAR16;
|
||||
|
||||
#endif
|
||||
|
||||
typedef UINT32 UINTN;
|
||||
typedef INT32 INTN;
|
||||
|
||||
|
||||
//
|
||||
// Processor specific defines
|
||||
//
|
||||
#define MAX_BIT 0x80000000
|
||||
#define MAX_2_BITS 0xC0000000
|
||||
|
||||
//
|
||||
// Maximum legal IA-32 address
|
||||
//
|
||||
#define MAX_ADDRESS 0xFFFFFFFF
|
||||
|
||||
//
|
||||
// Modifier to ensure that all protocol member functions and EFI intrinsics
|
||||
// use the correct C calling convention. All protocol member functions and
|
||||
// EFI intrinsics are required to modify thier member functions with EFIAPI.
|
||||
//
|
||||
#if _MSC_EXTENSIONS
|
||||
//
|
||||
// Microsoft* compiler requires _EFIAPI useage, __cdecl is Microsoft* specific C.
|
||||
//
|
||||
#define EFIAPI __cdecl
|
||||
#endif
|
||||
|
||||
#if __GNUC__
|
||||
#define EFIAPI __attribute__((cdecl))
|
||||
#endif
|
||||
|
||||
//
|
||||
// The Microsoft* C compiler can removed references to unreferenced data items
|
||||
// if the /OPT:REF linker option is used. We defined a macro as this is a
|
||||
// a non standard extension
|
||||
//
|
||||
#if _MSC_EXTENSIONS
|
||||
#define GLOBAL_REMOVE_IF_UNREFERENCED __declspec(selectany)
|
||||
#else
|
||||
#define GLOBAL_REMOVE_IF_UNREFERENCED
|
||||
#endif
|
||||
|
||||
#endif
|
282
Tools/Source/TianoTools/Include/IndustryStandard/Usb.h
Normal file
282
Tools/Source/TianoTools/Include/IndustryStandard/Usb.h
Normal file
@ -0,0 +1,282 @@
|
||||
/** @file
|
||||
Support for USB 1.1 standard.
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
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
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
Module Name: Usb.h
|
||||
|
||||
**/
|
||||
|
||||
#ifndef __USB_H__
|
||||
#define __USB_H__
|
||||
|
||||
//
|
||||
// USB Descriptor types
|
||||
//
|
||||
#define USB_DT_DEVICE 0x01
|
||||
#define USB_DT_CONFIG 0x02
|
||||
#define USB_DT_STRING 0x03
|
||||
#define USB_DT_INTERFACE 0x04
|
||||
#define USB_DT_ENDPOINT 0x05
|
||||
#define USB_DT_HUB 0x29
|
||||
#define USB_DT_HID 0x21
|
||||
|
||||
//
|
||||
// USB request type
|
||||
//
|
||||
#define USB_TYPE_STANDARD (0x00 << 5)
|
||||
#define USB_TYPE_CLASS (0x01 << 5)
|
||||
#define USB_TYPE_VENDOR (0x02 << 5)
|
||||
#define USB_TYPE_RESERVED (0x03 << 5)
|
||||
|
||||
//
|
||||
// USB request targer device
|
||||
//
|
||||
#define USB_RECIP_DEVICE 0x00
|
||||
#define USB_RECIP_INTERFACE 0x01
|
||||
#define USB_RECIP_ENDPOINT 0x02
|
||||
#define USB_RECIP_OTHER 0x03
|
||||
|
||||
//
|
||||
// Request target types.
|
||||
//
|
||||
#define USB_RT_DEVICE 0x00
|
||||
#define USB_RT_INTERFACE 0x01
|
||||
#define USB_RT_ENDPOINT 0x02
|
||||
#define USB_RT_HUB (USB_TYPE_CLASS | USB_RECIP_DEVICE)
|
||||
#define USB_RT_PORT (USB_TYPE_CLASS | USB_RECIP_OTHER)
|
||||
|
||||
//
|
||||
// USB Transfer Results
|
||||
//
|
||||
#define EFI_USB_NOERROR 0x00
|
||||
#define EFI_USB_ERR_NOTEXECUTE 0x01
|
||||
#define EFI_USB_ERR_STALL 0x02
|
||||
#define EFI_USB_ERR_BUFFER 0x04
|
||||
#define EFI_USB_ERR_BABBLE 0x08
|
||||
#define EFI_USB_ERR_NAK 0x10
|
||||
#define EFI_USB_ERR_CRC 0x20
|
||||
#define EFI_USB_ERR_TIMEOUT 0x40
|
||||
#define EFI_USB_ERR_BITSTUFF 0x80
|
||||
#define EFI_USB_ERR_SYSTEM 0x100
|
||||
|
||||
//
|
||||
//Use 200 ms to increase the error handling response time
|
||||
//
|
||||
#define EFI_USB_INTERRUPT_DELAY 2000000
|
||||
|
||||
//
|
||||
// USB transation direction
|
||||
//
|
||||
typedef enum {
|
||||
EfiUsbDataOut,
|
||||
EfiUsbDataIn,
|
||||
EfiUsbNoData
|
||||
} EFI_USB_DATA_DIRECTION;
|
||||
|
||||
//
|
||||
// Usb Data recipient type
|
||||
//
|
||||
typedef enum {
|
||||
EfiUsbDevice,
|
||||
EfiUsbInterface,
|
||||
EfiUsbEndpoint
|
||||
} EFI_USB_RECIPIENT;
|
||||
|
||||
typedef enum {
|
||||
EfiUsbEndpointHalt,
|
||||
EfiUsbDeviceRemoteWakeup
|
||||
} EFI_USB_STANDARD_FEATURE_SELECTOR;
|
||||
|
||||
#pragma pack(1)
|
||||
//
|
||||
// Usb device request structure
|
||||
//
|
||||
typedef struct {
|
||||
UINT8 RequestType;
|
||||
UINT8 Request;
|
||||
UINT16 Value;
|
||||
UINT16 Index;
|
||||
UINT16 Length;
|
||||
} EFI_USB_DEVICE_REQUEST;
|
||||
|
||||
//
|
||||
// Standard USB request
|
||||
//
|
||||
#define USB_DEV_GET_STATUS 0x00
|
||||
|
||||
#define USB_DEV_CLEAR_FEATURE 0x01
|
||||
|
||||
#define USB_DEV_SET_FEATURE 0x03
|
||||
|
||||
#define USB_DEV_SET_ADDRESS 0x05
|
||||
#define USB_DEV_SET_ADDRESS_REQ_TYPE 0x00
|
||||
|
||||
#define USB_DEV_GET_DESCRIPTOR 0x06
|
||||
#define USB_DEV_GET_DESCRIPTOR_REQ_TYPE 0x80
|
||||
|
||||
#define USB_DEV_SET_DESCRIPTOR 0x07
|
||||
#define USB_DEV_SET_DESCRIPTOR_REQ_TYPE 0x00
|
||||
|
||||
#define USB_DEV_GET_CONFIGURATION 0x08
|
||||
#define USB_DEV_GET_CONFIGURATION_REQ_TYPE 0x80
|
||||
|
||||
#define USB_DEV_SET_CONFIGURATION 0x09
|
||||
#define USB_DEV_SET_CONFIGURATION_REQ_TYPE 0x00
|
||||
|
||||
#define USB_DEV_GET_INTERFACE 0x0A
|
||||
#define USB_DEV_GET_INTERFACE_REQ_TYPE 0x81
|
||||
|
||||
#define USB_DEV_SET_INTERFACE 0x0B
|
||||
#define USB_DEV_SET_INTERFACE_REQ_TYPE 0x01
|
||||
|
||||
#define USB_DEV_SYNCH_FRAME 0x0C
|
||||
#define USB_DEV_SYNCH_FRAME_REQ_TYPE 0x82
|
||||
|
||||
//
|
||||
// Device descriptor. refer USB1.1
|
||||
//
|
||||
typedef struct usb_device_descriptor {
|
||||
UINT8 Length;
|
||||
UINT8 DescriptorType;
|
||||
UINT16 BcdUSB;
|
||||
UINT8 DeviceClass;
|
||||
UINT8 DeviceSubClass;
|
||||
UINT8 DeviceProtocol;
|
||||
UINT8 MaxPacketSize0;
|
||||
UINT16 IdVendor;
|
||||
UINT16 IdProduct;
|
||||
UINT16 BcdDevice;
|
||||
UINT8 StrManufacturer;
|
||||
UINT8 StrProduct;
|
||||
UINT8 StrSerialNumber;
|
||||
UINT8 NumConfigurations;
|
||||
} EFI_USB_DEVICE_DESCRIPTOR;
|
||||
|
||||
//
|
||||
// Endpoint descriptor
|
||||
//
|
||||
typedef struct {
|
||||
UINT8 Length;
|
||||
UINT8 DescriptorType;
|
||||
UINT8 EndpointAddress;
|
||||
UINT8 Attributes;
|
||||
UINT16 MaxPacketSize;
|
||||
UINT8 Interval;
|
||||
} EFI_USB_ENDPOINT_DESCRIPTOR;
|
||||
|
||||
//
|
||||
// Interface descriptor
|
||||
//
|
||||
typedef struct {
|
||||
UINT8 Length;
|
||||
UINT8 DescriptorType;
|
||||
UINT8 InterfaceNumber;
|
||||
UINT8 AlternateSetting;
|
||||
UINT8 NumEndpoints;
|
||||
UINT8 InterfaceClass;
|
||||
UINT8 InterfaceSubClass;
|
||||
UINT8 InterfaceProtocol;
|
||||
UINT8 Interface;
|
||||
} EFI_USB_INTERFACE_DESCRIPTOR;
|
||||
|
||||
//
|
||||
// USB alternate setting
|
||||
//
|
||||
typedef struct {
|
||||
EFI_USB_INTERFACE_DESCRIPTOR *Interface;
|
||||
} USB_ALT_SETTING;
|
||||
|
||||
//
|
||||
// Configuration descriptor
|
||||
//
|
||||
typedef struct {
|
||||
UINT8 Length;
|
||||
UINT8 DescriptorType;
|
||||
UINT16 TotalLength;
|
||||
UINT8 NumInterfaces;
|
||||
UINT8 ConfigurationValue;
|
||||
UINT8 Configuration;
|
||||
UINT8 Attributes;
|
||||
UINT8 MaxPower;
|
||||
} EFI_USB_CONFIG_DESCRIPTOR;
|
||||
|
||||
//
|
||||
// Supported String Languages
|
||||
//
|
||||
typedef struct {
|
||||
UINT8 Length;
|
||||
UINT8 DescriptorType;
|
||||
UINT16 SupportedLanID[1];
|
||||
} EFI_USB_SUPPORTED_LANGUAGES;
|
||||
|
||||
//
|
||||
// String descriptor
|
||||
//
|
||||
typedef struct {
|
||||
UINT8 Length;
|
||||
UINT8 DescriptorType;
|
||||
CHAR16 String[1];
|
||||
} EFI_USB_STRING_DESCRIPTOR;
|
||||
|
||||
//
|
||||
// Hub descriptor
|
||||
//
|
||||
#define MAXBYTES 8
|
||||
typedef struct {
|
||||
UINT8 Length;
|
||||
UINT8 DescriptorType;
|
||||
UINT8 NbrPorts;
|
||||
UINT8 HubCharacteristics[2];
|
||||
UINT8 PwrOn2PwrGood;
|
||||
UINT8 HubContrCurrent;
|
||||
UINT8 Filler[MAXBYTES];
|
||||
} EFI_USB_HUB_DESCRIPTOR;
|
||||
|
||||
typedef struct {
|
||||
UINT16 PortStatus;
|
||||
UINT16 PortChangeStatus;
|
||||
} EFI_USB_PORT_STATUS;
|
||||
|
||||
//
|
||||
// Constant value for Port Status & Port Change Status
|
||||
//
|
||||
#define USB_PORT_STAT_CONNECTION 0x0001
|
||||
#define USB_PORT_STAT_ENABLE 0x0002
|
||||
#define USB_PORT_STAT_SUSPEND 0x0004
|
||||
#define USB_PORT_STAT_OVERCURRENT 0x0008
|
||||
#define USB_PORT_STAT_RESET 0x0010
|
||||
#define USB_PORT_STAT_POWER 0x0100
|
||||
#define USB_PORT_STAT_LOW_SPEED 0x0200
|
||||
|
||||
#define USB_PORT_STAT_C_CONNECTION 0x0001
|
||||
#define USB_PORT_STAT_C_ENABLE 0x0002
|
||||
#define USB_PORT_STAT_C_SUSPEND 0x0004
|
||||
#define USB_PORT_STAT_C_OVERCURRENT 0x0008
|
||||
#define USB_PORT_STAT_C_RESET 0x0010
|
||||
|
||||
//
|
||||
// Used for set/clear port feature request
|
||||
//
|
||||
typedef enum {
|
||||
EfiUsbPortEnable = 1,
|
||||
EfiUsbPortSuspend = 2,
|
||||
EfiUsbPortReset = 4,
|
||||
EfiUsbPortPower = 8,
|
||||
EfiUsbPortConnectChange = 16,
|
||||
EfiUsbPortEnableChange = 17,
|
||||
EfiUsbPortSuspendChange = 18,
|
||||
EfiUsbPortOverCurrentChange = 19,
|
||||
EfiUsbPortResetChange = 20
|
||||
} EFI_USB_PORT_FEATURE;
|
||||
|
||||
#pragma pack()
|
||||
|
||||
#endif
|
481
Tools/Source/TianoTools/Include/IndustryStandard/pci22.h
Normal file
481
Tools/Source/TianoTools/Include/IndustryStandard/pci22.h
Normal file
@ -0,0 +1,481 @@
|
||||
/** @file
|
||||
Support for PCI 2.2 standard.
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
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
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
Module Name: pci22.h
|
||||
|
||||
**/
|
||||
|
||||
#ifndef _PCI22_H
|
||||
#define _PCI22_H
|
||||
|
||||
#define PCI_MAX_SEGMENT 0
|
||||
|
||||
#define PCI_MAX_BUS 255
|
||||
|
||||
#define PCI_MAX_DEVICE 31
|
||||
#define PCI_MAX_FUNC 7
|
||||
|
||||
//
|
||||
// Command
|
||||
//
|
||||
#define PCI_VGA_PALETTE_SNOOP_DISABLED 0x20
|
||||
|
||||
#pragma pack(push, 1)
|
||||
typedef struct {
|
||||
UINT16 VendorId;
|
||||
UINT16 DeviceId;
|
||||
UINT16 Command;
|
||||
UINT16 Status;
|
||||
UINT8 RevisionID;
|
||||
UINT8 ClassCode[3];
|
||||
UINT8 CacheLineSize;
|
||||
UINT8 LatencyTimer;
|
||||
UINT8 HeaderType;
|
||||
UINT8 BIST;
|
||||
} PCI_DEVICE_INDEPENDENT_REGION;
|
||||
|
||||
typedef struct {
|
||||
UINT32 Bar[6];
|
||||
UINT32 CISPtr;
|
||||
UINT16 SubsystemVendorID;
|
||||
UINT16 SubsystemID;
|
||||
UINT32 ExpansionRomBar;
|
||||
UINT8 CapabilityPtr;
|
||||
UINT8 Reserved1[3];
|
||||
UINT32 Reserved2;
|
||||
UINT8 InterruptLine;
|
||||
UINT8 InterruptPin;
|
||||
UINT8 MinGnt;
|
||||
UINT8 MaxLat;
|
||||
} PCI_DEVICE_HEADER_TYPE_REGION;
|
||||
|
||||
typedef struct {
|
||||
PCI_DEVICE_INDEPENDENT_REGION Hdr;
|
||||
PCI_DEVICE_HEADER_TYPE_REGION Device;
|
||||
} PCI_TYPE00;
|
||||
|
||||
typedef struct {
|
||||
UINT32 Bar[2];
|
||||
UINT8 PrimaryBus;
|
||||
UINT8 SecondaryBus;
|
||||
UINT8 SubordinateBus;
|
||||
UINT8 SecondaryLatencyTimer;
|
||||
UINT8 IoBase;
|
||||
UINT8 IoLimit;
|
||||
UINT16 SecondaryStatus;
|
||||
UINT16 MemoryBase;
|
||||
UINT16 MemoryLimit;
|
||||
UINT16 PrefetchableMemoryBase;
|
||||
UINT16 PrefetchableMemoryLimit;
|
||||
UINT32 PrefetchableBaseUpper32;
|
||||
UINT32 PrefetchableLimitUpper32;
|
||||
UINT16 IoBaseUpper16;
|
||||
UINT16 IoLimitUpper16;
|
||||
UINT8 CapabilityPtr;
|
||||
UINT8 Reserved[3];
|
||||
UINT32 ExpansionRomBAR;
|
||||
UINT8 InterruptLine;
|
||||
UINT8 InterruptPin;
|
||||
UINT16 BridgeControl;
|
||||
} PCI_BRIDGE_CONTROL_REGISTER;
|
||||
|
||||
typedef struct {
|
||||
PCI_DEVICE_INDEPENDENT_REGION Hdr;
|
||||
PCI_BRIDGE_CONTROL_REGISTER Bridge;
|
||||
} PCI_TYPE01;
|
||||
|
||||
typedef union {
|
||||
PCI_TYPE00 Device;
|
||||
PCI_TYPE01 Bridge;
|
||||
} PCI_TYPE_GENERIC;
|
||||
|
||||
typedef struct {
|
||||
UINT32 CardBusSocketReg; // Cardus Socket/ExCA Base
|
||||
// Address Register
|
||||
//
|
||||
UINT16 Reserved;
|
||||
UINT16 SecondaryStatus; // Secondary Status
|
||||
UINT8 PciBusNumber; // PCI Bus Number
|
||||
UINT8 CardBusBusNumber; // CardBus Bus Number
|
||||
UINT8 SubordinateBusNumber; // Subordinate Bus Number
|
||||
UINT8 CardBusLatencyTimer; // CardBus Latency Timer
|
||||
UINT32 MemoryBase0; // Memory Base Register 0
|
||||
UINT32 MemoryLimit0; // Memory Limit Register 0
|
||||
UINT32 MemoryBase1;
|
||||
UINT32 MemoryLimit1;
|
||||
UINT32 IoBase0;
|
||||
UINT32 IoLimit0; // I/O Base Register 0
|
||||
UINT32 IoBase1; // I/O Limit Register 0
|
||||
UINT32 IoLimit1;
|
||||
UINT8 InterruptLine; // Interrupt Line
|
||||
UINT8 InterruptPin; // Interrupt Pin
|
||||
UINT16 BridgeControl; // Bridge Control
|
||||
} PCI_CARDBUS_CONTROL_REGISTER;
|
||||
|
||||
//
|
||||
// Definitions of PCI class bytes and manipulation macros.
|
||||
//
|
||||
#define PCI_CLASS_OLD 0x00
|
||||
#define PCI_CLASS_OLD_OTHER 0x00
|
||||
#define PCI_CLASS_OLD_VGA 0x01
|
||||
|
||||
#define PCI_CLASS_MASS_STORAGE 0x01
|
||||
#define PCI_CLASS_MASS_STORAGE_SCSI 0x00
|
||||
#define PCI_CLASS_MASS_STORAGE_IDE 0x01 // obsolete
|
||||
#define PCI_CLASS_IDE 0x01
|
||||
#define PCI_CLASS_MASS_STORAGE_FLOPPY 0x02
|
||||
#define PCI_CLASS_MASS_STORAGE_IPI 0x03
|
||||
#define PCI_CLASS_MASS_STORAGE_RAID 0x04
|
||||
#define PCI_CLASS_MASS_STORAGE_OTHER 0x80
|
||||
|
||||
#define PCI_CLASS_NETWORK 0x02
|
||||
#define PCI_CLASS_NETWORK_ETHERNET 0x00
|
||||
#define PCI_CLASS_ETHERNET 0x00 // obsolete
|
||||
#define PCI_CLASS_NETWORK_TOKENRING 0x01
|
||||
#define PCI_CLASS_NETWORK_FDDI 0x02
|
||||
#define PCI_CLASS_NETWORK_ATM 0x03
|
||||
#define PCI_CLASS_NETWORK_ISDN 0x04
|
||||
#define PCI_CLASS_NETWORK_OTHER 0x80
|
||||
|
||||
#define PCI_CLASS_DISPLAY 0x03
|
||||
#define PCI_CLASS_DISPLAY_CTRL 0x03 // obsolete
|
||||
#define PCI_CLASS_DISPLAY_VGA 0x00
|
||||
#define PCI_CLASS_VGA 0x00 // obsolete
|
||||
#define PCI_CLASS_DISPLAY_XGA 0x01
|
||||
#define PCI_CLASS_DISPLAY_3D 0x02
|
||||
#define PCI_CLASS_DISPLAY_OTHER 0x80
|
||||
#define PCI_CLASS_DISPLAY_GFX 0x80
|
||||
#define PCI_CLASS_GFX 0x80 // obsolete
|
||||
#define PCI_CLASS_BRIDGE 0x06
|
||||
#define PCI_CLASS_BRIDGE_HOST 0x00
|
||||
#define PCI_CLASS_BRIDGE_ISA 0x01
|
||||
#define PCI_CLASS_ISA 0x01 // obsolete
|
||||
#define PCI_CLASS_BRIDGE_EISA 0x02
|
||||
#define PCI_CLASS_BRIDGE_MCA 0x03
|
||||
#define PCI_CLASS_BRIDGE_P2P 0x04
|
||||
#define PCI_CLASS_BRIDGE_PCMCIA 0x05
|
||||
#define PCI_CLASS_BRIDGE_NUBUS 0x06
|
||||
#define PCI_CLASS_BRIDGE_CARDBUS 0x07
|
||||
#define PCI_CLASS_BRIDGE_RACEWAY 0x08
|
||||
#define PCI_CLASS_BRIDGE_ISA_PDECODE 0x80
|
||||
#define PCI_CLASS_ISA_POSITIVE_DECODE 0x80 // obsolete
|
||||
#define PCI_CLASS_SERIAL 0x0C
|
||||
#define PCI_CLASS_SERIAL_FIREWIRE 0x00
|
||||
#define PCI_CLASS_SERIAL_ACCESS_BUS 0x01
|
||||
#define PCI_CLASS_SERIAL_SSA 0x02
|
||||
#define PCI_CLASS_SERIAL_USB 0x03
|
||||
#define PCI_CLASS_SERIAL_FIBRECHANNEL 0x04
|
||||
#define PCI_CLASS_SERIAL_SMB 0x05
|
||||
|
||||
#define IS_CLASS1(_p, c) ((_p)->Hdr.ClassCode[2] == (c))
|
||||
#define IS_CLASS2(_p, c, s) (IS_CLASS1 (_p, c) && ((_p)->Hdr.ClassCode[1] == (s)))
|
||||
#define IS_CLASS3(_p, c, s, p) (IS_CLASS2 (_p, c, s) && ((_p)->Hdr.ClassCode[0] == (p)))
|
||||
|
||||
#define IS_PCI_DISPLAY(_p) IS_CLASS1 (_p, PCI_CLASS_DISPLAY)
|
||||
#define IS_PCI_VGA(_p) IS_CLASS3 (_p, PCI_CLASS_DISPLAY, PCI_CLASS_DISPLAY_VGA, 0)
|
||||
#define IS_PCI_8514(_p) IS_CLASS3 (_p, PCI_CLASS_DISPLAY, PCI_CLASS_DISPLAY_VGA, 1)
|
||||
#define IS_PCI_GFX(_p) IS_CLASS3 (_p, PCI_CLASS_DISPLAY, PCI_CLASS_DISPLAY_GFX, 0)
|
||||
#define IS_PCI_OLD(_p) IS_CLASS1 (_p, PCI_CLASS_OLD)
|
||||
#define IS_PCI_OLD_VGA(_p) IS_CLASS2 (_p, PCI_CLASS_OLD, PCI_CLASS_OLD_VGA)
|
||||
#define IS_PCI_IDE(_p) IS_CLASS2 (_p, PCI_CLASS_MASS_STORAGE, PCI_CLASS_MASS_STORAGE_IDE)
|
||||
#define IS_PCI_SCSI(_p) IS_CLASS3 (_p, PCI_CLASS_MASS_STORAGE, PCI_CLASS_MASS_STORAGE_SCSI, 0)
|
||||
#define IS_PCI_RAID(_p) IS_CLASS3 (_p, PCI_CLASS_MASS_STORAGE, PCI_CLASS_MASS_STORAGE_RAID, 0)
|
||||
#define IS_PCI_LPC(_p) IS_CLASS3 (_p, PCI_CLASS_BRIDGE, PCI_CLASS_BRIDGE_ISA, 0)
|
||||
#define IS_PCI_P2P(_p) IS_CLASS3 (_p, PCI_CLASS_BRIDGE, PCI_CLASS_BRIDGE_P2P, 0)
|
||||
#define IS_PCI_P2P_SUB(_p) IS_CLASS3 (_p, PCI_CLASS_BRIDGE, PCI_CLASS_BRIDGE_P2P, 1)
|
||||
#define IS_PCI_USB(_p) IS_CLASS2 (_p, PCI_CLASS_SERIAL, PCI_CLASS_SERIAL_USB)
|
||||
|
||||
#define HEADER_TYPE_DEVICE 0x00
|
||||
#define HEADER_TYPE_PCI_TO_PCI_BRIDGE 0x01
|
||||
#define HEADER_TYPE_CARDBUS_BRIDGE 0x02
|
||||
|
||||
#define HEADER_TYPE_MULTI_FUNCTION 0x80
|
||||
#define HEADER_LAYOUT_CODE 0x7f
|
||||
|
||||
#define IS_PCI_BRIDGE(_p) (((_p)->Hdr.HeaderType & HEADER_LAYOUT_CODE) == (HEADER_TYPE_PCI_TO_PCI_BRIDGE))
|
||||
#define IS_CARDBUS_BRIDGE(_p) (((_p)->Hdr.HeaderType & HEADER_LAYOUT_CODE) == (HEADER_TYPE_CARDBUS_BRIDGE))
|
||||
#define IS_PCI_MULTI_FUNC(_p) ((_p)->Hdr.HeaderType & HEADER_TYPE_MULTI_FUNCTION)
|
||||
|
||||
#define PCI_DEVICE_ROMBAR 0x30
|
||||
#define PCI_BRIDGE_ROMBAR 0x38
|
||||
|
||||
#define PCI_MAX_BAR 6
|
||||
#define PCI_MAX_CONFIG_OFFSET 0x100
|
||||
//
|
||||
// bugbug: this is supported in PCI spec v2.3
|
||||
//
|
||||
#define PCI_EXP_MAX_CONFIG_OFFSET 0x1000
|
||||
|
||||
#define PCI_VENDOR_ID_OFFSET 0x00
|
||||
#define PCI_DEVICE_ID_OFFSET 0x02
|
||||
#define PCI_COMMAND_OFFSET 0x04
|
||||
#define PCI_PRIMARY_STATUS_OFFSET 0x06
|
||||
#define PCI_REVISION_ID_OFFSET 0x08
|
||||
#define PCI_CLASSCODE_OFFSET 0x09
|
||||
#define PCI_CACHELINE_SIZE_OFFSET 0x0C
|
||||
#define PCI_LATENCY_TIMER_OFFSET 0x0D
|
||||
#define PCI_HEADER_TYPE_OFFSET 0x0E
|
||||
#define PCI_BIST_OFFSET 0x0F
|
||||
|
||||
#define PCI_BRIDGE_CONTROL_REGISTER_OFFSET 0x3E
|
||||
#define PCI_BRIDGE_STATUS_REGISTER_OFFSET 0x1E
|
||||
|
||||
#define PCI_BRIDGE_PRIMARY_BUS_REGISTER_OFFSET 0x18
|
||||
#define PCI_BRIDGE_SECONDARY_BUS_REGISTER_OFFSET 0x19
|
||||
#define PCI_BRIDGE_SUBORDINATE_BUS_REGISTER_OFFSET 0x1a
|
||||
|
||||
typedef struct {
|
||||
UINT8 Register;
|
||||
UINT8 Function;
|
||||
UINT8 Device;
|
||||
UINT8 Bus;
|
||||
UINT8 Reserved[4];
|
||||
} DEFIO_PCI_ADDR;
|
||||
|
||||
typedef union {
|
||||
struct {
|
||||
UINT32 Reg : 8;
|
||||
UINT32 Func : 3;
|
||||
UINT32 Dev : 5;
|
||||
UINT32 Bus : 8;
|
||||
UINT32 Reserved : 7;
|
||||
UINT32 Enable : 1;
|
||||
} Bits;
|
||||
UINT32 Uint32;
|
||||
} PCI_CONFIG_ACCESS_CF8;
|
||||
|
||||
#pragma pack()
|
||||
|
||||
#define EFI_ROOT_BRIDGE_LIST 'eprb'
|
||||
#define PCI_EXPANSION_ROM_HEADER_SIGNATURE 0xaa55
|
||||
#define EFI_PCI_EXPANSION_ROM_HEADER_EFISIGNATURE 0x0EF1
|
||||
#define PCI_DATA_STRUCTURE_SIGNATURE EFI_SIGNATURE_32 ('P', 'C', 'I', 'R')
|
||||
#define PCI_CODE_TYPE_PCAT_IMAGE 0x00
|
||||
#define PCI_CODE_TYPE_EFI_IMAGE 0x03
|
||||
#define EFI_PCI_EXPANSION_ROM_HEADER_COMPRESSED 0x0001
|
||||
|
||||
#define EFI_PCI_COMMAND_IO_SPACE 0x0001
|
||||
#define EFI_PCI_COMMAND_MEMORY_SPACE 0x0002
|
||||
#define EFI_PCI_COMMAND_BUS_MASTER 0x0004
|
||||
#define EFI_PCI_COMMAND_SPECIAL_CYCLE 0x0008
|
||||
#define EFI_PCI_COMMAND_MEMORY_WRITE_AND_INVALIDATE 0x0010
|
||||
#define EFI_PCI_COMMAND_VGA_PALETTE_SNOOP 0x0020
|
||||
#define EFI_PCI_COMMAND_PARITY_ERROR_RESPOND 0x0040
|
||||
#define EFI_PCI_COMMAND_STEPPING_CONTROL 0x0080
|
||||
#define EFI_PCI_COMMAND_SERR 0x0100
|
||||
#define EFI_PCI_COMMAND_FAST_BACK_TO_BACK 0x0200
|
||||
|
||||
#define EFI_PCI_BRIDGE_CONTROL_PARITY_ERROR_RESPONSE 0x0001
|
||||
#define EFI_PCI_BRIDGE_CONTROL_SERR 0x0002
|
||||
#define EFI_PCI_BRIDGE_CONTROL_ISA 0x0004
|
||||
#define EFI_PCI_BRIDGE_CONTROL_VGA 0x0008
|
||||
#define EFI_PCI_BRIDGE_CONTROL_VGA_16 0x0010
|
||||
#define EFI_PCI_BRIDGE_CONTROL_MASTER_ABORT 0x0020
|
||||
#define EFI_PCI_BRIDGE_CONTROL_RESET_SECONDARY_BUS 0x0040
|
||||
#define EFI_PCI_BRIDGE_CONTROL_FAST_BACK_TO_BACK 0x0080
|
||||
#define EFI_PCI_BRIDGE_CONTROL_PRIMARY_DISCARD_TIMER 0x0100
|
||||
#define EFI_PCI_BRIDGE_CONTROL_SECONDARY_DISCARD_TIMER 0x0200
|
||||
#define EFI_PCI_BRIDGE_CONTROL_TIMER_STATUS 0x0400
|
||||
#define EFI_PCI_BRIDGE_CONTROL_DISCARD_TIMER_SERR 0x0800
|
||||
|
||||
//
|
||||
// Following are the PCI-CARDBUS bridge control bit
|
||||
//
|
||||
#define EFI_PCI_BRIDGE_CONTROL_IREQINT_ENABLE 0x0080
|
||||
#define EFI_PCI_BRIDGE_CONTROL_RANGE0_MEMORY_TYPE 0x0100
|
||||
#define EFI_PCI_BRIDGE_CONTROL_RANGE1_MEMORY_TYPE 0x0200
|
||||
#define EFI_PCI_BRIDGE_CONTROL_WRITE_POSTING_ENABLE 0x0400
|
||||
|
||||
//
|
||||
// Following are the PCI status control bit
|
||||
//
|
||||
#define EFI_PCI_STATUS_CAPABILITY 0x0010
|
||||
#define EFI_PCI_STATUS_66MZ_CAPABLE 0x0020
|
||||
#define EFI_PCI_FAST_BACK_TO_BACK_CAPABLE 0x0080
|
||||
#define EFI_PCI_MASTER_DATA_PARITY_ERROR 0x0100
|
||||
|
||||
#define EFI_PCI_CAPABILITY_PTR 0x34
|
||||
#define EFI_PCI_CARDBUS_BRIDGE_CAPABILITY_PTR 0x14
|
||||
|
||||
#pragma pack(1)
|
||||
typedef struct {
|
||||
UINT16 Signature; // 0xaa55
|
||||
UINT8 Reserved[0x16];
|
||||
UINT16 PcirOffset;
|
||||
} PCI_EXPANSION_ROM_HEADER;
|
||||
|
||||
typedef struct {
|
||||
UINT16 Signature; // 0xaa55
|
||||
UINT16 InitializationSize;
|
||||
UINT32 EfiSignature; // 0x0EF1
|
||||
UINT16 EfiSubsystem;
|
||||
UINT16 EfiMachineType;
|
||||
UINT16 CompressionType;
|
||||
UINT8 Reserved[8];
|
||||
UINT16 EfiImageHeaderOffset;
|
||||
UINT16 PcirOffset;
|
||||
} EFI_PCI_EXPANSION_ROM_HEADER;
|
||||
|
||||
typedef struct {
|
||||
UINT16 Signature; // 0xaa55
|
||||
UINT8 Size512;
|
||||
UINT8 Reserved[15];
|
||||
UINT16 PcirOffset;
|
||||
} EFI_LEGACY_EXPANSION_ROM_HEADER;
|
||||
|
||||
typedef union {
|
||||
UINT8 *Raw;
|
||||
PCI_EXPANSION_ROM_HEADER *Generic;
|
||||
EFI_PCI_EXPANSION_ROM_HEADER *Efi;
|
||||
EFI_LEGACY_EXPANSION_ROM_HEADER *PcAt;
|
||||
} EFI_PCI_ROM_HEADER;
|
||||
|
||||
typedef struct {
|
||||
UINT32 Signature; // "PCIR"
|
||||
UINT16 VendorId;
|
||||
UINT16 DeviceId;
|
||||
UINT16 Reserved0;
|
||||
UINT16 Length;
|
||||
UINT8 Revision;
|
||||
UINT8 ClassCode[3];
|
||||
UINT16 ImageLength;
|
||||
UINT16 CodeRevision;
|
||||
UINT8 CodeType;
|
||||
UINT8 Indicator;
|
||||
UINT16 Reserved1;
|
||||
} PCI_DATA_STRUCTURE;
|
||||
|
||||
//
|
||||
// PCI Capability List IDs and records
|
||||
//
|
||||
#define EFI_PCI_CAPABILITY_ID_PMI 0x01
|
||||
#define EFI_PCI_CAPABILITY_ID_AGP 0x02
|
||||
#define EFI_PCI_CAPABILITY_ID_VPD 0x03
|
||||
#define EFI_PCI_CAPABILITY_ID_SLOTID 0x04
|
||||
#define EFI_PCI_CAPABILITY_ID_MSI 0x05
|
||||
#define EFI_PCI_CAPABILITY_ID_HOTPLUG 0x06
|
||||
#define EFI_PCI_CAPABILITY_ID_PCIX 0x07
|
||||
//
|
||||
// bugbug: this ID is defined in PCI spec v2.3
|
||||
//
|
||||
#define EFI_PCI_CAPABILITY_ID_PCIEXP 0x10
|
||||
|
||||
typedef struct {
|
||||
UINT8 CapabilityID;
|
||||
UINT8 NextItemPtr;
|
||||
} EFI_PCI_CAPABILITY_HDR;
|
||||
|
||||
//
|
||||
// Capability EFI_PCI_CAPABILITY_ID_PMI
|
||||
//
|
||||
typedef struct {
|
||||
EFI_PCI_CAPABILITY_HDR Hdr;
|
||||
UINT16 PMC;
|
||||
UINT16 PMCSR;
|
||||
UINT8 BridgeExtention;
|
||||
UINT8 Data;
|
||||
} EFI_PCI_CAPABILITY_PMI;
|
||||
|
||||
//
|
||||
// Capability EFI_PCI_CAPABILITY_ID_AGP
|
||||
//
|
||||
typedef struct {
|
||||
EFI_PCI_CAPABILITY_HDR Hdr;
|
||||
UINT8 Rev;
|
||||
UINT8 Reserved;
|
||||
UINT32 Status;
|
||||
UINT32 Command;
|
||||
} EFI_PCI_CAPABILITY_AGP;
|
||||
|
||||
//
|
||||
// Capability EFI_PCI_CAPABILITY_ID_VPD
|
||||
//
|
||||
typedef struct {
|
||||
EFI_PCI_CAPABILITY_HDR Hdr;
|
||||
UINT16 AddrReg;
|
||||
UINT32 DataReg;
|
||||
} EFI_PCI_CAPABILITY_VPD;
|
||||
|
||||
//
|
||||
// Capability EFI_PCI_CAPABILITY_ID_SLOTID
|
||||
//
|
||||
typedef struct {
|
||||
EFI_PCI_CAPABILITY_HDR Hdr;
|
||||
UINT8 ExpnsSlotReg;
|
||||
UINT8 ChassisNo;
|
||||
} EFI_PCI_CAPABILITY_SLOTID;
|
||||
|
||||
//
|
||||
// Capability EFI_PCI_CAPABILITY_ID_MSI
|
||||
//
|
||||
typedef struct {
|
||||
EFI_PCI_CAPABILITY_HDR Hdr;
|
||||
UINT16 MsgCtrlReg;
|
||||
UINT32 MsgAddrReg;
|
||||
UINT16 MsgDataReg;
|
||||
} EFI_PCI_CAPABILITY_MSI32;
|
||||
|
||||
typedef struct {
|
||||
EFI_PCI_CAPABILITY_HDR Hdr;
|
||||
UINT16 MsgCtrlReg;
|
||||
UINT32 MsgAddrRegLsdw;
|
||||
UINT32 MsgAddrRegMsdw;
|
||||
UINT16 MsgDataReg;
|
||||
} EFI_PCI_CAPABILITY_MSI64;
|
||||
|
||||
//
|
||||
// Capability EFI_PCI_CAPABILITY_ID_HOTPLUG
|
||||
//
|
||||
typedef struct {
|
||||
EFI_PCI_CAPABILITY_HDR Hdr;
|
||||
//
|
||||
// not finished - fields need to go here
|
||||
//
|
||||
} EFI_PCI_CAPABILITY_HOTPLUG;
|
||||
|
||||
//
|
||||
// Capability EFI_PCI_CAPABILITY_ID_PCIX
|
||||
//
|
||||
typedef struct {
|
||||
EFI_PCI_CAPABILITY_HDR Hdr;
|
||||
UINT16 CommandReg;
|
||||
UINT32 StatusReg;
|
||||
} EFI_PCI_CAPABILITY_PCIX;
|
||||
|
||||
typedef struct {
|
||||
EFI_PCI_CAPABILITY_HDR Hdr;
|
||||
UINT16 SecStatusReg;
|
||||
UINT32 StatusReg;
|
||||
UINT32 SplitTransCtrlRegUp;
|
||||
UINT32 SplitTransCtrlRegDn;
|
||||
} EFI_PCI_CAPABILITY_PCIX_BRDG;
|
||||
|
||||
#define DEVICE_ID_NOCARE 0xFFFF
|
||||
|
||||
#define PCI_ACPI_UNUSED 0
|
||||
#define PCI_BAR_NOCHANGE 0
|
||||
#define PCI_BAR_OLD_ALIGN 0xFFFFFFFFFFFFFFFFULL
|
||||
#define PCI_BAR_EVEN_ALIGN 0xFFFFFFFFFFFFFFFEULL
|
||||
#define PCI_BAR_SQUAD_ALIGN 0xFFFFFFFFFFFFFFFDULL
|
||||
#define PCI_BAR_DQUAD_ALIGN 0xFFFFFFFFFFFFFFFCULL
|
||||
|
||||
#define PCI_BAR_IDX0 0x00
|
||||
#define PCI_BAR_IDX1 0x01
|
||||
#define PCI_BAR_IDX2 0x02
|
||||
#define PCI_BAR_IDX3 0x03
|
||||
#define PCI_BAR_IDX4 0x04
|
||||
#define PCI_BAR_IDX5 0x05
|
||||
#define PCI_BAR_ALL 0xFF
|
||||
|
||||
#pragma pack(pop)
|
||||
|
||||
#endif
|
4890
Tools/Source/TianoTools/Include/Library/BaseLib.h
Normal file
4890
Tools/Source/TianoTools/Include/Library/BaseLib.h
Normal file
File diff suppressed because it is too large
Load Diff
395
Tools/Source/TianoTools/Include/Library/BaseMemoryLib.h
Normal file
395
Tools/Source/TianoTools/Include/Library/BaseMemoryLib.h
Normal file
@ -0,0 +1,395 @@
|
||||
/** @file
|
||||
Memory-only library functions with no library constructor/destructor
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
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
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
Module Name: BaseMemoryLib.h
|
||||
|
||||
**/
|
||||
|
||||
#ifndef __BASE_MEMORY_LIB__
|
||||
#define __BASE_MEMORY_LIB__
|
||||
|
||||
/**
|
||||
Copy Length bytes from Source to Destination.
|
||||
|
||||
This function copies Length bytes from SourceBuffer to DestinationBuffer, and
|
||||
returns DestinationBuffer. The implementation must be reentrant, and it must
|
||||
handle the case where SourceBuffer overlaps DestinationBuffer.
|
||||
|
||||
If Length is greater than (MAX_ADDRESS - DestinationBuffer + 1), then
|
||||
ASSERT().
|
||||
If Length is greater than (MAX_ADDRESS - SourceBuffer + 1), then ASSERT().
|
||||
|
||||
@param Destination Target of copy
|
||||
@param Source Place to copy from
|
||||
@param Length Number of bytes to copy
|
||||
|
||||
@return Destination
|
||||
|
||||
**/
|
||||
VOID *
|
||||
EFIAPI
|
||||
CopyMem (
|
||||
OUT VOID *DestinationBuffer,
|
||||
IN CONST VOID *SourceBuffer,
|
||||
IN UINTN Length
|
||||
);
|
||||
|
||||
/**
|
||||
Set Buffer to Value for Size bytes.
|
||||
|
||||
This function fills Length bytes of Buffer with Value, and returns Buffer.
|
||||
|
||||
If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
|
||||
|
||||
@param Buffer Memory to set.
|
||||
@param Size Number of bytes to set
|
||||
@param Value Value of the set operation.
|
||||
|
||||
@return Buffer
|
||||
|
||||
**/
|
||||
VOID *
|
||||
EFIAPI
|
||||
SetMem (
|
||||
OUT VOID *Buffer,
|
||||
IN UINTN Length,
|
||||
IN UINT8 Value
|
||||
);
|
||||
|
||||
/**
|
||||
Fills a target buffer with a 16-bit value, and returns the target buffer.
|
||||
|
||||
This function fills Length bytes of Buffer with the 16-bit value specified by
|
||||
Value, and returns Buffer. Value is repeated every 16-bits in for Length
|
||||
bytes of Buffer.
|
||||
|
||||
If Buffer is NULL and Length > 0, then ASSERT().
|
||||
If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
|
||||
If Buffer is not aligned on a 16-bit boundary, then ASSERT().
|
||||
If Length is not aligned on a 16-bit boundary, then ASSERT().
|
||||
|
||||
@param Buffer Pointer to the target buffer to fill.
|
||||
@param Length Number of bytes in Buffer to fill.
|
||||
@param Value Value with which to fill Length bytes of Buffer.
|
||||
|
||||
@return Buffer
|
||||
|
||||
**/
|
||||
VOID *
|
||||
EFIAPI
|
||||
SetMem16 (
|
||||
OUT VOID *Buffer,
|
||||
IN UINTN Length,
|
||||
IN UINT16 Value
|
||||
);
|
||||
|
||||
/**
|
||||
Fills a target buffer with a 32-bit value, and returns the target buffer.
|
||||
|
||||
This function fills Length bytes of Buffer with the 32-bit value specified by
|
||||
Value, and returns Buffer. Value is repeated every 32-bits in for Length
|
||||
bytes of Buffer.
|
||||
|
||||
If Buffer is NULL and Length > 0, then ASSERT().
|
||||
If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
|
||||
If Buffer is not aligned on a 32-bit boundary, then ASSERT().
|
||||
If Length is not aligned on a 32-bit boundary, then ASSERT().
|
||||
|
||||
@param Buffer Pointer to the target buffer to fill.
|
||||
@param Length Number of bytes in Buffer to fill.
|
||||
@param Value Value with which to fill Length bytes of Buffer.
|
||||
|
||||
@return Buffer
|
||||
|
||||
**/
|
||||
VOID *
|
||||
EFIAPI
|
||||
SetMem32 (
|
||||
OUT VOID *Buffer,
|
||||
IN UINTN Length,
|
||||
IN UINT32 Value
|
||||
);
|
||||
|
||||
/**
|
||||
Fills a target buffer with a 64-bit value, and returns the target buffer.
|
||||
|
||||
This function fills Length bytes of Buffer with the 64-bit value specified by
|
||||
Value, and returns Buffer. Value is repeated every 64-bits in for Length
|
||||
bytes of Buffer.
|
||||
|
||||
If Buffer is NULL and Length > 0, then ASSERT().
|
||||
If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
|
||||
If Buffer is not aligned on a 64-bit boundary, then ASSERT().
|
||||
If Length is not aligned on a 64-bit boundary, then ASSERT().
|
||||
|
||||
@param Buffer Pointer to the target buffer to fill.
|
||||
@param Length Number of bytes in Buffer to fill.
|
||||
@param Value Value with which to fill Length bytes of Buffer.
|
||||
|
||||
@return Buffer
|
||||
|
||||
**/
|
||||
VOID *
|
||||
EFIAPI
|
||||
SetMem64 (
|
||||
OUT VOID *Buffer,
|
||||
IN UINTN Length,
|
||||
IN UINT64 Value
|
||||
);
|
||||
|
||||
/**
|
||||
Set Buffer to 0 for Size bytes.
|
||||
|
||||
This function fills Length bytes of Buffer with zeros, and returns Buffer.
|
||||
|
||||
If Buffer is NULL and Length > 0, then ASSERT().
|
||||
If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
|
||||
|
||||
@param Buffer Memory to set.
|
||||
@param Size Number of bytes to set
|
||||
|
||||
@return Buffer
|
||||
|
||||
**/
|
||||
VOID *
|
||||
EFIAPI
|
||||
ZeroMem (
|
||||
OUT VOID *Buffer,
|
||||
IN UINTN Length
|
||||
);
|
||||
|
||||
/**
|
||||
Compares two memory buffers of a given length.
|
||||
|
||||
This function compares Length bytes of SourceBuffer to Length bytes of
|
||||
DestinationBuffer. If all Length bytes of the two buffers are identical, then
|
||||
0 is returned. Otherwise, the value returned is the first mismatched byte in
|
||||
SourceBuffer subtracted from the first mismatched byte in DestinationBuffer.
|
||||
|
||||
If DestinationBuffer is NULL and Length > 0, then ASSERT().
|
||||
If SourceBuffer is NULL and Length > 0, then ASSERT().
|
||||
If Length is greater than (MAX_ADDRESS - DestinationBuffer + 1), then
|
||||
ASSERT().
|
||||
If Length is greater than (MAX_ADDRESS - SourceBuffer + 1), then ASSERT().
|
||||
|
||||
@param DestinationBuffer First memory buffer
|
||||
@param SourceBuffer Second memory buffer
|
||||
@param Length Length of DestinationBuffer and SourceBuffer memory
|
||||
regions to compare
|
||||
|
||||
@retval 0 if DestinationBuffer == SourceBuffer
|
||||
@retval Non-zero if DestinationBuffer != SourceBuffer
|
||||
|
||||
**/
|
||||
INTN
|
||||
EFIAPI
|
||||
CompareMem (
|
||||
IN CONST VOID *DestinationBuffer,
|
||||
IN CONST VOID *SourceBuffer,
|
||||
IN UINTN Length
|
||||
);
|
||||
|
||||
/**
|
||||
Scans a target buffer for an 8-bit value, and returns a pointer to the
|
||||
matching 8-bit value in the target buffer.
|
||||
|
||||
This function searches target the buffer specified by Buffer and Length from
|
||||
the lowest address to the highest address for an 8-bit value that matches
|
||||
Value. If a match is found, then a pointer to the matching byte in the target
|
||||
buffer is returned. If no match is found, then NULL is returned. If Length is
|
||||
0, then NULL is returned.
|
||||
|
||||
If Buffer is NULL, then ASSERT().
|
||||
If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
|
||||
|
||||
@param Buffer Pointer to the target buffer to scan.
|
||||
@param Length Number of bytes in Buffer to scan.
|
||||
@param Value Value to search for in the target buffer.
|
||||
|
||||
@return Pointer to the first occurrence or NULL if not found.
|
||||
@retval NULL if Length == 0 or Value was not found.
|
||||
|
||||
**/
|
||||
VOID *
|
||||
EFIAPI
|
||||
ScanMem8 (
|
||||
IN CONST VOID *Buffer,
|
||||
IN UINTN Length,
|
||||
IN UINT8 Value
|
||||
);
|
||||
|
||||
/**
|
||||
Scans a target buffer for a 16-bit value, and returns a pointer to the
|
||||
matching 16-bit value in the target buffer.
|
||||
|
||||
This function searches target the buffer specified by Buffer and Length from
|
||||
the lowest address to the highest address at 16-bit increments for a 16-bit
|
||||
value that matches Value. If a match is found, then a pointer to the matching
|
||||
value in the target buffer is returned. If no match is found, then NULL is
|
||||
returned. If Length is 0, then NULL is returned.
|
||||
|
||||
If Buffer is NULL, then ASSERT().
|
||||
If Buffer is not aligned on a 16-bit boundary, then ASSERT().
|
||||
If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
|
||||
|
||||
@param Buffer Pointer to the target buffer to scan.
|
||||
@param Length Number of bytes in Buffer to scan.
|
||||
@param Value Value to search for in the target buffer.
|
||||
|
||||
@return Pointer to the first occurrence.
|
||||
@retval NULL if Length == 0 or Value was not found.
|
||||
|
||||
**/
|
||||
VOID *
|
||||
EFIAPI
|
||||
ScanMem16 (
|
||||
IN CONST VOID *Buffer,
|
||||
IN UINTN Length,
|
||||
IN UINT16 Value
|
||||
);
|
||||
|
||||
/**
|
||||
Scans a target buffer for a 32-bit value, and returns a pointer to the
|
||||
matching 32-bit value in the target buffer.
|
||||
|
||||
This function searches target the buffer specified by Buffer and Length from
|
||||
the lowest address to the highest address at 32-bit increments for a 32-bit
|
||||
value that matches Value. If a match is found, then a pointer to the matching
|
||||
value in the target buffer is returned. If no match is found, then NULL is
|
||||
returned. If Length is 0, then NULL is returned.
|
||||
|
||||
If Buffer is NULL, then ASSERT().
|
||||
If Buffer is not aligned on a 32-bit boundary, then ASSERT().
|
||||
If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
|
||||
|
||||
@param Buffer Pointer to the target buffer to scan.
|
||||
@param Length Number of bytes in Buffer to scan.
|
||||
@param Value Value to search for in the target buffer.
|
||||
|
||||
@return Pointer to the first occurrence or NULL if not found.
|
||||
@retval NULL if Length == 0 or Value was not found.
|
||||
|
||||
**/
|
||||
VOID *
|
||||
EFIAPI
|
||||
ScanMem32 (
|
||||
IN CONST VOID *Buffer,
|
||||
IN UINTN Length,
|
||||
IN UINT32 Value
|
||||
);
|
||||
|
||||
/**
|
||||
Scans a target buffer for a 64-bit value, and returns a pointer to the
|
||||
matching 64-bit value in the target buffer.
|
||||
|
||||
This function searches target the buffer specified by Buffer and Length from
|
||||
the lowest address to the highest address at 64-bit increments for a 64-bit
|
||||
value that matches Value. If a match is found, then a pointer to the matching
|
||||
value in the target buffer is returned. If no match is found, then NULL is
|
||||
returned. If Length is 0, then NULL is returned.
|
||||
|
||||
If Buffer is NULL, then ASSERT().
|
||||
If Buffer is not aligned on a 64-bit boundary, then ASSERT().
|
||||
If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
|
||||
|
||||
@param Buffer Pointer to the target buffer to scan.
|
||||
@param Length Number of bytes in Buffer to scan.
|
||||
@param Value Value to search for in the target buffer.
|
||||
|
||||
@return Pointer to the first occurrence or NULL if not found.
|
||||
@retval NULL if Length == 0 or Value was not found.
|
||||
|
||||
**/
|
||||
VOID *
|
||||
EFIAPI
|
||||
ScanMem64 (
|
||||
IN CONST VOID *Buffer,
|
||||
IN UINTN Length,
|
||||
IN UINT64 Value
|
||||
);
|
||||
|
||||
/**
|
||||
This function copies a source GUID to a destination GUID.
|
||||
|
||||
This function copies the contents of the 128-bit GUID specified by SourceGuid
|
||||
to DestinationGuid, and returns DestinationGuid.
|
||||
|
||||
If DestinationGuid is NULL, then ASSERT().
|
||||
If SourceGuid is NULL, then ASSERT().
|
||||
|
||||
@param DestinationGuid Pointer to the destination GUID.
|
||||
@param SourceGuid Pointer to the source GUID.
|
||||
|
||||
@return DestinationGuid
|
||||
|
||||
**/
|
||||
GUID *
|
||||
EFIAPI
|
||||
CopyGuid (
|
||||
OUT GUID *DestinationGuid,
|
||||
IN CONST GUID *SourceGuid
|
||||
);
|
||||
|
||||
/**
|
||||
Compares two GUIDs
|
||||
|
||||
This function compares Guid1 to Guid2. If the GUIDs are identical then TRUE
|
||||
is returned. If there are any bit differences in the two GUIDs, then FALSE is
|
||||
returned.
|
||||
|
||||
If Guid1 is NULL, then ASSERT().
|
||||
If Guid2 is NULL, then ASSERT().
|
||||
|
||||
@param Guid1 guid to compare
|
||||
@param Guid2 guid to compare
|
||||
|
||||
@retval TRUE if Guid1 == Guid2
|
||||
@retval FALSE if Guid1 != Guid2
|
||||
|
||||
**/
|
||||
BOOLEAN
|
||||
EFIAPI
|
||||
CompareGuid (
|
||||
IN CONST GUID *Guid1,
|
||||
IN CONST GUID *Guid2
|
||||
);
|
||||
|
||||
/**
|
||||
Scans a target buffer for a GUID, and returns a pointer to the matching GUID
|
||||
in the target buffer.
|
||||
|
||||
This function searches target the buffer specified by Buffer and Length from
|
||||
the lowest address to the highest address at 128-bit increments for the
|
||||
128-bit GUID value that matches Guid. If a match is found, then a pointer to
|
||||
the matching GUID in the target buffer is returned. If no match is found,
|
||||
then NULL is returned. If Length is 0, then NULL is returned.
|
||||
|
||||
If Buffer is NULL, then ASSERT().
|
||||
If Buffer is not aligned on a 64-bit boundary, then ASSERT().
|
||||
If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
|
||||
|
||||
@param Buffer Pointer to the target buffer to scan.
|
||||
@param Length Number of bytes in Buffer to scan.
|
||||
@param Guid Value to search for in the target buffer.
|
||||
|
||||
@return Pointer to the first occurrence.
|
||||
@retval NULL if Length == 0 or Guid was not found.
|
||||
**/
|
||||
VOID *
|
||||
EFIAPI
|
||||
ScanGuid (
|
||||
IN CONST VOID *Buffer,
|
||||
IN UINTN Length,
|
||||
IN CONST GUID *Guid
|
||||
);
|
||||
|
||||
#endif
|
699
Tools/Source/TianoTools/Include/Library/PcdLib.h
Normal file
699
Tools/Source/TianoTools/Include/Library/PcdLib.h
Normal file
@ -0,0 +1,699 @@
|
||||
/** @file
|
||||
PCD Library Class Interface Declarations
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
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
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
|
||||
Module Name: PcdLib.h
|
||||
|
||||
**/
|
||||
|
||||
#ifndef __PCD_LIB_H__
|
||||
#define __PCD_LIB_H__
|
||||
|
||||
#define PCD_INVALID_TOKEN_NUMBER ((UINTN) -1)
|
||||
|
||||
#define PcdToken(TokenName) _PCD_TOKEN_##TokenName
|
||||
|
||||
|
||||
//
|
||||
// Feature Flag is in the form of a global constant
|
||||
//
|
||||
#define FeaturePcdGet(TokenName) _gPcd_FixedAtBuild_##TokenName
|
||||
|
||||
|
||||
//
|
||||
// Fixed is fixed at build time
|
||||
//
|
||||
#define FixedPcdGet8(TokenName) _gPcd_FixedAtBuild_##TokenName
|
||||
#define FixedPcdGet16(TokenName) _gPcd_FixedAtBuild_##TokenName
|
||||
#define FixedPcdGet32(TokenName) _gPcd_FixedAtBuild_##TokenName
|
||||
#define FixedPcdGet64(TokenName) _gPcd_FixedAtBuild_##TokenName
|
||||
#define FixedPcdGetBool(TokenName) _gPcd_FixedAtBuild_##TokenName
|
||||
|
||||
|
||||
//
|
||||
// BugBug: This works for strings, but not constants.
|
||||
//
|
||||
#define FixedPcdGetPtr(TokenName) ((VOID *)_gPcd_FixedAtBuild_##TokenName)
|
||||
|
||||
|
||||
//
|
||||
// (Binary) Patch is in the form of a global variable
|
||||
//
|
||||
#define PatchPcdGet8(TokenName) _gPcd_BinaryPatch_##TokenName
|
||||
#define PatchPcdGet16(TokenName) _gPcd_BinaryPatch_##TokenName
|
||||
#define PatchPcdGet32(TokenName) _gPcd_BinaryPatch_##TokenName
|
||||
#define PatchPcdGet64(TokenName) _gPcd_BinaryPatch_##TokenName
|
||||
#define PatchPcdGetBool(TokenName) _gPcd_BinaryPatch_##TokenName
|
||||
#define PatchPcdGetPtr(TokenName) ((VOID *)_gPcd_BinaryPatch_##TokenName)
|
||||
|
||||
#define PatchPcdSet8(TokenName, Value) (_gPcd_BinaryPatch_##TokenName = Value)
|
||||
#define PatchPcdSet16(TokenName, Value) (_gPcd_BinaryPatch_##TokenName = Value)
|
||||
#define PatchPcdSet32(TokenName, Value) (_gPcd_BinaryPatch_##TokenName = Value)
|
||||
#define PatchPcdSet64(TokenName, Value) (_gPcd_BinaryPatch_##TokenName = Value)
|
||||
#define PatchPcdSetBool(TokenName, Value) (_gPcd_BinaryPatch_##TokenName = Value)
|
||||
#define PatchPcdSetPtr(TokenName, Value, Size) CopyMem (_gPcd_BinaryPatch_##TokenName, Value, Size)
|
||||
|
||||
//
|
||||
// Dynamic is via the protocol with only the TokenNumber as argument
|
||||
// It can also be Patch or Fixed type based on a build option
|
||||
//
|
||||
#define PcdGet8(TokenName) _PCD_MODE_8_##TokenName
|
||||
#define PcdGet16(TokenName) _PCD_MODE_16_##TokenName
|
||||
#define PcdGet32(TokenName) _PCD_MODE_32_##TokenName
|
||||
#define PcdGet64(TokenName) _PCD_MODE_64_##TokenName
|
||||
#define PcdGetPtr(TokenName) _PCD_MODE_PTR_##TokenName
|
||||
#define PcdGetBool(TokenName) _PCD_MODE_BOOL_##TokenName
|
||||
|
||||
|
||||
//
|
||||
// Dynamic Ex is to support binary distribution
|
||||
//
|
||||
#define PcdGetEx8(Guid, TokenName) LibPcdGetEx8 (Guid, _PCD_TOKEN_##TokenName)
|
||||
#define PcdGetEx16(Guid, TokenName) LibPcdGetEx16 (Guid, _PCD_TOKEN_##TokenName)
|
||||
#define PcdGetEx32(Guid, TokenName) LibPcdGetEx32 (Guid, _PCD_TOKEN_##TokenName)
|
||||
#define PcdGetEx64(Guid, TokenName) LibPcdGetEx64 (Guid, _PCD_TOKEN_##TokenName)
|
||||
#define PcdGetExPtr(Guid, TokenName) LibPcdGetExPtr (Guid, _PCD_TOKEN_##TokenName)
|
||||
#define PcdGetExBool(Guid, TokenName) LibPcdGetExBool (Guid, _PCD_TOKEN_##TokenName)
|
||||
|
||||
|
||||
//
|
||||
// Dynamic Set
|
||||
//
|
||||
#define PcdSet8(TokenName, Value) LibPcdSet8 (_PCD_TOKEN_##TokenName, Value)
|
||||
#define PcdSet16(TokenName, Value) LibPcdSet16 (_PCD_TOKEN_##TokenName, Value)
|
||||
#define PcdSet32(TokenName, Value) LibPcdSet32 (_PCD_TOKEN_##TokenName, Value)
|
||||
#define PcdSet64(TokenName, Value) LibPcdSet64 (_PCD_TOKEN_##TokenName, Value)
|
||||
#define PcdSetPtr(TokenName, SizeOfBuffer, Buffer) LibPcdSetPtr (_PCD_TOKEN_##TokenName, SizeOfBuffer, Buffer)
|
||||
#define PcdSetBool(TokenName, Value) LibPcdSetBool(_PCD_TOKEN_##TokenName, Value)
|
||||
|
||||
|
||||
//
|
||||
// Dynamic Set Ex
|
||||
//
|
||||
#define PcdSetEx8(Guid, TokenName, Value) LibPcdSetEx8 (Guid, _PCD_TOKEN_##TokenName, Value)
|
||||
#define PcdSetEx16(Guid, TokenName, Value) LibPcdSetEx16 (Guid, _PCD_TOKEN_##TokenName, Value)
|
||||
#define PcdSetEx32(Guid, TokenName, Value) LibPcdSetEx32 (Guid, _PCD_TOKEN_##TokenName, Value)
|
||||
#define PcdSetEx64(Guid, TokenName, Value) LibPcdSetEx64 (Guid, _PCD_TOKEN_##TokenName, Value)
|
||||
#define PcdSetExPtr(Guid, TokenName, SizeOfBuffer, Buffer) LibPcdSetExPtr (Guid, _PCD_TOKEN_##TokenName, SizeOfBuffer, Buffer)
|
||||
#define PcdSetExBool(Guid, TokenName, Value) LibPcdSetExBool(Guid, _PCD_TOKEN_##TokenName, Value)
|
||||
|
||||
|
||||
/**
|
||||
Sets the current SKU in the PCD database to the value specified by SkuId. SkuId is returned.
|
||||
|
||||
@param[in] SkuId The SKU value that will be used when the PCD service will retrieve and
|
||||
set values associated with a PCD token.
|
||||
|
||||
@retval SKU_ID Return the SKU ID that just be set.
|
||||
|
||||
**/
|
||||
UINTN
|
||||
EFIAPI
|
||||
LibPcdSetSku (
|
||||
IN UINTN SkuId
|
||||
);
|
||||
|
||||
|
||||
/**
|
||||
Returns the 8-bit value for the token specified by TokenNumber.
|
||||
|
||||
@param[in] The PCD token number to retrieve a current value for.
|
||||
|
||||
@retval UINT8 Returns the 8-bit value for the token specified by TokenNumber.
|
||||
|
||||
**/
|
||||
UINT8
|
||||
EFIAPI
|
||||
LibPcdGet8 (
|
||||
IN UINTN TokenNumber
|
||||
);
|
||||
|
||||
|
||||
/**
|
||||
Returns the 16-bit value for the token specified by TokenNumber.
|
||||
|
||||
@param[in] The PCD token number to retrieve a current value for.
|
||||
|
||||
@retval UINT16 Returns the 16-bit value for the token specified by TokenNumber.
|
||||
|
||||
**/
|
||||
UINT16
|
||||
EFIAPI
|
||||
LibPcdGet16 (
|
||||
IN UINTN TokenNumber
|
||||
);
|
||||
|
||||
|
||||
/**
|
||||
Returns the 32-bit value for the token specified by TokenNumber.
|
||||
|
||||
@param[in] TokenNumber The PCD token number to retrieve a current value for.
|
||||
|
||||
@retval UINT32 Returns the 32-bit value for the token specified by TokenNumber.
|
||||
|
||||
**/
|
||||
UINT32
|
||||
EFIAPI
|
||||
LibPcdGet32 (
|
||||
IN UINTN TokenNumber
|
||||
);
|
||||
|
||||
|
||||
/**
|
||||
Returns the 64-bit value for the token specified by TokenNumber.
|
||||
|
||||
@param[in] TokenNumber The PCD token number to retrieve a current value for.
|
||||
|
||||
@retval UINT64 Returns the 64-bit value for the token specified by TokenNumber.
|
||||
|
||||
**/
|
||||
UINT64
|
||||
EFIAPI
|
||||
LibPcdGet64 (
|
||||
IN UINTN TokenNumber
|
||||
);
|
||||
|
||||
|
||||
/**
|
||||
Returns the pointer to the buffer of the token specified by TokenNumber.
|
||||
|
||||
@param[in] TokenNumber The PCD token number to retrieve a current value for.
|
||||
|
||||
@retval VOID* Returns the pointer to the token specified by TokenNumber.
|
||||
|
||||
**/
|
||||
VOID *
|
||||
EFIAPI
|
||||
LibPcdGetPtr (
|
||||
IN UINTN TokenNumber
|
||||
);
|
||||
|
||||
|
||||
/**
|
||||
Returns the Boolean value of the token specified by TokenNumber.
|
||||
|
||||
@param[in] TokenNumber The PCD token number to retrieve a current value for.
|
||||
|
||||
@retval BOOLEAN Returns the Boolean value of the token specified by TokenNumber.
|
||||
|
||||
**/
|
||||
BOOLEAN
|
||||
EFIAPI
|
||||
LibPcdGetBool (
|
||||
IN UINTN TokenNumber
|
||||
);
|
||||
|
||||
|
||||
/**
|
||||
Returns the size of the token specified by TokenNumber.
|
||||
|
||||
@param[in] TokenNumber The PCD token number to retrieve a current value for.
|
||||
|
||||
@retval UINTN Returns the size of the token specified by TokenNumber.
|
||||
|
||||
**/
|
||||
UINTN
|
||||
EFIAPI
|
||||
LibPcdGetSize (
|
||||
IN UINTN TokenNumber
|
||||
);
|
||||
|
||||
|
||||
/**
|
||||
Returns the 8-bit value for the token specified by TokenNumber and Guid.
|
||||
If Guid is NULL, then ASSERT().
|
||||
|
||||
@param[in] Guid Pointer to a 128-bit unique value that designates
|
||||
which namespace to retrieve a value from.
|
||||
@param[in] TokenNumber The PCD token number to retrieve a current value for.
|
||||
|
||||
@retval UINT8 Return the UINT8.
|
||||
|
||||
**/
|
||||
UINT8
|
||||
EFIAPI
|
||||
LibPcdGetEx8 (
|
||||
IN CONST GUID *Guid,
|
||||
IN UINTN TokenNumber
|
||||
);
|
||||
|
||||
|
||||
/**
|
||||
Returns the 16-bit value for the token specified by TokenNumber and Guid.
|
||||
If Guid is NULL, then ASSERT().
|
||||
|
||||
@param[in] Guid Pointer to a 128-bit unique value that designates
|
||||
which namespace to retrieve a value from.
|
||||
@param[in] TokenNumber The PCD token number to retrieve a current value for.
|
||||
|
||||
@retval UINT16 Return the UINT16.
|
||||
|
||||
**/
|
||||
UINT16
|
||||
EFIAPI
|
||||
LibPcdGetEx16 (
|
||||
IN CONST GUID *Guid,
|
||||
IN UINTN TokenNumber
|
||||
);
|
||||
|
||||
|
||||
/**
|
||||
Returns the 32-bit value for the token specified by TokenNumber and Guid.
|
||||
If Guid is NULL, then ASSERT().
|
||||
|
||||
@param[in] Guid Pointer to a 128-bit unique value that designates
|
||||
which namespace to retrieve a value from.
|
||||
@param[in] TokenNumber The PCD token number to retrieve a current value for.
|
||||
|
||||
@retval UINT32 Return the UINT32.
|
||||
|
||||
**/
|
||||
UINT32
|
||||
EFIAPI
|
||||
LibPcdGetEx32 (
|
||||
IN CONST GUID *Guid,
|
||||
IN UINTN TokenNumber
|
||||
);
|
||||
|
||||
|
||||
/**
|
||||
Returns the 64-bit value for the token specified by TokenNumber and Guid.
|
||||
If Guid is NULL, then ASSERT().
|
||||
|
||||
@param[in] Guid Pointer to a 128-bit unique value that designates
|
||||
which namespace to retrieve a value from.
|
||||
@param[in] TokenNumber The PCD token number to retrieve a current value for.
|
||||
|
||||
@retval UINT64 Return the UINT64.
|
||||
|
||||
**/
|
||||
UINT64
|
||||
EFIAPI
|
||||
LibPcdGetEx64 (
|
||||
IN CONST GUID *Guid,
|
||||
IN UINTN TokenNumber
|
||||
);
|
||||
|
||||
|
||||
/**
|
||||
Returns the pointer to the buffer of token specified by TokenNumber and Guid.
|
||||
If Guid is NULL, then ASSERT().
|
||||
|
||||
@param[in] Guid Pointer to a 128-bit unique value that designates
|
||||
which namespace to retrieve a value from.
|
||||
@param[in] TokenNumber The PCD token number to retrieve a current value for.
|
||||
|
||||
@retval VOID* Return the VOID* pointer.
|
||||
|
||||
**/
|
||||
VOID *
|
||||
EFIAPI
|
||||
LibPcdGetExPtr (
|
||||
IN CONST GUID *Guid,
|
||||
IN UINTN TokenNumber
|
||||
);
|
||||
|
||||
|
||||
/**
|
||||
Returns the Boolean value of the token specified by TokenNumber and Guid.
|
||||
If Guid is NULL, then ASSERT().
|
||||
|
||||
@param[in] Guid Pointer to a 128-bit unique value that designates
|
||||
which namespace to retrieve a value from.
|
||||
@param[in] TokenNumber The PCD token number to retrieve a current value for.
|
||||
|
||||
@retval BOOLEAN Return the BOOLEAN.
|
||||
|
||||
**/
|
||||
BOOLEAN
|
||||
EFIAPI
|
||||
LibPcdGetExBool (
|
||||
IN CONST GUID *Guid,
|
||||
IN UINTN TokenNumber
|
||||
);
|
||||
|
||||
|
||||
/**
|
||||
Returns the size of the token specified by TokenNumber and Guid.
|
||||
If Guid is NULL, then ASSERT().
|
||||
|
||||
@param[in] Guid Pointer to a 128-bit unique value that designates
|
||||
which namespace to retrieve a value from.
|
||||
@param[in] TokenNumber The PCD token number to retrieve a current value for.
|
||||
|
||||
@retval UINTN Return the size.
|
||||
|
||||
**/
|
||||
UINTN
|
||||
EFIAPI
|
||||
LibPcdGetExSize (
|
||||
IN CONST GUID *Guid,
|
||||
IN UINTN TokenNumber
|
||||
);
|
||||
|
||||
|
||||
/**
|
||||
Sets the 8-bit value for the token specified by TokenNumber
|
||||
to the value specified by Value. Value is returned.
|
||||
|
||||
@param[in] TokenNumber The PCD token number to set a current value for.
|
||||
@param[in] Value The 8-bit value to set.
|
||||
|
||||
@retval UINT8 Return the value been set.
|
||||
|
||||
**/
|
||||
UINT8
|
||||
EFIAPI
|
||||
LibPcdSet8 (
|
||||
IN UINTN TokenNumber,
|
||||
IN UINT8 Value
|
||||
);
|
||||
|
||||
|
||||
/**
|
||||
Sets the 16-bit value for the token specified by TokenNumber
|
||||
to the value specified by Value. Value is returned.
|
||||
|
||||
@param[in] TokenNumber The PCD token number to set a current value for.
|
||||
@param[in] Value The 16-bit value to set.
|
||||
|
||||
@retval UINT16 Return the value been set.
|
||||
|
||||
**/
|
||||
UINT16
|
||||
EFIAPI
|
||||
LibPcdSet16 (
|
||||
IN UINTN TokenNumber,
|
||||
IN UINT16 Value
|
||||
);
|
||||
|
||||
|
||||
/**
|
||||
Sets the 32-bit value for the token specified by TokenNumber
|
||||
to the value specified by Value. Value is returned.
|
||||
|
||||
@param[in] TokenNumber The PCD token number to set a current value for.
|
||||
@param[in] Value The 32-bit value to set.
|
||||
|
||||
@retval UINT32 Return the value been set.
|
||||
|
||||
**/
|
||||
UINT32
|
||||
EFIAPI
|
||||
LibPcdSet32 (
|
||||
IN UINTN TokenNumber,
|
||||
IN UINT32 Value
|
||||
);
|
||||
|
||||
|
||||
/**
|
||||
Sets the 64-bit value for the token specified by TokenNumber
|
||||
to the value specified by Value. Value is returned.
|
||||
|
||||
@param[in] TokenNumber The PCD token number to set a current value for.
|
||||
@param[in] Value The 64-bit value to set.
|
||||
|
||||
@retval UINT64 Return the value been set.
|
||||
|
||||
**/
|
||||
UINT64
|
||||
EFIAPI
|
||||
LibPcdSet64 (
|
||||
IN UINTN TokenNumber,
|
||||
IN UINT64 Value
|
||||
);
|
||||
|
||||
|
||||
/**
|
||||
Sets a buffer for the token specified by TokenNumber to
|
||||
the value specified by Value. Value is returned.
|
||||
If Value is NULL, then ASSERT().
|
||||
|
||||
@param[in] TokenNumber The PCD token number to set a current value for.
|
||||
@param[in] Value A pointer to the buffer to set.
|
||||
|
||||
@retval VOID* Return the pointer for the buffer been set.
|
||||
|
||||
**/
|
||||
VOID*
|
||||
EFIAPI
|
||||
LibPcdSetPtr (
|
||||
IN UINTN TokenNumber,
|
||||
IN UINTN SizeOfBuffer,
|
||||
IN VOID *Value
|
||||
);
|
||||
|
||||
|
||||
/**
|
||||
Sets the Boolean value for the token specified by TokenNumber
|
||||
to the value specified by Value. Value is returned.
|
||||
|
||||
@param[in] TokenNumber The PCD token number to set a current value for.
|
||||
@param[in] Value The boolean value to set.
|
||||
|
||||
@retval BOOLEAN Return the value been set.
|
||||
|
||||
**/
|
||||
BOOLEAN
|
||||
EFIAPI
|
||||
LibPcdSetBool (
|
||||
IN UINTN TokenNumber,
|
||||
IN BOOLEAN Value
|
||||
);
|
||||
|
||||
|
||||
/**
|
||||
Sets the 8-bit value for the token specified by TokenNumber and
|
||||
Guid to the value specified by Value. Value is returned.
|
||||
If Guid is NULL, then ASSERT().
|
||||
|
||||
@param[in] Guid Pointer to a 128-bit unique value that
|
||||
designates which namespace to set a value from.
|
||||
@param[in] TokenNumber The PCD token number to set a current value for.
|
||||
@param[in] Value The 8-bit value to set.
|
||||
|
||||
@retval UINT8 Return the value been set.
|
||||
|
||||
**/
|
||||
UINT8
|
||||
EFIAPI
|
||||
LibPcdSetEx8 (
|
||||
IN CONST GUID *Guid,
|
||||
IN UINTN TokenNumber,
|
||||
IN UINT8 Value
|
||||
);
|
||||
|
||||
|
||||
/**
|
||||
Sets the 16-bit value for the token specified by TokenNumber and
|
||||
Guid to the value specified by Value. Value is returned.
|
||||
If Guid is NULL, then ASSERT().
|
||||
|
||||
@param[in] Guid Pointer to a 128-bit unique value that
|
||||
designates which namespace to set a value from.
|
||||
@param[in] TokenNumber The PCD token number to set a current value for.
|
||||
@param[in] Value The 16-bit value to set.
|
||||
|
||||
@retval UINT8 Return the value been set.
|
||||
|
||||
**/
|
||||
UINT16
|
||||
EFIAPI
|
||||
LibPcdSetEx16 (
|
||||
IN CONST GUID *Guid,
|
||||
IN UINTN TokenNumber,
|
||||
IN UINT16 Value
|
||||
);
|
||||
|
||||
|
||||
/**
|
||||
Sets the 32-bit value for the token specified by TokenNumber and
|
||||
Guid to the value specified by Value. Value is returned.
|
||||
If Guid is NULL, then ASSERT().
|
||||
|
||||
@param[in] Guid Pointer to a 128-bit unique value that
|
||||
designates which namespace to set a value from.
|
||||
@param[in] TokenNumber The PCD token number to set a current value for.
|
||||
@param[in] Value The 32-bit value to set.
|
||||
|
||||
@retval UINT32 Return the value been set.
|
||||
|
||||
**/
|
||||
UINT32
|
||||
EFIAPI
|
||||
LibPcdSetEx32 (
|
||||
IN CONST GUID *Guid,
|
||||
IN UINTN TokenNumber,
|
||||
IN UINT32 Value
|
||||
);
|
||||
|
||||
|
||||
/**
|
||||
Sets the 64-bit value for the token specified by TokenNumber and
|
||||
Guid to the value specified by Value. Value is returned.
|
||||
If Guid is NULL, then ASSERT().
|
||||
|
||||
@param[in] Guid Pointer to a 128-bit unique value that
|
||||
designates which namespace to set a value from.
|
||||
@param[in] TokenNumber The PCD token number to set a current value for.
|
||||
@param[in] Value The 64-bit value to set.
|
||||
|
||||
@retval UINT64 Return the value been set.
|
||||
|
||||
**/
|
||||
UINT64
|
||||
EFIAPI
|
||||
LibPcdSetEx64 (
|
||||
IN CONST GUID *Guid,
|
||||
IN UINTN TokenNumber,
|
||||
IN UINT64 Value
|
||||
);
|
||||
|
||||
|
||||
/**
|
||||
Sets a buffer for the token specified by TokenNumber and
|
||||
Guid to the value specified by Value. Value is returned.
|
||||
If Guid is NULL, then ASSERT().
|
||||
If Value is NULL, then ASSERT().
|
||||
|
||||
@param[in] Guid Pointer to a 128-bit unique value that
|
||||
designates which namespace to set a value from.
|
||||
@param[in] TokenNumber The PCD token number to set a current value for.
|
||||
@param[in] Value The 8-bit value to set.
|
||||
|
||||
@retval VOID * Return the value been set.
|
||||
|
||||
**/
|
||||
VOID *
|
||||
EFIAPI
|
||||
LibPcdSetExPtr (
|
||||
IN CONST GUID *Guid,
|
||||
IN UINTN TokenNumber,
|
||||
IN UINTN SizeOfBuffer,
|
||||
IN VOID *Value
|
||||
);
|
||||
|
||||
|
||||
/**
|
||||
Sets the Boolean value for the token specified by TokenNumber and
|
||||
Guid to the value specified by Value. Value is returned.
|
||||
If Guid is NULL, then ASSERT().
|
||||
|
||||
@param[in] Guid Pointer to a 128-bit unique value that
|
||||
designates which namespace to set a value from.
|
||||
@param[in] TokenNumber The PCD token number to set a current value for.
|
||||
@param[in] Value The Boolean value to set.
|
||||
|
||||
@retval Boolean Return the value been set.
|
||||
|
||||
**/
|
||||
BOOLEAN
|
||||
EFIAPI
|
||||
LibPcdSetExBool (
|
||||
IN CONST GUID *Guid,
|
||||
IN UINTN TokenNumber,
|
||||
IN BOOLEAN Value
|
||||
);
|
||||
|
||||
|
||||
/**
|
||||
When the token specified by TokenNumber and Guid is set,
|
||||
then notification function specified by NotificationFunction is called.
|
||||
If Guid is NULL, then the default token space is used.
|
||||
If NotificationFunction is NULL, then ASSERT().
|
||||
|
||||
@param[in] CallBackGuid The PCD token GUID being set.
|
||||
@param[in] CallBackToken The PCD token number being set.
|
||||
@param[in] TokenData A pointer to the token data being set.
|
||||
@param[in] TokenDataSize The size, in bytes, of the data being set.
|
||||
|
||||
@retval VOID
|
||||
|
||||
**/
|
||||
typedef
|
||||
VOID
|
||||
(EFIAPI *PCD_CALLBACK) (
|
||||
IN CONST GUID *CallBackGuid, OPTIONAL
|
||||
IN UINTN CallBackToken,
|
||||
IN OUT VOID *TokenData,
|
||||
IN UINTN TokenDataSize
|
||||
);
|
||||
|
||||
|
||||
/**
|
||||
When the token specified by TokenNumber and Guid is set,
|
||||
then notification function specified by NotificationFunction is called.
|
||||
If Guid is NULL, then the default token space is used.
|
||||
If NotificationFunction is NULL, then ASSERT().
|
||||
|
||||
@param[in] Guid Pointer to a 128-bit unique value that designates which
|
||||
namespace to set a value from. If NULL, then the default
|
||||
token space is used.
|
||||
@param[in] TokenNumber The PCD token number to monitor.
|
||||
@param[in] NotificationFunction The function to call when the token
|
||||
specified by Guid and TokenNumber is set.
|
||||
|
||||
@retval VOID
|
||||
|
||||
**/
|
||||
VOID
|
||||
EFIAPI
|
||||
LibPcdCallbackOnSet (
|
||||
IN CONST GUID *Guid, OPTIONAL
|
||||
IN UINTN TokenNumber,
|
||||
IN PCD_CALLBACK NotificationFunction
|
||||
);
|
||||
|
||||
|
||||
/**
|
||||
Disable a notification function that was established with LibPcdCallbackonSet().
|
||||
|
||||
@param[in] Guid Specify the GUID token space.
|
||||
@param[in] TokenNumber Specify the token number.
|
||||
@param[in] NotificationFunction The callback function to be unregistered.
|
||||
|
||||
@retval VOID
|
||||
|
||||
**/
|
||||
VOID
|
||||
EFIAPI
|
||||
LibPcdCancelCallback (
|
||||
IN CONST GUID *Guid, OPTIONAL
|
||||
IN UINTN TokenNumber,
|
||||
IN PCD_CALLBACK NotificationFunction
|
||||
);
|
||||
|
||||
|
||||
/**
|
||||
Retrieves the next PCD token number from the token space specified by Guid.
|
||||
If Guid is NULL, then the default token space is used. If TokenNumber is 0,
|
||||
then the first token number is returned. Otherwise, the token number that
|
||||
follows TokenNumber in the token space is returned. If TokenNumber is the last
|
||||
token number in the token space, then 0 is returned. If TokenNumber is not 0 and
|
||||
is not in the token space specified by Guid, then ASSERT().
|
||||
|
||||
@param[in] Pointer to a 128-bit unique value that designates which namespace
|
||||
to set a value from. If NULL, then the default token space is used.
|
||||
@param[in] The previous PCD token number. If 0, then retrieves the first PCD
|
||||
token number.
|
||||
|
||||
@retval UINTN The next valid token number.
|
||||
|
||||
**/
|
||||
UINTN
|
||||
EFIAPI
|
||||
LibPcdGetNextToken (
|
||||
IN CONST GUID *Guid, OPTIONAL
|
||||
IN UINTN TokenNumber
|
||||
);
|
||||
|
||||
#endif
|
131
Tools/Source/TianoTools/Include/Library/PeCoffLib.h
Normal file
131
Tools/Source/TianoTools/Include/Library/PeCoffLib.h
Normal file
@ -0,0 +1,131 @@
|
||||
/** @file
|
||||
Memory Only PE COFF loader
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
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
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
Module Name: PeCoffLib.h
|
||||
|
||||
**/
|
||||
|
||||
#ifndef __BASE_PE_COFF_LIB_H__
|
||||
#define __BASE_PE_COFF_LIB_H__
|
||||
|
||||
//
|
||||
// Return status codes from the PE/COFF Loader services
|
||||
// BUGBUG: Find where used and see if can be replaced by RETURN_STATUS codes
|
||||
//
|
||||
#define IMAGE_ERROR_SUCCESS 0
|
||||
#define IMAGE_ERROR_IMAGE_READ 1
|
||||
#define IMAGE_ERROR_INVALID_PE_HEADER_SIGNATURE 2
|
||||
#define IMAGE_ERROR_INVALID_MACHINE_TYPE 3
|
||||
#define IMAGE_ERROR_INVALID_SUBSYSTEM 4
|
||||
#define IMAGE_ERROR_INVALID_IMAGE_ADDRESS 5
|
||||
#define IMAGE_ERROR_INVALID_IMAGE_SIZE 6
|
||||
#define IMAGE_ERROR_INVALID_SECTION_ALIGNMENT 7
|
||||
#define IMAGE_ERROR_SECTION_NOT_LOADED 8
|
||||
#define IMAGE_ERROR_FAILED_RELOCATION 9
|
||||
#define IMAGE_ERROR_FAILED_ICACHE_FLUSH 10
|
||||
|
||||
|
||||
//
|
||||
// PE/COFF Loader Read Function passed in by caller
|
||||
//
|
||||
typedef
|
||||
RETURN_STATUS
|
||||
(EFIAPI *PE_COFF_LOADER_READ_FILE) (
|
||||
IN VOID *FileHandle,
|
||||
IN UINTN FileOffset,
|
||||
IN OUT UINTN *ReadSize,
|
||||
OUT VOID *Buffer
|
||||
);
|
||||
|
||||
//
|
||||
// Context structure used while PE/COFF image is being loaded and relocated
|
||||
//
|
||||
typedef struct {
|
||||
PHYSICAL_ADDRESS ImageAddress;
|
||||
UINT64 ImageSize;
|
||||
PHYSICAL_ADDRESS DestinationAddress;
|
||||
PHYSICAL_ADDRESS EntryPoint;
|
||||
PE_COFF_LOADER_READ_FILE ImageRead;
|
||||
VOID *Handle;
|
||||
VOID *FixupData;
|
||||
UINT32 SectionAlignment;
|
||||
UINT32 PeCoffHeaderOffset;
|
||||
UINT32 DebugDirectoryEntryRva;
|
||||
VOID *CodeView;
|
||||
CHAR8 *PdbPointer;
|
||||
UINTN SizeOfHeaders;
|
||||
UINT32 ImageCodeMemoryType;
|
||||
UINT32 ImageDataMemoryType;
|
||||
UINT32 ImageError;
|
||||
UINTN FixupDataSize;
|
||||
UINT16 Machine;
|
||||
UINT16 ImageType;
|
||||
BOOLEAN RelocationsStripped;
|
||||
BOOLEAN IsTeImage;
|
||||
} PE_COFF_LOADER_IMAGE_CONTEXT;
|
||||
|
||||
|
||||
/**
|
||||
Retrieves information on a PE/COFF image
|
||||
|
||||
@param ImageContext The context of the image being loaded
|
||||
|
||||
@retval EFI_SUCCESS The information on the PE/COFF image was collected.
|
||||
@retval EFI_INVALID_PARAMETER ImageContext is NULL.
|
||||
@retval EFI_UNSUPPORTED The PE/COFF image is not supported.
|
||||
@retval Otherwise The error status from reading the PE/COFF image using the
|
||||
ImageContext->ImageRead() function
|
||||
|
||||
**/
|
||||
RETURN_STATUS
|
||||
EFIAPI
|
||||
PeCoffLoaderGetImageInfo (
|
||||
IN OUT PE_COFF_LOADER_IMAGE_CONTEXT *ImageContext
|
||||
)
|
||||
;
|
||||
|
||||
/**
|
||||
Relocates a PE/COFF image in memory
|
||||
|
||||
@param ImageContext Contains information on the loaded image to relocate
|
||||
|
||||
@retval EFI_SUCCESS if the PE/COFF image was relocated
|
||||
@retval EFI_LOAD_ERROR if the image is not a valid PE/COFF image
|
||||
@retval EFI_UNSUPPORTED not support
|
||||
|
||||
**/
|
||||
RETURN_STATUS
|
||||
EFIAPI
|
||||
PeCoffLoaderRelocateImage (
|
||||
IN OUT PE_COFF_LOADER_IMAGE_CONTEXT *ImageContext
|
||||
)
|
||||
;
|
||||
|
||||
/**
|
||||
Loads a PE/COFF image into memory
|
||||
|
||||
@param ImageContext Contains information on image to load into memory
|
||||
|
||||
@retval EFI_SUCCESS if the PE/COFF image was loaded
|
||||
@retval EFI_BUFFER_TOO_SMALL if the caller did not provide a large enough buffer
|
||||
@retval EFI_LOAD_ERROR if the image is a runtime driver with no relocations
|
||||
@retval EFI_INVALID_PARAMETER if the image address is invalid
|
||||
|
||||
**/
|
||||
RETURN_STATUS
|
||||
EFIAPI
|
||||
PeCoffLoaderLoadImage (
|
||||
IN OUT PE_COFF_LOADER_IMAGE_CONTEXT *ImageContext
|
||||
)
|
||||
;
|
||||
|
||||
#endif
|
406
Tools/Source/TianoTools/Include/Library/PrintLib.h
Normal file
406
Tools/Source/TianoTools/Include/Library/PrintLib.h
Normal file
@ -0,0 +1,406 @@
|
||||
/** @file
|
||||
Library that provides print services
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
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
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
Module Name: PrintLib.h
|
||||
|
||||
**/
|
||||
|
||||
#ifndef __PRINT_LIB_H__
|
||||
#define __PRINT_LIB_H__
|
||||
|
||||
//
|
||||
// Print primitives
|
||||
//
|
||||
#define LEFT_JUSTIFY 0x01
|
||||
#define COMMA_TYPE 0x08
|
||||
#define PREFIX_ZERO 0x20
|
||||
|
||||
/**
|
||||
Produces a Null-terminated Unicode string in an output buffer based on
|
||||
a Null-terminated Unicode format string and a VA_LIST argument list
|
||||
|
||||
Produces a Null-terminated Unicode string in the output buffer specified by StartOfBuffer
|
||||
and BufferSize.
|
||||
The Unicode string is produced by parsing the format string specified by FormatString.
|
||||
Arguments are pulled from the variable argument list specified by Marker based on the
|
||||
contents of the format string.
|
||||
The length of the produced output buffer is returned.
|
||||
If BufferSize is 0, then no output buffer is produced and 0 is returned.
|
||||
|
||||
If BufferSize is not 0 and StartOfBuffer is NULL, then ASSERT().
|
||||
If BufferSize is not 0 and FormatString is NULL, then ASSERT().
|
||||
If PcdMaximumUnicodeStringLength is not zero, and FormatString contains more than
|
||||
PcdMaximumUnicodeStringLength Unicode characters, then ASSERT().
|
||||
If PcdMaximumUnicodeStringLength is not zero, and produced Null-terminated Unicode string
|
||||
contains more than PcdMaximumUnicodeStringLength Unicode characters, then ASSERT().
|
||||
|
||||
@param StartOfBuffer APointer to the output buffer for the produced Null-terminated
|
||||
Unicode string.
|
||||
@param BufferSize The size, in bytes, of the output buffer specified by StartOfBuffer.
|
||||
@param FormatString Null-terminated Unicode format string.
|
||||
@param Marker VA_LIST marker for the variable argument list.
|
||||
|
||||
@return return Length of the produced output buffer.
|
||||
|
||||
**/
|
||||
UINTN
|
||||
EFIAPI
|
||||
UnicodeVSPrint (
|
||||
OUT CHAR16 *StartOfBuffer,
|
||||
IN UINTN BufferSize,
|
||||
IN CONST CHAR16 *FormatString,
|
||||
IN VA_LIST Marker
|
||||
);
|
||||
|
||||
/**
|
||||
Produces a Null-terminated Unicode string in an output buffer based on a Null-terminated
|
||||
Unicode format string and variable argument list.
|
||||
|
||||
Produces a Null-terminated Unicode string in the output buffer specified by StartOfBuffer
|
||||
and BufferSize.
|
||||
The Unicode string is produced by parsing the format string specified by FormatString.
|
||||
Arguments are pulled from the variable argument list based on the contents of the format string.
|
||||
The length of the produced output buffer is returned.
|
||||
If BufferSize is 0, then no output buffer is produced and 0 is returned.
|
||||
|
||||
If BufferSize is not 0 and StartOfBuffer is NULL, then ASSERT().
|
||||
If BufferSize is not 0 and FormatString is NULL, then ASSERT().
|
||||
If PcdMaximumUnicodeStringLength is not zero, and FormatString contains more than
|
||||
PcdMaximumUnicodeStringLength Unicode characters, then ASSERT().
|
||||
If PcdMaximumUnicodeStringLength is not zero, and produced Null-terminated Unicode string
|
||||
contains more than PcdMaximumUnicodeStringLength Unicode characters, then ASSERT().
|
||||
|
||||
@param StartOfBuffer APointer to the output buffer for the produced Null-terminated
|
||||
Unicode string.
|
||||
@param BufferSize The size, in bytes, of the output buffer specified by StartOfBuffer.
|
||||
@param FormatString Null-terminated Unicode format string.
|
||||
|
||||
@return Length of the produced output buffer.
|
||||
|
||||
**/
|
||||
UINTN
|
||||
EFIAPI
|
||||
UnicodeSPrint (
|
||||
OUT CHAR16 *StartOfBuffer,
|
||||
IN UINTN BufferSize,
|
||||
IN CONST CHAR16 *FormatString,
|
||||
...
|
||||
);
|
||||
|
||||
/**
|
||||
Produces a Null-terminated Unicode string in an output buffer based on a Null-terminated
|
||||
ASCII format string and a VA_LIST argument list
|
||||
|
||||
Produces a Null-terminated Unicode string in the output buffer specified by StartOfBuffer
|
||||
and BufferSize.
|
||||
The Unicode string is produced by parsing the format string specified by FormatString.
|
||||
Arguments are pulled from the variable argument list specified by Marker based on the
|
||||
contents of the format string.
|
||||
The length of the produced output buffer is returned.
|
||||
If BufferSize is 0, then no output buffer is produced and 0 is returned.
|
||||
|
||||
If BufferSize is not 0 and StartOfBuffer is NULL, then ASSERT().
|
||||
If BufferSize is not 0 and FormatString is NULL, then ASSERT().
|
||||
If PcdMaximumUnicodeStringLength is not zero, and FormatString contains more than
|
||||
PcdMaximumUnicodeStringLength Unicode characters, then ASSERT().
|
||||
If PcdMaximumUnicodeStringLength is not zero, and produced Null-terminated Unicode string
|
||||
contains more than PcdMaximumUnicodeStringLength Unicode characters, then ASSERT().
|
||||
|
||||
@param StartOfBuffer APointer to the output buffer for the produced Null-terminated
|
||||
Unicode string.
|
||||
@param BufferSize The size, in bytes, of the output buffer specified by StartOfBuffer.
|
||||
@param FormatString Null-terminated Unicode format string.
|
||||
@param Marker VA_LIST marker for the variable argument list.
|
||||
|
||||
@return Length of the produced output buffer.
|
||||
|
||||
**/
|
||||
UINTN
|
||||
EFIAPI
|
||||
UnicodeVSPrintAsciiFormat (
|
||||
OUT CHAR16 *StartOfBuffer,
|
||||
IN UINTN BufferSize,
|
||||
IN CONST CHAR8 *FormatString,
|
||||
IN VA_LIST Marker
|
||||
);
|
||||
|
||||
/**
|
||||
Produces a Null-terminated Unicode string in an output buffer based on a Null-terminated
|
||||
ASCII format string and variable argument list.
|
||||
|
||||
Produces a Null-terminated Unicode string in the output buffer specified by StartOfBuffer
|
||||
and BufferSize.
|
||||
The Unicode string is produced by parsing the format string specified by FormatString.
|
||||
Arguments are pulled from the variable argument list based on the contents of the
|
||||
format string.
|
||||
The length of the produced output buffer is returned.
|
||||
If BufferSize is 0, then no output buffer is produced and 0 is returned.
|
||||
|
||||
If BufferSize is not 0 and StartOfBuffer is NULL, then ASSERT().
|
||||
If BufferSize is not 0 and FormatString is NULL, then ASSERT().
|
||||
If PcdMaximumUnicodeStringLength is not zero, and FormatString contains more than
|
||||
PcdMaximumUnicodeStringLength Unicode characters, then ASSERT().
|
||||
If PcdMaximumUnicodeStringLength is not zero, and produced Null-terminated Unicode string
|
||||
contains more than PcdMaximumUnicodeStringLength Unicode characters, then ASSERT().
|
||||
|
||||
@param StartOfBuffer APointer to the output buffer for the produced Null-terminated
|
||||
Unicode string.
|
||||
@param BufferSize The size, in bytes, of the output buffer specified by StartOfBuffer.
|
||||
@param FormatString Null-terminated Unicode format string.
|
||||
|
||||
@return Length of the produced output buffer.
|
||||
|
||||
**/
|
||||
UINTN
|
||||
EFIAPI
|
||||
UnicodeSPrintAsciiFormat (
|
||||
OUT CHAR16 *StartOfBuffer,
|
||||
IN UINTN BufferSize,
|
||||
IN CONST CHAR8 *FormatString,
|
||||
...
|
||||
);
|
||||
|
||||
/**
|
||||
Produces a Null-terminated ASCII string in an output buffer based on a Null-terminated
|
||||
ASCII format string and a VA_LIST argument list.
|
||||
|
||||
Produces a Null-terminated ASCII string in the output buffer specified by StartOfBuffer
|
||||
and BufferSize.
|
||||
The ASCII string is produced by parsing the format string specified by FormatString.
|
||||
Arguments are pulled from the variable argument list specified by Marker based on
|
||||
the contents of the format string.
|
||||
The length of the produced output buffer is returned.
|
||||
If BufferSize is 0, then no output buffer is produced and 0 is returned.
|
||||
|
||||
If BufferSize is not 0 and StartOfBuffer is NULL, then ASSERT().
|
||||
If BufferSize is not 0 and FormatString is NULL, then ASSERT().
|
||||
If PcdMaximumUnicodeStringLength is not zero, and FormatString contains more than
|
||||
PcdMaximumUnicodeStringLength ASCII characters, then ASSERT().
|
||||
If PcdMaximumUnicodeStringLength is not zero, and produced Null-terminated Unicode string
|
||||
contains more than PcdMaximumUnicodeStringLength ASCII characters, then ASSERT().
|
||||
|
||||
@param StartOfBuffer APointer to the output buffer for the produced Null-terminated
|
||||
ASCII string.
|
||||
@param BufferSize The size, in bytes, of the output buffer specified by StartOfBuffer.
|
||||
@param FormatString Null-terminated Unicode format string.
|
||||
@param Marker VA_LIST marker for the variable argument list.
|
||||
|
||||
@return Length of the produced output buffer.
|
||||
|
||||
**/
|
||||
UINTN
|
||||
EFIAPI
|
||||
AsciiVSPrint (
|
||||
OUT CHAR8 *StartOfBuffer,
|
||||
IN UINTN BufferSize,
|
||||
IN CONST CHAR8 *FormatString,
|
||||
IN VA_LIST Marker
|
||||
);
|
||||
|
||||
/**
|
||||
Produces a Null-terminated ASCII string in an output buffer based on a Null-terminated
|
||||
ASCII format string and variable argument list.
|
||||
|
||||
Produces a Null-terminated ASCII string in the output buffer specified by StartOfBuffer
|
||||
and BufferSize.
|
||||
The ASCII string is produced by parsing the format string specified by FormatString.
|
||||
Arguments are pulled from the variable argument list based on the contents of the
|
||||
format string.
|
||||
The length of the produced output buffer is returned.
|
||||
If BufferSize is 0, then no output buffer is produced and 0 is returned.
|
||||
|
||||
If BufferSize is not 0 and StartOfBuffer is NULL, then ASSERT().
|
||||
If BufferSize is not 0 and FormatString is NULL, then ASSERT().
|
||||
If PcdMaximumUnicodeStringLength is not zero, and FormatString contains more than
|
||||
PcdMaximumUnicodeStringLength ASCII characters, then ASSERT().
|
||||
If PcdMaximumUnicodeStringLength is not zero, and produced Null-terminated Unicode string
|
||||
contains more than PcdMaximumUnicodeStringLength ASCII characters, then ASSERT().
|
||||
|
||||
@param StartOfBuffer APointer to the output buffer for the produced Null-terminated
|
||||
ASCII string.
|
||||
@param BufferSize The size, in bytes, of the output buffer specified by StartOfBuffer.
|
||||
@param FormatString Null-terminated Unicode format string.
|
||||
|
||||
@return Length of the produced output buffer.
|
||||
|
||||
**/
|
||||
UINTN
|
||||
EFIAPI
|
||||
AsciiSPrint (
|
||||
OUT CHAR8 *StartOfBuffer,
|
||||
IN UINTN BufferSize,
|
||||
IN CONST CHAR8 *FormatString,
|
||||
...
|
||||
);
|
||||
|
||||
/**
|
||||
Produces a Null-terminated ASCII string in an output buffer based on a Null-terminated
|
||||
ASCII format string and a VA_LIST argument list.
|
||||
|
||||
Produces a Null-terminated ASCII string in the output buffer specified by StartOfBuffer
|
||||
and BufferSize.
|
||||
The ASCII string is produced by parsing the format string specified by FormatString.
|
||||
Arguments are pulled from the variable argument list specified by Marker based on
|
||||
the contents of the format string.
|
||||
The length of the produced output buffer is returned.
|
||||
If BufferSize is 0, then no output buffer is produced and 0 is returned.
|
||||
|
||||
If BufferSize is not 0 and StartOfBuffer is NULL, then ASSERT().
|
||||
If BufferSize is not 0 and FormatString is NULL, then ASSERT().
|
||||
If PcdMaximumUnicodeStringLength is not zero, and FormatString contains more than
|
||||
PcdMaximumUnicodeStringLength ASCII characters, then ASSERT().
|
||||
If PcdMaximumUnicodeStringLength is not zero, and produced Null-terminated Unicode string
|
||||
contains more than PcdMaximumUnicodeStringLength ASCII characters, then ASSERT().
|
||||
|
||||
@param StartOfBuffer APointer to the output buffer for the produced Null-terminated
|
||||
ASCII string.
|
||||
@param BufferSize The size, in bytes, of the output buffer specified by StartOfBuffer.
|
||||
@param FormatString Null-terminated Unicode format string.
|
||||
@param Marker VA_LIST marker for the variable argument list.
|
||||
|
||||
@return Length of the produced output buffer.
|
||||
|
||||
**/
|
||||
UINTN
|
||||
EFIAPI
|
||||
AsciiVSPrintUnicodeFormat (
|
||||
OUT CHAR8 *StartOfBuffer,
|
||||
IN UINTN BufferSize,
|
||||
IN CONST CHAR16 *FormatString,
|
||||
IN VA_LIST Marker
|
||||
);
|
||||
|
||||
/**
|
||||
Produces a Null-terminated ASCII string in an output buffer based on a Null-terminated
|
||||
ASCII format string and variable argument list.
|
||||
|
||||
Produces a Null-terminated ASCII string in the output buffer specified by StartOfBuffer
|
||||
and BufferSize.
|
||||
The ASCII string is produced by parsing the format string specified by FormatString.
|
||||
Arguments are pulled from the variable argument list based on the contents of the
|
||||
format string.
|
||||
The length of the produced output buffer is returned.
|
||||
If BufferSize is 0, then no output buffer is produced and 0 is returned.
|
||||
|
||||
If BufferSize is not 0 and StartOfBuffer is NULL, then ASSERT().
|
||||
If BufferSize is not 0 and FormatString is NULL, then ASSERT().
|
||||
If PcdMaximumUnicodeStringLength is not zero, and FormatString contains more than
|
||||
PcdMaximumUnicodeStringLength ASCII characters, then ASSERT().
|
||||
If PcdMaximumUnicodeStringLength is not zero, and produced Null-terminated Unicode string
|
||||
contains more than PcdMaximumUnicodeStringLength ASCII characters, then ASSERT().
|
||||
|
||||
@param StartOfBuffer APointer to the output buffer for the produced Null-terminated
|
||||
ASCII string.
|
||||
@param BufferSize The size, in bytes, of the output buffer specified by StartOfBuffer.
|
||||
@param FormatString Null-terminated Unicode format string.
|
||||
|
||||
@return Length of the produced output buffer.
|
||||
|
||||
**/
|
||||
UINTN
|
||||
EFIAPI
|
||||
AsciiSPrintUnicodeFormat (
|
||||
OUT CHAR8 *StartOfBuffer,
|
||||
IN UINTN BufferSize,
|
||||
IN CONST CHAR16 *FormatString,
|
||||
...
|
||||
);
|
||||
|
||||
/**
|
||||
Converts a decimal value to a Null-terminated Unicode string.
|
||||
|
||||
Converts the decimal number specified by Value to a Null-terminated Unicode
|
||||
string specified by Buffer containing at most Width characters.
|
||||
If Width is 0 then a width of MAXIMUM_VALUE_CHARACTERS is assumed.
|
||||
The total number of characters placed in Buffer is returned.
|
||||
If the conversion contains more than Width characters, then only the first
|
||||
Width characters are returned, and the total number of characters
|
||||
required to perform the conversion is returned.
|
||||
Additional conversion parameters are specified in Flags.
|
||||
The Flags bit LEFT_JUSTIFY is always ignored.
|
||||
All conversions are left justified in Buffer.
|
||||
If Width is 0, PREFIX_ZERO is ignored in Flags.
|
||||
If COMMA_TYPE is set in Flags, then PREFIX_ZERO is ignored in Flags, and commas
|
||||
are inserted every 3rd digit starting from the right.
|
||||
If Value is < 0, then the fist character in Buffer is a '-'.
|
||||
If PREFIX_ZERO is set in Flags and PREFIX_ZERO is not being ignored,
|
||||
then Buffer is padded with '0' characters so the combination of the optional '-'
|
||||
sign character, '0' characters, digit characters for Value, and the Null-terminator
|
||||
add up to Width characters.
|
||||
|
||||
If Buffer is NULL, then ASSERT().
|
||||
If unsupported bits are set in Flags, then ASSERT().
|
||||
If Width >= MAXIMUM_VALUE_CHARACTERS, then ASSERT()
|
||||
|
||||
@param Buffer Pointer to the output buffer for the produced Null-terminated
|
||||
Unicode string.
|
||||
@param Flags The bitmask of flags that specify left justification, zero pad, and commas.
|
||||
@param Value The 64-bit signed value to convert to a string.
|
||||
@param Width The maximum number of Unicode characters to place in Buffer.
|
||||
|
||||
@return Total number of characters required to perform the conversion.
|
||||
|
||||
**/
|
||||
UINTN
|
||||
EFIAPI
|
||||
UnicodeValueToString (
|
||||
IN OUT CHAR16 *Buffer,
|
||||
IN UINTN Flags,
|
||||
IN INT64 Value,
|
||||
IN UINTN Width
|
||||
);
|
||||
|
||||
/**
|
||||
Converts a decimal value to a Null-terminated ASCII string.
|
||||
|
||||
Converts the decimal number specified by Value to a Null-terminated ASCII string
|
||||
specified by Buffer containing at most Width characters.
|
||||
If Width is 0 then a width of MAXIMUM_VALUE_CHARACTERS is assumed.
|
||||
The total number of characters placed in Buffer is returned.
|
||||
If the conversion contains more than Width characters, then only the first Width
|
||||
characters are returned, and the total number of characters required to perform
|
||||
the conversion is returned.
|
||||
Additional conversion parameters are specified in Flags.
|
||||
The Flags bit LEFT_JUSTIFY is always ignored.
|
||||
All conversions are left justified in Buffer.
|
||||
If Width is 0, PREFIX_ZERO is ignored in Flags.
|
||||
If COMMA_TYPE is set in Flags, then PREFIX_ZERO is ignored in Flags, and commas
|
||||
are inserted every 3rd digit starting from the right.
|
||||
If Value is < 0, then the fist character in Buffer is a '-'.
|
||||
If PREFIX_ZERO is set in Flags and PREFIX_ZERO is not being ignored, then Buffer
|
||||
is padded with '0' characters so the combination of the optional '-'
|
||||
sign character, '0' characters, digit characters for Value, and the
|
||||
Null-terminator add up to Width characters.
|
||||
|
||||
If Buffer is NULL, then ASSERT().
|
||||
If unsupported bits are set in Flags, then ASSERT().
|
||||
If Width >= MAXIMUM_VALUE_CHARACTERS, then ASSERT()
|
||||
|
||||
@param Buffer Pointer to the output buffer for the produced Null-terminated
|
||||
ASCII string.
|
||||
@param Flags The bitmask of flags that specify left justification, zero pad, and commas.
|
||||
@param Value The 64-bit signed value to convert to a string.
|
||||
@param Width The maximum number of ASCII characters to place in Buffer.
|
||||
|
||||
@return Total number of characters required to perform the conversion.
|
||||
|
||||
**/
|
||||
UINTN
|
||||
EFIAPI
|
||||
AsciiValueToString (
|
||||
IN OUT CHAR8 *Buffer,
|
||||
IN UINTN Flags,
|
||||
IN INT64 Value,
|
||||
IN UINTN Width
|
||||
);
|
||||
|
||||
#endif
|
173
Tools/Source/TianoTools/Include/Protocol/AcpiSupport.h
Normal file
173
Tools/Source/TianoTools/Include/Protocol/AcpiSupport.h
Normal file
@ -0,0 +1,173 @@
|
||||
/** @file
|
||||
Definition of the ACPI Support protocol.
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
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
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
Module Name: AcpiSupport.h
|
||||
|
||||
@par Revision Reference:
|
||||
This is defined in the ACPI Specification 0.9.
|
||||
|
||||
**/
|
||||
|
||||
#ifndef _ACPI_SUPPORT_PROTOCOL_H_
|
||||
#define _ACPI_SUPPORT_PROTOCOL_H_
|
||||
|
||||
typedef struct _EFI_ACPI_SUPPORT_PROTOCOL EFI_ACPI_SUPPORT_PROTOCOL;
|
||||
|
||||
//
|
||||
// ACPI Support Protocol GUID
|
||||
//
|
||||
#define EFI_ACPI_SUPPORT_GUID \
|
||||
{ \
|
||||
0xdbff9d55, 0x89b7, 0x46da, {0xbd, 0xdf, 0x67, 0x7d, 0x3d, 0xc0, 0x24, 0x1d } \
|
||||
}
|
||||
|
||||
//
|
||||
// Protocol Data Definitions
|
||||
//
|
||||
//
|
||||
// ACPI Version bitmap definition:
|
||||
//
|
||||
// EFI_ACPI_TABLE_VERSION_1_0B - ACPI Version 1.0b
|
||||
// EFI_ACPI_TABLE_VERSION_2_0 - ACPI Version 2.0
|
||||
// EFI_ACPI_TABLE_VERSION_3_0 - ACPI Version 3.0
|
||||
// EFI_ACPI_TABLE_VERSION_NONE - No ACPI Versions. This might be used
|
||||
// to create memory-based operation regions or other information
|
||||
// that is not part of the ACPI "tree" but must still be found
|
||||
// in ACPI memory space and/or managed by the core ACPI driver.
|
||||
//
|
||||
// Note that EFI provides discrete GUIDs for each version of ACPI
|
||||
// that is supported. It is expected that each EFI GUIDed
|
||||
// version of ACPI will also have a corresponding bitmap
|
||||
// definition. This allows maintenance of separate ACPI trees
|
||||
// for each distinctly different version of ACPI.
|
||||
//
|
||||
#define EFI_ACPI_TABLE_VERSION UINT32
|
||||
|
||||
#define EFI_ACPI_TABLE_VERSION_NONE (1 << 0)
|
||||
#define EFI_ACPI_TABLE_VERSION_1_0B (1 << 1)
|
||||
#define EFI_ACPI_TABLE_VERSION_2_0 (1 << 2)
|
||||
#define EFI_ACPI_TABLE_VERSION_3_0 (1 << 3)
|
||||
|
||||
//
|
||||
// Protocol Member Functions
|
||||
//
|
||||
|
||||
/**
|
||||
Returns a requested ACPI table.
|
||||
|
||||
@param This A pointer to the EFI_ACPI_SUPPORT_PROTOCOL instance.
|
||||
|
||||
@param Index The zero-based index of the table to retrieve.
|
||||
|
||||
@param Table Pointer for returning the table buffer.
|
||||
|
||||
@param Version Updated with the ACPI versions to which this table belongs.
|
||||
|
||||
@param Handle Pointer for identifying the table.
|
||||
|
||||
@retval EFI_SUCCESS The function completed successfully.
|
||||
|
||||
@retval EFI_NOT_FOUND The requested index is too large and a table was not found.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_ACPI_GET_ACPI_TABLE) (
|
||||
IN EFI_ACPI_SUPPORT_PROTOCOL *This,
|
||||
IN INTN Index,
|
||||
OUT VOID **Table,
|
||||
OUT EFI_ACPI_TABLE_VERSION *Version,
|
||||
OUT UINTN *Handle
|
||||
);
|
||||
|
||||
/**
|
||||
Used to add, remove, or update ACPI tables.
|
||||
|
||||
@param This A pointer to the EFI_ACPI_SUPPORT_PROTOCOL instance.
|
||||
|
||||
@param Table Pointer to the new table to add or update.
|
||||
|
||||
@param Checksum If TRUE, indicates that the checksum should be
|
||||
calculated for this table.
|
||||
|
||||
@param Version Indicates to which version(s) of ACPI the table should be added.
|
||||
|
||||
@param Pointer to the handle of the table to remove or update.
|
||||
|
||||
@retval EFI_SUCCESS The function completed successfully.
|
||||
|
||||
@retval EFI_INVALID_PARAMETER *Handle was zero and Table was NULL.
|
||||
|
||||
@retval EFI_ABORTED Could not complete the desired action.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_ACPI_SET_ACPI_TABLE) (
|
||||
IN EFI_ACPI_SUPPORT_PROTOCOL *This,
|
||||
IN VOID *Table OPTIONAL,
|
||||
IN BOOLEAN Checksum,
|
||||
IN EFI_ACPI_TABLE_VERSION Version,
|
||||
IN OUT UINTN *Handle
|
||||
);
|
||||
|
||||
/**
|
||||
Causes one or more versions of the ACPI tables to be published in
|
||||
the EFI system configuration tables.
|
||||
|
||||
@param This A pointer to the EFI_ACPI_SUPPORT_PROTOCOL instance.
|
||||
|
||||
@param Version Indicates to which version(s) of ACPI that the table should be published.
|
||||
|
||||
@retval EFI_SUCCESS The function completed successfully.
|
||||
|
||||
@retval EFI_ABORTED An error occurred and the function could not complete successfully.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_ACPI_PUBLISH_TABLES) (
|
||||
IN EFI_ACPI_SUPPORT_PROTOCOL *This,
|
||||
IN EFI_ACPI_TABLE_VERSION Version
|
||||
);
|
||||
|
||||
//
|
||||
// ACPI Support Protocol
|
||||
//
|
||||
/**
|
||||
@par Protocol Description:
|
||||
This protocol provides some basic services to support publishing ACPI system
|
||||
tables. The services handle many of the more mundane tasks that are required
|
||||
to publish a set of tables.
|
||||
|
||||
@param GetAcpiTable
|
||||
Returns a table specified by an index if it exists.
|
||||
|
||||
@param SetAcpiTable
|
||||
Adds, removes, or updates ACPI tables
|
||||
|
||||
@param PublishTables
|
||||
Publishes the ACPI tables.
|
||||
|
||||
**/
|
||||
struct _EFI_ACPI_SUPPORT_PROTOCOL {
|
||||
EFI_ACPI_GET_ACPI_TABLE GetAcpiTable;
|
||||
EFI_ACPI_SET_ACPI_TABLE SetAcpiTable;
|
||||
EFI_ACPI_PUBLISH_TABLES PublishTables;
|
||||
};
|
||||
|
||||
//
|
||||
// Extern the GUID for protocol users.
|
||||
//
|
||||
extern EFI_GUID gEfiAcpiSupportProtocolGuid;
|
||||
|
||||
#endif
|
259
Tools/Source/TianoTools/Include/Protocol/Arp.h
Normal file
259
Tools/Source/TianoTools/Include/Protocol/Arp.h
Normal file
@ -0,0 +1,259 @@
|
||||
/** @file
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
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
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
Module Name: Arp.h
|
||||
|
||||
**/
|
||||
|
||||
#ifndef __EFI_ARP_PROTOCOL_H__
|
||||
#define __EFI_ARP_PROTOCOL_H__
|
||||
|
||||
#define EFI_ARP_SERVICE_BINDING_PROTOCOL_GUID \
|
||||
{ \
|
||||
0xf44c00ee, 0x1f2c, 0x4a00, {0xaa, 0x9, 0x1c, 0x9f, 0x3e, 0x8, 0x0, 0xa3 } \
|
||||
}
|
||||
|
||||
#define EFI_ARP_PROTOCOL_GUID \
|
||||
{ \
|
||||
0xf4b427bb, 0xba21, 0x4f16, {0xbc, 0x4e, 0x43, 0xe4, 0x16, 0xab, 0x61, 0x9c } \
|
||||
}
|
||||
|
||||
typedef struct _EFI_ARP_PROTOCOL EFI_ARP_PROTOCOL;
|
||||
|
||||
typedef struct {
|
||||
UINT32 Size;
|
||||
BOOLEAN DenyFlag;
|
||||
BOOLEAN StaticFlag;
|
||||
UINT16 HwAddressType;
|
||||
UINT16 SwAddressType;
|
||||
UINT8 HwAddressLength;
|
||||
UINT8 SwAddressLength;
|
||||
} EFI_ARP_FIND_DATA;
|
||||
|
||||
typedef struct {
|
||||
UINT16 SwAddressType; // Host byte order
|
||||
UINT8 SwAddressLength;
|
||||
VOID *StationAddress; // Network byte order
|
||||
UINT32 EntryTimeOut;
|
||||
UINT32 RetryCount;
|
||||
UINT32 RetryTimeOut;
|
||||
} EFI_ARP_CONFIG_DATA;
|
||||
|
||||
|
||||
/**
|
||||
Assigns a station address (protocol type and network address) to this instance of the ARP cache.
|
||||
|
||||
@param This A pointer to the EFI_ARP_PROTOCOL instance.
|
||||
@param ConfigData A pointer to the EFI_ARP_CONFIG_DATA structure.Buffer
|
||||
|
||||
@retval EFI_SUCCESS The new station address was successfully registered.
|
||||
@retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:
|
||||
@retval EFI_ACCESS_DENIED The SwAddressType, SwAddressLength, or
|
||||
StationAddress is different from the one that is already
|
||||
registered.
|
||||
@retval EFI_OUT_OF_RESOURCES Storage for the new StationAddress could not be allocated.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_ARP_CONFIGURE) (
|
||||
IN EFI_ARP_PROTOCOL *This,
|
||||
IN EFI_ARP_CONFIG_DATA *ConfigData OPTIONAL
|
||||
)
|
||||
;
|
||||
|
||||
/**
|
||||
Inserts an entry to the ARP cache.
|
||||
|
||||
@param This A pointer to the EFI_ARP_PROTOCOL instance.
|
||||
@param DenyFlag Set to TRUE if this entry is a <20><>deny<6E><79> entry. Set to FALSE if this
|
||||
entry is a <20><>normal<61><6C> entry.
|
||||
@param TargetSwAddress Pointer to a protocol address to add (or deny). May be set to
|
||||
NULL if DenyFlag is TRUE.
|
||||
@param TargetHwAddress Pointer to a hardware address to add (or deny). May be set to
|
||||
NULL if DenyFlag is TRUE.
|
||||
@param TimeoutValue Time in 100-ns units that this entry will remain in the ARP
|
||||
cache. A value of zero means that the entry is permanent. A
|
||||
nonzero value will override the one given by Configure() if
|
||||
the entry to be added is dynamic entry.
|
||||
@param Overwrite If TRUE, the matching cache entry will be overwritten with the
|
||||
supplied parameters. If FALSE, EFI_ACCESS_DENIED
|
||||
|
||||
@retval EFI_SUCCESS The entry has been added or updated.
|
||||
@retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:
|
||||
@retval EFI_OUT_OF_RESOURCES The new ARP cache entry could not be allocated.
|
||||
@retval EFI_ACCESS_DENIED The ARP cache entry already exists and Overwrite is not true.
|
||||
@retval EFI_NOT_STARTED The ARP driver instance has not been configured.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_ARP_ADD) (
|
||||
IN EFI_ARP_PROTOCOL *This,
|
||||
IN BOOLEAN DenyFlag,
|
||||
IN VOID *TargetSwAddress OPTIONAL,
|
||||
IN VOID *TargetHwAddress OPTIONAL,
|
||||
IN UINT32 TimeoutValue,
|
||||
IN BOOLEAN Overwrite
|
||||
)
|
||||
;
|
||||
|
||||
/**
|
||||
Locates one or more entries in the ARP cache.
|
||||
|
||||
@param This A pointer to the EFI_ARP_PROTOCOL instance.
|
||||
@param BySwAddress Set to TRUE to look for matching software protocol addresses.
|
||||
Set to FALSE to look for matching hardware protocol addresses.
|
||||
@param AddressBuffer Pointer to address buffer. Set to NULL to match all addresses.
|
||||
@param EntryLength The size of an entry in the entries buffer. To keep the
|
||||
EFI_ARP_FIND_DATA structure properly aligned, this field
|
||||
may be longer than sizeof(EFI_ARP_FIND_DATA) plus
|
||||
the length of the software and hardware addresses.
|
||||
@param EntryCount The number of ARP cache entries that are found by the specified criteria.
|
||||
@param Entries Pointer to the buffer that will receive the ARP cache entries.
|
||||
@param Refresh Set to TRUE to refresh the timeout value of the matching ARP
|
||||
cache entry.
|
||||
|
||||
@retval EFI_SUCCESS The requested ARP cache entries were copied into the buffer.
|
||||
@retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:
|
||||
@retval EFI_NOT_FOUND No matching entries were found.
|
||||
@retval EFI_NOT_STARTED The ARP driver instance has not been configured.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_ARP_FIND) (
|
||||
IN EFI_ARP_PROTOCOL *This,
|
||||
IN BOOLEAN BySwAddress,
|
||||
IN VOID *AddressBuffer OPTIONAL,
|
||||
OUT UINT32 *EntryLength OPTIONAL,
|
||||
OUT UINT32 *EntryCount OPTIONAL,
|
||||
OUT EFI_ARP_FIND_DATA **Entries OPTIONAL,
|
||||
IN BOOLEAN Refresh
|
||||
)
|
||||
;
|
||||
|
||||
|
||||
/**
|
||||
Removes entries from the ARP cache.
|
||||
|
||||
@param This A pointer to the EFI_ARP_PROTOCOL instance.
|
||||
@param BySwAddress Set to TRUE to delete matching protocol addresses.
|
||||
Set to FALSE to delete matching hardware addresses.
|
||||
@param AddressBuffer Pointer to the address buffer that is used as a key to look for the
|
||||
cache entry. Set to NULL to delete all entries.
|
||||
|
||||
@retval EFI_SUCCESS The entry was removed from the ARP cache.
|
||||
@retval EFI_INVALID_PARAMETER This is NULL.
|
||||
@retval EFI_NOT_FOUND The specified deletion key was not found.
|
||||
@retval EFI_NOT_STARTED The ARP driver instance has not been configured.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_ARP_DELETE) (
|
||||
IN EFI_ARP_PROTOCOL *This,
|
||||
IN BOOLEAN BySwAddress,
|
||||
IN VOID *AddressBuffer OPTIONAL
|
||||
)
|
||||
;
|
||||
|
||||
/**
|
||||
Removes all dynamic ARP cache entries that were added by this interface.
|
||||
|
||||
@param This A pointer to the EFI_ARP_PROTOCOL instance.
|
||||
|
||||
@retval EFI_SUCCESS The cache has been flushed.
|
||||
@retval EFI_INVALID_PARAMETER This is NULL.
|
||||
@retval EFI_NOT_FOUND There are no matching dynamic cache entries.
|
||||
@retval EFI_NOT_STARTED The ARP driver instance has not been configured.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_ARP_FLUSH) (
|
||||
IN EFI_ARP_PROTOCOL *This
|
||||
)
|
||||
;
|
||||
|
||||
/**
|
||||
Starts an ARP request session.
|
||||
|
||||
@param This A pointer to the EFI_ARP_PROTOCOL instance.
|
||||
@param TargetSwAddress Pointer to the protocol address to resolve.
|
||||
@param ResolvedEvent Pointer to the event that will be signaled when the address is
|
||||
resolved or some error occurs.
|
||||
@param TargetHwAddress Pointer to the buffer for the resolved hardware address in
|
||||
network byte order. The buffer must be large enough to hold the
|
||||
resulting hardware address. TargetHwAddress must not be
|
||||
NULL.
|
||||
|
||||
@retval EFI_SUCCESS The data was copied from the ARP cache into the
|
||||
TargetHwAddress buffer.
|
||||
@retval EFI_INVALID_PARAMETER This or TargetHwAddress is NULL.
|
||||
@retval EFI_ACCESS_DENIED The requested address is not present in the normal ARP cache but
|
||||
is present in the deny address list. Outgoing traffic to that address is
|
||||
forbidden.
|
||||
@retval EFI_NOT_STARTED The ARP driver instance has not been configured.
|
||||
@retval EFI_NOT_READY The request has been started and is not finished.
|
||||
@retval EFI_UNSUPPORTED The requested conversion is not supported in this implementation or
|
||||
configuration.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_ARP_REQUEST) (
|
||||
IN EFI_ARP_PROTOCOL *This,
|
||||
IN VOID *TargetSwAddress OPTIONAL,
|
||||
IN EFI_EVENT ResolvedEvent OPTIONAL,
|
||||
OUT VOID *TargetHwAddress
|
||||
)
|
||||
;
|
||||
|
||||
/**
|
||||
Cancels an ARP request session.
|
||||
|
||||
@param This A pointer to the EFI_ARP_PROTOCOL instance.
|
||||
@param TargetSwAddress Pointer to the protocol address in previous request session.
|
||||
@param ResolvedEvent Pointer to the event that is used as the notification event in
|
||||
previous request session.
|
||||
|
||||
@retval EFI_SUCCESS The pending request session(s) is/are aborted and corresponding
|
||||
event(s) is/are signaled.
|
||||
@retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:
|
||||
@retval EFI_NOT_STARTED The ARP driver instance has not been configured.
|
||||
@retval EFI_NOT_FOUND The request is not issued by
|
||||
EFI_ARP_PROTOCOL.Request().
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_ARP_CANCEL) (
|
||||
IN EFI_ARP_PROTOCOL *This,
|
||||
IN VOID *TargetSwAddress OPTIONAL,
|
||||
IN EFI_EVENT ResolvedEvent OPTIONAL
|
||||
)
|
||||
;
|
||||
|
||||
struct _EFI_ARP_PROTOCOL {
|
||||
EFI_ARP_CONFIGURE Configure;
|
||||
EFI_ARP_ADD Add;
|
||||
EFI_ARP_FIND Find;
|
||||
EFI_ARP_DELETE Delete;
|
||||
EFI_ARP_FLUSH Flush;
|
||||
EFI_ARP_REQUEST Request;
|
||||
EFI_ARP_CANCEL Cancel;
|
||||
};
|
||||
|
||||
|
||||
extern EFI_GUID gEfiArpServiceBindingProtocolGuid;
|
||||
extern EFI_GUID gEfiArpProtocolGuid;
|
||||
|
||||
#endif
|
125
Tools/Source/TianoTools/Include/Protocol/AuthenticationInfo.h
Normal file
125
Tools/Source/TianoTools/Include/Protocol/AuthenticationInfo.h
Normal file
@ -0,0 +1,125 @@
|
||||
/** @file
|
||||
EFI_AUTHENTICATION_INFO_PROTOCOL as defined in UEFI 2.0.
|
||||
This protocol is used on any device handle to obtain authentication information
|
||||
associated with the physical or logical device.
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
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
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
Module Name: AuthenticationInfo.h
|
||||
|
||||
**/
|
||||
|
||||
#ifndef __AUTHENTICATION_INFO_H__
|
||||
#define __AUTHENTICATION_INFO_H__
|
||||
|
||||
#define EFI_AUTHENTICATION_INFO_PROTOCOL_GUID \
|
||||
{ \
|
||||
0x7671d9d0, 0x53db, 0x4173, {0xaa, 0x69, 0x23, 0x27, 0xf2, 0x1f, 0x0b, 0xc7 } \
|
||||
}
|
||||
|
||||
#define EFI_AUTHENTICATION_CHAP_RADIUS_GUID \
|
||||
{ \
|
||||
0xd6062b50, 0x15ca, 0x11da, {0x92, 0x19, 0x00, 0x10, 0x83, 0xff, 0xca, 0x4d } \
|
||||
}
|
||||
|
||||
#define EFI_AUTHENTICATION_CHAP_LOCAL_GUID \
|
||||
{ \
|
||||
0xc280c73e, 0x15ca, 0x11da, {0xb0, 0xca, 0x00, 0x10, 0x83, 0xff, 0xca, 0x4d } \
|
||||
}
|
||||
|
||||
typedef struct _EFI_AUTHENTICATION_INFO_PROTOCOL EFI_AUTHENTICATION_INFO_PROTOCOL;
|
||||
|
||||
typedef struct {
|
||||
EFI_GUID Guid;
|
||||
UINT16 Length;
|
||||
} AUTH_NODE_HEADER;
|
||||
|
||||
typedef struct {
|
||||
AUTH_NODE_HEADER Header;
|
||||
EFI_IPv6_ADDRESS RadiusIpAddr; // IPv4 or IPv6 address
|
||||
UINT16 Reserved;
|
||||
EFI_IPv6_ADDRESS NasIpAddr; // IPv4 or IPv6 address
|
||||
UINT16 NasSecretLength;
|
||||
UINT8 *NasSecret;
|
||||
UINT16 ChapSecretLength;
|
||||
UINT8 *ChapSecret;
|
||||
UINT16 ChapNameLength;
|
||||
UINT8 *ChapName;
|
||||
} CHAP_RADIUS_AUTH_NODE;
|
||||
|
||||
typedef struct {
|
||||
AUTH_NODE_HEADER Header;
|
||||
UINT16 Reserved;
|
||||
UINT16 UserSecretLength;
|
||||
UINT8 *UserSecret;
|
||||
UINT16 UserNameLength;
|
||||
UINT8 *UserName;
|
||||
UINT16 ChapSecretLength;
|
||||
UINT8 *ChapSecret;
|
||||
UINT16 ChapNameLength;
|
||||
UINT8 *ChapName;
|
||||
} CHAP_LOCAL_AUTH_NODE;
|
||||
|
||||
/**
|
||||
Retrieves the Authentication information associated with a particular controller handle.
|
||||
|
||||
@param This Pointer to the EFI_AUTHENTICATION_INFO_PROTOCOL
|
||||
@param ControllerHandle Handle to the Controller
|
||||
@param Buffer Pointer to the authentication information.
|
||||
|
||||
@retval EFI_SUCCESS Successfully retrieved Authentication information for the given ControllerHandle
|
||||
@retval EFI_INVALID_PARAMETER No matching Authentication information found for the given ControllerHandle
|
||||
@retval EFI_DEVICE_ERROR The authentication information could not be retrieved due to a
|
||||
hardware error.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_AUTHENTICATION_PROTOCOL_INFO_GET) (
|
||||
IN EFI_AUTHENTICATION_INFO_PROTOCOL *This,
|
||||
IN EFI_HANDLE *ControllerHandle,
|
||||
OUT VOID *Buffer
|
||||
)
|
||||
;
|
||||
|
||||
/**
|
||||
Set the Authentication information for a given controller handle.
|
||||
|
||||
@param This Pointer to the EFI_AUTHENTICATION_INFO_PROTOCOL
|
||||
@param ControllerHandle Handle to the Controller
|
||||
@param Buffer Pointer to the authentication information.
|
||||
|
||||
@retval EFI_SUCCESS Successfully set Authentication information for the given ControllerHandle
|
||||
@retval EFI_UNSUPPORTED If the platform policies do not allow setting of the Authentication
|
||||
information.
|
||||
@retval EFI_DEVICE_ERROR The authentication information could not be configured due to a
|
||||
hardware error.
|
||||
@retval EFI_OUT_OF_RESOURCES Not enough storage is available to hold the data.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_AUTHENTICATION_PROTOCOL_INFO_SET) (
|
||||
IN EFI_AUTHENTICATION_INFO_PROTOCOL *This,
|
||||
IN EFI_HANDLE *ControllerHandle,
|
||||
IN VOID *Buffer
|
||||
)
|
||||
;
|
||||
|
||||
struct _EFI_AUTHENTICATION_INFO_PROTOCOL {
|
||||
EFI_AUTHENTICATION_PROTOCOL_INFO_GET Get;
|
||||
EFI_AUTHENTICATION_PROTOCOL_INFO_SET Set;
|
||||
};
|
||||
|
||||
extern EFI_GUID gEfiAuthenticationInfoProtocolGuid;
|
||||
extern EFI_GUID gEfiAuthenticationChapRadiusGuid;
|
||||
extern EFI_GUID gEfiAuthenticationChapLocalGuid;
|
||||
|
||||
#endif
|
418
Tools/Source/TianoTools/Include/Protocol/Bis.h
Normal file
418
Tools/Source/TianoTools/Include/Protocol/Bis.h
Normal file
@ -0,0 +1,418 @@
|
||||
/** @file
|
||||
This file defines the BIS protocol.
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
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
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
Module Name: Bis.h
|
||||
|
||||
**/
|
||||
|
||||
#ifndef __BIS_H__
|
||||
#define __BIS_H__
|
||||
|
||||
#define EFI_BIS_PROTOCOL_GUID \
|
||||
{ \
|
||||
0x0b64aab0, 0x5429, 0x11d4, {0x98, 0x16, 0x00, 0xa0, 0xc9, 0x1f, 0xad, 0xcf } \
|
||||
}
|
||||
|
||||
typedef struct _EFI_BIS_PROTOCOL EFI_BIS_PROTOCOL;
|
||||
|
||||
|
||||
//
|
||||
// Basic types
|
||||
//
|
||||
typedef VOID *BIS_APPLICATION_HANDLE;
|
||||
typedef UINT16 BIS_ALG_ID;
|
||||
typedef UINT32 BIS_CERT_ID;
|
||||
|
||||
//
|
||||
// EFI_BIS_DATA type.
|
||||
//
|
||||
// EFI_BIS_DATA instances obtained from BIS must be freed by calling Free( ).
|
||||
//
|
||||
typedef struct {
|
||||
UINT32 Length; // Length of Data in 8 bit bytes.
|
||||
UINT8 *Data; // 32 Bit Flat Address of data.
|
||||
} EFI_BIS_DATA;
|
||||
|
||||
//
|
||||
// EFI_BIS_VERSION type.
|
||||
//
|
||||
typedef struct {
|
||||
UINT32 Major; // BIS Interface version number.
|
||||
UINT32 Minor; // Build number.
|
||||
} EFI_BIS_VERSION;
|
||||
|
||||
//
|
||||
// ----------------------------------------------------//
|
||||
// Use these values to initialize EFI_BIS_VERSION.Major
|
||||
// and to interpret results of Initialize.
|
||||
// ----------------------------------------------------//
|
||||
//
|
||||
#define BIS_CURRENT_VERSION_MAJOR BIS_VERSION_1
|
||||
#define BIS_VERSION_1 1
|
||||
|
||||
//
|
||||
// EFI_BIS_SIGNATURE_INFO type.
|
||||
//
|
||||
typedef struct {
|
||||
BIS_CERT_ID CertificateID; // Truncated hash of platform Boot Object
|
||||
// authorization certificate.
|
||||
//
|
||||
BIS_ALG_ID AlgorithmID; // A signature algorithm number.
|
||||
UINT16 KeyLength; // Length of alg. keys in bits.
|
||||
} EFI_BIS_SIGNATURE_INFO;
|
||||
|
||||
//
|
||||
// Currently defined values for EFI_BIS_SIGNATURE_INFO.AlgorithmID.
|
||||
// The exact numeric values come from
|
||||
// "Common Data Security Architecture (CDSA) Specification".
|
||||
//
|
||||
#define BIS_ALG_DSA (41) // CSSM_ALGID_DSA
|
||||
#define BIS_ALG_RSA_MD5 (42) // CSSM_ALGID_MD5_WITH_RSA
|
||||
// Currently defined values for EFI_BIS_SIGNATURE_INFO.CertificateId.
|
||||
//
|
||||
#define BIS_CERT_ID_DSA BIS_ALG_DSA // CSSM_ALGID_DSA
|
||||
#define BIS_CERT_ID_RSA_MD5 BIS_ALG_RSA_MD5 // CSSM_ALGID_MD5_WITH_RSA
|
||||
// The following is a mask value that gets applied to the truncated hash of a
|
||||
// platform Boot Object Authorization Certificate to create the certificateID.
|
||||
// A certificateID must not have any bits set to the value 1 other than bits in
|
||||
// this mask.
|
||||
//
|
||||
#define BIS_CERT_ID_MASK (0xFF7F7FFF)
|
||||
|
||||
//
|
||||
// Macros for dealing with the EFI_BIS_DATA object obtained
|
||||
// from BIS_GetSignatureInfo()
|
||||
// BIS_GET_SIGINFO_COUNT - tells how many EFI_BIS_SIGNATURE_INFO
|
||||
// elements are contained in a EFI_BIS_DATA struct pointed to
|
||||
// by the provided EFI_BIS_DATA*.
|
||||
//
|
||||
#define BIS_GET_SIGINFO_COUNT(BisDataPtr) ((BisDataPtr)->Length / sizeof (EFI_BIS_SIGNATURE_INFO))
|
||||
|
||||
//
|
||||
// BIS_GET_SIGINFO_ARRAY - produces a EFI_BIS_SIGNATURE_INFO*
|
||||
// from a given EFI_BIS_DATA*.
|
||||
//
|
||||
#define BIS_GET_SIGINFO_ARRAY(BisDataPtr) ((EFI_BIS_SIGNATURE_INFO *) (BisDataPtr)->Data)
|
||||
|
||||
//
|
||||
// Binary Value of "X-Intel-BIS-ParameterSet" Attribute.
|
||||
// (Value is Base64 encoded in actual signed manifest).
|
||||
// {EDD35E31-07B9-11d2-83A3-00A0C91FADCF}
|
||||
//
|
||||
#define BOOT_OBJECT_AUTHORIZATION_PARMSET_GUID \
|
||||
{ \
|
||||
0xedd35e31, 0x7b9, 0x11d2, \
|
||||
{ \
|
||||
0x83, 0xa3, 0x0, 0xa0, 0xc9, 0x1f, 0xad, 0xcf \
|
||||
} \
|
||||
}
|
||||
|
||||
//
|
||||
// Support old name for backward compatible
|
||||
//
|
||||
#define BOOT_OBJECT_AUTHORIZATION_PARMSET_GUIDVALUE \
|
||||
BOOT_OBJECT_AUTHORIZATION_PARMSET_GUID
|
||||
|
||||
/**
|
||||
Initializes the BIS service, checking that it is compatible with the version requested by the caller.
|
||||
After this call, other BIS functions may be invoked.
|
||||
|
||||
@param This A pointer to the EFI_BIS_PROTOCOL object.
|
||||
@param AppHandle The function writes the new BIS_APPLICATION_HANDLE if
|
||||
successful, otherwise it writes NULL. The caller must eventually
|
||||
destroy this handle by calling Shutdown().
|
||||
@param InterfaceVersion On input, the caller supplies the major version number of the
|
||||
interface version desired.
|
||||
On output, both the major and minor
|
||||
version numbers are updated with the major and minor version
|
||||
numbers of the interface
|
||||
@param TargetAddress Indicates a network or device address of the BIS platform to connect to.
|
||||
|
||||
@retval EFI_SUCCESS The function completed successfully.
|
||||
@retval EFI_INCOMPATIBLE_VERSION The InterfaceVersion.Major requested by the
|
||||
caller was not compatible with the interface version of the
|
||||
@retval EFI_UNSUPPORTED This is a local-platform implementation and
|
||||
TargetAddress.Data was not NULL, or
|
||||
TargetAddress.Data was any other value that was not
|
||||
supported by the implementation.
|
||||
@retval EFI_OUT_OF_RESOURCES The function failed due to lack of memory or other resources.
|
||||
@retval EFI_DEVICE_ERROR The function encountered an unexpected internal failure.
|
||||
@retval EFI_INVALID_PARAMETER One or more parameters are invalid.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_BIS_INITIALIZE) (
|
||||
IN EFI_BIS_PROTOCOL *This,
|
||||
OUT BIS_APPLICATION_HANDLE *AppHandle,
|
||||
IN OUT EFI_BIS_VERSION *InterfaceVersion,
|
||||
IN EFI_BIS_DATA *TargetAddress
|
||||
);
|
||||
|
||||
/**
|
||||
Frees memory structures allocated and returned by other functions in the EFI_BIS protocol.
|
||||
|
||||
@param AppHandle An opaque handle that identifies the caller<65><72>s instance of initialization
|
||||
of the BIS service.
|
||||
@param ToFree An EFI_BIS_DATA* and associated memory block to be freed.
|
||||
|
||||
@retval EFI_SUCCESS The function completed successfully.
|
||||
@retval EFI_NO_MAPPING The AppHandle parameter is not or is no longer a valid
|
||||
application instance handle associated with the EFI_BIS protocol.
|
||||
@retval EFI_OUT_OF_RESOURCES The function failed due to lack of memory or other resources.
|
||||
@retval EFI_INVALID_PARAMETER The ToFree parameter is not or is no longer a memory resource
|
||||
associated with this AppHandle.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_BIS_FREE) (
|
||||
IN BIS_APPLICATION_HANDLE AppHandle,
|
||||
IN EFI_BIS_DATA *ToFree
|
||||
);
|
||||
|
||||
/**
|
||||
Shuts down an application<6F><6E>s instance of the BIS service, invalidating the application handle. After
|
||||
this call, other BIS functions may no longer be invoked using the application handle value.
|
||||
|
||||
@param AppHandle An opaque handle that identifies the caller<65><72>s instance of initialization
|
||||
of the BIS service.
|
||||
|
||||
@retval EFI_SUCCESS The function completed successfully.
|
||||
@retval EFI_NO_MAPPING The AppHandle parameter is not or is no longer a valid
|
||||
application instance handle associated with the EFI_BIS protocol.
|
||||
@retval EFI_OUT_OF_RESOURCES The function failed due to lack of memory or other resources.
|
||||
@retval EFI_DEVICE_ERROR The function encountered an unexpected internal failure.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_BIS_SHUTDOWN) (
|
||||
IN BIS_APPLICATION_HANDLE AppHandle
|
||||
);
|
||||
|
||||
/**
|
||||
Retrieves the certificate that has been configured as the identity of the organization designated as
|
||||
the source of authorization for signatures of boot objects.
|
||||
|
||||
@param AppHandle An opaque handle that identifies the caller<65><72>s instance of initialization
|
||||
of the BIS service.
|
||||
@param Certificate The function writes an allocated EFI_BIS_DATA* containing the Boot
|
||||
Object Authorization Certificate object.
|
||||
|
||||
@retval EFI_SUCCESS The function completed successfully.
|
||||
@retval EFI_NO_MAPPING The AppHandle parameter is not or is no longer a valid
|
||||
application instance handle associated with the EFI_BIS protocol.
|
||||
@retval EFI_NOT_FOUND There is no Boot Object Authorization Certificate currently installed.
|
||||
@retval EFI_OUT_OF_RESOURCES The function failed due to lack of memory or other resources.
|
||||
@retval EFI_INVALID_PARAMETER The Certificate parameter supplied by the caller is NULL or
|
||||
an invalid memory reference.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_BIS_GET_BOOT_OBJECT_AUTHORIZATION_CERTIFICATE) (
|
||||
IN BIS_APPLICATION_HANDLE AppHandle,
|
||||
OUT EFI_BIS_DATA **Certificate
|
||||
);
|
||||
|
||||
/**
|
||||
Verifies the integrity and authorization of the indicated data object according to the
|
||||
indicated credentials.
|
||||
|
||||
@param AppHandle An opaque handle that identifies the caller<65><72>s instance of initialization
|
||||
of the BIS service.
|
||||
@param Credentials A Signed Manifest containing verification information for the indicated
|
||||
data object.
|
||||
@param DataObject An in-memory copy of the raw data object to be verified.
|
||||
@param IsVerified The function writes TRUE if the verification succeeded, otherwise
|
||||
FALSE.
|
||||
|
||||
@retval EFI_SUCCESS The function completed successfully.
|
||||
@retval EFI_NO_MAPPING The AppHandle parameter is not or is no longer a valid
|
||||
application instance handle associated with the EFI_BIS protocol.
|
||||
@retval EFI_OUT_OF_RESOURCES The function failed due to lack of memory or other resources.
|
||||
@retval EFI_INVALID_PARAMETER One or more parameters are invalid.
|
||||
@retval EFI_SECURITY_VIOLATION The signed manifest supplied as the Credentials parameter
|
||||
was invalid (could not be parsed) or Platform-specific authorization failed, etc.
|
||||
@retval EFI_DEVICE_ERROR An unexpected internal error occurred.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_BIS_VERIFY_BOOT_OBJECT) (
|
||||
IN BIS_APPLICATION_HANDLE AppHandle,
|
||||
IN EFI_BIS_DATA *Credentials,
|
||||
IN EFI_BIS_DATA *DataObject,
|
||||
OUT BOOLEAN *IsVerified
|
||||
);
|
||||
|
||||
/**
|
||||
Retrieves the current status of the Boot Authorization Check Flag.
|
||||
|
||||
@param AppHandle An opaque handle that identifies the caller<65><72>s instance of initialization
|
||||
of the BIS service.
|
||||
@param CheckIsRequired The function writes the value TRUE if a Boot Authorization Check is
|
||||
currently required on this platform, otherwise the function writes
|
||||
FALSE.
|
||||
|
||||
@retval EFI_SUCCESS The function completed successfully.
|
||||
@retval EFI_NO_MAPPING The AppHandle parameter is not or is no longer a valid
|
||||
application instance handle associated with the EFI_BIS protocol.
|
||||
@retval EFI_OUT_OF_RESOURCES The function failed due to lack of memory or other resources.
|
||||
@retval EFI_INVALID_PARAMETER The CheckIsRequired parameter supplied by the caller is
|
||||
NULL or an invalid memory reference.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_BIS_GET_BOOT_OBJECT_AUTHORIZATION_CHECKFLAG) (
|
||||
IN BIS_APPLICATION_HANDLE AppHandle,
|
||||
OUT BOOLEAN *CheckIsRequired
|
||||
);
|
||||
|
||||
/**
|
||||
Retrieves a unique token value to be included in the request credential for the next update of any
|
||||
parameter in the Boot Object Authorization set
|
||||
|
||||
@param AppHandle An opaque handle that identifies the caller<65><72>s instance of initialization
|
||||
of the BIS service.
|
||||
@param UpdateToken The function writes an allocated EFI_BIS_DATA* containing the new
|
||||
unique update token value.
|
||||
|
||||
@retval EFI_SUCCESS The function completed successfully.
|
||||
@retval EFI_NO_MAPPING The AppHandle parameter is not or is no longer a valid
|
||||
application instance handle associated with the EFI_BIS protocol.
|
||||
@retval EFI_OUT_OF_RESOURCES The function failed due to lack of memory or other resources.
|
||||
@retval EFI_INVALID_PARAMETER The UpdateToken parameter supplied by the caller is NULL or
|
||||
an invalid memory reference.
|
||||
@retval EFI_DEVICE_ERROR An unexpected internal error occurred.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_BIS_GET_BOOT_OBJECT_AUTHORIZATION_UPDATE_TOKEN) (
|
||||
IN BIS_APPLICATION_HANDLE AppHandle,
|
||||
OUT EFI_BIS_DATA **UpdateToken
|
||||
);
|
||||
|
||||
/**
|
||||
Updates one of the configurable parameters of the Boot Object Authorization set.
|
||||
|
||||
@param AppHandle An opaque handle that identifies the caller<65><72>s instance of initialization
|
||||
of the BIS service.
|
||||
@param RequestCredential This is a Signed Manifest with embedded attributes that carry the details
|
||||
of the requested update.
|
||||
@param NewUpdateToken The function writes an allocated EFI_BIS_DATA* containing the new
|
||||
unique update token value.
|
||||
|
||||
@retval EFI_SUCCESS The function completed successfully.
|
||||
@retval EFI_NO_MAPPING The AppHandle parameter is not or is no longer a valid
|
||||
application instance handle associated with the EFI_BIS protocol.
|
||||
@retval EFI_OUT_OF_RESOURCES The function failed due to lack of memory or other resources.
|
||||
@retval EFI_INVALID_PARAMETER One or more parameters are invalid.
|
||||
@retval EFI_SECURITY_VIOLATION The signed manifest supplied as the RequestCredential parameter
|
||||
was invalid (could not be parsed) or Platform-specific authorization failed, etc.
|
||||
@retval EFI_DEVICE_ERROR An unexpected internal error occurred.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_BIS_UPDATE_BOOT_OBJECT_AUTHORIZATION) (
|
||||
IN BIS_APPLICATION_HANDLE AppHandle,
|
||||
IN EFI_BIS_DATA *RequestCredential,
|
||||
OUT EFI_BIS_DATA **NewUpdateToken
|
||||
);
|
||||
|
||||
/**
|
||||
Verifies the integrity and authorization of the indicated data object according to the indicated
|
||||
credentials and authority certificate.
|
||||
|
||||
@param AppHandle An opaque handle that identifies the caller<65><72>s instance of initialization
|
||||
of the BIS service.
|
||||
@param Credentials A Signed Manifest containing verification information for the
|
||||
indicated data object.
|
||||
@param DataObject An in-memory copy of the raw data object to be verified.
|
||||
@param SectionName An ASCII (not Unicode) string giving the section name in the
|
||||
manifest holding the verification information (in other words,
|
||||
hash value) that corresponds to DataObject.
|
||||
@param AuthorityCertificate A digital certificate whose public key must match the signer<65><72>s
|
||||
public key which is found in the credentials.
|
||||
@param IsVerified The function writes TRUE if the verification was successful.
|
||||
Otherwise, the function writes FALSE.
|
||||
|
||||
@retval EFI_SUCCESS The function completed successfully.
|
||||
@retval EFI_NO_MAPPING The AppHandle parameter is not or is no longer a valid
|
||||
application instance handle associated with the EFI_BIS protocol.
|
||||
@retval EFI_OUT_OF_RESOURCES The function failed due to lack of memory or other resources.
|
||||
@retval EFI_INVALID_PARAMETER One or more parameters are invalid.
|
||||
@retval EFI_SECURITY_VIOLATION The Credentials.Data supplied by the caller is NULL,
|
||||
or the AuthorityCertificate supplied by the caller was
|
||||
invalid (could not be parsed),
|
||||
or Platform-specific authorization failed, etc.
|
||||
@retval EFI_DEVICE_ERROR An unexpected internal error occurred.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_BIS_VERIFY_OBJECT_WITH_CREDENTIAL) (
|
||||
IN BIS_APPLICATION_HANDLE AppHandle,
|
||||
IN EFI_BIS_DATA *Credentials,
|
||||
IN EFI_BIS_DATA *DataObject,
|
||||
IN EFI_BIS_DATA *SectionName,
|
||||
IN EFI_BIS_DATA *AuthorityCertificate,
|
||||
OUT BOOLEAN *IsVerified
|
||||
);
|
||||
|
||||
/**
|
||||
Retrieves a list of digital certificate identifier, digital signature algorithm, hash algorithm, and keylength
|
||||
combinations that the platform supports.
|
||||
|
||||
@param AppHandle An opaque handle that identifies the caller<65><72>s instance of initialization
|
||||
of the BIS service.
|
||||
@param SignatureInfo The function writes an allocated EFI_BIS_DATA* containing the array
|
||||
of EFI_BIS_SIGNATURE_INFO structures representing the supported
|
||||
digital certificate identifier, algorithm, and key length combinations.
|
||||
|
||||
@retval EFI_SUCCESS The function completed successfully.
|
||||
@retval EFI_NO_MAPPING The AppHandle parameter is not or is no longer a valid
|
||||
application instance handle associated with the EFI_BIS protocol.
|
||||
@retval EFI_OUT_OF_RESOURCES The function failed due to lack of memory or other resources.
|
||||
@retval EFI_INVALID_PARAMETER The SignatureInfo parameter supplied by the caller is NULL
|
||||
or an invalid memory reference.
|
||||
@retval EFI_DEVICE_ERROR An unexpected internal error occurred.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_BIS_GET_SIGNATURE_INFO) (
|
||||
IN BIS_APPLICATION_HANDLE AppHandle,
|
||||
OUT EFI_BIS_DATA **SignatureInfo
|
||||
);
|
||||
|
||||
struct _EFI_BIS_PROTOCOL {
|
||||
EFI_BIS_INITIALIZE Initialize;
|
||||
EFI_BIS_SHUTDOWN Shutdown;
|
||||
EFI_BIS_FREE Free;
|
||||
EFI_BIS_GET_BOOT_OBJECT_AUTHORIZATION_CERTIFICATE GetBootObjectAuthorizationCertificate;
|
||||
EFI_BIS_GET_BOOT_OBJECT_AUTHORIZATION_CHECKFLAG GetBootObjectAuthorizationCheckFlag;
|
||||
EFI_BIS_GET_BOOT_OBJECT_AUTHORIZATION_UPDATE_TOKEN GetBootObjectAuthorizationUpdateToken;
|
||||
EFI_BIS_GET_SIGNATURE_INFO GetSignatureInfo;
|
||||
EFI_BIS_UPDATE_BOOT_OBJECT_AUTHORIZATION UpdateBootObjectAuthorization;
|
||||
EFI_BIS_VERIFY_BOOT_OBJECT VerifyBootObject;
|
||||
EFI_BIS_VERIFY_OBJECT_WITH_CREDENTIAL VerifyObjectWithCredential;
|
||||
};
|
||||
|
||||
extern EFI_GUID gEfiBisProtocolGuid;
|
||||
extern EFI_GUID gBootObjectAuthorizationParmsetGuid;
|
||||
|
||||
#endif
|
173
Tools/Source/TianoTools/Include/Protocol/BlockIo.h
Normal file
173
Tools/Source/TianoTools/Include/Protocol/BlockIo.h
Normal file
@ -0,0 +1,173 @@
|
||||
/** @file
|
||||
Block IO protocol as defined in the EFI 1.0 specification.
|
||||
|
||||
The Block IO protocol is used to abstract block devices like hard drives,
|
||||
DVD-ROMs and floppy drives.
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
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
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
Module Name: BlockIo.h
|
||||
|
||||
**/
|
||||
|
||||
#ifndef __BLOCK_IO_H__
|
||||
#define __BLOCK_IO_H__
|
||||
|
||||
#define EFI_BLOCK_IO_PROTOCOL_GUID \
|
||||
{ \
|
||||
0x964e5b21, 0x6459, 0x11d2, {0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b } \
|
||||
}
|
||||
|
||||
//
|
||||
// Forward reference for pure ANSI compatability
|
||||
//
|
||||
typedef struct _EFI_BLOCK_IO_PROTOCOL EFI_BLOCK_IO_PROTOCOL;
|
||||
|
||||
/**
|
||||
Reset the Block Device.
|
||||
|
||||
@param This Protocol instance pointer.
|
||||
@param ExtendedVerification Driver may perform diagnostics on reset.
|
||||
|
||||
@retval EFI_SUCCESS The device was reset.
|
||||
@retval EFI_DEVICE_ERROR The device is not functioning properly and could
|
||||
not be reset.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_BLOCK_RESET) (
|
||||
IN EFI_BLOCK_IO_PROTOCOL *This,
|
||||
IN BOOLEAN ExtendedVerification
|
||||
)
|
||||
;
|
||||
|
||||
/**
|
||||
Read BufferSize bytes from Lba into Buffer.
|
||||
|
||||
@param This Protocol instance pointer.
|
||||
@param MediaId Id of the media, changes every time the media is replaced.
|
||||
@param Lba The starting Logical Block Address to read from
|
||||
@param BufferSize Size of Buffer, must be a multiple of device block size.
|
||||
@param Buffer Buffer containing read data
|
||||
|
||||
@retval EFI_SUCCESS The data was read correctly from the device.
|
||||
@retval EFI_DEVICE_ERROR The device reported an error while performing the read.
|
||||
@retval EFI_NO_MEDIA There is no media in the device.
|
||||
@retval EFI_MEDIA_CHANGED The MediaId does not matched the current device.
|
||||
@retval EFI_BAD_BUFFER_SIZE The Buffer was not a multiple of the block size of the device.
|
||||
@retval EFI_INVALID_PARAMETER The read request contains device addresses that are not
|
||||
valid for the device.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_BLOCK_READ) (
|
||||
IN EFI_BLOCK_IO_PROTOCOL *This,
|
||||
IN UINT32 MediaId,
|
||||
IN EFI_LBA Lba,
|
||||
IN UINTN BufferSize,
|
||||
OUT VOID *Buffer
|
||||
)
|
||||
;
|
||||
|
||||
/**
|
||||
Write BufferSize bytes from Lba into Buffer.
|
||||
|
||||
@param This Protocol instance pointer.
|
||||
@param MediaId Id of the media, changes every time the media is replaced.
|
||||
@param Lba The starting Logical Block Address to read from
|
||||
@param BufferSize Size of Buffer, must be a multiple of device block size.
|
||||
@param Buffer Buffer containing read data
|
||||
|
||||
@retval EFI_SUCCESS The data was written correctly to the device.
|
||||
@retval EFI_WRITE_PROTECTED The device can not be written to.
|
||||
@retval EFI_DEVICE_ERROR The device reported an error while performing the write.
|
||||
@retval EFI_NO_MEDIA There is no media in the device.
|
||||
@retval EFI_MEDIA_CHNAGED The MediaId does not matched the current device.
|
||||
@retval EFI_BAD_BUFFER_SIZE The Buffer was not a multiple of the block size of the device.
|
||||
@retval EFI_INVALID_PARAMETER The write request contains a LBA that is not
|
||||
valid for the device.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_BLOCK_WRITE) (
|
||||
IN EFI_BLOCK_IO_PROTOCOL *This,
|
||||
IN UINT32 MediaId,
|
||||
IN EFI_LBA Lba,
|
||||
IN UINTN BufferSize,
|
||||
IN VOID *Buffer
|
||||
)
|
||||
;
|
||||
|
||||
/**
|
||||
Flush the Block Device.
|
||||
|
||||
@param This Protocol instance pointer.
|
||||
|
||||
@retval EFI_SUCCESS All outstanding data was written to the device
|
||||
@retval EFI_DEVICE_ERROR The device reported an error while writting back the data
|
||||
@retval EFI_NO_MEDIA There is no media in the device.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_BLOCK_FLUSH) (
|
||||
IN EFI_BLOCK_IO_PROTOCOL *This
|
||||
)
|
||||
;
|
||||
|
||||
/**
|
||||
Block IO read only mode data and updated only via members of BlockIO
|
||||
|
||||
**/
|
||||
typedef struct {
|
||||
UINT32 MediaId; ///< The curent media Id. If the media changes, this value is changed.
|
||||
BOOLEAN RemovableMedia; ///< TRUE if the media is removable; otherwise, FALSE.
|
||||
BOOLEAN MediaPresent; /**< TRUE if there is a media currently present in the device;
|
||||
othersise, FALSE. THis field shows the media present status
|
||||
as of the most recent ReadBlocks() or WriteBlocks() call.
|
||||
**/
|
||||
BOOLEAN LogicalPartition; /**< TRUE if LBA 0 is the first block of a partition; otherwise
|
||||
FALSE. For media with only one partition this would be TRUE.
|
||||
**/
|
||||
BOOLEAN ReadOnly; /**< TRUE if the media is marked read-only otherwise, FALSE.
|
||||
This field shows the read-only status as of the most recent WriteBlocks () call.
|
||||
**/
|
||||
BOOLEAN WriteCaching; ///< TRUE if the WriteBlock () function caches write data.
|
||||
|
||||
UINT32 BlockSize; /**< The intrinsic block size of the device. If the media changes, then
|
||||
this field is updated.
|
||||
**/
|
||||
UINT32 IoAlign; ///< Supplies the alignment requirement for any buffer to read or write block(s).
|
||||
|
||||
EFI_LBA LastBlock; /**< The last logical block address on the device.
|
||||
If the media changes, then this field is updated.
|
||||
**/
|
||||
} EFI_BLOCK_IO_MEDIA;
|
||||
|
||||
#define EFI_BLOCK_IO_PROTOCOL_REVISION 0x00010000
|
||||
|
||||
struct _EFI_BLOCK_IO_PROTOCOL {
|
||||
UINT64 Revision;
|
||||
|
||||
EFI_BLOCK_IO_MEDIA *Media;
|
||||
|
||||
EFI_BLOCK_RESET Reset;
|
||||
EFI_BLOCK_READ ReadBlocks;
|
||||
EFI_BLOCK_WRITE WriteBlocks;
|
||||
EFI_BLOCK_FLUSH FlushBlocks;
|
||||
|
||||
};
|
||||
|
||||
extern EFI_GUID gEfiBlockIoProtocolGuid;
|
||||
|
||||
#endif
|
110
Tools/Source/TianoTools/Include/Protocol/BootScriptSave.h
Normal file
110
Tools/Source/TianoTools/Include/Protocol/BootScriptSave.h
Normal file
@ -0,0 +1,110 @@
|
||||
/** @file
|
||||
Definition of the Boot Script Save protocol.
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
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
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
Module Name: BootScriptSave.h
|
||||
|
||||
@par Revision Reference:
|
||||
This protocol defined in the Boot Script Specification, Version 0.91.
|
||||
|
||||
**/
|
||||
|
||||
#ifndef _BOOT_SCRIPT_SAVE_PROTOCOL_H
|
||||
#define _BOOT_SCRIPT_SAVE_PROTOCOL_H
|
||||
|
||||
//
|
||||
// S3 Save Protocol GUID
|
||||
//
|
||||
#define EFI_BOOT_SCRIPT_SAVE_PROTOCOL_GUID \
|
||||
{ \
|
||||
0x470e1529, 0xb79e, 0x4e32, {0xa0, 0xfe, 0x6a, 0x15, 0x6d, 0x29, 0xf9, 0xb2 } \
|
||||
}
|
||||
|
||||
typedef struct _EFI_BOOT_SCRIPT_SAVE_PROTOCOL EFI_BOOT_SCRIPT_SAVE_PROTOCOL;
|
||||
|
||||
//
|
||||
// Protocol Member_Function
|
||||
//
|
||||
/**
|
||||
Adds a record into a specified Framework boot script table.
|
||||
|
||||
@param This A pointer to the EFI_BOOT_SCRIPT_SAVE_PROTOCOL instance.
|
||||
|
||||
@param TableName Name of the script table.Currently, the only meaningful
|
||||
value is EFI_ACPI_S3_RESUME_SCRIPT_TABLE.
|
||||
|
||||
@param OpCode The operation code (opcode) number.
|
||||
|
||||
@param ... Argument list that is specific to each opcode.
|
||||
|
||||
@retval EFI_SUCCESS The operation succeeded. A record was added into the specified script table.
|
||||
|
||||
@retval EFI_INVALID_PARAMETER The parameter is illegal or the given boot script is not supported.
|
||||
|
||||
@retval EFI_OUT_OF_RESOURCES There is insufficient memory to store the boot script.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_BOOT_SCRIPT_WRITE) (
|
||||
IN EFI_BOOT_SCRIPT_SAVE_PROTOCOL *This,
|
||||
IN UINT16 TableName,
|
||||
IN UINT16 OpCode,
|
||||
...
|
||||
);
|
||||
|
||||
/**
|
||||
Closes the specified script table.
|
||||
|
||||
@param This A pointer to the EFI_BOOT_SCRIPT_SAVE_PROTOCOL instance.
|
||||
|
||||
@param TableName Name of the script table.
|
||||
|
||||
@param Address A pointer to the physical address where the table begins.
|
||||
|
||||
@retval EFI_SUCCESS The table was successfully returned.
|
||||
|
||||
@retval EFI_NOT_FOUND The specified table was not created previously.
|
||||
|
||||
@retval EFI_OUT_OF_RESOURCES Memory is insufficient to hold the reorganized boot script table.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_BOOT_SCRIPT_CLOSE_TABLE) (
|
||||
IN EFI_BOOT_SCRIPT_SAVE_PROTOCOL *This,
|
||||
IN UINT16 TableName,
|
||||
OUT EFI_PHYSICAL_ADDRESS *Address
|
||||
);
|
||||
|
||||
//
|
||||
// S3 Save Protocol data structure
|
||||
//
|
||||
/**
|
||||
@par Protocol Description:
|
||||
The EFI_BOOT_SCRIPT_SAVE_PROTOCOL publishes the Framework boot script abstractions
|
||||
to store or record various boot scripts into boot script tables.
|
||||
|
||||
@param Write
|
||||
Writes various boot scripts to a boot script table.
|
||||
|
||||
@param CloseTable
|
||||
Retrieves and closes a script table.
|
||||
|
||||
**/
|
||||
struct _EFI_BOOT_SCRIPT_SAVE_PROTOCOL {
|
||||
EFI_BOOT_SCRIPT_WRITE Write;
|
||||
EFI_BOOT_SCRIPT_CLOSE_TABLE CloseTable;
|
||||
};
|
||||
|
||||
extern EFI_GUID gEfiBootScriptSaveProtocolGuid;
|
||||
|
||||
#endif
|
@ -0,0 +1,66 @@
|
||||
/** @file
|
||||
Bus Specific Driver Override protocol as defined in the EFI 1.1 specification.
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
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
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
Module Name: BusSpecificDriverOverride.h
|
||||
|
||||
**/
|
||||
|
||||
#ifndef _EFI_BUS_SPECIFIC_DRIVER_OVERRIDE_PROTOCOL_H_
|
||||
#define _EFI_BUS_SPECIFIC_DRIVER_OVERRIDE_PROTOCOL_H_
|
||||
|
||||
//
|
||||
// Global ID for the Bus Specific Driver Override Protocol
|
||||
//
|
||||
#define EFI_BUS_SPECIFIC_DRIVER_OVERRIDE_PROTOCOL_GUID \
|
||||
{ \
|
||||
0x3bc1b285, 0x8a15, 0x4a82, {0xaa, 0xbf, 0x4d, 0x7d, 0x13, 0xfb, 0x32, 0x65 } \
|
||||
}
|
||||
|
||||
typedef struct _EFI_BUS_SPECIFIC_DRIVER_OVERRIDE_PROTOCOL EFI_BUS_SPECIFIC_DRIVER_OVERRIDE_PROTOCOL;
|
||||
|
||||
//
|
||||
// Prototypes for the Bus Specific Driver Override Protocol
|
||||
//
|
||||
|
||||
/**
|
||||
Uses a bus specific algorithm to retrieve a driver image handle for a controller.
|
||||
|
||||
@param This A pointer to the EFI_BUS_SPECIFIC_DRIVER_
|
||||
OVERRIDE_PROTOCOL instance.
|
||||
@param DriverImageHandle On input, a pointer to the previous driver image handle returned
|
||||
by GetDriver(). On output, a pointer to the next driver
|
||||
image handle. Passing in a NULL, will return the first driver
|
||||
image handle.
|
||||
|
||||
@retval EFI_SUCCESS A bus specific override driver is returned in DriverImageHandle.
|
||||
@retval EFI_NOT_FOUND The end of the list of override drivers was reached.
|
||||
@retval EFI_INVALID_PARAMETER DriverImageHandle is not a handle that was returned on a
|
||||
previous call to GetDriver().
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_BUS_SPECIFIC_DRIVER_OVERRIDE_GET_DRIVER) (
|
||||
IN EFI_BUS_SPECIFIC_DRIVER_OVERRIDE_PROTOCOL *This,
|
||||
IN OUT EFI_HANDLE *DriverImageHandle
|
||||
);
|
||||
|
||||
//
|
||||
// Interface structure for the Bus Specific Driver Override Protocol
|
||||
//
|
||||
struct _EFI_BUS_SPECIFIC_DRIVER_OVERRIDE_PROTOCOL {
|
||||
EFI_BUS_SPECIFIC_DRIVER_OVERRIDE_GET_DRIVER GetDriver;
|
||||
};
|
||||
|
||||
extern EFI_GUID gEfiBusSpecificDriverOverrideProtocolGuid;
|
||||
|
||||
#endif
|
123
Tools/Source/TianoTools/Include/Protocol/ComponentName.h
Normal file
123
Tools/Source/TianoTools/Include/Protocol/ComponentName.h
Normal file
@ -0,0 +1,123 @@
|
||||
/** @file
|
||||
EFI Component Name Protocol
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
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
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
Module Name: ComponentName.h
|
||||
|
||||
**/
|
||||
|
||||
#ifndef __EFI_COMPONENT_NAME_H__
|
||||
#define __EFI_COMPONENT_NAME_H__
|
||||
|
||||
//
|
||||
// Global ID for the Component Name Protocol
|
||||
//
|
||||
#define EFI_COMPONENT_NAME_PROTOCOL_GUID \
|
||||
{ \
|
||||
0x107a772c, 0xd5e1, 0x11d4, {0x9a, 0x46, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d } \
|
||||
}
|
||||
|
||||
typedef struct _EFI_COMPONENT_NAME_PROTOCOL EFI_COMPONENT_NAME_PROTOCOL;
|
||||
|
||||
|
||||
/**
|
||||
Retrieves a Unicode string that is the user readable name of the EFI Driver.
|
||||
|
||||
@param This A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.
|
||||
@param Language A pointer to a three character ISO 639-2 language identifier.
|
||||
This is the language of the driver name that that the caller
|
||||
is requesting, and it must match one of the languages specified
|
||||
in SupportedLanguages. The number of languages supported by a
|
||||
driver is up to the driver writer.
|
||||
@param DriverName A pointer to the Unicode string to return. This Unicode string
|
||||
is the name of the driver specified by This in the language
|
||||
specified by Language.
|
||||
|
||||
@retval EFI_SUCCESS The Unicode string for the Driver specified by This
|
||||
and the language specified by Language was returned
|
||||
in DriverName.
|
||||
@retval EFI_INVALID_PARAMETER Language is NULL.
|
||||
@retval EFI_INVALID_PARAMETER DriverName is NULL.
|
||||
@retval EFI_UNSUPPORTED The driver specified by This does not support the
|
||||
language specified by Language.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_COMPONENT_NAME_GET_DRIVER_NAME) (
|
||||
IN EFI_COMPONENT_NAME_PROTOCOL *This,
|
||||
IN CHAR8 *Language,
|
||||
OUT CHAR16 **DriverName
|
||||
);
|
||||
|
||||
|
||||
/**
|
||||
Retrieves a Unicode string that is the user readable name of the controller
|
||||
that is being managed by an EFI Driver.
|
||||
|
||||
@param This A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.
|
||||
@param ControllerHandle The handle of a controller that the driver specified by
|
||||
This is managing. This handle specifies the controller
|
||||
whose name is to be returned.
|
||||
@param ChildHandle The handle of the child controller to retrieve the name
|
||||
of. This is an optional parameter that may be NULL. It
|
||||
will be NULL for device drivers. It will also be NULL
|
||||
for a bus drivers that wish to retrieve the name of the
|
||||
bus controller. It will not be NULL for a bus driver
|
||||
that wishes to retrieve the name of a child controller.
|
||||
@param Language A pointer to a three character ISO 639-2 language
|
||||
identifier. This is the language of the controller name
|
||||
that that the caller is requesting, and it must match one
|
||||
of the languages specified in SupportedLanguages. The
|
||||
number of languages supported by a driver is up to the
|
||||
driver writer.
|
||||
@param ControllerName A pointer to the Unicode string to return. This Unicode
|
||||
string is the name of the controller specified by
|
||||
ControllerHandle and ChildHandle in the language specified
|
||||
by Language from the point of view of the driver specified
|
||||
by This.
|
||||
|
||||
@retval EFI_SUCCESS The Unicode string for the user readable name in the
|
||||
language specified by Language for the driver
|
||||
specified by This was returned in DriverName.
|
||||
@retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.
|
||||
@retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid EFI_HANDLE.
|
||||
@retval EFI_INVALID_PARAMETER Language is NULL.
|
||||
@retval EFI_INVALID_PARAMETER ControllerName is NULL.
|
||||
@retval EFI_UNSUPPORTED The driver specified by This is not currently managing
|
||||
the controller specified by ControllerHandle and
|
||||
ChildHandle.
|
||||
@retval EFI_UNSUPPORTED The driver specified by This does not support the
|
||||
language specified by Language.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_COMPONENT_NAME_GET_CONTROLLER_NAME) (
|
||||
IN EFI_COMPONENT_NAME_PROTOCOL *This,
|
||||
IN EFI_HANDLE ControllerHandle,
|
||||
IN EFI_HANDLE ChildHandle OPTIONAL,
|
||||
IN CHAR8 *Language,
|
||||
OUT CHAR16 **ControllerName
|
||||
);
|
||||
|
||||
//
|
||||
// Interface structure for the Component Name Protocol
|
||||
//
|
||||
struct _EFI_COMPONENT_NAME_PROTOCOL {
|
||||
EFI_COMPONENT_NAME_GET_DRIVER_NAME GetDriverName;
|
||||
EFI_COMPONENT_NAME_GET_CONTROLLER_NAME GetControllerName;
|
||||
CHAR8 *SupportedLanguages;
|
||||
};
|
||||
|
||||
extern EFI_GUID gEfiComponentNameProtocolGuid;
|
||||
|
||||
#endif
|
131
Tools/Source/TianoTools/Include/Protocol/CpuIo.h
Normal file
131
Tools/Source/TianoTools/Include/Protocol/CpuIo.h
Normal file
@ -0,0 +1,131 @@
|
||||
/** @file
|
||||
This code abstracts the CPU IO Protocol
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
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
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
Module Name: CpuIO.h
|
||||
|
||||
@par Revision Reference:
|
||||
CPU IO Protocol is defined in Framework of EFI CPU IO Protocol Spec
|
||||
Version 0.9
|
||||
|
||||
**/
|
||||
|
||||
#ifndef _CPUIO_H_
|
||||
#define _CPUIO_H_
|
||||
|
||||
#define EFI_CPU_IO_PROTOCOL_GUID \
|
||||
{ \
|
||||
0xB0732526, 0x38C8, 0x4b40, {0x88, 0x77, 0x61, 0xC7, 0xB0, 0x6A, 0xAC, 0x45 } \
|
||||
}
|
||||
|
||||
typedef struct _EFI_CPU_IO_PROTOCOL EFI_CPU_IO_PROTOCOL;
|
||||
|
||||
//
|
||||
// *******************************************************
|
||||
// EFI_CPU_IO_PROTOCOL_WIDTH
|
||||
// *******************************************************
|
||||
//
|
||||
typedef enum {
|
||||
EfiCpuIoWidthUint8,
|
||||
EfiCpuIoWidthUint16,
|
||||
EfiCpuIoWidthUint32,
|
||||
EfiCpuIoWidthUint64,
|
||||
EfiCpuIoWidthFifoUint8,
|
||||
EfiCpuIoWidthFifoUint16,
|
||||
EfiCpuIoWidthFifoUint32,
|
||||
EfiCpuIoWidthFifoUint64,
|
||||
EfiCpuIoWidthFillUint8,
|
||||
EfiCpuIoWidthFillUint16,
|
||||
EfiCpuIoWidthFillUint32,
|
||||
EfiCpuIoWidthFillUint64,
|
||||
EfiCpuIoWidthMaximum
|
||||
} EFI_CPU_IO_PROTOCOL_WIDTH;
|
||||
|
||||
//
|
||||
// *******************************************************
|
||||
// EFI_CPU_IO_PROTOCOL_IO_MEM
|
||||
// *******************************************************
|
||||
//
|
||||
/**
|
||||
Enables a driver to access memory-mapped registers in the EFI system memory space.
|
||||
Or, Enables a driver to access registers in the EFI CPU I/O space.
|
||||
|
||||
@param This A pointer to the EFI_CPU_IO_PROTOCOL instance.
|
||||
|
||||
@param Width Signifies the width of the I/O or Memory operation.
|
||||
|
||||
@param Address The base address of the I/O or Memoryoperation.
|
||||
|
||||
@param Count The number of I/O or Memory operations to perform.
|
||||
The number of bytes moved is Width size * Count, starting at Address.
|
||||
|
||||
@param Buffer For read operations, the destination buffer to store the results.
|
||||
For write operations, the source buffer from which to write data.
|
||||
|
||||
@retval EFI_SUCCESS The data was read from or written to the EFI system.
|
||||
|
||||
@retval EFI_INVALID_PARAMETER Width is invalid for this EFI system.Or Buffer is NULL.
|
||||
|
||||
@retval EFI_UNSUPPORTED The Buffer is not aligned for the given Width.
|
||||
Or,The address range specified by Address, Width, and Count is not valid for this EFI system.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_CPU_IO_PROTOCOL_IO_MEM) (
|
||||
IN EFI_CPU_IO_PROTOCOL *This,
|
||||
IN EFI_CPU_IO_PROTOCOL_WIDTH Width,
|
||||
IN UINT64 Address,
|
||||
IN UINTN Count,
|
||||
IN OUT VOID *Buffer
|
||||
);
|
||||
|
||||
//
|
||||
// *******************************************************
|
||||
// EFI_CPU_IO_PROTOCOL_ACCESS
|
||||
// *******************************************************
|
||||
//
|
||||
typedef struct {
|
||||
EFI_CPU_IO_PROTOCOL_IO_MEM Read;
|
||||
EFI_CPU_IO_PROTOCOL_IO_MEM Write;
|
||||
} EFI_CPU_IO_PROTOCOL_ACCESS;
|
||||
|
||||
//
|
||||
// *******************************************************
|
||||
// EFI_CPU_IO_PROTOCOL
|
||||
// *******************************************************
|
||||
//
|
||||
/**
|
||||
@par Protocol Description:
|
||||
Provides the basic memory and I/O interfaces that are used to abstract
|
||||
accesses to devices in a system.
|
||||
|
||||
@param Mem.Read
|
||||
Allows reads from memory-mapped I/O space.
|
||||
|
||||
@param Mem.Write
|
||||
Allows writes to memory-mapped I/O space.
|
||||
|
||||
@param Io.Read
|
||||
Allows reads from I/O space.
|
||||
|
||||
@param Io.Write
|
||||
Allows writes to I/O space.
|
||||
|
||||
**/
|
||||
struct _EFI_CPU_IO_PROTOCOL {
|
||||
EFI_CPU_IO_PROTOCOL_ACCESS Mem;
|
||||
EFI_CPU_IO_PROTOCOL_ACCESS Io;
|
||||
};
|
||||
|
||||
extern EFI_GUID gEfiCpuIoProtocolGuid;
|
||||
|
||||
#endif
|
233
Tools/Source/TianoTools/Include/Protocol/DataHub.h
Normal file
233
Tools/Source/TianoTools/Include/Protocol/DataHub.h
Normal file
@ -0,0 +1,233 @@
|
||||
/** @file
|
||||
The data hub protocol is used both by agents wishing to log
|
||||
data and those wishing to be made aware of all information that
|
||||
has been logged.
|
||||
|
||||
For more information please look at Intel Platform Innovation
|
||||
Framework for EFI Data Hub Specification.
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
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
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
Module Name: DataHub.h
|
||||
|
||||
@par Revision Reference:
|
||||
This protocol is defined in Framework for EFI Data Hub Specification.
|
||||
Version 0.9.
|
||||
|
||||
**/
|
||||
|
||||
#ifndef __DATA_HUB_H__
|
||||
#define __DATA_HUB_H__
|
||||
|
||||
#define EFI_DATA_HUB_PROTOCOL_GUID \
|
||||
{ \
|
||||
0xae80d021, 0x618e, 0x11d4, {0xbc, 0xd7, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81 } \
|
||||
}
|
||||
|
||||
//
|
||||
// EFI generic Data Hub Header
|
||||
//
|
||||
// A Data Record is an EFI_DATA_RECORD_HEADER followed by RecordSize bytes of
|
||||
// data. The format of the data is defined by the DataRecordGuid.
|
||||
//
|
||||
// If EFI_DATA_RECORD_HEADER is extended in the future the Version number must
|
||||
// change and the HeaderSize will change if the definition of
|
||||
// EFI_DATA_RECORD_HEADER is extended.
|
||||
//
|
||||
// The logger is responcible for initializing:
|
||||
// Version, HeaderSize, RecordSize, DataRecordGuid, DataRecordClass
|
||||
//
|
||||
// The Data Hub driver is responcible for initializing:
|
||||
// LogTime and LogMonotonicCount.
|
||||
//
|
||||
#define EFI_DATA_RECORD_HEADER_VERSION 0x0100
|
||||
typedef struct {
|
||||
UINT16 Version;
|
||||
UINT16 HeaderSize;
|
||||
UINT32 RecordSize;
|
||||
EFI_GUID DataRecordGuid;
|
||||
EFI_GUID ProducerName;
|
||||
UINT64 DataRecordClass;
|
||||
EFI_TIME LogTime;
|
||||
UINT64 LogMonotonicCount;
|
||||
} EFI_DATA_RECORD_HEADER;
|
||||
|
||||
//
|
||||
// Definition of DataRecordClass. These are used to filter out class types
|
||||
// at a very high level. The DataRecordGuid still defines the format of
|
||||
// the data. See DateHub.doc for rules on what can and can not be a
|
||||
// new DataRecordClass
|
||||
//
|
||||
#define EFI_DATA_RECORD_CLASS_DEBUG 0x0000000000000001
|
||||
#define EFI_DATA_RECORD_CLASS_ERROR 0x0000000000000002
|
||||
#define EFI_DATA_RECORD_CLASS_DATA 0x0000000000000004
|
||||
#define EFI_DATA_RECORD_CLASS_PROGRESS_CODE 0x0000000000000008
|
||||
|
||||
//
|
||||
// Forward reference for pure ANSI compatability
|
||||
//
|
||||
typedef struct _EFI_DATA_HUB_PROTOCOL EFI_DATA_HUB_PROTOCOL;
|
||||
|
||||
/**
|
||||
Logs a data record to the system event log.
|
||||
|
||||
@param This The EFI_DATA_HUB_PROTOCOL instance.
|
||||
|
||||
@param description
|
||||
|
||||
@param DataRecordGuid A GUID that indicates the format of the data passed into RawData.
|
||||
|
||||
@param ProducerName A GUID that indicates the identity of the caller to this API.
|
||||
|
||||
@param DataRecordClass This class indicates the generic type of the data record.
|
||||
|
||||
@param RawData The DataRecordGuid-defined data to be logged.
|
||||
|
||||
@param RawDataSize The size in bytes of RawData.
|
||||
|
||||
@retval EFI_SUCCESS Data was logged.
|
||||
|
||||
@retval EFI_OUT_OF_RESOURCES Data was not logged due to lack of system resources.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_DATA_HUB_LOG_DATA) (
|
||||
IN EFI_DATA_HUB_PROTOCOL *This,
|
||||
IN EFI_GUID *DataRecordGuid,
|
||||
IN EFI_GUID *ProducerName,
|
||||
IN UINT64 DataRecordClass,
|
||||
IN VOID *RawData,
|
||||
IN UINT32 RawDataSize
|
||||
);
|
||||
|
||||
/**
|
||||
Allows the system data log to be searched.
|
||||
|
||||
@param This The EFI_DATA_HUB_PROTOCOL instance.
|
||||
|
||||
@param MonotonicCount On input, it specifies the Record to return.
|
||||
An input of zero means to return the first record.
|
||||
|
||||
@param FilterDriver If FilterDriver is not passed in a MonotonicCount of zero,
|
||||
it means to return the first data record. If FilterDriver is passed in,
|
||||
then a MonotonicCount of zero means to return the first data not yet read
|
||||
by FilterDriver.
|
||||
|
||||
@param Record Returns a dynamically allocated memory buffer with a data
|
||||
record that matches MonotonicCount.
|
||||
|
||||
@retval EFI_SUCCESS Data was returned in Record.
|
||||
|
||||
@retval EFI_INVALID_PARAMETER FilterDriver was passed in but does not exist.
|
||||
|
||||
@retval EFI_NOT_FOUND MonotonicCount does not match any data record
|
||||
in the system. If a MonotonicCount of zero was passed in, then no
|
||||
data records exist in the system.
|
||||
|
||||
@retval EFI_OUT_OF_RESOURCES Record was not returned due to lack
|
||||
of system resources.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_DATA_HUB_GET_NEXT_RECORD) (
|
||||
IN EFI_DATA_HUB_PROTOCOL *This,
|
||||
IN OUT UINT64 *MonotonicCount,
|
||||
IN EFI_EVENT *FilterDriver OPTIONAL,
|
||||
OUT EFI_DATA_RECORD_HEADER **Record
|
||||
);
|
||||
|
||||
/**
|
||||
Registers an event to be signaled every time a data record is logged in the system.
|
||||
|
||||
@param This The EFI_DATA_HUB_PROTOCOL instance.
|
||||
|
||||
@param FilterEvent The EFI_EVENT to signal whenever data that matches
|
||||
FilterClass is logged in the system.
|
||||
|
||||
@param FilterTpl The maximum EFI_TPL at which FilterEvent can be signaled.
|
||||
It is strongly recommended that you use the lowest EFI_TPL possible.
|
||||
|
||||
@param FilterClass FilterEvent will be signaled whenever a bit
|
||||
in EFI_DATA_RECORD_HEADER.DataRecordClass is also set in FilterClass.
|
||||
If FilterClass is zero, no class-based filtering will be performed.
|
||||
|
||||
@param FilterDataRecordGuid FilterEvent will be signaled whenever
|
||||
FilterDataRecordGuid matches EFI_DATA_RECORD_HEADER.DataRecordGuid.
|
||||
If FilterDataRecordGuid is NULL, then no GUID-based filtering will be performed.
|
||||
|
||||
@retval EFI_SUCCESS The filter driver event was registered
|
||||
|
||||
@retval EFI_ALREADY_STARTED FilterEvent was previously registered and cannot be registered again.
|
||||
|
||||
@retval EFI_OUT_OF_RESOURCES The filter driver event was not registered
|
||||
due to lack of system resources.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_DATA_HUB_REGISTER_FILTER_DRIVER) (
|
||||
IN EFI_DATA_HUB_PROTOCOL *This,
|
||||
IN EFI_EVENT FilterEvent,
|
||||
IN EFI_TPL FilterTpl,
|
||||
IN UINT64 FilterClass,
|
||||
IN EFI_GUID *FilterDataRecordGuid OPTIONAL
|
||||
);
|
||||
|
||||
/**
|
||||
Stops a filter driver from being notified when data records are logged.
|
||||
|
||||
@param This The EFI_DATA_HUB_PROTOCOL instance.
|
||||
|
||||
@param FilterEvent The EFI_EVENT to remove from the list of events to be
|
||||
signaled every time errors are logged.
|
||||
|
||||
@retval EFI_SUCCESS The filter driver represented by FilterEvent was shut off.
|
||||
|
||||
@retval EFI_NOT_FOUND FilterEvent did not exist.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_DATA_HUB_UNREGISTER_FILTER_DRIVER) (
|
||||
IN EFI_DATA_HUB_PROTOCOL *This,
|
||||
IN EFI_EVENT FilterEvent
|
||||
);
|
||||
|
||||
/**
|
||||
@par Protocol Description:
|
||||
This protocol is used to log information and register filter drivers
|
||||
to receive data records.
|
||||
|
||||
@param LogData
|
||||
Logs a data record.
|
||||
|
||||
@param GetNextDataRecord
|
||||
Gets a data record. Used both to view the memory-based log and to
|
||||
get information about which data records have been consumed by a filter driver.
|
||||
|
||||
@param RegisterFilterDriver
|
||||
Allows the registration of an EFI event to act as a filter driver for all data records that are logged.
|
||||
|
||||
@param UnregisterFilterDriver
|
||||
Used to remove a filter driver that was added with RegisterFilterDriver().
|
||||
|
||||
**/
|
||||
struct _EFI_DATA_HUB_PROTOCOL {
|
||||
EFI_DATA_HUB_LOG_DATA LogData;
|
||||
EFI_DATA_HUB_GET_NEXT_RECORD GetNextRecord;
|
||||
EFI_DATA_HUB_REGISTER_FILTER_DRIVER RegisterFilterDriver;
|
||||
EFI_DATA_HUB_UNREGISTER_FILTER_DRIVER UnregisterFilterDriver;
|
||||
};
|
||||
|
||||
extern EFI_GUID gEfiDataHubProtocolGuid;
|
||||
|
||||
#endif
|
141
Tools/Source/TianoTools/Include/Protocol/DebugPort.h
Normal file
141
Tools/Source/TianoTools/Include/Protocol/DebugPort.h
Normal file
@ -0,0 +1,141 @@
|
||||
/** @file
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
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
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
Module Name: DebugPort.h
|
||||
|
||||
**/
|
||||
|
||||
#ifndef __DEBUG_PORT_H__
|
||||
#define __DEBUG_PORT_H__
|
||||
|
||||
|
||||
//
|
||||
// DebugPortIo protocol {EBA4E8D2-3858-41EC-A281-2647BA9660D0}
|
||||
//
|
||||
#define EFI_DEBUGPORT_PROTOCOL_GUID \
|
||||
{ \
|
||||
0xEBA4E8D2, 0x3858, 0x41EC, {0xA2, 0x81, 0x26, 0x47, 0xBA, 0x96, 0x60, 0xD0 } \
|
||||
}
|
||||
|
||||
extern EFI_GUID gEfiDebugPortProtocolGuid;
|
||||
|
||||
typedef struct _EFI_DEBUGPORT_PROTOCOL EFI_DEBUGPORT_PROTOCOL;
|
||||
|
||||
//
|
||||
// DebugPort member functions
|
||||
//
|
||||
|
||||
/**
|
||||
Resets the debugport.
|
||||
|
||||
@param This A pointer to the EFI_DEBUGPORT_PROTOCOL instance.
|
||||
|
||||
@retval EFI_SUCCESS The debugport device was reset and is in usable state.
|
||||
@retval EFI_DEVICE_ERROR The debugport device could not be reset and is unusable.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_DEBUGPORT_RESET) (
|
||||
IN EFI_DEBUGPORT_PROTOCOL *This
|
||||
);
|
||||
|
||||
/**
|
||||
Writes data to the debugport.
|
||||
|
||||
@param This A pointer to the EFI_DEBUGPORT_PROTOCOL instance.
|
||||
@param Timeout The number of microseconds to wait before timing out a write operation.
|
||||
@param BufferSize On input, the requested number of bytes of data to write. On output, the
|
||||
number of bytes of data actually written.
|
||||
@param Buffer A pointer to a buffer containing the data to write.
|
||||
|
||||
@retval EFI_SUCCESS The data was written.
|
||||
@retval EFI_DEVICE_ERROR The device reported an error.
|
||||
@retval EFI_TIMEOUT The data write was stopped due to a timeout.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_DEBUGPORT_WRITE) (
|
||||
IN EFI_DEBUGPORT_PROTOCOL *This,
|
||||
IN UINT32 Timeout,
|
||||
IN OUT UINTN *BufferSize,
|
||||
IN VOID *Buffer
|
||||
);
|
||||
|
||||
/**
|
||||
Reads data from the debugport.
|
||||
|
||||
@param This A pointer to the EFI_DEBUGPORT_PROTOCOL instance.
|
||||
@param Timeout The number of microseconds to wait before timing out a read operation.
|
||||
@param BufferSize On input, the requested number of bytes of data to read. On output, the
|
||||
number of bytes of data actually number of bytes
|
||||
of data read and returned in Buffer.
|
||||
@param Buffer A pointer to a buffer into which the data read will be saved.
|
||||
|
||||
@retval EFI_SUCCESS The data was read.
|
||||
@retval EFI_DEVICE_ERROR The device reported an error.
|
||||
@retval EFI_TIMEOUT The operation was stopped due to a timeout or overrun.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_DEBUGPORT_READ) (
|
||||
IN EFI_DEBUGPORT_PROTOCOL *This,
|
||||
IN UINT32 Timeout,
|
||||
IN OUT UINTN *BufferSize,
|
||||
OUT VOID *Buffer
|
||||
);
|
||||
|
||||
/**
|
||||
Checks to see if any data is available to be read from the debugport device.
|
||||
|
||||
@param This A pointer to the EFI_DEBUGPORT_PROTOCOL instance.
|
||||
|
||||
@retval EFI_SUCCESS At least one byte of data is available to be read.
|
||||
@retval EFI_DEVICE_ERROR The debugport device is not functioning correctly.
|
||||
@retval EFI_NOT_READY No data is available to be read.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_DEBUGPORT_POLL) (
|
||||
IN EFI_DEBUGPORT_PROTOCOL *This
|
||||
);
|
||||
|
||||
//
|
||||
// DebugPort protocol definition
|
||||
//
|
||||
struct _EFI_DEBUGPORT_PROTOCOL {
|
||||
EFI_DEBUGPORT_RESET Reset;
|
||||
EFI_DEBUGPORT_WRITE Write;
|
||||
EFI_DEBUGPORT_READ Read;
|
||||
EFI_DEBUGPORT_POLL Poll;
|
||||
};
|
||||
|
||||
//
|
||||
// DEBUGPORT variable definitions...
|
||||
//
|
||||
#define EFI_DEBUGPORT_VARIABLE_NAME L"DEBUGPORT"
|
||||
#define EFI_DEBUGPORT_VARIABLE_GUID EFI_DEBUGPORT_PROTOCOL_GUID
|
||||
#define gEfiDebugPortVariableGuid gEfiDebugPortProtocolGuid
|
||||
|
||||
//
|
||||
// DebugPort device path definitions...
|
||||
//
|
||||
#define DEVICE_PATH_MESSAGING_DEBUGPORT EFI_DEBUGPORT_PROTOCOL_GUID
|
||||
#define gEfiDebugPortDevicePathGuid gEfiDebugPortProtocolGuid
|
||||
|
||||
typedef struct {
|
||||
EFI_DEVICE_PATH_PROTOCOL Header;
|
||||
EFI_GUID Guid;
|
||||
} DEBUGPORT_DEVICE_PATH;
|
||||
|
||||
#endif
|
517
Tools/Source/TianoTools/Include/Protocol/DebugSupport.h
Normal file
517
Tools/Source/TianoTools/Include/Protocol/DebugSupport.h
Normal file
@ -0,0 +1,517 @@
|
||||
/** @file
|
||||
DebugSupport protocol and supporting definitions as defined in the EFI 1.1
|
||||
specification.
|
||||
|
||||
The DebugSupport protocol is used by source level debuggers to abstract the
|
||||
processor and handle context save and restore operations.
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
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
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
Module Name: DebugSupport.h
|
||||
|
||||
**/
|
||||
|
||||
#ifndef __DEBUG_SUPPORT_H__
|
||||
#define __DEBUG_SUPPORT_H__
|
||||
|
||||
typedef struct _EFI_DEBUG_SUPPORT_PROTOCOL EFI_DEBUG_SUPPORT_PROTOCOL;
|
||||
|
||||
//
|
||||
// Debug Support protocol {2755590C-6F3C-42FA-9EA4-A3BA543CDA25}
|
||||
//
|
||||
#define EFI_DEBUG_SUPPORT_PROTOCOL_GUID \
|
||||
{ \
|
||||
0x2755590C, 0x6F3C, 0x42FA, {0x9E, 0xA4, 0xA3, 0xBA, 0x54, 0x3C, 0xDA, 0x25 } \
|
||||
}
|
||||
|
||||
//
|
||||
// Debug Support definitions
|
||||
//
|
||||
typedef INTN EFI_EXCEPTION_TYPE;
|
||||
|
||||
//
|
||||
// IA-32 processor exception types
|
||||
//
|
||||
#define EXCEPT_IA32_DIVIDE_ERROR 0
|
||||
#define EXCEPT_IA32_DEBUG 1
|
||||
#define EXCEPT_IA32_NMI 2
|
||||
#define EXCEPT_IA32_BREAKPOINT 3
|
||||
#define EXCEPT_IA32_OVERFLOW 4
|
||||
#define EXCEPT_IA32_BOUND 5
|
||||
#define EXCEPT_IA32_INVALID_OPCODE 6
|
||||
#define EXCEPT_IA32_DOUBLE_FAULT 8
|
||||
#define EXCEPT_IA32_INVALID_TSS 10
|
||||
#define EXCEPT_IA32_SEG_NOT_PRESENT 11
|
||||
#define EXCEPT_IA32_STACK_FAULT 12
|
||||
#define EXCEPT_IA32_GP_FAULT 13
|
||||
#define EXCEPT_IA32_PAGE_FAULT 14
|
||||
#define EXCEPT_IA32_FP_ERROR 16
|
||||
#define EXCEPT_IA32_ALIGNMENT_CHECK 17
|
||||
#define EXCEPT_IA32_MACHINE_CHECK 18
|
||||
#define EXCEPT_IA32_SIMD 19
|
||||
|
||||
//
|
||||
// IA-32 processor context definition
|
||||
//
|
||||
//
|
||||
// FXSAVE_STATE
|
||||
// FP / MMX / XMM registers (see fxrstor instruction definition)
|
||||
//
|
||||
typedef struct {
|
||||
UINT16 Fcw;
|
||||
UINT16 Fsw;
|
||||
UINT16 Ftw;
|
||||
UINT16 Opcode;
|
||||
UINT32 Eip;
|
||||
UINT16 Cs;
|
||||
UINT16 Reserved1;
|
||||
UINT32 DataOffset;
|
||||
UINT16 Ds;
|
||||
UINT8 Reserved2[10];
|
||||
UINT8 St0Mm0[10], Reserved3[6];
|
||||
UINT8 St0Mm1[10], Reserved4[6];
|
||||
UINT8 St0Mm2[10], Reserved5[6];
|
||||
UINT8 St0Mm3[10], Reserved6[6];
|
||||
UINT8 St0Mm4[10], Reserved7[6];
|
||||
UINT8 St0Mm5[10], Reserved8[6];
|
||||
UINT8 St0Mm6[10], Reserved9[6];
|
||||
UINT8 St0Mm7[10], Reserved10[6];
|
||||
UINT8 Reserved11[22 * 16];
|
||||
} EFI_FX_SAVE_STATE_IA32;
|
||||
|
||||
typedef struct {
|
||||
UINT32 ExceptionData;
|
||||
EFI_FX_SAVE_STATE_IA32 FxSaveState;
|
||||
UINT32 Dr0;
|
||||
UINT32 Dr1;
|
||||
UINT32 Dr2;
|
||||
UINT32 Dr3;
|
||||
UINT32 Dr6;
|
||||
UINT32 Dr7;
|
||||
UINT32 Cr0;
|
||||
UINT32 Cr1;
|
||||
UINT32 Cr2;
|
||||
UINT32 Cr3;
|
||||
UINT32 Cr4;
|
||||
UINT32 Eflags;
|
||||
UINT32 Ldtr;
|
||||
UINT32 Tr;
|
||||
UINT32 Gdtr[2];
|
||||
UINT32 Idtr[2];
|
||||
UINT32 Eip;
|
||||
UINT32 Gs;
|
||||
UINT32 Fs;
|
||||
UINT32 Es;
|
||||
UINT32 Ds;
|
||||
UINT32 Cs;
|
||||
UINT32 Ss;
|
||||
UINT32 Edi;
|
||||
UINT32 Esi;
|
||||
UINT32 Ebp;
|
||||
UINT32 Esp;
|
||||
UINT32 Ebx;
|
||||
UINT32 Edx;
|
||||
UINT32 Ecx;
|
||||
UINT32 Eax;
|
||||
} EFI_SYSTEM_CONTEXT_IA32;
|
||||
|
||||
//
|
||||
// IPF processor exception types
|
||||
//
|
||||
#define EXCEPT_IPF_VHTP_TRANSLATION 0
|
||||
#define EXCEPT_IPF_INSTRUCTION_TLB 1
|
||||
#define EXCEPT_IPF_DATA_TLB 2
|
||||
#define EXCEPT_IPF_ALT_INSTRUCTION_TLB 3
|
||||
#define EXCEPT_IPF_ALT_DATA_TLB 4
|
||||
#define EXCEPT_IPF_DATA_NESTED_TLB 5
|
||||
#define EXCEPT_IPF_INSTRUCTION_KEY_MISSED 6
|
||||
#define EXCEPT_IPF_DATA_KEY_MISSED 7
|
||||
#define EXCEPT_IPF_DIRTY_BIT 8
|
||||
#define EXCEPT_IPF_INSTRUCTION_ACCESS_BIT 9
|
||||
#define EXCEPT_IPF_DATA_ACCESS_BIT 10
|
||||
#define EXCEPT_IPF_BREAKPOINT 11
|
||||
#define EXCEPT_IPF_EXTERNAL_INTERRUPT 12
|
||||
//
|
||||
// 13 - 19 reserved
|
||||
//
|
||||
#define EXCEPT_IPF_PAGE_NOT_PRESENT 20
|
||||
#define EXCEPT_IPF_KEY_PERMISSION 21
|
||||
#define EXCEPT_IPF_INSTRUCTION_ACCESS_RIGHTS 22
|
||||
#define EXCEPT_IPF_DATA_ACCESS_RIGHTS 23
|
||||
#define EXCEPT_IPF_GENERAL_EXCEPTION 24
|
||||
#define EXCEPT_IPF_DISABLED_FP_REGISTER 25
|
||||
#define EXCEPT_IPF_NAT_CONSUMPTION 26
|
||||
#define EXCEPT_IPF_SPECULATION 27
|
||||
//
|
||||
// 28 reserved
|
||||
//
|
||||
#define EXCEPT_IPF_DEBUG 29
|
||||
#define EXCEPT_IPF_UNALIGNED_REFERENCE 30
|
||||
#define EXCEPT_IPF_UNSUPPORTED_DATA_REFERENCE 31
|
||||
#define EXCEPT_IPF_FP_FAULT 32
|
||||
#define EXCEPT_IPF_FP_TRAP 33
|
||||
#define EXCEPT_IPF_LOWER_PRIVILEGE_TRANSFER_TRAP 34
|
||||
#define EXCEPT_IPF_TAKEN_BRANCH 35
|
||||
#define EXCEPT_IPF_SINGLE_STEP 36
|
||||
//
|
||||
// 37 - 44 reserved
|
||||
//
|
||||
#define EXCEPT_IPF_IA32_EXCEPTION 45
|
||||
#define EXCEPT_IPF_IA32_INTERCEPT 46
|
||||
#define EXCEPT_IPF_IA32_INTERRUPT 47
|
||||
|
||||
//
|
||||
// IPF processor context definition
|
||||
//
|
||||
typedef struct {
|
||||
//
|
||||
// The first reserved field is necessary to preserve alignment for the correct
|
||||
// bits in UNAT and to insure F2 is 16 byte aligned..
|
||||
//
|
||||
UINT64 Reserved;
|
||||
UINT64 R1;
|
||||
UINT64 R2;
|
||||
UINT64 R3;
|
||||
UINT64 R4;
|
||||
UINT64 R5;
|
||||
UINT64 R6;
|
||||
UINT64 R7;
|
||||
UINT64 R8;
|
||||
UINT64 R9;
|
||||
UINT64 R10;
|
||||
UINT64 R11;
|
||||
UINT64 R12;
|
||||
UINT64 R13;
|
||||
UINT64 R14;
|
||||
UINT64 R15;
|
||||
UINT64 R16;
|
||||
UINT64 R17;
|
||||
UINT64 R18;
|
||||
UINT64 R19;
|
||||
UINT64 R20;
|
||||
UINT64 R21;
|
||||
UINT64 R22;
|
||||
UINT64 R23;
|
||||
UINT64 R24;
|
||||
UINT64 R25;
|
||||
UINT64 R26;
|
||||
UINT64 R27;
|
||||
UINT64 R28;
|
||||
UINT64 R29;
|
||||
UINT64 R30;
|
||||
UINT64 R31;
|
||||
|
||||
UINT64 F2[2];
|
||||
UINT64 F3[2];
|
||||
UINT64 F4[2];
|
||||
UINT64 F5[2];
|
||||
UINT64 F6[2];
|
||||
UINT64 F7[2];
|
||||
UINT64 F8[2];
|
||||
UINT64 F9[2];
|
||||
UINT64 F10[2];
|
||||
UINT64 F11[2];
|
||||
UINT64 F12[2];
|
||||
UINT64 F13[2];
|
||||
UINT64 F14[2];
|
||||
UINT64 F15[2];
|
||||
UINT64 F16[2];
|
||||
UINT64 F17[2];
|
||||
UINT64 F18[2];
|
||||
UINT64 F19[2];
|
||||
UINT64 F20[2];
|
||||
UINT64 F21[2];
|
||||
UINT64 F22[2];
|
||||
UINT64 F23[2];
|
||||
UINT64 F24[2];
|
||||
UINT64 F25[2];
|
||||
UINT64 F26[2];
|
||||
UINT64 F27[2];
|
||||
UINT64 F28[2];
|
||||
UINT64 F29[2];
|
||||
UINT64 F30[2];
|
||||
UINT64 F31[2];
|
||||
|
||||
UINT64 Pr;
|
||||
|
||||
UINT64 B0;
|
||||
UINT64 B1;
|
||||
UINT64 B2;
|
||||
UINT64 B3;
|
||||
UINT64 B4;
|
||||
UINT64 B5;
|
||||
UINT64 B6;
|
||||
UINT64 B7;
|
||||
|
||||
//
|
||||
// application registers
|
||||
//
|
||||
UINT64 ArRsc;
|
||||
UINT64 ArBsp;
|
||||
UINT64 ArBspstore;
|
||||
UINT64 ArRnat;
|
||||
|
||||
UINT64 ArFcr;
|
||||
|
||||
UINT64 ArEflag;
|
||||
UINT64 ArCsd;
|
||||
UINT64 ArSsd;
|
||||
UINT64 ArCflg;
|
||||
UINT64 ArFsr;
|
||||
UINT64 ArFir;
|
||||
UINT64 ArFdr;
|
||||
|
||||
UINT64 ArCcv;
|
||||
|
||||
UINT64 ArUnat;
|
||||
|
||||
UINT64 ArFpsr;
|
||||
|
||||
UINT64 ArPfs;
|
||||
UINT64 ArLc;
|
||||
UINT64 ArEc;
|
||||
|
||||
//
|
||||
// control registers
|
||||
//
|
||||
UINT64 CrDcr;
|
||||
UINT64 CrItm;
|
||||
UINT64 CrIva;
|
||||
UINT64 CrPta;
|
||||
UINT64 CrIpsr;
|
||||
UINT64 CrIsr;
|
||||
UINT64 CrIip;
|
||||
UINT64 CrIfa;
|
||||
UINT64 CrItir;
|
||||
UINT64 CrIipa;
|
||||
UINT64 CrIfs;
|
||||
UINT64 CrIim;
|
||||
UINT64 CrIha;
|
||||
|
||||
//
|
||||
// debug registers
|
||||
//
|
||||
UINT64 Dbr0;
|
||||
UINT64 Dbr1;
|
||||
UINT64 Dbr2;
|
||||
UINT64 Dbr3;
|
||||
UINT64 Dbr4;
|
||||
UINT64 Dbr5;
|
||||
UINT64 Dbr6;
|
||||
UINT64 Dbr7;
|
||||
|
||||
UINT64 Ibr0;
|
||||
UINT64 Ibr1;
|
||||
UINT64 Ibr2;
|
||||
UINT64 Ibr3;
|
||||
UINT64 Ibr4;
|
||||
UINT64 Ibr5;
|
||||
UINT64 Ibr6;
|
||||
UINT64 Ibr7;
|
||||
|
||||
//
|
||||
// virtual registers - nat bits for R1-R31
|
||||
//
|
||||
UINT64 IntNat;
|
||||
|
||||
} EFI_SYSTEM_CONTEXT_IPF;
|
||||
|
||||
//
|
||||
// EBC processor exception types
|
||||
//
|
||||
#define EXCEPT_EBC_UNDEFINED 0
|
||||
#define EXCEPT_EBC_DIVIDE_ERROR 1
|
||||
#define EXCEPT_EBC_DEBUG 2
|
||||
#define EXCEPT_EBC_BREAKPOINT 3
|
||||
#define EXCEPT_EBC_OVERFLOW 4
|
||||
#define EXCEPT_EBC_INVALID_OPCODE 5 // opcode out of range
|
||||
#define EXCEPT_EBC_STACK_FAULT 6
|
||||
#define EXCEPT_EBC_ALIGNMENT_CHECK 7
|
||||
#define EXCEPT_EBC_INSTRUCTION_ENCODING 8 // malformed instruction
|
||||
#define EXCEPT_EBC_BAD_BREAK 9 // BREAK 0 or undefined BREAK
|
||||
#define EXCEPT_EBC_STEP 10 // to support debug stepping
|
||||
//
|
||||
// For coding convenience, define the maximum valid EBC exception.
|
||||
//
|
||||
#define MAX_EBC_EXCEPTION EXCEPT_EBC_STEP
|
||||
|
||||
//
|
||||
// EBC processor context definition
|
||||
//
|
||||
typedef struct {
|
||||
UINT64 R0;
|
||||
UINT64 R1;
|
||||
UINT64 R2;
|
||||
UINT64 R3;
|
||||
UINT64 R4;
|
||||
UINT64 R5;
|
||||
UINT64 R6;
|
||||
UINT64 R7;
|
||||
UINT64 Flags;
|
||||
UINT64 ControlFlags;
|
||||
UINT64 Ip;
|
||||
} EFI_SYSTEM_CONTEXT_EBC;
|
||||
|
||||
//
|
||||
// Universal EFI_SYSTEM_CONTEXT definition
|
||||
//
|
||||
typedef union {
|
||||
EFI_SYSTEM_CONTEXT_EBC *SystemContextEbc;
|
||||
EFI_SYSTEM_CONTEXT_IA32 *SystemContextIa32;
|
||||
EFI_SYSTEM_CONTEXT_IPF *SystemContextIpf;
|
||||
} EFI_SYSTEM_CONTEXT;
|
||||
|
||||
//
|
||||
// DebugSupport callback function prototypes
|
||||
//
|
||||
|
||||
/**
|
||||
Registers and enables an exception callback function for the specified exception.
|
||||
|
||||
@param ExceptionType Exception types in EBC, IA-32, X64, or IPF
|
||||
@param SystemContext Exception content.
|
||||
|
||||
**/
|
||||
typedef
|
||||
VOID
|
||||
(*EFI_EXCEPTION_CALLBACK) (
|
||||
IN EFI_EXCEPTION_TYPE ExceptionType,
|
||||
IN OUT EFI_SYSTEM_CONTEXT SystemContext
|
||||
);
|
||||
|
||||
/**
|
||||
Registers and enables the on-target debug agent<6E><74>s periodic entry point.
|
||||
|
||||
@param SystemContext Exception content.
|
||||
|
||||
**/
|
||||
typedef
|
||||
VOID
|
||||
(*EFI_PERIODIC_CALLBACK) (
|
||||
IN OUT EFI_SYSTEM_CONTEXT SystemContext
|
||||
);
|
||||
|
||||
//
|
||||
// Machine type definition
|
||||
//
|
||||
typedef enum {
|
||||
IsaIa32 = IMAGE_FILE_MACHINE_I386, // 0x014C
|
||||
IsaX64 = IMAGE_FILE_MACHINE_X64, // 0x8664
|
||||
IsaIpf = IMAGE_FILE_MACHINE_IA64, // 0x0200
|
||||
IsaEbc = IMAGE_FILE_MACHINE_EBC // 0x0EBC
|
||||
} EFI_INSTRUCTION_SET_ARCHITECTURE;
|
||||
|
||||
|
||||
//
|
||||
// DebugSupport member function definitions
|
||||
//
|
||||
|
||||
/**
|
||||
Returns the maximum value that may be used for the ProcessorIndex parameter in
|
||||
RegisterPeriodicCallback() and RegisterExceptionCallback().
|
||||
|
||||
@param This A pointer to the EFI_DEBUG_SUPPORT_PROTOCOL instance.
|
||||
@param MaxProcessorIndex Pointer to a caller-allocated UINTN in which the maximum supported
|
||||
processor index is returned.
|
||||
|
||||
@retval EFI_SUCCESS The function completed successfully.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_GET_MAXIMUM_PROCESSOR_INDEX) (
|
||||
IN EFI_DEBUG_SUPPORT_PROTOCOL *This,
|
||||
OUT UINTN *MaxProcessorIndex
|
||||
);
|
||||
|
||||
/**
|
||||
Registers a function to be called back periodically in interrupt context.
|
||||
|
||||
@param This A pointer to the EFI_DEBUG_SUPPORT_PROTOCOL instance.
|
||||
@param ProcessorIndex Specifies which processor the callback function applies to.
|
||||
@param PeriodicCallback A pointer to a function of type PERIODIC_CALLBACK that is the main
|
||||
periodic entry point of the debug agent.
|
||||
|
||||
@retval EFI_SUCCESS The function completed successfully.
|
||||
@retval EFI_ALREADY_STARTED Non-NULL PeriodicCallback parameter when a callback
|
||||
function was previously registered.
|
||||
@retval EFI_OUT_OF_RESOURCES System has insufficient memory resources to register new callback
|
||||
function.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_REGISTER_PERIODIC_CALLBACK) (
|
||||
IN EFI_DEBUG_SUPPORT_PROTOCOL *This,
|
||||
IN UINTN ProcessorIndex,
|
||||
IN EFI_PERIODIC_CALLBACK PeriodicCallback
|
||||
);
|
||||
|
||||
/**
|
||||
Registers a function to be called when a given processor exception occurs.
|
||||
|
||||
@param This A pointer to the EFI_DEBUG_SUPPORT_PROTOCOL instance.
|
||||
@param ProcessorIndex Specifies which processor the callback function applies to.
|
||||
@param PeriodicCallback A pointer to a function of type EXCEPTION_CALLBACK that is called
|
||||
when the processor exception specified by ExceptionType occurs.
|
||||
@param ExceptionType Specifies which processor exception to hook.
|
||||
|
||||
@retval EFI_SUCCESS The function completed successfully.
|
||||
@retval EFI_ALREADY_STARTED Non-NULL PeriodicCallback parameter when a callback
|
||||
function was previously registered.
|
||||
@retval EFI_OUT_OF_RESOURCES System has insufficient memory resources to register new callback
|
||||
function.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_REGISTER_EXCEPTION_CALLBACK) (
|
||||
IN EFI_DEBUG_SUPPORT_PROTOCOL *This,
|
||||
IN UINTN ProcessorIndex,
|
||||
IN EFI_EXCEPTION_CALLBACK ExceptionCallback,
|
||||
IN EFI_EXCEPTION_TYPE ExceptionType
|
||||
);
|
||||
|
||||
/**
|
||||
Invalidates processor instruction cache for a memory range. Subsequent execution in this range
|
||||
causes a fresh memory fetch to retrieve code to be executed.
|
||||
|
||||
@param This A pointer to the EFI_DEBUG_SUPPORT_PROTOCOL instance.
|
||||
@param ProcessorIndex Specifies which processor<6F><72>s instruction cache is to be invalidated.
|
||||
@param Start Specifies the physical base of the memory range to be invalidated.
|
||||
@param Length Specifies the minimum number of bytes in the processor<6F><72>s instruction
|
||||
cache to invalidate.
|
||||
|
||||
@retval EFI_SUCCESS The function completed successfully.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_INVALIDATE_INSTRUCTION_CACHE) (
|
||||
IN EFI_DEBUG_SUPPORT_PROTOCOL *This,
|
||||
IN UINTN ProcessorIndex,
|
||||
IN VOID *Start,
|
||||
IN UINT64 Length
|
||||
);
|
||||
|
||||
//
|
||||
// DebugSupport protocol definition
|
||||
//
|
||||
struct _EFI_DEBUG_SUPPORT_PROTOCOL {
|
||||
EFI_INSTRUCTION_SET_ARCHITECTURE Isa;
|
||||
EFI_GET_MAXIMUM_PROCESSOR_INDEX GetMaximumProcessorIndex;
|
||||
EFI_REGISTER_PERIODIC_CALLBACK RegisterPeriodicCallback;
|
||||
EFI_REGISTER_EXCEPTION_CALLBACK RegisterExceptionCallback;
|
||||
EFI_INVALIDATE_INSTRUCTION_CACHE InvalidateInstructionCache;
|
||||
};
|
||||
|
||||
extern EFI_GUID gEfiDebugSupportProtocolGuid;
|
||||
|
||||
#endif
|
121
Tools/Source/TianoTools/Include/Protocol/Decompress.h
Normal file
121
Tools/Source/TianoTools/Include/Protocol/Decompress.h
Normal file
@ -0,0 +1,121 @@
|
||||
/** @file
|
||||
The Decompress Protocol Interface
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
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
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
Module Name: Decompress.h
|
||||
|
||||
**/
|
||||
|
||||
#ifndef __DECOMPRESS_H__
|
||||
#define __DECOMPRESS_H__
|
||||
|
||||
#define EFI_DECOMPRESS_PROTOCOL_GUID \
|
||||
{ \
|
||||
0xd8117cfe, 0x94a6, 0x11d4, {0x9a, 0x3a, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d } \
|
||||
}
|
||||
|
||||
typedef struct _EFI_DECOMPRESS_PROTOCOL EFI_DECOMPRESS_PROTOCOL;
|
||||
|
||||
/**
|
||||
The GetInfo() function retrieves the size of the uncompressed buffer
|
||||
and the temporary scratch buffer required to decompress the buffer
|
||||
specified by Source and SourceSize. If the size of the uncompressed
|
||||
buffer or the size of the scratch buffer cannot be determined from
|
||||
the compressed data specified by Source and SourceData, then
|
||||
EFI_INVALID_PARAMETER is returned. Otherwise, the size of the uncompressed
|
||||
buffer is returned in DestinationSize, the size of the scratch buffer is
|
||||
returned in ScratchSize, and EFI_SUCCESS is returned.
|
||||
|
||||
The GetInfo() function does not have scratch buffer available to perform
|
||||
a thorough checking of the validity of the source data. It just retrieves
|
||||
the 'Original Size' field from the beginning bytes of the source data and
|
||||
output it as DestinationSize. And ScratchSize is specific to the decompression
|
||||
implementation.
|
||||
|
||||
@param This The protocol instance pointer
|
||||
@param Source The source buffer containing the compressed data.
|
||||
@param SourceSize The size, in bytes, of source buffer.
|
||||
@param DestinationSize A pointer to the size, in bytes, of the uncompressed buffer
|
||||
that will be generated when the compressed buffer specified
|
||||
by Source and SourceSize is decompressed.
|
||||
@param ScratchSize A pointer to the size, in bytes, of the scratch buffer that
|
||||
is required to decompress the compressed buffer specified by
|
||||
Source and SourceSize.
|
||||
|
||||
@retval EFI_SUCCESS The size of the uncompressed data was returned in DestinationSize
|
||||
and the size of the scratch buffer was returned in ScratchSize.
|
||||
@retval EFI_INVALID_PARAMETER The size of the uncompressed data or the size of the scratch
|
||||
buffer cannot be determined from the compressed data specified by
|
||||
Source and SourceData.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_DECOMPRESS_GET_INFO) (
|
||||
IN EFI_DECOMPRESS_PROTOCOL *This,
|
||||
IN VOID *Source,
|
||||
IN UINT32 SourceSize,
|
||||
OUT UINT32 *DestinationSize,
|
||||
OUT UINT32 *ScratchSize
|
||||
);
|
||||
|
||||
/**
|
||||
The Decompress() function extracts decompressed data to its original form.
|
||||
|
||||
This protocol is designed so that the decompression algorithm can be
|
||||
implemented without using any memory services. As a result, the
|
||||
Decompress() function is not allowed to call AllocatePool() or
|
||||
AllocatePages() in its implementation. It is the caller's responsibility
|
||||
to allocate and free the Destination and Scratch buffers.
|
||||
|
||||
If the compressed source data specified by Source and SourceSize is
|
||||
sucessfully decompressed into Destination, then EFI_SUCCESS is returned.
|
||||
If the compressed source data specified by Source and SourceSize is not in
|
||||
a valid compressed data format, then EFI_INVALID_PARAMETER is returned.
|
||||
|
||||
@param This The protocol instance pointer
|
||||
@param Source The source buffer containing the compressed data.
|
||||
@param SourceSize The size of source data.
|
||||
@param Destination On output, the destination buffer that contains
|
||||
the uncompressed data.
|
||||
@param DestinationSize The size of destination buffer. The size of destination
|
||||
buffer needed is obtained from GetInfo().
|
||||
@param Scratch A temporary scratch buffer that is used to perform the
|
||||
decompression.
|
||||
@param ScratchSize The size of scratch buffer. The size of scratch buffer needed
|
||||
is obtained from GetInfo().
|
||||
|
||||
@retval EFI_SUCCESS Decompression completed successfully, and the uncompressed
|
||||
buffer is returned in Destination.
|
||||
@retval EFI_INVALID_PARAMETER The source buffer specified by Source and SourceSize is
|
||||
corrupted (not in a valid compressed format).
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_DECOMPRESS_DECOMPRESS) (
|
||||
IN EFI_DECOMPRESS_PROTOCOL *This,
|
||||
IN VOID *Source,
|
||||
IN UINT32 SourceSize,
|
||||
IN OUT VOID *Destination,
|
||||
IN UINT32 DestinationSize,
|
||||
IN OUT VOID *Scratch,
|
||||
IN UINT32 ScratchSize
|
||||
);
|
||||
|
||||
struct _EFI_DECOMPRESS_PROTOCOL {
|
||||
EFI_DECOMPRESS_GET_INFO GetInfo;
|
||||
EFI_DECOMPRESS_DECOMPRESS Decompress;
|
||||
};
|
||||
|
||||
extern EFI_GUID gEfiDecompressProtocolGuid;
|
||||
|
||||
#endif
|
94
Tools/Source/TianoTools/Include/Protocol/DevicePath.h
Normal file
94
Tools/Source/TianoTools/Include/Protocol/DevicePath.h
Normal file
@ -0,0 +1,94 @@
|
||||
/** @file
|
||||
The device path protocol as defined in EFI 1.0.
|
||||
|
||||
The device path represents a programatic path to a device. It's the view
|
||||
from a software point of view. It also must persist from boot to boot, so
|
||||
it can not contain things like PCI bus numbers that change from boot to boot.
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
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
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
Module Name: DevicePath.h
|
||||
|
||||
**/
|
||||
|
||||
#ifndef __EFI_DEVICE_PATH_PROTOCOL_H__
|
||||
#define __EFI_DEVICE_PATH_PROTOCOL_H__
|
||||
|
||||
//
|
||||
// Device Path protocol
|
||||
//
|
||||
#define EFI_DEVICE_PATH_PROTOCOL_GUID \
|
||||
{ \
|
||||
0x9576e91, 0x6d3f, 0x11d2, {0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b } \
|
||||
}
|
||||
|
||||
#pragma pack(1)
|
||||
|
||||
typedef struct {
|
||||
UINT8 Type;
|
||||
UINT8 SubType;
|
||||
UINT8 Length[2];
|
||||
} EFI_DEVICE_PATH_PROTOCOL;
|
||||
|
||||
#pragma pack()
|
||||
|
||||
#define EFI_DP_TYPE_MASK 0x7F
|
||||
#define EFI_DP_TYPE_UNPACKED 0x80
|
||||
#define END_DEVICE_PATH_TYPE 0x7f
|
||||
|
||||
#define EFI_END_ENTIRE_DEVICE_PATH 0xff
|
||||
#define EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE 0xff
|
||||
#define EFI_END_INSTANCE_DEVICE_PATH 0x01
|
||||
#define END_ENTIRE_DEVICE_PATH_SUBTYPE EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE
|
||||
#define END_INSTANCE_DEVICE_PATH_SUBTYPE EFI_END_INSTANCE_DEVICE_PATH
|
||||
|
||||
#define EFI_END_DEVICE_PATH_LENGTH (sizeof (EFI_DEVICE_PATH_PROTOCOL))
|
||||
#define END_DEVICE_PATH_LENGTH EFI_END_DEVICE_PATH_LENGTH
|
||||
|
||||
#define DP_IS_END_TYPE(a)
|
||||
#define DP_IS_END_SUBTYPE(a) (((a)->SubType == END_ENTIRE_DEVICE_PATH_SUBTYPE)
|
||||
#define DevicePathSubType(a) ((a)->SubType)
|
||||
#define IsDevicePathUnpacked(a) ((a)->Type & EFI_DP_TYPE_UNPACKED)
|
||||
|
||||
#define EfiDevicePathNodeLength(a) (((a)->Length[0]) | ((a)->Length[1] << 8))
|
||||
#define DevicePathNodeLength(a) (EfiDevicePathNodeLength(a))
|
||||
#define EfiNextDevicePathNode(a) ((EFI_DEVICE_PATH_PROTOCOL *) (((UINT8 *) (a)) + EfiDevicePathNodeLength (a)))
|
||||
#define NextDevicePathNode(a) (EfiNextDevicePathNode(a))
|
||||
|
||||
#define EfiDevicePathType(a) (((a)->Type) & EFI_DP_TYPE_MASK)
|
||||
#define DevicePathType(a) (EfiDevicePathType(a))
|
||||
#define EfiIsDevicePathEndType(a) (EfiDevicePathType (a) == END_DEVICE_PATH_TYPE)
|
||||
#define IsDevicePathEndType(a) (EfiIsDevicePathEndType(a))
|
||||
|
||||
|
||||
#define EfiIsDevicePathEndSubType(a) ((a)->SubType == EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE)
|
||||
#define IsDevicePathEndSubType(a) (EfiIsDevicePathEndSubType(a))
|
||||
#define EfiIsDevicePathEndInstanceSubType(a) ((a)->SubType == EFI_END_INSTANCE_DEVICE_PATH)
|
||||
|
||||
#define EfiIsDevicePathEnd(a) (EfiIsDevicePathEndType (a) && EfiIsDevicePathEndSubType (a))
|
||||
#define IsDevicePathEnd(a) (EfiIsDevicePathEnd(a))
|
||||
#define EfiIsDevicePathEndInstance(a) (EfiIsDevicePathEndType (a) && EfiIsDevicePathEndInstanceSubType (a))
|
||||
|
||||
|
||||
#define SetDevicePathNodeLength(a,l) { \
|
||||
(a)->Length[0] = (UINT8) (l); \
|
||||
(a)->Length[1] = (UINT8) ((l) >> 8); \
|
||||
}
|
||||
|
||||
#define SetDevicePathEndNode(a) { \
|
||||
(a)->Type = END_DEVICE_PATH_TYPE; \
|
||||
(a)->SubType = END_ENTIRE_DEVICE_PATH_SUBTYPE; \
|
||||
(a)->Length[0] = sizeof(EFI_DEVICE_PATH_PROTOCOL); \
|
||||
(a)->Length[1] = 0; \
|
||||
}
|
||||
|
||||
extern EFI_GUID gEfiDevicePathProtocolGuid;
|
||||
|
||||
#endif
|
@ -0,0 +1,73 @@
|
||||
/** @file
|
||||
EFI_DEVICE_PATH_FROM_TEXT_PROTOCOL as defined in UEFI 2.0.
|
||||
This protocol provides service to convert text to device paths and device nodes.
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
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
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
Module Name: DevicePathFromText.h
|
||||
|
||||
**/
|
||||
|
||||
#ifndef __DEVICE_PATH_FROM_TEXT_PROTOCOL_H__
|
||||
#define __DEVICE_PATH_FROM_TEXT_PROTOCOL_H__
|
||||
|
||||
//
|
||||
// Device Path From Text protocol
|
||||
//
|
||||
#define EFI_DEVICE_PATH_FROM_TEXT_PROTOCOL_GUID \
|
||||
{ \
|
||||
0x5c99a21, 0xc70f, 0x4ad2, {0x8a, 0x5f, 0x35, 0xdf, 0x33, 0x43, 0xf5, 0x1e } \
|
||||
}
|
||||
|
||||
/**
|
||||
Convert text to the binary representation of a device node.
|
||||
|
||||
@param TextDeviceNode TextDeviceNode points to the text representation of a device
|
||||
node. Conversion starts with the first character and continues
|
||||
until the first non-device node character.
|
||||
|
||||
@retval a_pointer Pointer to the EFI device node.
|
||||
@retval NULL if TextDeviceNode is NULL or there was insufficient memory.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_DEVICE_PATH_PROTOCOL*
|
||||
(EFIAPI *EFI_DEVICE_PATH_FROM_TEXT_NODE) (
|
||||
IN CONST CHAR16 *TextDeviceNode
|
||||
)
|
||||
;
|
||||
|
||||
|
||||
/**
|
||||
Convert text to the binary representation of a device node.
|
||||
|
||||
@param TextDeviceNode TextDevicePath points to the text representation of a device
|
||||
path. Conversion starts with the first character and continues
|
||||
until the first non-device path character.
|
||||
|
||||
@retval a_pointer Pointer to the allocated device path.
|
||||
@retval NULL if TextDeviceNode is NULL or there was insufficient memory.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_DEVICE_PATH_PROTOCOL*
|
||||
(EFIAPI *EFI_DEVICE_PATH_FROM_TEXT_PATH) (
|
||||
IN CONST CHAR16 *TextDevicePath
|
||||
)
|
||||
;
|
||||
|
||||
typedef struct {
|
||||
EFI_DEVICE_PATH_FROM_TEXT_NODE ConvertDeviceNodeFromText;
|
||||
EFI_DEVICE_PATH_FROM_TEXT_PATH ConvertDevicePathFromText;
|
||||
} EFI_DEVICE_PATH_FROM_TEXT_PROTOCOL;
|
||||
|
||||
extern EFI_GUID gEfiDevicePathFromTextProtocolGuid;
|
||||
|
||||
#endif
|
86
Tools/Source/TianoTools/Include/Protocol/DevicePathToText.h
Normal file
86
Tools/Source/TianoTools/Include/Protocol/DevicePathToText.h
Normal file
@ -0,0 +1,86 @@
|
||||
/** @file
|
||||
EFI_DEVICE_PATH_TO_TEXT_PROTOCOL as defined in UEFI 2.0.
|
||||
This protocol provides service to convert device nodes and paths to text.
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
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
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
Module Name: DevicePathToText.h
|
||||
|
||||
**/
|
||||
|
||||
#ifndef __DEVICE_PATH_TO_TEXT_PROTOCOL_H__
|
||||
#define __DEVICE_PATH_TO_TEXT_PROTOCOL_H__
|
||||
|
||||
//
|
||||
// Device Path To Text protocol
|
||||
//
|
||||
#define EFI_DEVICE_PATH_TO_TEXT_PROTOCOL_GUID \
|
||||
{ \
|
||||
0x8b843e20, 0x8132, 0x4852, {0x90, 0xcc, 0x55, 0x1a, 0x4e, 0x4a, 0x7f, 0x1c } \
|
||||
}
|
||||
|
||||
/**
|
||||
Convert a device node to its text representation.
|
||||
|
||||
@param DeviceNode Points to the device node to be converted.
|
||||
@param DisplayOnly If DisplayOnly is TRUE, then the shorter text representation
|
||||
of the display node is used, where applicable. If DisplayOnly
|
||||
is FALSE, then the longer text representation of the display node
|
||||
is used.
|
||||
@param AllowShortcuts If AllowShortcuts is TRUE, then the shortcut forms of text
|
||||
representation for a device node can be used, where applicable.
|
||||
|
||||
@retval a_pointer a pointer to the allocated text representation of the device node data
|
||||
@retval NULL if DeviceNode is NULL or there was insufficient memory.
|
||||
|
||||
**/
|
||||
typedef
|
||||
CHAR16*
|
||||
(EFIAPI *EFI_DEVICE_PATH_TO_TEXT_NODE) (
|
||||
IN CONST EFI_DEVICE_PATH_PROTOCOL *DeviceNode,
|
||||
IN BOOLEAN DisplayOnly,
|
||||
IN BOOLEAN AllowShortcuts
|
||||
)
|
||||
;
|
||||
|
||||
/**
|
||||
Convert a device path to its text representation.
|
||||
|
||||
@param DevicePath Points to the device path to be converted.
|
||||
@param DisplayOnly If DisplayOnly is TRUE, then the shorter text representation
|
||||
of the display node is used, where applicable. If DisplayOnly
|
||||
is FALSE, then the longer text representation of the display node
|
||||
is used.
|
||||
@param AllowShortcuts The AllowShortcuts is FALSE, then the shortcut forms of
|
||||
text representation for a device node cannot be used.
|
||||
|
||||
@retval a_pointer a pointer to the allocated text representation of the device node.
|
||||
@retval NULL if DevicePath is NULL or there was insufficient memory.
|
||||
|
||||
**/
|
||||
typedef
|
||||
CHAR16*
|
||||
(EFIAPI *EFI_DEVICE_PATH_TO_TEXT_PATH) (
|
||||
IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath,
|
||||
IN BOOLEAN DisplayOnly,
|
||||
IN BOOLEAN AllowShortcuts
|
||||
)
|
||||
;
|
||||
|
||||
typedef struct {
|
||||
EFI_DEVICE_PATH_TO_TEXT_NODE ConvertDeviceNodeToText;
|
||||
EFI_DEVICE_PATH_TO_TEXT_PATH ConvertDevicePathToText;
|
||||
} EFI_DEVICE_PATH_TO_TEXT_PROTOCOL;
|
||||
|
||||
extern EFI_GUID gEfiDevicePathToTextProtocolGuid;
|
||||
|
||||
#endif
|
||||
|
||||
|
194
Tools/Source/TianoTools/Include/Protocol/DevicePathUtilities.h
Normal file
194
Tools/Source/TianoTools/Include/Protocol/DevicePathUtilities.h
Normal file
@ -0,0 +1,194 @@
|
||||
/** @file
|
||||
EFI_DEVICE_PATH_UTILITIES_PROTOCOL as defined in UEFI 2.0.
|
||||
Use to create and manipulate device paths and device nodes.
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
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
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
Module Name: DevicePathUtilities.h
|
||||
|
||||
**/
|
||||
|
||||
#ifndef __DEVICE_PATH_UTILITIES_PROTOCOL_H__
|
||||
#define __DEVICE_PATH_UTILITIES_PROTOCOL_H__
|
||||
|
||||
//
|
||||
// Device Path Utilities protocol
|
||||
//
|
||||
#define EFI_DEVICE_PATH_UTILITIES_PROTOCOL_GUID \
|
||||
{ \
|
||||
0x379be4e, 0xd706, 0x437d, {0xb0, 0x37, 0xed, 0xb8, 0x2f, 0xb7, 0x72, 0xa4 } \
|
||||
}
|
||||
|
||||
/**
|
||||
Returns the size of the device path, in bytes.
|
||||
|
||||
@param DevicePath Points to the start of the EFI device path.
|
||||
|
||||
@revtal Size Size of the specified device path, in bytes, including the end-of-path tag.
|
||||
|
||||
**/
|
||||
typedef
|
||||
UINTN
|
||||
(EFIAPI *EFI_DEVICE_PATH_UTILS_GET_DEVICE_PATH_SIZE) (
|
||||
IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath
|
||||
)
|
||||
;
|
||||
|
||||
|
||||
/**
|
||||
Create a duplicate of the specified path.
|
||||
|
||||
@param DevicePath Points to the source EFI device path.
|
||||
|
||||
@retval Pointer A pointer to the duplicate device path.
|
||||
@retval NULL insufficient memory
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_DEVICE_PATH_PROTOCOL*
|
||||
(EFIAPI *EFI_DEVICE_PATH_UTILS_DUP_DEVICE_PATH) (
|
||||
IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath
|
||||
)
|
||||
;
|
||||
|
||||
/**
|
||||
Create a new path by appending the second device path to the first.
|
||||
|
||||
@param Src1 Points to the first device path. If NULL, then it is ignored.
|
||||
@param Src2 Points to the second device path. If NULL, then it is ignored.
|
||||
|
||||
@retval Pointer A pointer to the newly created device path.
|
||||
@retval NULL Memory could not be allocated
|
||||
or either DevicePath or DeviceNode is NULL.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_DEVICE_PATH_PROTOCOL*
|
||||
(EFIAPI *EFI_DEVICE_PATH_UTILS_APPEND_PATH) (
|
||||
IN CONST EFI_DEVICE_PATH_PROTOCOL *Src1,
|
||||
IN CONST EFI_DEVICE_PATH_PROTOCOL *Src2
|
||||
)
|
||||
;
|
||||
|
||||
/**
|
||||
Creates a new path by appending the device node to the device path.
|
||||
|
||||
@param DevicePath Points to the device path.
|
||||
@param DeviceNode Points to the device node.
|
||||
|
||||
@retval Pointer A pointer to the allocated device node.
|
||||
@retval NULL Memory could not be allocated
|
||||
or either DevicePath or DeviceNode is NULL.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_DEVICE_PATH_PROTOCOL*
|
||||
(EFIAPI *EFI_DEVICE_PATH_UTILS_APPEND_NODE) (
|
||||
IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath,
|
||||
IN CONST EFI_DEVICE_PATH_PROTOCOL *DeviceNode
|
||||
)
|
||||
;
|
||||
|
||||
/**
|
||||
Creates a new path by appending the specified device path instance to the specified device path.
|
||||
|
||||
@param DevicePath Points to the device path. If NULL, then ignored.
|
||||
@param DevicePathInstance Points to the device path instance.
|
||||
|
||||
@retval Pointer A pointer to the newly created device path
|
||||
@retval NULL Memory could not be allocated or DevicePathInstance is NULL.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_DEVICE_PATH_PROTOCOL*
|
||||
(EFIAPI *EFI_DEVICE_PATH_UTILS_APPEND_INSTANCE) (
|
||||
IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath,
|
||||
IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePathInstance
|
||||
)
|
||||
;
|
||||
|
||||
/**
|
||||
Creates a copy of the current device path instance and returns a pointer to the next device path
|
||||
instance.
|
||||
|
||||
@param DevicePathInstance On input, this holds the pointer to the current device path
|
||||
instance. On output, this holds the pointer to the next
|
||||
device path instance or NULL if there are no more device
|
||||
path instances in the device path.
|
||||
@param DevicePathInstanceSize On output, this holds the size of the device path instance,
|
||||
in bytes or zero, if DevicePathInstance is zero.
|
||||
|
||||
@retval Pointer A pointer to the copy of the current device path instance.
|
||||
@retval NULL DevicePathInstace was NULL on entry or there was insufficient memory.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_DEVICE_PATH_PROTOCOL*
|
||||
(EFIAPI *EFI_DEVICE_PATH_UTILS_GET_NEXT_INSTANCE) (
|
||||
IN OUT EFI_DEVICE_PATH_PROTOCOL **DevicePathInstance,
|
||||
OUT UINTN *DevicePathInstanceSize
|
||||
)
|
||||
;
|
||||
|
||||
/**
|
||||
Creates a device node
|
||||
|
||||
@param NodeType NodeType is the device node type (EFI_DEVICE_PATH.Type) for
|
||||
the new device node.
|
||||
@param NodeSubType NodeSubType is the device node sub-type
|
||||
EFI_DEVICE_PATH.SubType) for the new device node.
|
||||
@param NodeLength NodeLength is the length of the device node
|
||||
(EFI_DEVICE_PATH.Length) for the new device node.
|
||||
|
||||
@retval Pointer A pointer to the newly created device node.
|
||||
@retval NULL NodeLength is less than
|
||||
the size of the header or there was insufficient memory.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_DEVICE_PATH_PROTOCOL*
|
||||
(EFIAPI *EFI_DEVICE_PATH_CREATE_NODE) (
|
||||
IN UINT8 NodeType,
|
||||
IN UINT8 NodeSubType,
|
||||
IN UINT16 NodeLength
|
||||
)
|
||||
;
|
||||
|
||||
/**
|
||||
Returns whether a device path is multi-instance.
|
||||
|
||||
@param DevicePath Points to the device path. If NULL, then ignored.
|
||||
|
||||
@retval TRUE The device path has more than one instance
|
||||
@retval FALSE The device path is empty or contains only a single instance.
|
||||
|
||||
**/
|
||||
typedef
|
||||
BOOLEAN
|
||||
(EFIAPI *EFI_DEVICE_PATH_UTILS_IS_MULTI_INSTANCE) (
|
||||
IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath
|
||||
)
|
||||
;
|
||||
|
||||
|
||||
typedef struct {
|
||||
EFI_DEVICE_PATH_UTILS_GET_DEVICE_PATH_SIZE GetDevicePathSize;
|
||||
EFI_DEVICE_PATH_UTILS_DUP_DEVICE_PATH DuplicateDevicePath;
|
||||
EFI_DEVICE_PATH_UTILS_APPEND_PATH AppendDevicePath;
|
||||
EFI_DEVICE_PATH_UTILS_APPEND_NODE AppendDeviceNode;
|
||||
EFI_DEVICE_PATH_UTILS_APPEND_INSTANCE AppendDevicePathInstance;
|
||||
EFI_DEVICE_PATH_UTILS_GET_NEXT_INSTANCE GetNextDevicePathInstance;
|
||||
EFI_DEVICE_PATH_UTILS_IS_MULTI_INSTANCE IsDevicePathMultiInstance;
|
||||
EFI_DEVICE_PATH_CREATE_NODE CreateDeviceNode;
|
||||
} EFI_DEVICE_PATH_UTILITIES_PROTOCOL;
|
||||
|
||||
extern EFI_GUID gEfiDevicePathUtilitiesProtocolGuid;
|
||||
|
||||
#endif
|
442
Tools/Source/TianoTools/Include/Protocol/Dhcp4.h
Normal file
442
Tools/Source/TianoTools/Include/Protocol/Dhcp4.h
Normal file
@ -0,0 +1,442 @@
|
||||
/** @file
|
||||
EFI_DHCP4_PROTOCOL as defined in UEFI 2.0.
|
||||
EFI_DHCP4_SERVICE_BINDING_PROTOCOL as defined in UEFI 2.0.
|
||||
These protocols are used to collect configuration information for the EFI IPv4 Protocol
|
||||
drivers and to provide DHCPv4 server and PXE boot server discovery services.
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
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
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
Module Name: DHCP4.h
|
||||
|
||||
**/
|
||||
|
||||
#ifndef __EFI_DHCP4_PROTOCOL_H__
|
||||
#define __EFI_DHCP4_PROTOCOL_H__
|
||||
|
||||
#define EFI_DHCP4_PROTOCOL_GUID \
|
||||
{ \
|
||||
0x8a219718, 0x4ef5, 0x4761, {0x91, 0xc8, 0xc0, 0xf0, 0x4b, 0xda, 0x9e, 0x56 } \
|
||||
}
|
||||
|
||||
#define EFI_DHCP4_SERVICE_BINDING_PROTOCOL_GUID \
|
||||
{ \
|
||||
0x9d9a39d8, 0xbd42, 0x4a73, {0xa4, 0xd5, 0x8e, 0xe9, 0x4b, 0xe1, 0x13, 0x80 } \
|
||||
}
|
||||
|
||||
typedef struct _EFI_DHCP4_PROTOCOL EFI_DHCP4_PROTOCOL;
|
||||
|
||||
|
||||
#pragma pack(1)
|
||||
typedef struct {
|
||||
UINT8 OpCode;
|
||||
UINT8 Length;
|
||||
UINT8 Data[1];
|
||||
} EFI_DHCP4_PACKET_OPTION;
|
||||
#pragma pack()
|
||||
|
||||
|
||||
#pragma pack(1)
|
||||
typedef struct {
|
||||
UINT8 OpCode;
|
||||
UINT8 HwType;
|
||||
UINT8 HwAddrLen;
|
||||
UINT8 Hops;
|
||||
UINT32 Xid;
|
||||
UINT16 Seconds;
|
||||
UINT16 Reserved;
|
||||
EFI_IPv4_ADDRESS ClientAddr; //Client IP address from client
|
||||
EFI_IPv4_ADDRESS YourAddr; //Client IP address from server
|
||||
EFI_IPv4_ADDRESS ServerAddr; //IP address of next server in bootstrap
|
||||
EFI_IPv4_ADDRESS GatewayAddr; //Relay agent IP address
|
||||
UINT8 ClientHwAddr[16]; //Client hardware address
|
||||
CHAR8 ServerName[64];
|
||||
CHAR8 BootFileName[128];
|
||||
}EFI_DHCP4_HEADER;
|
||||
#pragma pack()
|
||||
|
||||
|
||||
#pragma pack(1)
|
||||
typedef struct {
|
||||
UINT32 Size;
|
||||
UINT32 Length;
|
||||
|
||||
struct {
|
||||
EFI_DHCP4_HEADER Header;
|
||||
UINT32 Magik;
|
||||
UINT8 Option[1];
|
||||
} Dhcp4;
|
||||
} EFI_DHCP4_PACKET;
|
||||
#pragma pack()
|
||||
|
||||
|
||||
typedef enum {
|
||||
Dhcp4Stopped = 0x0,
|
||||
Dhcp4Init = 0x1,
|
||||
Dhcp4Selecting = 0x2,
|
||||
Dhcp4Requesting = 0x3,
|
||||
Dhcp4Bound = 0x4,
|
||||
Dhcp4Renewing = 0x5,
|
||||
Dhcp4Rebinding = 0x6,
|
||||
Dhcp4InitReboot = 0x7,
|
||||
Dhcp4Rebooting = 0x8
|
||||
} EFI_DHCP4_STATE;
|
||||
|
||||
|
||||
typedef enum{
|
||||
Dhcp4SendDiscover = 0x01,
|
||||
Dhcp4RcvdOffer = 0x02,
|
||||
Dhcp4SelectOffer = 0x03,
|
||||
Dhcp4SendRequest = 0x04,
|
||||
Dhcp4RcvdAck = 0x05,
|
||||
Dhcp4RcvdNak = 0x06,
|
||||
Dhcp4SendDecline = 0x07,
|
||||
Dhcp4BoundCompleted = 0x08,
|
||||
Dhcp4EnterRenewing = 0x09,
|
||||
Dhcp4EnterRebinding = 0x0a,
|
||||
Dhcp4AddressLost = 0x0b,
|
||||
Dhcp4Fail = 0x0c
|
||||
} EFI_DHCP4_EVENT;
|
||||
|
||||
/**
|
||||
Callback routine
|
||||
|
||||
@param This Pointer to the EFI DHCPv4 Protocol instance that is used to
|
||||
configure this callback function.
|
||||
@param Context Pointer to the context that is initialized by
|
||||
EFI_DHCP4_PROTOCOL.Configure().
|
||||
@param CurrentState The current operational state of the EFI DHCPv4 Protocol
|
||||
driver.
|
||||
@param Dhcp4Event The event that occurs in the current state, which usually means a
|
||||
state transition.
|
||||
@param Packet The DHCP packet that is going to be sent or already received.
|
||||
@param NewPacket The packet that is used to replace the above Packet.
|
||||
|
||||
@retval EFI_SUCCESS Tells the EFI DHCPv4 Protocol driver to continue the DHCP process.
|
||||
@retval EFI_NOT_READY Only used in the Dhcp4Selecting state. The EFI DHCPv4 Protocol
|
||||
driver will continue to wait for more DHCPOFFER packets until the retry
|
||||
timeout expires.
|
||||
@retval EFI_ABORTED Tells the EFI DHCPv4 Protocol driver to abort the current process and
|
||||
return to the Dhcp4Init or Dhcp4InitReboot state.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_DHCP4_CALLBACK) (
|
||||
IN EFI_DHCP4_PROTOCOL *This,
|
||||
IN VOID *Context,
|
||||
IN EFI_DHCP4_STATE CurrentState,
|
||||
IN EFI_DHCP4_EVENT Dhcp4Event,
|
||||
IN EFI_DHCP4_PACKET *Packet OPTIONAL,
|
||||
OUT EFI_DHCP4_PACKET **NewPacket OPTIONAL
|
||||
);
|
||||
|
||||
|
||||
typedef struct {
|
||||
UINT32 DiscoverTryCount;
|
||||
UINT32 *DiscoverTimeout;
|
||||
UINT32 RequestTryCount;
|
||||
UINT32 *RequestTimeout;
|
||||
EFI_IPv4_ADDRESS ClientAddress;
|
||||
EFI_DHCP4_CALLBACK Dhcp4Callback;
|
||||
void *CallbackContext;
|
||||
UINT32 OptionCount;
|
||||
EFI_DHCP4_PACKET_OPTION **OptionList;
|
||||
} EFI_DHCP4_CONFIG_DATA;
|
||||
|
||||
|
||||
typedef struct {
|
||||
EFI_DHCP4_STATE State;
|
||||
EFI_DHCP4_CONFIG_DATA ConfigData;
|
||||
EFI_IPv4_ADDRESS ClientAddress;
|
||||
EFI_MAC_ADDRESS ClientMacAddress;
|
||||
EFI_IPv4_ADDRESS ServerAddress;
|
||||
EFI_IPv4_ADDRESS RouterAddress;
|
||||
EFI_IPv4_ADDRESS SubnetMask;
|
||||
UINT32 LeaseTime;
|
||||
EFI_DHCP4_PACKET *ReplyPacket;
|
||||
} EFI_DHCP4_MODE_DATA;
|
||||
|
||||
|
||||
typedef struct {
|
||||
EFI_IPv4_ADDRESS ListenAddress;
|
||||
EFI_IPv4_ADDRESS SubnetMask;
|
||||
UINT16 ListenPort;
|
||||
} EFI_DHCP4_LISTEN_POINT;
|
||||
|
||||
|
||||
typedef struct {
|
||||
OUT EFI_STATUS Status;
|
||||
IN EFI_EVENT CompletionEvent;
|
||||
IN EFI_IPv4_ADDRESS RemoteAddress;
|
||||
IN UINT16 RemotePort;
|
||||
IN EFI_IPv4_ADDRESS GatewayAddress;
|
||||
IN UINT32 ListenPointCount;
|
||||
IN EFI_DHCP4_LISTEN_POINT *ListenPoints;
|
||||
IN UINT32 TimeoutValue;
|
||||
IN EFI_DHCP4_PACKET *Packet;
|
||||
OUT UINT32 ResponseCount;
|
||||
OUT EFI_DHCP4_PACKET *ResponseList;
|
||||
} EFI_DHCP4_TRANSMIT_RECEIVE_TOKEN;
|
||||
|
||||
|
||||
/**
|
||||
Returns the current operating mode and cached data packet for the EFI DHCPv4 Protocol driver.
|
||||
|
||||
@param This Pointer to the EFI_DHCP4_PROTOCOL instance.
|
||||
@param Dhcp4ModeData Pointer to storage for the EFI_DHCP4_MODE_DATA structure.
|
||||
|
||||
@retval EFI_SUCCESS The mode data was returned.
|
||||
@retval EFI_INVALID_PARAMETER This is NULL.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_DHCP4_GET_MODE_DATA)(
|
||||
IN EFI_DHCP4_PROTOCOL *This,
|
||||
OUT EFI_DHCP4_MODE_DATA *Dhcp4ModeData
|
||||
)
|
||||
;
|
||||
|
||||
/**
|
||||
Initializes, changes, or resets the operational settings for the EFI DHCPv4 Protocol driver.
|
||||
|
||||
@param This Pointer to the EFI_DHCP4_PROTOCOL instance.
|
||||
@param Dhcp4CfgData Pointer to the EFI_DHCP4_CONFIG_DATA.
|
||||
|
||||
@retval EFI_SUCCESS The EFI DHCPv4 Protocol driver is now in the Dhcp4Init or
|
||||
Dhcp4InitReboot state, if the original state of this driver
|
||||
was Dhcp4Stopped and the value of Dhcp4CfgData was
|
||||
not NULL. Otherwise, the state was left unchanged.
|
||||
@retval EFI_ACCESS_DENIED This instance of the EFI DHCPv4 Protocol driver was not in the
|
||||
Dhcp4Stopped, Dhcp4Init, Dhcp4InitReboot, or Dhcp4Bound state;
|
||||
Or onother instance of this EFI DHCPv4 Protocol driver is already
|
||||
in a valid configured state.
|
||||
@retval EFI_INVALID_PARAMETER Some parameter is NULL.
|
||||
@retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated.
|
||||
@retval EFI_DEVICE_ERROR An unexpected system or network error occurred.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_DHCP4_CONFIGURE) (
|
||||
IN EFI_DHCP4_PROTOCOL *This,
|
||||
IN EFI_DHCP4_CONFIG_DATA *Dhcp4CfgData OPTIONAL
|
||||
)
|
||||
;
|
||||
|
||||
|
||||
/**
|
||||
Starts the DHCP configuration process.
|
||||
|
||||
@param This Pointer to the EFI_DHCP4_PROTOCOL instance.
|
||||
@param CompletionEvent If not NULL, indicates the event that will be signaled when the
|
||||
EFI DHCPv4 Protocol driver is transferred into the
|
||||
Dhcp4Bound state or when the DHCP process is aborted.
|
||||
EFI_DHCP4_PROTOCOL.GetModeData() can be called to
|
||||
check the completion status. If NULL,
|
||||
EFI_DHCP4_PROTOCOL.Start() will wait until the driver
|
||||
is transferred into the Dhcp4Bound state or the process fails.
|
||||
|
||||
@retval EFI_SUCCESS The DHCP configuration process has started, or it has completed
|
||||
when CompletionEvent is NULL.
|
||||
@retval EFI_NOT_STARTED The EFI DHCPv4 Protocol driver is in the Dhcp4Stopped
|
||||
state. EFI_DHCP4_PROTOCOL. Configure() needs to be called.
|
||||
@retval EFI_INVALID_PARAMETER This is NULL.
|
||||
@retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated.
|
||||
@retval EFI_TIMEOUT The DHCP configuration process failed because no response was
|
||||
received from the server within the specified timeout value.
|
||||
@retval EFI_ABORTED The user aborted the DHCP process.
|
||||
@retval EFI_ALREADY_STARTED Some other EFI DHCPv4 Protocol instance already started the
|
||||
DHCP process.
|
||||
@retval EFI_DEVICE_ERROR An unexpected system or network error occurred.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_DHCP4_START) (
|
||||
IN EFI_DHCP4_PROTOCOL *This,
|
||||
IN EFI_EVENT CompletionEvent OPTIONAL
|
||||
)
|
||||
;
|
||||
|
||||
/**
|
||||
Extends the lease time by sending a request packet.
|
||||
|
||||
@param This Pointer to the EFI_DHCP4_PROTOCOL instance.
|
||||
@param RebindRequest If TRUE, this function broadcasts the request packets and enters
|
||||
the Dhcp4Rebinding state. Otherwise, it sends a unicast
|
||||
request packet and enters the Dhcp4Renewing state.
|
||||
@param CompletionEvent If not NULL, this event is signaled when the renew/rebind phase
|
||||
completes or some error occurs.
|
||||
EFI_DHCP4_PROTOCOL.GetModeData() can be called to
|
||||
check the completion status. If NULL,
|
||||
EFI_DHCP4_PROTOCOL.RenewRebind() will busy-wait
|
||||
until the DHCP process finishes.
|
||||
|
||||
@retval EFI_SUCCESS The EFI DHCPv4 Protocol driver is now in the
|
||||
Dhcp4Renewing state or is back to the Dhcp4Bound state.
|
||||
@retval EFI_NOT_STARTED The EFI DHCPv4 Protocol driver is in the Dhcp4Stopped
|
||||
state. EFI_DHCP4_PROTOCOL.Configure() needs to
|
||||
be called.
|
||||
@retval EFI_INVALID_PARAMETER This is NULL.
|
||||
@retval EFI_TIMEOUT There was no response from the server when the try count was
|
||||
exceeded.
|
||||
@retval EFI_ACCESS_DENIED The driver is not in the Dhcp4Bound state.
|
||||
@retval EFI_DEVICE_ERROR An unexpected system or network error occurred.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_DHCP4_RENEW_REBIND) (
|
||||
IN EFI_DHCP4_PROTOCOL *This,
|
||||
IN BOOLEAN RebindRequest,
|
||||
IN EFI_EVENT CompletionEvent OPTIONAL
|
||||
)
|
||||
;
|
||||
|
||||
/**
|
||||
Releases the current address configuration.
|
||||
|
||||
@param This Pointer to the EFI_DHCP4_PROTOCOL instance.
|
||||
|
||||
@retval EFI_SUCCESS The EFI DHCPv4 Protocol driver is now in the Dhcp4Init phase.
|
||||
@retval EFI_INVALID_PARAMETER This is NULL.
|
||||
@retval EFI_ACCESS_DENIED The EFI DHCPv4 Protocol driver is not Dhcp4InitReboot state.
|
||||
@retval EFI_DEVICE_ERROR An unexpected system or network error occurred.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_DHCP4_RELEASE) (
|
||||
IN EFI_DHCP4_PROTOCOL *This
|
||||
)
|
||||
;
|
||||
|
||||
/**
|
||||
Stops the current address configuration.
|
||||
|
||||
@param This Pointer to the EFI_DHCP4_PROTOCOL instance.
|
||||
|
||||
@retval EFI_SUCCESS The EFI DHCPv4 Protocol driver is now in the Dhcp4Stopped phase.
|
||||
@retval EFI_INVALID_PARAMETER This is NULL.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_DHCP4_STOP) (
|
||||
IN EFI_DHCP4_PROTOCOL *This
|
||||
)
|
||||
;
|
||||
|
||||
/**
|
||||
Builds a DHCP packet, given the options to be appended or deleted or replaced.
|
||||
|
||||
@param This Pointer to the EFI_DHCP4_PROTOCOL instance.
|
||||
@param SeedPacket Initial packet to be used as a base for building new packet.
|
||||
@param DeleteCount Number of opcodes in the DeleteList.
|
||||
@param DeleteList List of opcodes to be deleted from the seed packet.
|
||||
Ignored if DeleteCount is zero.
|
||||
@param AppendCount Number of entries in the OptionList.
|
||||
@param AppendList Pointer to a DHCP option list to be appended to SeedPacket.
|
||||
If SeedPacket also contains options in this list, they are
|
||||
replaced by new options (except pad option). Ignored if
|
||||
AppendCount is zero. Type EFI_DHCP4_PACKET_OPTION
|
||||
@param NewPacket Pointer to storage for the pointer to the new allocated packet.
|
||||
Use the EFI Boot Service FreePool() on the resulting pointer
|
||||
when done with the packet.
|
||||
|
||||
@retval EFI_SUCCESS The new packet was built.
|
||||
@retval EFI_OUT_OF_RESOURCES Storage for the new packet could not be allocated.
|
||||
@retval EFI_INVALID_PARAMETER Some parameter is NULL.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_DHCP4_BUILD) (
|
||||
IN EFI_DHCP4_PROTOCOL *This,
|
||||
IN EFI_DHCP4_PACKET *SeedPacket,
|
||||
IN UINT32 DeleteCount,
|
||||
IN UINT8 *DeleteList OPTIONAL,
|
||||
IN UINT32 AppendCount,
|
||||
IN EFI_DHCP4_PACKET_OPTION *AppendList[] OPTIONAL,
|
||||
OUT EFI_DHCP4_PACKET **NewPacket
|
||||
);
|
||||
;
|
||||
|
||||
/**
|
||||
Transmits a DHCP formatted packet and optionally waits for responses.
|
||||
|
||||
@param This Pointer to the EFI_DHCP4_PROTOCOL instance.
|
||||
@param Token Pointer to the EFI_DHCP4_TRANSMIT_RECEIVE_TOKEN structure.
|
||||
|
||||
@retval EFI_SUCCESS The packet was successfully queued for transmission.
|
||||
@retval EFI_INVALID_PARAMETER Some parameter is NULL.
|
||||
@retval EFI_NOT_READY The previous call to this function has not finished yet. Try to call
|
||||
this function after collection process completes.
|
||||
@retval EFI_NO_MAPPING The default station address is not available yet.
|
||||
@retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated.
|
||||
@retval Others Some other unexpected error occurred.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_DHCP4_TRANSMIT_RECEIVE) (
|
||||
IN EFI_DHCP4_PROTOCOL *This,
|
||||
IN EFI_DHCP4_TRANSMIT_RECEIVE_TOKEN *Token
|
||||
)
|
||||
;
|
||||
|
||||
|
||||
/**
|
||||
Parses the packed DHCP option data.
|
||||
|
||||
@param This Pointer to the EFI_DHCP4_PROTOCOL instance.
|
||||
@param Packet Pointer to packet to be parsed.
|
||||
@param OptionCount On input, the number of entries in the PacketOptionList.
|
||||
On output, the number of entries that were written into the
|
||||
PacketOptionList.
|
||||
@param PacketOptionList List of packet option entries to be filled in. End option or pad
|
||||
options are not included.
|
||||
|
||||
@retval EFI_SUCCESS The packet was successfully parsed.
|
||||
@retval EFI_INVALID_PARAMETER Some parameter is NULL.
|
||||
@retval EFI_BUFFER_TOO_SMALL One or more of the following conditions is TRUE:
|
||||
1) *OptionCount is smaller than the number of options that
|
||||
were found in the Packet.
|
||||
2) PacketOptionList is NULL.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_DHCP4_PARSE) (
|
||||
IN EFI_DHCP4_PROTOCOL *This,
|
||||
IN EFI_DHCP4_PACKET *Packet,
|
||||
IN OUT UINT32 *OptionCount,
|
||||
OUT EFI_DHCP4_PACKET_OPTION *PacketOptionList[] OPTIONAL
|
||||
)
|
||||
;
|
||||
|
||||
|
||||
struct _EFI_DHCP4_PROTOCOL {
|
||||
EFI_DHCP4_GET_MODE_DATA GetModeData;
|
||||
EFI_DHCP4_CONFIGURE Configure;
|
||||
EFI_DHCP4_START Start;
|
||||
EFI_DHCP4_RENEW_REBIND RenewRebind;
|
||||
EFI_DHCP4_RELEASE Release;
|
||||
EFI_DHCP4_STOP Stop;
|
||||
EFI_DHCP4_BUILD Build;
|
||||
EFI_DHCP4_TRANSMIT_RECEIVE TransmitReceive;
|
||||
EFI_DHCP4_PARSE Parse;
|
||||
};
|
||||
|
||||
extern EFI_GUID gEfiDhcp4ProtocolGuid;
|
||||
extern EFI_GUID gEfiDhcp4ServiceBindingProtocolGuid;
|
||||
|
||||
#endif
|
98
Tools/Source/TianoTools/Include/Protocol/DiskIo.h
Normal file
98
Tools/Source/TianoTools/Include/Protocol/DiskIo.h
Normal file
@ -0,0 +1,98 @@
|
||||
/** @file
|
||||
Disk IO protocol as defined in the EFI 1.0 specification.
|
||||
|
||||
The Disk IO protocol is used to convert block oriented devices into byte
|
||||
oriented devices. The Disk IO protocol is intended to layer on top of the
|
||||
Block IO protocol.
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
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
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
Module Name: DiskIo.h
|
||||
|
||||
**/
|
||||
|
||||
#ifndef __DISK_IO_H__
|
||||
#define __DISK_IO_H__
|
||||
|
||||
#define EFI_DISK_IO_PROTOCOL_GUID \
|
||||
{ \
|
||||
0xce345171, 0xba0b, 0x11d2, {0x8e, 0x4f, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b } \
|
||||
}
|
||||
|
||||
typedef struct _EFI_DISK_IO_PROTOCOL EFI_DISK_IO_PROTOCOL;
|
||||
|
||||
/**
|
||||
Read BufferSize bytes from Offset into Buffer.
|
||||
|
||||
@param This Protocol instance pointer.
|
||||
@param MediaId Id of the media, changes every time the media is replaced.
|
||||
@param Offset The starting byte offset to read from
|
||||
@param BufferSize Size of Buffer
|
||||
@param Buffer Buffer containing read data
|
||||
|
||||
@retval EFI_SUCCESS The data was read correctly from the device.
|
||||
@retval EFI_DEVICE_ERROR The device reported an error while performing the read.
|
||||
@retval EFI_NO_MEDIA There is no media in the device.
|
||||
@retval EFI_MEDIA_CHNAGED The MediaId does not matched the current device.
|
||||
@retval EFI_INVALID_PARAMETER The read request contains device addresses that are not
|
||||
valid for the device.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_DISK_READ) (
|
||||
IN EFI_DISK_IO_PROTOCOL *This,
|
||||
IN UINT32 MediaId,
|
||||
IN UINT64 Offset,
|
||||
IN UINTN BufferSize,
|
||||
OUT VOID *Buffer
|
||||
)
|
||||
;
|
||||
|
||||
/**
|
||||
Read BufferSize bytes from Offset into Buffer.
|
||||
|
||||
@param This Protocol instance pointer.
|
||||
@param MediaId Id of the media, changes every time the media is replaced.
|
||||
@param Offset The starting byte offset to read from
|
||||
@param BufferSize Size of Buffer
|
||||
@param Buffer Buffer containing read data
|
||||
|
||||
@retval EFI_SUCCESS The data was written correctly to the device.
|
||||
@retval EFI_WRITE_PROTECTED The device can not be written to.
|
||||
@retval EFI_DEVICE_ERROR The device reported an error while performing the write.
|
||||
@retval EFI_NO_MEDIA There is no media in the device.
|
||||
@retval EFI_MEDIA_CHNAGED The MediaId does not matched the current device.
|
||||
@retval EFI_INVALID_PARAMETER The write request contains device addresses that are not
|
||||
valid for the device.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_DISK_WRITE) (
|
||||
IN EFI_DISK_IO_PROTOCOL *This,
|
||||
IN UINT32 MediaId,
|
||||
IN UINT64 Offset,
|
||||
IN UINTN BufferSize,
|
||||
IN VOID *Buffer
|
||||
)
|
||||
;
|
||||
|
||||
#define EFI_DISK_IO_PROTOCOL_REVISION 0x00010000
|
||||
|
||||
struct _EFI_DISK_IO_PROTOCOL {
|
||||
UINT64 Revision;
|
||||
EFI_DISK_READ ReadDisk;
|
||||
EFI_DISK_WRITE WriteDisk;
|
||||
};
|
||||
|
||||
extern EFI_GUID gEfiDiskIoProtocolGuid;
|
||||
|
||||
#endif
|
111
Tools/Source/TianoTools/Include/Protocol/DriverBinding.h
Normal file
111
Tools/Source/TianoTools/Include/Protocol/DriverBinding.h
Normal file
@ -0,0 +1,111 @@
|
||||
/** @file
|
||||
EFI ControllerHandle Driver Protocol
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
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
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
Module Name: DriverBinding.h
|
||||
|
||||
**/
|
||||
|
||||
#ifndef __EFI_DRIVER_BINDING_H__
|
||||
#define __EFI_DRIVER_BINDING_H__
|
||||
|
||||
//
|
||||
// Global ID for the ControllerHandle Driver Protocol
|
||||
//
|
||||
#define EFI_DRIVER_BINDING_PROTOCOL_GUID \
|
||||
{ \
|
||||
0x18a031ab, 0xb443, 0x4d1a, {0xa5, 0xc0, 0xc, 0x9, 0x26, 0x1e, 0x9f, 0x71 } \
|
||||
}
|
||||
|
||||
typedef struct _EFI_DRIVER_BINDING_PROTOCOL EFI_DRIVER_BINDING_PROTOCOL;
|
||||
|
||||
/**
|
||||
Test to see if this driver supports ControllerHandle.
|
||||
|
||||
@param This Protocol instance pointer.
|
||||
@param ControllerHandle Handle of device to test
|
||||
@param RemainingDevicePath Optional parameter use to pick a specific child
|
||||
device to start.
|
||||
|
||||
@retval EFI_SUCCESS This driver supports this device
|
||||
@retval EFI_ALREADY_STARTED This driver is already running on this device
|
||||
@retval other This driver does not support this device
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_DRIVER_BINDING_SUPPORTED) (
|
||||
IN EFI_DRIVER_BINDING_PROTOCOL *This,
|
||||
IN EFI_HANDLE ControllerHandle,
|
||||
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL
|
||||
)
|
||||
;
|
||||
|
||||
/**
|
||||
Start this driver on ControllerHandle.
|
||||
|
||||
@param This Protocol instance pointer.
|
||||
@param ControllerHandle Handle of device to bind driver to
|
||||
@param RemainingDevicePath Optional parameter use to pick a specific child
|
||||
device to start.
|
||||
|
||||
@retval EFI_SUCCESS This driver is added to ControllerHandle
|
||||
@retval EFI_ALREADY_STARTED This driver is already running on ControllerHandle
|
||||
@retval other This driver does not support this device
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_DRIVER_BINDING_START) (
|
||||
IN EFI_DRIVER_BINDING_PROTOCOL *This,
|
||||
IN EFI_HANDLE ControllerHandle,
|
||||
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL
|
||||
)
|
||||
;
|
||||
|
||||
/**
|
||||
Stop this driver on ControllerHandle.
|
||||
|
||||
@param This Protocol instance pointer.
|
||||
@param ControllerHandle Handle of device to stop driver on
|
||||
@param NumberOfChildren Number of Handles in ChildHandleBuffer. If number of
|
||||
children is zero stop the entire bus driver.
|
||||
@param ChildHandleBuffer List of Child Handles to Stop.
|
||||
|
||||
@retval EFI_SUCCESS This driver is removed ControllerHandle
|
||||
@retval other This driver was not removed from this device
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_DRIVER_BINDING_STOP) (
|
||||
IN EFI_DRIVER_BINDING_PROTOCOL *This,
|
||||
IN EFI_HANDLE ControllerHandle,
|
||||
IN UINTN NumberOfChildren,
|
||||
IN EFI_HANDLE *ChildHandleBuffer OPTIONAL
|
||||
)
|
||||
;
|
||||
|
||||
//
|
||||
// Interface structure for the ControllerHandle Driver Protocol
|
||||
//
|
||||
struct _EFI_DRIVER_BINDING_PROTOCOL {
|
||||
EFI_DRIVER_BINDING_SUPPORTED Supported;
|
||||
EFI_DRIVER_BINDING_START Start;
|
||||
EFI_DRIVER_BINDING_STOP Stop;
|
||||
UINT32 Version;
|
||||
EFI_HANDLE ImageHandle;
|
||||
EFI_HANDLE DriverBindingHandle;
|
||||
};
|
||||
|
||||
extern EFI_GUID gEfiDriverBindingProtocolGuid;
|
||||
|
||||
#endif
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user