From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ed1-f43.google.com (mail-ed1-f43.google.com [209.85.208.43]) by mx.groups.io with SMTP id smtpd.web11.9112.1615298488646888497 for ; Tue, 09 Mar 2021 06:01:29 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@linaro.org header.s=google header.b=uYi/yECT; spf=pass (domain: linaro.org, ip: 209.85.208.43, mailfrom: ilias.apalodimas@linaro.org) Received: by mail-ed1-f43.google.com with SMTP id w9so20206115edt.13 for ; Tue, 09 Mar 2021 06:01:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=/5AAxSt7A6pF2yLEnlCEIaMFXCJ3nCe0kGM+vUrf0X0=; b=uYi/yECTCu5Fa/ZqtL+FL9s0v7Z42xtSkoKD4nEYDn8cIy3iSY52nqx8IAAEwI3itr a58JPNzkgln+VSuWK+TDpihYORWhsJlwtf/dehVTRuqX4LVh1WJxKRoPpT0qjXsQxO0m 42LqxTh5MASuj9xLUzKFNUosleogz6ks3Nk7hhUtsAyk5io70bekFqCdD2BljRzCEoZk f7Vws/vkYUiqoqtoV07muoAIuTi5svMpks8ActIb/5O5lCUJajA2tALV+YusjLEI9EVB E46HGfrhbow9jp7U1F0G9K64gznE4pHGwWjXC+RJfQl0cIeTxKimovV6xB+x75bnxiOT i17A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=/5AAxSt7A6pF2yLEnlCEIaMFXCJ3nCe0kGM+vUrf0X0=; b=DXfqTr84obRd9rwQKWd8msoA4glAcGLydEJAqWvtukuFPDLOVGFwGqwPBlAPaSE+i2 ZXqsMCWyPN27+q8NyaeAhm0HDMhKg9o5XXkYbFseE8NSPdUDfmn+pIdtFwqEO2qV/6pC Aojs/7POc/MJRVK1wTAEiUZDwOunQ5IajbTTJLAK8WjCqDofLwGosFh/RWBbcePJh2UG dSPxgYjvoN3sVc/LchPi8v3kObmb2XnfzyGGIN3GEouxm0gXRXaySD3k6sJtQbLIrPvD 63nVjGGCPrzSeuS4ZngkAn7/z7RU+PeIVdagePgKUz8/2Z9ggQbalkmfI4U2TvCmKiya JtwA== X-Gm-Message-State: AOAM5326n9OE+1vDrJw57H11nkRG7S1rI+lrLkm0BK1LtDfww8XS8exq VbupHgziS0nPDywFo+A34yIo/wdNQUZzAHCn X-Google-Smtp-Source: ABdhPJyxQLFPkp5SifgEhJOyWPeM1dLiOMQ5DLMEIv+ctkiLfTKv7V0unZwN6kkcXF0Dmvy7nT2b1Q== X-Received: by 2002:aa7:d54c:: with SMTP id u12mr4428799edr.234.1615298487090; Tue, 09 Mar 2021 06:01:27 -0800 (PST) Return-Path: Received: from apalos.home ([2a02:587:4647:e6c6:2e56:dcff:fe9a:8f06]) by smtp.gmail.com with ESMTPSA id r17sm9190373edt.70.2021.03.09.06.01.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Mar 2021 06:01:26 -0800 (PST) From: "Ilias Apalodimas" To: devel@edk2.groups.io, sami.mujawar@arm.com, pierre.gondois@arm.com Cc: ardb+tianocore@kernel.org, sughosh.ganu@linaro.org, leif@nuviainc.com, Ilias Apalodimas Subject: [PATCH 0/3 v6] Add support for running StandaloneMm as OP-TEE TA Date: Tue, 9 Mar 2021 16:01:20 +0200 Message-Id: <20210309140123.2992772-1-ilias.apalodimas@linaro.org> X-Mailer: git-send-email 2.30.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Hi, This is v6 of [1] Changes since V5: - Addressed coding style fixes from Pierre - Removed redundant checks in memory allocation and block usage - Removed unused COMPRESSION_TOOL_GUID - Renamed the files and directories following Leif's sugestion - Added Sami and myself as maintainers 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 (3): Drivers/OpTeeRpmb: Add an OP-TEE backed RPMB driver StMMRpmb: Add support for building StandaloneMm image for OP-TEE Maintainers: Add maintainers for StandAloneMM and RPMD driver Drivers/OpTee/OpteeRpmbPkg/FixupPcd.c | 80 ++ Drivers/OpTee/OpteeRpmbPkg/FixupPcd.inf | 43 + Drivers/OpTee/OpteeRpmbPkg/OpTeeRpmbFv.inf | 58 ++ Drivers/OpTee/OpteeRpmbPkg/OpTeeRpmbFvb.c | 893 ++++++++++++++++++ Drivers/OpTee/OpteeRpmbPkg/OpTeeRpmbFvb.h | 51 + Maintainers.txt | 15 +- .../PlatformStandaloneMmRpmb.dsc | 162 ++++ .../PlatformStandaloneMmRpmb.fdf | 111 +++ 8 files changed, 1408 insertions(+), 5 deletions(-) create mode 100644 Drivers/OpTee/OpteeRpmbPkg/FixupPcd.c create mode 100644 Drivers/OpTee/OpteeRpmbPkg/FixupPcd.inf create mode 100644 Drivers/OpTee/OpteeRpmbPkg/OpTeeRpmbFv.inf create mode 100644 Drivers/OpTee/OpteeRpmbPkg/OpTeeRpmbFvb.c create mode 100644 Drivers/OpTee/OpteeRpmbPkg/OpTeeRpmbFvb.h create mode 100644 Platform/StandaloneMm/PlatformStandaloneMmPkg/PlatformStandaloneMmRpmb.dsc create mode 100644 Platform/StandaloneMm/PlatformStandaloneMmPkg/PlatformStandaloneMmRpmb.fdf -- 2.30.1