From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ej1-f46.google.com (mail-ej1-f46.google.com [209.85.218.46]) by mx.groups.io with SMTP id smtpd.web11.38340.1615219073600076068 for ; Mon, 08 Mar 2021 07:57:54 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@nuviainc-com.20150623.gappssmtp.com header.s=20150623 header.b=RbXwqRkQ; spf=pass (domain: nuviainc.com, ip: 209.85.218.46, mailfrom: leif@nuviainc.com) Received: by mail-ej1-f46.google.com with SMTP id p7so9949802eju.6 for ; Mon, 08 Mar 2021 07:57:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nuviainc-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=hjYW750qKOJoNI821UpwaQIU+l1/jxHzq4D229Z87Lo=; b=RbXwqRkQw1lCbl1oK7yHgoX8QHIlKKg2ErKeNL7cDlfgdOB1TxL0wtfaOohoXCbhII beEpbWupIn03YbabkeLEw/O1fDlfr1CJRL1ZGDmMY0LlGahYVnS0186NS6+X0l2NPyiO dl8Sn52Rv8gBXQZWbWyDqMgaU1ASMamND2WOp3jpoTCa9CT7OrSLpY2UNPvsdwn2lsux yqP7rXCw/1bUD1Df973yT+67k3cW4FYmsj3FLoN87+q/ObVNTer0bop6v3wX/i8ZJSm6 vqAxeftdAB22w2CXbV2iOAmu1dXyWLD7iCYpjVVJixm3Jt7QyOAYPwYbZPiljQMR+t6Y 7/6A== 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:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=hjYW750qKOJoNI821UpwaQIU+l1/jxHzq4D229Z87Lo=; b=CPCcuokktuOoDzlN3nl4SLl4IKLfy8CUeWcvBVGvnHFxvGqoF9ai7jZa41Khgi9nPB xvTDdHcQqbQCnaKLRdIQKX/EIWITHR2Fe+SlzEoxxqrgF9HMH7UkTovaZXLPVAp9sslp hdF4RrGTsKMeZ74x9n2bcd38mp1GdnC8dLfqy23iez+OCzmnc4xDUkLp/8IlsZC3dT4l RtxUwhZ8GLWKqms8uQZzibgiHlk5gfRd6vnWTI+zmkAbbi0/OcJvXAPh487Olmoqy3E0 J8m/Ndn/wgF3Px1rGeBi7/5RDmMNng7UmwcQjwugT6ZbBvdib0blRdPnu1umj76vO+oV wzYA== X-Gm-Message-State: AOAM531AgH6XXx9Pb4dP3H/Lk22CEIM/Uf5aRekS0U/tffe/A9uwGdce e4LsVedBKe4L+IRsgD5zKJaIEg== X-Google-Smtp-Source: ABdhPJxcDTBM4UgDW0kbIKtoKHCvvxD8mPvSnvDDhteQeJKyztWpcTviMHlEqr0KE6rFoMqqZpUSqA== X-Received: by 2002:a17:907:2054:: with SMTP id pg20mr15713938ejb.213.1615219072140; Mon, 08 Mar 2021 07:57:52 -0800 (PST) Return-Path: Received: from vanye (cpc1-cmbg19-2-0-cust915.5-4.cable.virginm.net. [82.27.183.148]) by smtp.gmail.com with ESMTPSA id pg2sm6980632ejb.49.2021.03.08.07.57.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Mar 2021 07:57:51 -0800 (PST) Date: Mon, 8 Mar 2021 15:57:49 +0000 From: "Leif Lindholm" To: Sami Mujawar Cc: "devel@edk2.groups.io" , "ilias.apalodimas@linaro.org" , "ardb+tianocore@kernel.org" , "sughosh.ganu@linaro.org" , nd Subject: Re: [edk2-devel] [PATCH 0/2 v5] Add support for running StandaloneMm as OP-TEE TA Message-ID: <20210308155749.GM1664@vanye> References: <20210212173459.508205-1-ilias.apalodimas@linaro.org> MIME-Version: 1.0 In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit Hi Sami, My £0.05 would be something like: - Drivers/OpTee/OpteeRpmbPkg - Platform/StandaloneMm/PlatformStandaloneMmPkg I think until we have more generic STMM solutions, it may be tricky to figure out the optimal layout, so if the yneed to change in future, that's fine. / Leif On Wed, Mar 03, 2021 at 11:32:53 +0000, Sami Mujawar wrote: > Hi Ard, Leif, > > This patch series is creating 2 new folders Platform/StMMRpmb & Drivers/OpTeeRpmb. > - Should these be in Drivers\StandaloneMmRpmbPkg similar to Drivers\OptionRomPkg ? > - Also, the maintainer.txt file would need updating accordingly. > > Any advice/suggestions about this, please. > > Regards, > > Sami Mujawar > > -----Original Message----- > From: devel@edk2.groups.io On Behalf Of Ilias Apalodimas via groups.io > Sent: 12 February 2021 05:35 PM > To: devel@edk2.groups.io; Sami Mujawar > Cc: ardb+tianocore@kernel.org; sughosh.ganu@linaro.org; leif@nuviainc.com; Ilias Apalodimas > Subject: [edk2-devel] [PATCH 0/2 v5] Add support for running StandaloneMm as OP-TEE TA > > Hi, > > This is v5 of [1] > > Changes since V4: > - More coding stule fixes proposed by Sami, which Ecc or Patchcheck didn't > report. > - Adding missing error handling in InitializeFvAndVariableStoreHeaders(). > An allocation wasn't properly checked for success > > Changes since V3: > - Coding style fixes proposed by Sami > - Fixed all reported PatchCheck errors > - Added overflow checks on the base aaddress allocated for EFI variables. > The size of the partition is user defined (via Pcd's) and the memory layout > and allocation address depends on OP-TEE. So let's make sure we won't overflow > when calculating the 3 partitions needed for FTW > - Switched some PcdGet/Set32 to 64 to accomodate 64-bit addressing > - Removed some duplicate entries in Platform/StMMRpmb/PlatformStandaloneMm.dsc > - Added reviewed-by tags on patch 2/2 > > Changes since V2: > - Allocate a dynamic number of pages based on the Pcd values instead > of a static number > - Clean up unused structs in header file > - Added checks in OpTeeRpmbFvbGetBlockSize and handle NumLba=0 > > Changes since V1: > Some enhancements made by Ilias to the Optee Rpmb driver > > [1] https://edk2.groups.io/g/devel/message/66483?p=,,,20,0,0,0::Created,,ilias+apalodimas,20,2,0,77703661 > > Ilias Apalodimas (2): > Drivers/OpTeeRpmb: Add an OP-TEE backed RPMB driver > StMMRpmb: Add support for building StandaloneMm image for OP-TEE > > Drivers/OpTeeRpmb/FixupPcd.c | 89 ++ > Drivers/OpTeeRpmb/FixupPcd.inf | 43 + > Drivers/OpTeeRpmb/OpTeeRpmbFv.inf | 58 ++ > Drivers/OpTeeRpmb/OpTeeRpmbFvb.c | 920 +++++++++++++++++++++ > Drivers/OpTeeRpmb/OpTeeRpmbFvb.h | 52 ++ > Platform/StMMRpmb/PlatformStandaloneMm.dsc | 165 ++++ > Platform/StMMRpmb/PlatformStandaloneMm.fdf | 111 +++ > 7 files changed, 1438 insertions(+) > create mode 100644 Drivers/OpTeeRpmb/FixupPcd.c > create mode 100644 Drivers/OpTeeRpmb/FixupPcd.inf > create mode 100644 Drivers/OpTeeRpmb/OpTeeRpmbFv.inf > create mode 100644 Drivers/OpTeeRpmb/OpTeeRpmbFvb.c > create mode 100644 Drivers/OpTeeRpmb/OpTeeRpmbFvb.h > create mode 100644 Platform/StMMRpmb/PlatformStandaloneMm.dsc > create mode 100644 Platform/StMMRpmb/PlatformStandaloneMm.fdf > > -- > 2.30.0 > > > > > >