From 3eb9473ea9a949badfe06ae61d2d3fcfa53651c7 Mon Sep 17 00:00:00 2001 From: qwang12 Date: Thu, 28 Jun 2007 07:00:39 +0000 Subject: Add in the 1st version of ECP. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2832 6f19259b-4bc3-4df7-8a09-765794883524 --- EdkCompatibilityPkg/Sample/Include/Efi2WinNT.h | 59 ++++++++++++++++++++++ .../Sample/Include/EfiCompNameSupport.h | 58 +++++++++++++++++++++ EdkCompatibilityPkg/Sample/Include/EfiWinNt.h | 46 +++++++++++++++++ 3 files changed, 163 insertions(+) create mode 100644 EdkCompatibilityPkg/Sample/Include/Efi2WinNT.h create mode 100644 EdkCompatibilityPkg/Sample/Include/EfiCompNameSupport.h create mode 100644 EdkCompatibilityPkg/Sample/Include/EfiWinNt.h (limited to 'EdkCompatibilityPkg/Sample/Include') diff --git a/EdkCompatibilityPkg/Sample/Include/Efi2WinNT.h b/EdkCompatibilityPkg/Sample/Include/Efi2WinNT.h new file mode 100644 index 0000000000..031a1d96fc --- /dev/null +++ b/EdkCompatibilityPkg/Sample/Include/Efi2WinNT.h @@ -0,0 +1,59 @@ +/*++ + +Copyright (c) 2004, 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: + + Efi2WinNT.h + +Abstract: + + Tiano mechanism to create WIN32 EFI code. + + Only used for NT emulation environment. This file replaces the Tiano.h + when you need to access Win32 stuff in EFI. + + Don't access Win32 APIs directly allways go WinNtThunk protocol. + + In most envirnments gWinNt is a pointer to a EFI_WIN_NT_THUNK_PROTOCOL. + +--*/ + +#ifndef _EFI_WIN_NT_H_ +#define _EFI_WIN_NT_H_ + +// +// Win32 include files do not compile clean with /W4, so we use the warning +// pragma to suppress the warnings for Win32 only. This way our code can stil +// compile at /W4 (highest warning level) with /WX (warnings cause build +// errors). +// +#pragma warning(disable : 4115) +#pragma warning(disable : 4201) +#pragma warning(disable : 4214) +#pragma warning(disable : 4028) +#pragma warning(disable : 4133) + +#include "windows.h" + +// +// Set the warnings back on so the EFI code must be /W4. +// +#pragma warning(default : 4115) +#pragma warning(default : 4201) +#pragma warning(default : 4214) +// +// We replaced Tiano.h so we must include it. +// +#include "Tiano.h" + +#include EFI_PROTOCOL_DEFINITION (WinNtThunk) + +#endif diff --git a/EdkCompatibilityPkg/Sample/Include/EfiCompNameSupport.h b/EdkCompatibilityPkg/Sample/Include/EfiCompNameSupport.h new file mode 100644 index 0000000000..7159588ee1 --- /dev/null +++ b/EdkCompatibilityPkg/Sample/Include/EfiCompNameSupport.h @@ -0,0 +1,58 @@ +/*++ + +Copyright (c) 2004, 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: + + EfiCompNameSupport.h + +Abstract: + + Private data structures for the Console Splitter driver + +--*/ + +#ifndef EFI_COMPONENT_NAME_SUPPORT_H +#define EFI_COMPONENT_NAME_SUPPORT_H + +#include "Tiano.h" + +#ifndef EFI_SIZE_REDUCTION_APPLIED + +#define INSTALL_ALL_DRIVER_PROTOCOLS(ImageHandle, \ + SystemTable, \ + DriverBinding, \ + DriverBindingHandle, \ + ComponentName, \ + DriverConfiguration, \ + DriverDiagnostics) \ + EfiLibInstallAllDriverProtocols ((ImageHandle), \ + (SystemTable), \ + (DriverBinding), \ + (DriverBindingHandle), \ + (ComponentName), \ + (DriverConfiguration), \ + (DriverDiagnostics)) +#else + +#define INSTALL_ALL_DRIVER_PROTOCOLS(ImageHandle, \ + SystemTable, \ + DriverBinding, \ + DriverBindingHandle, \ + ComponentName, \ + DriverConfiguration, \ + DriverDiagnostics) \ + EfiLibInstallDriverBinding ((ImageHandle), \ + (SystemTable), \ + (DriverBinding), \ + (DriverBindingHandle)) +#endif + +#endif diff --git a/EdkCompatibilityPkg/Sample/Include/EfiWinNt.h b/EdkCompatibilityPkg/Sample/Include/EfiWinNt.h new file mode 100644 index 0000000000..7722e6a45a --- /dev/null +++ b/EdkCompatibilityPkg/Sample/Include/EfiWinNt.h @@ -0,0 +1,46 @@ +/*++ + +Copyright (c) 2004, 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: + + EfiWinNt.h + +Abstract: + + EFI master include file for WinNt components. + +--*/ + +#ifndef _EFI_WIN_NT_H_ + +#ifdef EFI_NT_EMULATOR + +#define _EFI_WIN_NT_H_ + +#pragma warning(disable : 4115) +#pragma warning(disable : 4201) +#pragma warning(disable : 4214) + +#include "windows.h" +#include "stdio.h" + +// +// Set the warnings back on so the EFI code must be /W4. +// +#pragma warning(default : 4115) +#pragma warning(default : 4201) +#pragma warning(default : 4214) + +#endif + +#include "Tiano.h" + +#endif -- cgit v1.2.3