diff options
author | bxing <bxing@6f19259b-4bc3-4df7-8a09-765794883524> | 2006-05-15 11:14:20 +0000 |
---|---|---|
committer | bxing <bxing@6f19259b-4bc3-4df7-8a09-765794883524> | 2006-05-15 11:14:20 +0000 |
commit | 97d92bdaf05d9307d494444cead97c41272eca62 (patch) | |
tree | cbe5aa3ff333bb976ccb1688e114779329b5694a /MdePkg/Include/Library | |
parent | 7c28d0e095a592063410d2c5f7d8ff040cf89d10 (diff) | |
download | edk2-platforms-97d92bdaf05d9307d494444cead97c41272eca62.tar.xz |
Updated BaseLib for THUNK functions and some CPU functions
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@158 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdePkg/Include/Library')
-rw-r--r-- | MdePkg/Include/Library/BaseLib.h | 41 |
1 files changed, 35 insertions, 6 deletions
diff --git a/MdePkg/Include/Library/BaseLib.h b/MdePkg/Include/Library/BaseLib.h index ff663c91b7..7fb2e64dfb 100644 --- a/MdePkg/Include/Library/BaseLib.h +++ b/MdePkg/Include/Library/BaseLib.h @@ -2969,15 +2969,16 @@ typedef union { // Byte packed structure for an 16-bit real mode thunks
//
typedef struct {
- IA32_REGISTER_SET RealModeState;
+ IA32_REGISTER_SET *RealModeState;
VOID *RealModeBuffer;
- UINTN RealModeBufferSize;
- VOID *CallStack;
- UINTN CallStackSize;
- VOID *RealModeCode;
- UINTN RealModeCodeSize;
+ UINT32 RealModeBufferSize;
+ UINT32 ThunkAttributes;
} THUNK_CONTEXT;
+#define THUNK_ATTRIBUTE_BIG_REAL_MODE 0x00000001
+#define THUNK_ATTRIBUTE_DISABLE_A20_MASK_INT_15 0x00000002
+#define THUNK_ATTRIBUTE_DISABLE_A20_MASK_KBD_CTRL 0x00000004
+
/**
Retrieves CPUID information.
@@ -4799,6 +4800,34 @@ AsmDisablePaging64 ( //
/**
+ Retrieves the properties for 16-bit thunk functions.
+
+ Computes the size of the buffer and stack below 1MB required to use the
+ AsmPrepareThunk16(), AsmThunk16() and AsmPrepareAndThunk16() functions. This
+ buffer size is returned in RealModeBufferSize, and the stack size is returned
+ in ExtraStackSize. If parameters are passed to the 16-bit real mode code,
+ then the actual minimum stack size is ExtraStackSize plus the maximum number
+ of bytes that need to be passed to the 16-bit real mode code.
+
+ If RealModeBufferSize is NULL, then ASSERT().
+ If ExtraStackSize is NULL, then ASSERT().
+
+ @param RealModeBufferSize A pointer to the size of the buffer below 1MB
+ required to use the 16-bit thunk functions.
+ @param ExtraStackSize A pointer to the extra size of stack below 1MB
+ that the 16-bit thunk functions require for
+ temporary storage in the transition to and from
+ 16-bit real mode.
+
+**/
+VOID
+EFIAPI
+AsmGetThunk16Properties (
+ OUT UINT32 *RealModeBufferSize,
+ OUT UINT32 *ExtraStackSize
+ );
+
+/**
Prepares all structures a code required to use AsmThunk16().
Prepares all structures and code required to use AsmThunk16().
|