On Mon, Sep 23, 2019 at 08:31:48AM +0800, Abner Chang wrote:
> NULL instance of RISC-V Platform Temporary Memory library.
> 
> Signed-off-by: Abner Chang <abner.ch...@hpe.com>
> ---
>  .../Library/RiscVPlatformTempMemoryInitLib.h       | 17 +++++++++++
>  .../RiscVPlatformTempMemoryInitLibNull.inf         | 34 
> ++++++++++++++++++++++
>  .../Riscv64/TempMemInit.S                          | 26 +++++++++++++++++
>  3 files changed, 77 insertions(+)
>  create mode 100644 RiscVPkg/Include/Library/RiscVPlatformTempMemoryInitLib.h
>  create mode 100644 
> RiscVPkg/Library/RiscVPlatformTempMemoryInitLibNull/RiscVPlatformTempMemoryInitLibNull.inf
>  create mode 100644 
> RiscVPkg/Library/RiscVPlatformTempMemoryInitLibNull/Riscv64/TempMemInit.S
> 
> diff --git a/RiscVPkg/Include/Library/RiscVPlatformTempMemoryInitLib.h 
> b/RiscVPkg/Include/Library/RiscVPlatformTempMemoryInitLib.h
> new file mode 100644
> index 0000000..11dfcfb
> --- /dev/null
> +++ b/RiscVPkg/Include/Library/RiscVPlatformTempMemoryInitLib.h
> @@ -0,0 +1,17 @@
> +/** @file
> +  RISC-V package definitions.
> +
> +  Copyright (c) 2016 - 2019, Hewlett Packard Enterprise Development LP. All 
> rights reserved.<BR>
> +
> +  SPDX-License-Identifier: BSD-2-Clause-Patent
> +**/
> +
> +#ifndef _RISCV_PLATFORM_TEMP_MEM_LIB_H_
> +#define _RISCV_PLATFORM_TEMP_MEM_LIB_H_
> +
> +#include "RiscV.h"

If you drop the leading _ above, and use <> for include:
Reviewed-by: Leif Lindholm <leif.lindh...@linaro.org>

> +
> +VOID EFIAPI   RiscVPlatformTemporaryMemInit (VOID);
> +UINT32 EFIAPI RiscVPlatformTemporaryMemSize (VOID);
> +UINT32 EFIAPI RiscVPlatformTemporaryMemBase (VOID);
> +#endif
> diff --git 
> a/RiscVPkg/Library/RiscVPlatformTempMemoryInitLibNull/RiscVPlatformTempMemoryInitLibNull.inf
>  
> b/RiscVPkg/Library/RiscVPlatformTempMemoryInitLibNull/RiscVPlatformTempMemoryInitLibNull.inf
> new file mode 100644
> index 0000000..12fa497
> --- /dev/null
> +++ 
> b/RiscVPkg/Library/RiscVPlatformTempMemoryInitLibNull/RiscVPlatformTempMemoryInitLibNull.inf
> @@ -0,0 +1,34 @@
> +## @file
> +# RISC-V platform temporary memory library.
> +#
> +# Copyright (c) 2016, Hewlett Packard Enterprise Development LP. All rights 
> reserved.<BR>
> +#
> +# SPDX-License-Identifier: BSD-2-Clause-Patent
> +#
> +##
> +
> +[Defines]
> +  INF_VERSION                    = 0x0001001b
> +  BASE_NAME                      = RiscVPlatformTempMemoryInitLibNull
> +  FILE_GUID                      = 67294857-C0F8-4ACB-8237-D91FE506B710
> +  MODULE_TYPE                    = SEC
> +  VERSION_STRING                 = 1.0
> +  LIBRARY_CLASS                  = RiscVPlatformTempMemoryInitLib
> +
> +#
> +# The following information is for reference only and not required by the 
> build tools.
> +#
> +#  VALID_ARCHITECTURES           = RISCV64
> +#
> +
> +[Sources]
> +
> +[Sources.RISCV64]
> +  Riscv64/TempMemInit.S
> +
> +[Packages]
> +  MdePkg/MdePkg.dec
> +  MdeModulePkg/MdeModulePkg.dec
> +  RiscVPkg/RiscVPkg.dec
> +
> +
> diff --git 
> a/RiscVPkg/Library/RiscVPlatformTempMemoryInitLibNull/Riscv64/TempMemInit.S 
> b/RiscVPkg/Library/RiscVPlatformTempMemoryInitLibNull/Riscv64/TempMemInit.S
> new file mode 100644
> index 0000000..61a9923
> --- /dev/null
> +++ 
> b/RiscVPkg/Library/RiscVPlatformTempMemoryInitLibNull/Riscv64/TempMemInit.S
> @@ -0,0 +1,26 @@
> +//------------------------------------------------------------------------------
> +//
> +// RISC-V RiscVPlatformTemporaryMemInit.
> +//
> +// Copyright (c) 2016 - 2019, Hewlett Packard Enterprise Development LP. All 
> rights reserved.<BR>
> +//
> +// SPDX-License-Identifier: BSD-2-Clause-Patent
> +//
> +//------------------------------------------------------------------------------
> +#include <Base.h>
> +
> +.data
> +
> +.text
> +.align 3
> +
> +.global ASM_PFX(RiscVPlatformTemporaryMemInit)
> +
> +//
> +// @retval  a0 Temporary memory base.
> +//          a1 Temporary memory size.
> +//
> +ASM_PFX(RiscVPlatformTemporaryMemInit):
> +    li      a0, FixedPcdGet32 (PcdRiscVSecPeiTempRamBase)
> +    li      a1, FixedPcdGet32 (PcdRiscVSecPeiTempRamSize)
> +    ret
> -- 
> 2.7.4
> 
> 
> 
> 

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#48308): https://edk2.groups.io/g/devel/message/48308
Mute This Topic: https://groups.io/mt/34258220/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to