Success to build first Nt32 module.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2753 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
klu2
2007-06-26 09:35:19 +00:00
parent 8693ca5d75
commit 869f8e34d2
39 changed files with 6951 additions and 750 deletions

View File

@@ -0,0 +1,34 @@
/**@file
Common header file shared by all source files.
This file includes package header files, library classes and protocol, PPI & GUID definitions.
Copyright (c) 2006 - 2007, 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.
**/
#ifndef __COMMON_HEADER_H_
#define __COMMON_HEADER_H_
//
// The package level header files this module uses
//
#include <PiDxe.h>
#include <WinNtDxe.h>
//
// The protocols, PPI and GUID defintions for this module
//
//
// The Library classes this module consumes
//
#include <Library/WinNtLib.h>
#include <Library/DebugLib.h>
#include <Library/HobLib.h>
#endif

View File

@@ -0,0 +1,85 @@
#/** @file
# A library to produce the global variable 'gWinNt'
#
# This library contains a single global variable 'gWinNt' along with a constructor to initialize that global.
# Copyright (c) 2006 - 2007, 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.
#
#
#**/
################################################################################
#
# Defines Section - statements that will be processed to create a Makefile.
#
################################################################################
[Defines]
INF_VERSION = 0x00010005
BASE_NAME = DxeWinNtLib
FILE_GUID = f6b5871d-5226-41b3-a569-3ff893fdc7bc
MODULE_TYPE = DXE_DRIVER
VERSION_STRING = 1.0
LIBRARY_CLASS = WinNtLib|DXE_DRIVER DXE_RUNTIME_DRIVER DXE_SMM_DRIVER UEFI_APPLICATION UEFI_DRIVER
EDK_RELEASE_VERSION = 0x00020000
EFI_SPECIFICATION_VERSION = 0x00020000
CONSTRUCTOR = WinNtLibConstructor
#
# The following information is for reference only and not required by the build tools.
#
# VALID_ARCHITECTURES = IA32
#
# HOB Guid C Name: gEfiWinNtThunkProtocolGuid Hob Type: GUID_EXTENSION
#
################################################################################
#
# Sources Section - list of files that are required for the build to succeed.
#
################################################################################
[Sources.common]
WinNtLib.c
CommonHeader.h
################################################################################
#
# Includes Section - list of Include locations that are required for
# this module.
#
################################################################################
[Includes]
$(WORKSPACE)/MdePkg/Include/Library
################################################################################
#
# Package Dependency Section - list of Package files that are required for
# this module.
#
################################################################################
[Packages]
Nt32Pkg/Nt32Pkg.dec
MdePkg/MdePkg.dec
################################################################################
#
# Library Class Section - list of Library Classes that are required for
# this module.
#
################################################################################
[LibraryClasses]
HobLib
DebugLib

View File

@@ -0,0 +1,54 @@
<?xml version="1.0" encoding="UTF-8"?>
<ModuleSurfaceArea xmlns="http://www.TianoCore.org/2006/Edk2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<MsaHeader>
<ModuleName>DxeWinNtLib</ModuleName>
<ModuleType>DXE_DRIVER</ModuleType>
<GuidValue>f6b5871d-5226-41b3-a569-3ff893fdc7bc</GuidValue>
<Version>1.0</Version>
<Abstract>A library to produce the global variable 'gWinNt'</Abstract>
<Description>This library contains a single global variable 'gWinNt' along with a constructor to initialize that global.</Description>
<Copyright>Copyright (c) 2006 - 2007, Intel Corporation.</Copyright>
<License>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.</License>
<Specification>FRAMEWORK_BUILD_PACKAGING_SPECIFICATION 0x00000052</Specification>
</MsaHeader>
<ModuleDefinitions>
<SupportedArchitectures>IA32</SupportedArchitectures>
<BinaryModule>false</BinaryModule>
<OutputFileBasename>DxeWinNtLib</OutputFileBasename>
</ModuleDefinitions>
<LibraryClassDefinitions>
<LibraryClass Usage="ALWAYS_PRODUCED" SupModuleList="DXE_DRIVER DXE_RUNTIME_DRIVER DXE_SMM_DRIVER UEFI_APPLICATION UEFI_DRIVER">
<Keyword>WinNtLib</Keyword>
</LibraryClass>
<LibraryClass Usage="ALWAYS_CONSUMED">
<Keyword>DebugLib</Keyword>
</LibraryClass>
<LibraryClass Usage="ALWAYS_CONSUMED">
<Keyword>HobLib</Keyword>
</LibraryClass>
</LibraryClassDefinitions>
<SourceFiles>
<Filename>WinNtLib.c</Filename>
</SourceFiles>
<PackageDependencies>
<Package PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
<Package PackageGuid="0fb2aa2d-10d5-40a5-a9dc-060c12a4a3f3"/>
</PackageDependencies>
<Hobs>
<HobTypes HobGuidCName="gEfiWinNtThunkProtocolGuid" Usage="ALWAYS_CONSUMED">
<HobType>GUID_EXTENSION</HobType>
</HobTypes>
</Hobs>
<Externs>
<Specification>EFI_SPECIFICATION_VERSION 0x00020000</Specification>
<Specification>EDK_RELEASE_VERSION 0x00020000</Specification>
<Extern>
<Constructor>WinNtLibConstructor</Constructor>
</Extern>
</Externs>
</ModuleSurfaceArea>

View File

@@ -0,0 +1,53 @@
/*++
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:
WinNtLib.c
Abstract:
WinNt Library
--*/
//
// Include common header file for this module.
//
#include "CommonHeader.h"
EFI_WIN_NT_THUNK_PROTOCOL *gWinNt;
EFI_STATUS
WinNtLibConstructor (
IN EFI_HANDLE ImageHandle,
IN EFI_SYSTEM_TABLE *SystemTable
)
/*++
Routine Description:
Arguments:
Returns:
--*/
{
EFI_HOB_GUID_TYPE *GuidHob;
GuidHob = GetFirstGuidHob (&gEfiWinNtThunkProtocolGuid);
ASSERT (GuidHob != NULL);
gWinNt = (EFI_WIN_NT_THUNK_PROTOCOL *)(*(UINTN *)(GET_GUID_HOB_DATA (GuidHob)));
ASSERT (gWinNt != NULL);
return EFI_SUCCESS;
}