From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=pass header.i=@linaro.org header.s=google header.b=gP+gVP6h; spf=pass (domain: linaro.org, ip: 209.85.221.68, mailfrom: leif.lindholm@linaro.org) Received: from mail-wr1-f68.google.com (mail-wr1-f68.google.com [209.85.221.68]) by groups.io with SMTP; Mon, 30 Sep 2019 13:56:57 -0700 Received: by mail-wr1-f68.google.com with SMTP id i1so12909170wro.4 for ; Mon, 30 Sep 2019 13:56:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=ppCkC1F1dMkY8+cZP8eai7Z2YoHCZb+vY822jUfvRrA=; b=gP+gVP6hrm+/WVaxjUDxzytNeiEnv+6d8uDEaKz40GuxcNPCLMaCN0T3diFicoNzjI YBpiM1yXN8bPMnyRvHVMp6vlM2nOLY5kXSGjfV78re0a1wXqe/AbqTDg70UvNIhqznMP wVGfYXi8Miq7ixjFAAWkVJ2tUk0WXsoCGMD+xTBNyF3vWDvDC5xG73eP925Bl7lNfDQG o2YajVC/l1R55YI1rhjleJ7F4O8kNmpSUCp9DPI9TXY5p/EpjZw8h52BqiTGOIxiDn1p +LGBfSosfzQUogyDUnFcmEDAlP3FdwFpGyJANSabiEIdLs5mnUU4yu7Fklke1roBvUQ4 IuVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=ppCkC1F1dMkY8+cZP8eai7Z2YoHCZb+vY822jUfvRrA=; b=BciY9eRgg5iT1TqdbcPHIosmiaEePp5A3kEMivpDy6PF5FPKYwDq/1ES+/I5Ig4mii DNrpXSStqY4kCj1+kLQiOj0WWeh15THaUAo13v7WzwC+cBe9BIOtXnCNoBLKR+ycbR98 GcD9wameX5g+s7wtgCB/BPqG8t/4XggdaR/d7OuiFqGBMccjYyJ/stwOsFNkKIGhd56U VhQ1B6I48tM/C8kuKxKAZ0/d6/JGVxDjxLcNZ7GASo0jUqzC2pUQQcnZRjJAXiMs7QVZ S7qZhnc8hw21y+dyTCGoWNc5m8J+MDMH1+YaD43fZjjD+rjbxVpQbGVzJxIdaHG0g3tZ FynA== X-Gm-Message-State: APjAAAUPpWHetKWsx1mx0qmZzrw3UVcagJqB5blnb9jmV7yOHj/N8Dd4 a7dx11Zgzn1oDrWkePE/7g0K7xPpi4w= X-Google-Smtp-Source: APXvYqzP2B41xJNJNR5zWmsqXy6CUfJ1M/tv5nwN06oDbP+bxjMKvuHgn3hf8tgX6Q8S4kN48eKllQ== X-Received: by 2002:a5d:4102:: with SMTP id l2mr15480877wrp.348.1569877015284; Mon, 30 Sep 2019 13:56:55 -0700 (PDT) Return-Path: Received: from bivouac.eciton.net (bivouac.eciton.net. [2a00:1098:0:86:1000:23:0:2]) by smtp.gmail.com with ESMTPSA id b3sm11063856wrw.4.2019.09.30.13.56.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Sep 2019 13:56:54 -0700 (PDT) Date: Mon, 30 Sep 2019 21:56:53 +0100 From: "Leif Lindholm" To: devel@edk2.groups.io, abner.chang@hpe.com Subject: Re: [edk2-devel] [edk2-staging/RISC-V-V2 PATCH v2 22/29] RiscVPkg/RiscVPlatformTempMemoryInit: RISC-V Platform Temporary Memory library Message-ID: <20190930205653.GH25504@bivouac.eciton.net> References: <1569198715-31552-1-git-send-email-abner.chang@hpe.com> <1569198715-31552-24-git-send-email-abner.chang@hpe.com> MIME-Version: 1.0 In-Reply-To: <1569198715-31552-24-git-send-email-abner.chang@hpe.com> User-Agent: Mutt/1.10.1 (2018-07-13) Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 > --- > .../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.
> + > + 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 > + > +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.
> +# > +# 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.
> +// > +// SPDX-License-Identifier: BSD-2-Clause-Patent > +// > +//------------------------------------------------------------------------------ > +#include > + > +.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 > > > >