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 <isaac.w.o...@intel.com>
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: mikub...@linux.microsoft.com <mikub...@linux.microsoft.com>
Sent: Thursday, October 28, 2021 1:43 PM
To: devel@edk2.groups.io
Cc: Oram, Isaac W <isaac.w.o...@intel.com>; Desimone, Nathaniel L
<nathaniel.l.desim...@intel.com>; Chiu, Chasel <chasel.c...@intel.com>
Subject: [PATCH v6 33/52] PurleyOpenBoardPkg: Add SpiFlashCommonLib.h
From: Michael Kubacki <michael.kuba...@microsoft.com>
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 <isaac.w.o...@intel.com>
Cc: Nate DeSimone <nathaniel.l.desim...@intel.com>
Cc: Chasel Chiu <chasel.c...@intel.com>
Signed-off-by: Michael Kubacki <michael.kuba...@microsoft.com>
---
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. <BR>
+ SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#ifndef __SPI_FLASH_COMMON_LIB_H__
+#define __SPI_FLASH_COMMON_LIB_H__
+
+#include <Uefi.h>
+#include <Library/BaseLib.h>
+#include <Library/PcdLib.h>
+#include <Library/DebugLib.h>
+#include <Library/BaseMemoryLib.h>
+#include <Library/MemoryAllocationLib.h> #include
+<Library/UefiDriverEntryPoint.h> #include
+<Library/UefiBootServicesTableLib.h>
+
+#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
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#83050): https://edk2.groups.io/g/devel/message/83050
Mute This Topic: https://groups.io/mt/86662348/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-