From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mx.groups.io with SMTP id smtpd.web10.392.1635800487614871352 for ; Mon, 01 Nov 2021 14:01:27 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=C/P1MNgI; spf=pass (domain: linux.microsoft.com, ip: 13.77.154.182, mailfrom: mikuback@linux.microsoft.com) Received: from [10.0.0.19] (c-73-27-179-174.hsd1.fl.comcast.net [73.27.179.174]) by linux.microsoft.com (Postfix) with ESMTPSA id 7450E201E767; Mon, 1 Nov 2021 14:01:26 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 7450E201E767 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1635800486; bh=loF/AgRYdhauarIfffBztJBJ7m0Wd2/7cqTHv8Ltaps=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=C/P1MNgIHscit6VVV2tIkhTgpmzt2T7sQ/MHKXNK4etoN6xhMBoQ89SDza/mcyATH 96YGtNPGCYAfQ6B135LAcRulAa0lsNmInLQLB27PjOWu+jhJyRhBoT7wH7Jjx0FUkr wI1kxnr50USCqlp94KZQhWyCpBJAuYiZKt1rfOqs= Message-ID: <16421013-3c80-d6f7-d458-0d1d831112b2@linux.microsoft.com> Date: Mon, 1 Nov 2021 17:01:25 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.2.1 Subject: Re: [PATCH v6 33/52] PurleyOpenBoardPkg: Add SpiFlashCommonLib.h To: "Oram, Isaac W" , "devel@edk2.groups.io" , "Desimone, Nathaniel L" Cc: "Chiu, Chasel" References: <20211028204326.645-1-mikuback@linux.microsoft.com> <20211028204326.645-34-mikuback@linux.microsoft.com> From: "Michael Kubacki" In-Reply-To: Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Thanks for pointing that out. This was a mistake in copying/pasting patch subject lines and your plan to extend WhitleyOpenBoardPkg to use IntelSiliconPkg sounds good. If the package names in the commit message can be corrected before pushing that would be great. Thanks, Michael On 11/1/2021 4:38 PM, Oram, Isaac W wrote: > Reviewed-by: Isaac Oram > > Please note subject/title and message body indicate PurleyOpenBoardPkg, but actual file is located in WhitleyOpenBoardPkg. > I don't see any content difference and think it would be better to modify INF to include IntelSiliconPkg/IntelSiliconPkg.dec. > > I can do this in the patch series I have to extend the WhitleyOpenBoardPkg for WHEA functionality. I need to rebase it to this series anyway. > However, if this is a bug and you meant to add to PurleyOpenBoardPkg, then it might be better to fix this series. I verified no build/boot issues using INF fix with WhitleyOpenBoardPkg. > > Regards, > Isaac > > -----Original Message----- > From: mikuback@linux.microsoft.com > Sent: Thursday, October 28, 2021 1:43 PM > To: devel@edk2.groups.io > Cc: Oram, Isaac W ; Desimone, Nathaniel L ; Chiu, Chasel > Subject: [PATCH v6 33/52] PurleyOpenBoardPkg: Add SpiFlashCommonLib.h > > From: Michael Kubacki > > REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3307 > > Adds the header file to PurleyOpenBoardPkg since it was removed from MinPlatformPkg. > > Cc: Isaac Oram > Cc: Nate DeSimone > Cc: Chasel Chiu > Signed-off-by: Michael Kubacki > --- > Platform/Intel/WhitleyOpenBoardPkg/Include/Library/SpiFlashCommonLib.h | 98 ++++++++++++++++++++ > 1 file changed, 98 insertions(+) > > diff --git a/Platform/Intel/WhitleyOpenBoardPkg/Include/Library/SpiFlashCommonLib.h b/Platform/Intel/WhitleyOpenBoardPkg/Include/Library/SpiFlashCommonLib.h > new file mode 100644 > index 000000000000..ef62ba238d71 > --- /dev/null > +++ b/Platform/Intel/WhitleyOpenBoardPkg/Include/Library/SpiFlashCommonL > +++ ib.h > @@ -0,0 +1,98 @@ > +/** @file > + The header file includes the common header files, defines > + internal structure and functions used by SpiFlashCommonLib. > + > + Copyright (c) 2019 Intel Corporation. All rights reserved.
> + SPDX-License-Identifier: BSD-2-Clause-Patent > + > +**/ > + > +#ifndef __SPI_FLASH_COMMON_LIB_H__ > +#define __SPI_FLASH_COMMON_LIB_H__ > + > +#include > +#include > +#include > +#include > +#include > +#include #include > + #include > + > + > +#define SECTOR_SIZE_4KB 0x1000 // Common 4kBytes sector size > +/** > + Enable block protection on the Serial Flash device. > + > + @retval EFI_SUCCESS Opertion is successful. > + @retval EFI_DEVICE_ERROR If there is any device errors. > + > +**/ > +EFI_STATUS > +EFIAPI > +SpiFlashLock ( > + VOID > + ); > + > +/** > + Read NumBytes bytes of data from the address specified by > + PAddress into Buffer. > + > + @param[in] Address The starting physical address of the read. > + @param[in,out] NumBytes On input, the number of bytes to read. On output, the number > + of bytes actually read. > + @param[out] Buffer The destination data buffer for the read. > + > + @retval EFI_SUCCESS Opertion is successful. > + @retval EFI_DEVICE_ERROR If there is any device errors. > + > +**/ > +EFI_STATUS > +EFIAPI > +SpiFlashRead ( > + IN UINTN Address, > + IN OUT UINT32 *NumBytes, > + OUT UINT8 *Buffer > + ); > + > +/** > + Write NumBytes bytes of data from Buffer to the address specified by > + PAddresss. > + > + @param[in] Address The starting physical address of the write. > + @param[in,out] NumBytes On input, the number of bytes to write. On output, > + the actual number of bytes written. > + @param[in] Buffer The source data buffer for the write. > + > + @retval EFI_SUCCESS Opertion is successful. > + @retval EFI_DEVICE_ERROR If there is any device errors. > + > +**/ > +EFI_STATUS > +EFIAPI > +SpiFlashWrite ( > + IN UINTN Address, > + IN OUT UINT32 *NumBytes, > + IN UINT8 *Buffer > + ); > + > +/** > + Erase the block starting at Address. > + > + @param[in] Address The starting physical address of the block to be erased. > + This library assume that caller garantee that the PAddress > + is at the starting address of this block. > + @param[in] NumBytes On input, the number of bytes of the logical block to be erased. > + On output, the actual number of bytes erased. > + > + @retval EFI_SUCCESS. Opertion is successful. > + @retval EFI_DEVICE_ERROR If there is any device errors. > + > +**/ > +EFI_STATUS > +EFIAPI > +SpiFlashBlockErase ( > + IN UINTN Address, > + IN UINTN *NumBytes > + ); > + > +#endif > -- > 2.28.0.windows.1 >