X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=MdePkg%2FInclude%2FIpf%2FProcessorBind.h;h=1021917b2ffd02298dddf874f75424aea9e78f06;hb=fb5148a0d8e660e79596d870964db27c3059eca1;hp=0d8b9e9ccaef90a83b8e0d350cae7d876119f50b;hpb=da0559bf7325a1f5c7612dd0a6532c6be97b5294;p=mirror_edk2.git diff --git a/MdePkg/Include/Ipf/ProcessorBind.h b/MdePkg/Include/Ipf/ProcessorBind.h index 0d8b9e9cca..1021917b2f 100644 --- a/MdePkg/Include/Ipf/ProcessorBind.h +++ b/MdePkg/Include/Ipf/ProcessorBind.h @@ -1,16 +1,14 @@ /** @file Processor or Compiler specific defines and types for Intel Itanium(TM). - 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 + 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 + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ @@ -18,9 +16,9 @@ #define __PROCESSOR_BIND_H__ -// -// Define the processor type so other code can make processor based choices -// +/// +/// Define the processor type so other code can make processor based choices +/// #define MDE_CPU_IPF @@ -30,12 +28,27 @@ #pragma pack() -#if _MSC_EXTENSIONS - +#if __INTEL_COMPILER +// +// Disable ICC's remark #1418: external function definition with no prior declaration. +// This is legal ANSI C code so we disable the remark that is turned on with /W4 +// +#pragma warning ( disable : 1418 ) + + +// +// Disable ICC's remark #1419: external declaration in primary source file +// This is legal ANSI C code so we disable the remark that is turned on with /W4 +// +#pragma warning ( disable : 1419 ) + +#endif + + +#if _MSC_EXTENSIONS // // Disable warning that make it impossible to compile at /W4 -// This only works for Microsoft tools. Copied from the -// IA-32 version of efibind.h +// This only works for Microsoft tools. // // @@ -65,7 +78,7 @@ #pragma warning ( disable : 4127 ) // -// Can not cast a function pointer to a data pointer. We need to do this on +// Can not cast a function pointer to a data pointer. We need to do this on // IPF to get access to the PLABEL. // #pragma warning ( disable : 4514 ) @@ -87,12 +100,12 @@ // // No ANSI C 2000 stdint.h integer width declarations, so define equivalents // - - #if _MSC_EXTENSIONS - + + #if _MSC_EXTENSIONS + // - // use Microsoft C complier dependent interger width types + // use Microsoft C complier dependent interger width types // typedef unsigned __int64 UINT64; typedef __int64 INT64; @@ -106,9 +119,9 @@ typedef char CHAR8; typedef char INT8; #else - #ifdef _EFI_P64 + #ifdef _EFI_P64 // - // P64 - is Intel Itanium(TM) speak for pointers being 64-bit and longs and ints + // P64 - is Intel Itanium(TM) speak for pointers being 64-bit and longs and ints // are 32-bits // typedef unsigned long long UINT64; @@ -187,36 +200,42 @@ typedef INT64 INTN; // 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 +#if _MSC_EXTENSIONS // // Microsoft* compiler requires _EFIAPI useage, __cdecl is Microsoft* specific C. - // - #define EFIAPI __cdecl + // + #define EFIAPI __cdecl #else - #define EFIAPI + #define EFIAPI #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 +// if the /OPT:REF linker option is used. We defined a macro as this is a // a non standard extension // -#define GLOBAL_REMOVE_IF_UNREFERENCED +#if _MSC_EXTENSIONS + #define GLOBAL_REMOVE_IF_UNREFERENCED __declspec(selectany) +#else + #define GLOBAL_REMOVE_IF_UNREFERENCED +#endif -// -// A pointer to a function in IPF points to a plabel. -// +/// +/// A pointer to a function in IPF points to a plabel. +/// typedef struct { UINT64 EntryPoint; UINT64 GP; } EFI_PLABEL; typedef struct { - UINTN BootPhase; // entry r20 value - UINTN UniqueId; // PAL arbitration ID - UINTN HealthStat; // Health Status - UINTN PALRetAddress; // return address to PAL -} IPF_HANDOFF_STATUS; + UINT64 Status; + UINT64 r9; + UINT64 r10; + UINT64 r11; +} PAL_CALL_RETURN; + +#define FUNCTION_ENTRY_POINT(p) (((EFI_PLABEL *)(p))->EntryPoint) #endif