Checked in part of MDE library instances following PI and UEFI. It includes:
1) UefiLib adds features of RFC 3066/Iso639 language string and driver model protocols installation. 2) PeiCoreEntryPoint following PI. 3) UefiDriverEntryPoint following UEFI/EFI. 4) PeiServicesTablePointerLib following PI for IPF and x86. 5) Remove many CommonHeader.h. If there is only one C file in module, we should add the common headers in C file instead of creating a new CommonHeader.h. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2723 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
#------------------------------------------------------------------------------
|
||||
#
|
||||
# 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:
|
||||
#
|
||||
# ReadIdtr.Asm
|
||||
#
|
||||
# Abstract:
|
||||
#
|
||||
# AsmPeiSevicesTablePointer function
|
||||
#
|
||||
# Notes:
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
.globl ASM_PFX(AsmPeiSevicesTablePointer)
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# EFI_PEI_SERVICES **
|
||||
# EFIAPI
|
||||
# AsmPeiSevicesTablePointer (
|
||||
# );
|
||||
#------------------------------------------------------------------------------
|
||||
ASM_PFX(AsmPeiSevicesTablePointer):
|
||||
movl 4(%esp), %eax
|
||||
sidt (%eax)
|
||||
movl -4(%eax), %eax
|
||||
ret
|
@@ -0,0 +1,41 @@
|
||||
;------------------------------------------------------------------------------
|
||||
;
|
||||
; 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:
|
||||
;
|
||||
; AsmPeiSevicesTablePointer.Asm
|
||||
;
|
||||
; Abstract:
|
||||
;
|
||||
; AsmPeiSevicesTablePointer function
|
||||
;
|
||||
; Notes:
|
||||
;
|
||||
;------------------------------------------------------------------------------
|
||||
|
||||
.386
|
||||
.model flat,C
|
||||
.code
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; EFI_PEI_SERVICES **
|
||||
; EFIAPI
|
||||
; AsmPeiSevicesTablePointer (
|
||||
; );
|
||||
;------------------------------------------------------------------------------
|
||||
PeiServicesTablePointer PROC
|
||||
mov eax, [esp + 4]
|
||||
sidt fword ptr [eax]
|
||||
mov eax, [eax - 4]
|
||||
ret
|
||||
PeiServicesTablePointer ENDP
|
||||
|
||||
END
|
@@ -0,0 +1,25 @@
|
||||
/** @file
|
||||
AsmReadIdtr function
|
||||
|
||||
Copyright (c) 2006 - 2007, Intel Corporation<BR>
|
||||
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.
|
||||
|
||||
**/
|
||||
|
||||
EFI_PEI_SERVICES **
|
||||
EFIAPI
|
||||
AsmPeiSevicesTablePointer (
|
||||
VOID
|
||||
)
|
||||
{
|
||||
_asm {
|
||||
sidt fword ptr [eax]
|
||||
mov eax, [eax - 4]
|
||||
}
|
||||
}
|
@@ -0,0 +1,31 @@
|
||||
/*++
|
||||
|
||||
Copyright (c) 2006 - 2007 Intel Corporation. All rights reserved
|
||||
This software and associated documentation (if any) is furnished
|
||||
under a license and may only be used or copied in accordance
|
||||
with the terms of the license. Except as permitted by such
|
||||
license, no part of this software or documentation may be
|
||||
reproduced, stored in a retrieval system, or transmitted in any
|
||||
form or by any means without the express written consent of
|
||||
Intel Corporation.
|
||||
|
||||
|
||||
Module Name:
|
||||
|
||||
InternalPeiServicesTablePointer.h
|
||||
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef __INTERNAL_PEI_SERVICES_TABLE_POINTER_H__
|
||||
#define __INTERNAL_PEI_SERVICES_TABLE_POINTER_H__
|
||||
|
||||
extern
|
||||
EFI_PEI_SERVICES **
|
||||
EFIAPI
|
||||
AsmPeiSevicesTablePointer (
|
||||
VOID
|
||||
);
|
||||
|
||||
|
||||
#endif
|
@@ -0,0 +1,50 @@
|
||||
/*++
|
||||
|
||||
Copyright (c) 2006 Intel Corporation. All rights reserved
|
||||
This software and associated documentation (if any) is furnished
|
||||
under a license and may only be used or copied in accordance
|
||||
with the terms of the license. Except as permitted by such
|
||||
license, no part of this software or documentation may be
|
||||
reproduced, stored in a retrieval system, or transmitted in any
|
||||
form or by any means without the express written consent of
|
||||
Intel Corporation.
|
||||
|
||||
|
||||
Module Name:
|
||||
|
||||
PeiServicesTablePointer.c
|
||||
|
||||
Abstract:
|
||||
|
||||
PEI Services Table Pointer Library.
|
||||
|
||||
--*/
|
||||
|
||||
#include "InternalPeiServicesTablePointer.h"
|
||||
|
||||
/**
|
||||
|
||||
The function returns the pointer to PeiServicee following
|
||||
PI1.0.
|
||||
|
||||
For IA32, the four-bytes field immediately prior to new IDT
|
||||
base addres is used to save the EFI_PEI_SERVICES**.
|
||||
For x64, the eight-bytes field immediately prior to new IDT
|
||||
base addres is used to save the EFI_PEI_SERVICES**.
|
||||
|
||||
@retval The pointer to PeiServices.
|
||||
|
||||
**/
|
||||
EFI_PEI_SERVICES **
|
||||
EFIAPI
|
||||
GetPeiServicesTablePointer (
|
||||
VOID
|
||||
)
|
||||
{
|
||||
EFI_PEI_SERVICES **PeiServices;
|
||||
|
||||
PeiServices = (EFI_PEI_SERVICES **) AsmPeiSevicesTablePointer ();
|
||||
ASSERT (PeiServices != NULL);
|
||||
return PeiServices;
|
||||
}
|
||||
|
@@ -0,0 +1,50 @@
|
||||
<?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>PeiServicesTablePointerLibIdt</ModuleName>
|
||||
<ModuleType>PEIM</ModuleType>
|
||||
<GuidValue>DED3F743-CE2C-4ba6-92A2-FFCE2A6D72D9</GuidValue>
|
||||
<Version>1.0</Version>
|
||||
<Abstract>Component description file for IPF KR1 Pei Services Table Pointer Library</Abstract>
|
||||
<Description>PEI Services Table Library implementation that retrieves a pointer to the PEI
|
||||
Services Table from the KR1 register on IPF.</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 X64</SupportedArchitectures>
|
||||
<BinaryModule>false</BinaryModule>
|
||||
<OutputFileBasename>PeiServicesTablePointerLibIdt</OutputFileBasename>
|
||||
</ModuleDefinitions>
|
||||
<LibraryClassDefinitions>
|
||||
<LibraryClass Usage="ALWAYS_PRODUCED" SupModuleList="PEIM PEI_CORE">
|
||||
<Keyword>PeiServicesTablePointerLib</Keyword>
|
||||
</LibraryClass>
|
||||
<LibraryClass Usage="ALWAYS_CONSUMED">
|
||||
<Keyword>DebugLib</Keyword>
|
||||
</LibraryClass>
|
||||
</LibraryClassDefinitions>
|
||||
<SourceFiles>
|
||||
<Filename SupArchList="IA32 X64">PeiServicesTablePointer.c</Filename>
|
||||
<Filename SupArchList="IA32" ToolChainFamily="GCC">Ia32/AsmPeiSevicesTablePointer.S</Filename>
|
||||
<Filename SupArchList="IA32" ToolChainFamily="MSFT">Ia32/AsmPeiSevicesTablePointer.c</Filename>
|
||||
<Filename SupArchList="X64" ToolChainFamily="GCC">x64/AsmPeiSevicesTablePointer.S</Filename>
|
||||
<Filename SupArchList="X64" ToolChainFamily="MSFT">x64/AsmPeiSevicesTablePointer.asm</Filename>
|
||||
</SourceFiles>
|
||||
<NonProcessedFiles>
|
||||
<Filename>Ia32/AsmPeiSevicesTablePointer.Asm</Filename>
|
||||
</NonProcessedFiles>
|
||||
<PackageDependencies>
|
||||
<Package PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
|
||||
</PackageDependencies>
|
||||
<Externs>
|
||||
<Specification>EFI_SPECIFICATION_VERSION 0x00020000</Specification>
|
||||
<Specification>EDK_RELEASE_VERSION 0x00020000</Specification>
|
||||
</Externs>
|
||||
</ModuleSurfaceArea>
|
@@ -0,0 +1,36 @@
|
||||
#------------------------------------------------------------------------------
|
||||
#
|
||||
# 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:
|
||||
#
|
||||
# AsmPeiSevicesTablePointer.S
|
||||
#
|
||||
# Abstract:
|
||||
#
|
||||
# AsmPeiSevicesTablePointer function
|
||||
#
|
||||
# Notes:
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# EFI_PEI_SERVICES **
|
||||
# EFIAPI
|
||||
# AsmPeiSevicesTablePointer (
|
||||
# );
|
||||
#------------------------------------------------------------------------------
|
||||
.global AsmPeiSevicesTablePointer;
|
||||
.align 16;
|
||||
AsmPeiSevicesTablePointer:
|
||||
sidt (%rcx)
|
||||
movq -8(%rcx), %rcx
|
||||
ret
|
@@ -0,0 +1,38 @@
|
||||
;------------------------------------------------------------------------------
|
||||
;
|
||||
; 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:
|
||||
;
|
||||
; ReadIdtr.Asm
|
||||
;
|
||||
; Abstract:
|
||||
;
|
||||
; AsmPeiSevicesTablePointer function
|
||||
;
|
||||
; Notes:
|
||||
;
|
||||
;------------------------------------------------------------------------------
|
||||
|
||||
.code
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; EFI_PEI_SERVICES **
|
||||
; EFIAPI
|
||||
; AsmPeiSevicesTablePointer (
|
||||
; );
|
||||
;------------------------------------------------------------------------------
|
||||
AsmPeiSevicesTablePointer PROC
|
||||
sidt fword ptr [rcx]
|
||||
mov rcx, [rcx - 8]
|
||||
ret
|
||||
AsmPeiSevicesTablePointer ENDP
|
||||
|
||||
END
|
Reference in New Issue
Block a user