On 05/19/14 23:27, Jordan Justen wrote:
> Using NASM we build OVMF's ResetVector as part of the EDK II build
> process.
> 
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Jordan Justen <jordan.l.jus...@intel.com>
> ---
>  OvmfPkg/ResetVector/ResetVector.inf     | 37 +++++++++++++++++++++++
>  OvmfPkg/ResetVector/ResetVector.nasmbin | 53 
> +++++++++++++++++++++++++++++++++
>  2 files changed, 90 insertions(+)
>  create mode 100644 OvmfPkg/ResetVector/ResetVector.inf
>  create mode 100644 OvmfPkg/ResetVector/ResetVector.nasmbin
> 
> diff --git a/OvmfPkg/ResetVector/ResetVector.inf 
> b/OvmfPkg/ResetVector/ResetVector.inf
> new file mode 100644
> index 0000000..57db16b
> --- /dev/null
> +++ b/OvmfPkg/ResetVector/ResetVector.inf
> @@ -0,0 +1,37 @@
> +## @file
> +#  Reset Vector
> +#
> +#  Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
> +#
> +#  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]
> +  INF_VERSION                    = 0x00010005
> +  BASE_NAME                      = ResetVector
> +  FILE_GUID                      = 1BA0062E-C779-4582-8566-336AE8F78F09
> +  MODULE_TYPE                    = SEC
> +  VERSION_STRING                 = 1.1

This seems to come from OvmfPkg/ResetVector/Bin/ResetVector.inf.
FILE_GUID matches EFI_FFS_VOLUME_TOP_FILE_GUID, about which
"MdePkg/Include/Guid/FirmwareFileSystem2.h " says

///
/// A Volume Top File (VTF) is a file that must be
/// located such that the last byte of the file is
/// also the last byte of the firmware volume
///


Seems OK.

> +
> +#
> +# The following information is for reference only and not required by the 
> build tools.
> +#
> +#  VALID_ARCHITECTURES           = IA32 X64
> +#
> +
> +[Sources]
> +  ResetVector.nasmbin
> +
> +[Packages]
> +  MdePkg/MdePkg.dec
> +  UefiCpuPkg/UefiCpuPkg.dec
> +
> +[BuildOptions]
> +   *_*_IA32_NASMBIN_FLAGS = -D ARCH_IA32 -D DEBUG_NONE 
> -I$(WORKSPACE)/UefiCpuPkg/ResetVector/Vtf0/
> +   *_*_X64_NASMBIN_FLAGS = -D ARCH_X64 -D DEBUG_NONE 
> -I$(WORKSPACE)/UefiCpuPkg/ResetVector/Vtf0/

These extra flags come from OvmfPkg/ResetVector/Build.py. Good.

> diff --git a/OvmfPkg/ResetVector/ResetVector.nasmbin 
> b/OvmfPkg/ResetVector/ResetVector.nasmbin
> new file mode 100644
> index 0000000..052c821
> --- /dev/null
> +++ b/OvmfPkg/ResetVector/ResetVector.nasmbin
> @@ -0,0 +1,53 @@
> +;------------------------------------------------------------------------------
> +; @file
> +; This file includes all other code files to assemble the reset vector code
> +;
> +; Copyright (c) 2008 - 2013, Intel Corporation. All rights reserved.<BR>
> +; 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.
> +;
> +;------------------------------------------------------------------------------
> +
> +%ifdef ARCH_IA32
> +  %ifdef ARCH_X64
> +    %error "Only one of ARCH_IA32 or ARCH_X64 can be defined."
> +  %endif
> +%elifdef ARCH_X64
> +%else
> +  %error "Either ARCH_IA32 or ARCH_X64 must be defined."
> +%endif
> +
> +%include "CommonMacros.inc"
> +
> +%include "PostCodes.inc"
> +
> +%ifdef DEBUG_NONE
> +  %include "DebugDisabled.asm"
> +%elifdef DEBUG_PORT80
> +  %include "Port80Debug.asm"
> +%elifdef DEBUG_SERIAL
> +  %include "SerialDebug.asm"
> +%else
> +  %error "No debug type was specified."
> +%endif
> +
> +%include "Ia32/SearchForBfvBase.asm"
> +%include "Ia32/SearchForSecEntry.asm"
> +
> +%ifdef ARCH_X64
> +%include "Ia32/Flat32ToFlat64.asm"
> +%include "Ia32/PageTables64.asm"
> +%endif
> +
> +%include "Ia16/Real16ToFlat32.asm"
> +%include "Ia16/Init16.asm"
> +
> +%include "Main.asm"
> +
> +%include "Ia16/ResetVectorVtf0.asm"
> +
> 

Looks like a verbatim copy of OvmfPkg/ResetVector/ResetVectorCode.asm.

Reviewed-by: Laszlo Ersek <ler...@redhat.com>

------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.
Get unparalleled scalability from the best Selenium testing platform available
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to