Home | History | Annotate | Download | only in Common
      1 /*++
      2 
      3 Copyright (c) 2004 - 2011, Intel Corporation. All rights reserved.<BR>
      4 This program and the accompanying materials
      5 are licensed and made available under the terms and conditions of the BSD License
      6 which accompanies this distribution.  The full text of the license may be found at
      7 http://opensource.org/licenses/bsd-license.php
      8 
      9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
     10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
     11 
     12 
     13 Module Name:
     14 
     15   EdkIIGlueDefinitionChangesBase.h
     16 
     17 Abstract:
     18 
     19   Data structure definition changes from EDK to EDKII
     20 
     21 --*/
     22 
     23 #ifndef __EDKII_GLUE_DEFINITION_CHANGES_BASE_H__
     24 #define __EDKII_GLUE_DEFINITION_CHANGES_BASE_H__
     25 
     26 #if (EFI_SPECIFICATION_VERSION >= 0x0002000A)
     27 #include "TianoHii.h"
     28 #else
     29 #include "EfiInternalFormRepresentation.h"
     30 #endif
     31 #include "EfiPxe.h"
     32 
     33 
     34 // ----------------------------------------------------------------------------------
     35 // Data Hub Record GUID Name changes
     36 // ----------------------------------------------------------------------------------
     37 #define gEfiProcessorSubClassGuid   gProcessorSubClassName
     38 #define gEfiCacheSubClassGuid       gCacheSubClassName
     39 #define gEfiMiscSubClassGuid        gMiscSubClassName
     40 #define gEfiProcessorProducerGuid   gProcessorProducerGuid
     41 #define gEfiMemoryProducerGuid      gMemoryProducerGuid
     42 #define gEfiMiscProducerGuid        gMiscProducerGuid
     43 
     44 
     45 // ----------------------------------------------------------------------------------
     46 // Hob.h: Get the data and data size field of GUID
     47 // ----------------------------------------------------------------------------------
     48 #define GET_GUID_HOB_DATA(GuidHob)      ((VOID *) (((UINT8 *) &((GuidHob)->Name)) + sizeof (EFI_GUID)))
     49 #define GET_GUID_HOB_DATA_SIZE(GuidHob) (((GuidHob)->Header).HobLength - sizeof (EFI_HOB_GUID_TYPE))
     50 
     51 // ----------------------------------------------------------------------------------
     52 // InternalFormRepresentation.h:
     53 // ----------------------------------------------------------------------------------
     54 #if (EFI_SPECIFICATION_VERSION < 0x0002000A)
     55 typedef struct {
     56   EFI_IFR_OP_HEADER Header;
     57   UINT16            QuestionId; // The ID designating what the question is about...sucked in from a #define, likely in the form of a variable name
     58   UINT8             Width;      // The Size of the Data being saved
     59   STRING_REF        Prompt;     // The String Token for the Prompt
     60   STRING_REF        Help;       // The string Token for the context-help
     61   UINT8             Flags;      // For now, if non-zero, means that it is the default option, - further definition likely
     62   UINT16            Key;        // Value to be passed to caller to identify this particular op-code
     63 } EFI_IFR_CHECKBOX;
     64 
     65 typedef struct {
     66   EFI_IFR_OP_HEADER Header;
     67   UINT8             Flags;
     68 } EFI_IFR_GRAY_OUT;
     69 
     70 typedef struct {
     71   EFI_IFR_OP_HEADER Header;
     72 } EFI_IFR_END_EXPR;
     73 #endif
     74 
     75 // ------------------------
     76 // define GUID as EFI_GUID
     77 // ------------------------
     78 typedef EFI_GUID GUID;
     79 
     80 
     81 // -------------------
     82 // EdkII Names - Edk Names
     83 // -------------------
     84 #define EFI_GLOBAL_VARIABLE                           EFI_GLOBAL_VARIABLE_GUID
     85 #define MPS_TABLE_GUID                                EFI_MPS_TABLE_GUID
     86 #define SAL_SYSTEM_TABLE_GUID                         EFI_SAL_SYSTEM_TABLE_GUID
     87 #define SMBIOS_TABLE_GUID                             EFI_SMBIOS_TABLE_GUID
     88 #define EFI_OPTIONAL_PTR                              EFI_OPTIONAL_POINTER
     89 #define PXE_FRAME_TYPE_FILTERED_MULTICAST             PXE_FRAME_TYPE_MULTICAST
     90 #define IMAGE_FILE_MACHINE_I386                       EFI_IMAGE_MACHINE_IA32
     91 #define IMAGE_FILE_MACHINE_IA64                       EFI_IMAGE_MACHINE_IA64
     92 #define IMAGE_FILE_MACHINE_EBC                        EFI_IMAGE_MACHINE_EBC
     93 #define IMAGE_FILE_MACHINE_X64                        EFI_IMAGE_MACHINE_X64
     94 #define EVENT_TIMER                                   EFI_EVENT_TIMER
     95 #define EVENT_RUNTIME                                 EFI_EVENT_RUNTIME
     96 #define EVENT_RUNTIME_CONTEXT                         EFI_EVENT_RUNTIME_CONTEXT
     97 #define EVENT_NOTIFY_WAIT                             EFI_EVENT_NOTIFY_WAIT
     98 #define EVENT_NOTIFY_SIGNAL                           EFI_EVENT_NOTIFY_SIGNAL
     99 #define EVENT_SIGNAL_EXIT_BOOT_SERVICES               EFI_EVENT_SIGNAL_EXIT_BOOT_SERVICES
    100 #define EVENT_SIGNAL_VIRTUAL_ADDRESS_CHANGE           EFI_EVENT_SIGNAL_VIRTUAL_ADDRESS_CHANGE
    101 #define TPL_APPLICATION                               EFI_TPL_APPLICATION
    102 #define TPL_CALLBACK                                  EFI_TPL_CALLBACK
    103 #define TPL_NOTIFY                                    EFI_TPL_NOTIFY
    104 #define TPL_HIGH_LEVEL                                EFI_TPL_HIGH_LEVEL
    105 
    106 //
    107 // Typos in EDK
    108 //
    109 #define gEfiHobMemoryAllocModuleGuid        gEfiHobMemeryAllocModuleGuid
    110 #define gEfiHobMemoryAllocStackGuid         gEfiHobMemeryAllocStackGuid
    111 #define gEfiHobMemoryAllocBspStoreGuid      gEfiHobMemeryAllocBspStoreGuid
    112 
    113 //
    114 // typedef Edk types - EdkII types
    115 //
    116 typedef PXE_CPB_START                                PXE_CPB_START_30;
    117 
    118 #endif
    119