From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-DM3-obe.outbound.protection.outlook.com (mail-dm3nam03on0702.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe49::702]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id A663D1A1DEB for ; Tue, 11 Oct 2016 02:27:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=xM2s+SYb1pqOSinqLbcuOjmxc19cKmNA0tZlwpRzvzY=; b=C9SapFYJM59pr2LxkSj6Xi9gb1pkhwd9aD9e+O2ZC7BIpgVtDK5ZH867nUKG6qDnA1VoFVkkQ2xhU2tRvgRyOoTajl+hAK5EYqnMjJCNWhHErf3YkgGxUzW907+3yaTQGTEMUqaUYXow1ODAA2O5YtCYL06fU2OI1tyyOSsgdpE= Received: from BY1PR03MB1355.namprd03.prod.outlook.com (10.162.109.25) by BY1PR03MB1355.namprd03.prod.outlook.com (10.162.109.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.659.11; Tue, 11 Oct 2016 09:27:42 +0000 Received: from BY1PR03MB1355.namprd03.prod.outlook.com ([10.162.109.25]) by BY1PR03MB1355.namprd03.prod.outlook.com ([10.162.109.25]) with mapi id 15.01.0659.018; Tue, 11 Oct 2016 09:27:42 +0000 From: Sean Brogan To: Jiewen Yao , "edk2-devel@lists.01.org" CC: Michael D Kinney , Feng Tian , Chao Zhang , Liming Gao , Star Zeng Thread-Topic: [edk2] [PATCH V2 05/50] MdeModulePkg/Include: Add PlatformFlashAccessLib header. Thread-Index: AQHSGxVVz+q1k/7j90CR8UUNUMxbwaCjDG/A Date: Tue, 11 Oct 2016 09:27:42 +0000 Message-ID: References: <1475238128-22448-1-git-send-email-jiewen.yao@intel.com> <1475238128-22448-6-git-send-email-jiewen.yao@intel.com> In-Reply-To: <1475238128-22448-6-git-send-email-jiewen.yao@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=sean.brogan@microsoft.com; x-originating-ip: [50.46.222.147] x-ms-office365-filtering-correlation-id: 3f683531-a221-4007-e79d-08d3f1b8da3c x-microsoft-exchange-diagnostics: 1; BY1PR03MB1355; 7:yslrs1+xHj+D67at5y3wExWlVjTNh/YX+eFiFLC9eTiRLY1Wq+DA/D+/rIGwxXP6mHdgKdf2221u/CSHkF7/47+gb8X1qeurTORFFjKnWAV7Pgyvc/vscm9rIlP8VLJ/UQwNhvMmnf1g/t3oIoc5bfuVBILh1Hne6yvRwBTxniFthwhD3jVcDGHPUD09eHbo7U1x/hAebVdF4ATRBDqLShiXvV0BA+0c21fLrHYa2ka1mkQ67T1G8lI8JltkEvCeV+/w6M5ZBpMv9urnesXjjd4Kki+gVuvgQtHcMwUqQuw3e17PIa8gRhMhqzoSjSIE7zLi0iFHTknCwRY1r1eRdpS1tjVyzpqrepA+yD4griyor8TIZDi0H3U/3iQinZkG x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BY1PR03MB1355; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(162533806227266)(228905959029699); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(61425038)(6040176)(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001)(6055026)(61426038)(61427038); SRVR:BY1PR03MB1355; BCL:0; PCL:0; RULEID:; SRVR:BY1PR03MB1355; x-forefront-prvs: 00922518D8 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(6009001)(7916002)(199003)(13464003)(377454003)(189002)(54356999)(3660700001)(50986999)(106356001)(8990500004)(68736007)(9686002)(15395725005)(8936002)(33656002)(2906002)(189998001)(4326007)(86362001)(11100500001)(66066001)(19580395003)(3280700002)(5005710100001)(106116001)(6116002)(3846002)(102836003)(19580405001)(105586002)(10090500001)(81166006)(16799955002)(99286002)(76176999)(81156014)(10290500002)(10400500002)(101416001)(15188155005)(8676002)(86612001)(586003)(92566002)(122556002)(2900100001)(15975445007)(77096005)(5002640100001)(2501003)(76576001)(2950100002)(97736004)(7846002)(87936001)(74316002)(5001770100001)(7696004)(305945005)(7736002)(5660300001); DIR:OUT; SFP:1102; SCL:1; SRVR:BY1PR03MB1355; H:BY1PR03MB1355.namprd03.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-originalarrivaltime: 11 Oct 2016 09:27:42.6392 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR03MB1355 Subject: Re: [PATCH V2 05/50] MdeModulePkg/Include: Add PlatformFlashAccessLib header. X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Oct 2016 09:27:45 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable My suggestion is to move to implementation specific package.=20 > -----Original Message----- > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of > Jiewen Yao > Sent: Friday, September 30, 2016 5:21 AM > To: edk2-devel@lists.01.org > Cc: Michael D Kinney ; Feng Tian > ; Chao Zhang ; Liming Gao > ; Star Zeng > Subject: [edk2] [PATCH V2 05/50] MdeModulePkg/Include: Add > PlatformFlashAccessLib header. >=20 > This library is used to abstract platform flash access. > This library is consumed by a capsule update module. > It may cover SystemFirmware region and/or non-SystemFirmware region. >=20 > Cc: Feng Tian > Cc: Star Zeng > Cc: Michael D Kinney > Cc: Liming Gao > Cc: Chao Zhang > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Jiewen Yao > Reviewed-by: Liming Gao > --- > MdeModulePkg/Include/Library/PlatformFlashAccessLib.h | 59 > ++++++++++++++++++++ > 1 file changed, 59 insertions(+) >=20 > diff --git a/MdeModulePkg/Include/Library/PlatformFlashAccessLib.h > b/MdeModulePkg/Include/Library/PlatformFlashAccessLib.h > new file mode 100644 > index 0000000..0ce7e29 > --- /dev/null > +++ b/MdeModulePkg/Include/Library/PlatformFlashAccessLib.h > @@ -0,0 +1,59 @@ > +/** @file > + Platform flash device access library. > + > + Copyright (c) 2016, Intel Corporation. All rights reserved.
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. > + > +**/ > + > + > +#ifndef __PLATFORM_FLASH_ACCESS_LIB_H__ #define > +__PLATFORM_FLASH_ACCESS_LIB_H__ > + > +typedef enum { > + FlashAddressTypeRelativeAddress, > + FlashAddressTypeAbsoluteAddress, > + FlashAddressTypeMax, > +} FLASH_ADDRESS_TYPE; > + > +// > +// Type 0 ~ 0x7FFFFFFF is defined in this library. > +// Type 0x80000000 ~ 0xFFFFFFFF is reserved for OEM. > +// > +typedef enum { > + PlatformFirmwareTypeSystemFirmware, > + PlatformFirmwareTypeNvRam, > + PlatformFirmwareTypeMax, > +} PLATFORM_FIRMWARE_TYPE; > + > +/** > + Perform flash write opreation. > + > + @param FirmwareType The type of firmware. > + @param FlashAddress The address of flash device to be accessed. > + @param FlashAddressType The type of flash device address. > + @param Buffer The pointer to the data buffer. > + @param Length The length of data buffer in bytes. > + > + @retval EFI_SUCCESS The operation returns successfully. > + @retval EFI_WRITE_PROTECTED The flash device is read only. > + @retval EFI_UNSUPPORTED The flash device access is unsupported. > + @retval EFI_INVALID_PARAMETER The input parameter is not valid. > +**/ > +EFI_STATUS > +EFIAPI > +PerformFlashWrite ( > + IN PLATFORM_FIRMWARE_TYPE FirmwareType, > + IN EFI_PHYSICAL_ADDRESS FlashAddress, > + IN FLASH_ADDRESS_TYPE FlashAddressType, > + IN VOID *Buffer, > + IN UINTN Length > + ); > + > +#endif > -- > 2.7.4.windows.1 >=20 > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel