]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Include/Library/BaseLib.h
Sync up Pcd Library Instances and PCD Driver/PEIM with Pcd spec 0.51 and Mde 0.51
[mirror_edk2.git] / MdePkg / Include / Library / BaseLib.h
index ff663c91b7eff435f42063295b37022e5a93d6a8..7fb2e64dfbbc427bc23e3e85b7565dc402a18b86 100644 (file)
@@ -2969,15 +2969,16 @@ typedef union {
 // Byte packed structure for an 16-bit real mode thunks\r
 //\r
 typedef struct {\r
-  IA32_REGISTER_SET                 RealModeState;\r
+  IA32_REGISTER_SET                 *RealModeState;\r
   VOID                              *RealModeBuffer;\r
-  UINTN                             RealModeBufferSize;\r
-  VOID                              *CallStack;\r
-  UINTN                             CallStackSize;\r
-  VOID                              *RealModeCode;\r
-  UINTN                             RealModeCodeSize;\r
+  UINT32                            RealModeBufferSize;\r
+  UINT32                            ThunkAttributes;\r
 } THUNK_CONTEXT;\r
 \r
+#define THUNK_ATTRIBUTE_BIG_REAL_MODE             0x00000001\r
+#define THUNK_ATTRIBUTE_DISABLE_A20_MASK_INT_15   0x00000002\r
+#define THUNK_ATTRIBUTE_DISABLE_A20_MASK_KBD_CTRL 0x00000004\r
+\r
 /**\r
   Retrieves CPUID information.\r
 \r
@@ -4798,6 +4799,34 @@ AsmDisablePaging64 (
 // 16-bit thunking services\r
 //\r
 \r
+/**\r
+  Retrieves the properties for 16-bit thunk functions.\r
+\r
+  Computes the size of the buffer and stack below 1MB required to use the\r
+  AsmPrepareThunk16(), AsmThunk16() and AsmPrepareAndThunk16() functions. This\r
+  buffer size is returned in RealModeBufferSize, and the stack size is returned\r
+  in ExtraStackSize. If parameters are passed to the 16-bit real mode code,\r
+  then the actual minimum stack size is ExtraStackSize plus the maximum number\r
+  of bytes that need to be passed to the 16-bit real mode code.\r
+\r
+  If RealModeBufferSize is NULL, then ASSERT().\r
+  If ExtraStackSize is NULL, then ASSERT().\r
+\r
+  @param  RealModeBufferSize  A pointer to the size of the buffer below 1MB\r
+                              required to use the 16-bit thunk functions.\r
+  @param  ExtraStackSize      A pointer to the extra size of stack below 1MB\r
+                              that the 16-bit thunk functions require for\r
+                              temporary storage in the transition to and from\r
+                              16-bit real mode.\r
+\r
+**/\r
+VOID\r
+EFIAPI\r
+AsmGetThunk16Properties (\r
+  OUT     UINT32                    *RealModeBufferSize,\r
+  OUT     UINT32                    *ExtraStackSize\r
+  );\r
+\r
 /**\r
   Prepares all structures a code required to use AsmThunk16().\r
 \r