]> git.proxmox.com Git - mirror_edk2.git/blobdiff - IntelSiliconPkg/Include/Library/MicrocodeFlashAccessLib.h
IntelSiliconPkg: Move MicrocodeUpdate from UefiCpuPkg
[mirror_edk2.git] / IntelSiliconPkg / Include / Library / MicrocodeFlashAccessLib.h
diff --git a/IntelSiliconPkg/Include/Library/MicrocodeFlashAccessLib.h b/IntelSiliconPkg/Include/Library/MicrocodeFlashAccessLib.h
new file mode 100644 (file)
index 0000000..0dfc3ef
--- /dev/null
@@ -0,0 +1,39 @@
+/** @file\r
+  Microcode flash device access library.\r
+\r
+  Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>\r
+  This program and the accompanying materials\r
+  are licensed and made available under the terms and conditions of the BSD License\r
+  which accompanies this distribution.  The full text of the license may be found at\r
+  http://opensource.org/licenses/bsd-license.php\r
+\r
+  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+\r
+**/\r
+\r
+\r
+#ifndef __MICROCODE_FLASH_ACCESS_LIB_H__\r
+#define __MICROCODE_FLASH_ACCESS_LIB_H__\r
+\r
+/**\r
+  Perform microcode write opreation.\r
+\r
+  @param[in] FlashAddress      The address of flash device to be accessed.\r
+  @param[in] Buffer            The pointer to the data buffer.\r
+  @param[in] Length            The length of data buffer in bytes.\r
+\r
+  @retval EFI_SUCCESS           The operation returns successfully.\r
+  @retval EFI_WRITE_PROTECTED   The flash device is read only.\r
+  @retval EFI_UNSUPPORTED       The flash device access is unsupported.\r
+  @retval EFI_INVALID_PARAMETER The input parameter is not valid.\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+MicrocodeFlashWrite (\r
+  IN EFI_PHYSICAL_ADDRESS         FlashAddress,\r
+  IN VOID                         *Buffer,\r
+  IN UINTN                        Length\r
+  );\r
+\r
+#endif\r