]> git.proxmox.com Git - mirror_edk2.git/blame - IntelSiliconPkg/Feature/Capsule/Library/MicrocodeFlashAccessLibNull/MicrocodeFlashAccessLibNull.c
IntelSiliconPkg: Move MicrocodeUpdate from UefiCpuPkg
[mirror_edk2.git] / IntelSiliconPkg / Feature / Capsule / Library / MicrocodeFlashAccessLibNull / MicrocodeFlashAccessLibNull.c
CommitLineData
c7829aa0
JY
1/** @file\r
2 Microcode flash device access library NULL instance.\r
3\r
4 Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>\r
5 This program and the accompanying materials\r
6 are licensed and made available under the terms and conditions of the BSD License\r
7 which accompanies this distribution. The full text of the license may be found at\r
8 http://opensource.org/licenses/bsd-license.php\r
9\r
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
12\r
13**/\r
14\r
15#include <PiDxe.h>\r
16\r
17#include <Library/BaseMemoryLib.h>\r
18#include <Library/MicrocodeFlashAccessLib.h>\r
19\r
20/**\r
21 Perform microcode write opreation.\r
22\r
23 @param[in] FlashAddress The address of flash device to be accessed.\r
24 @param[in] Buffer The pointer to the data buffer.\r
25 @param[in] Length The length of data buffer in bytes.\r
26\r
27 @retval EFI_SUCCESS The operation returns successfully.\r
28 @retval EFI_WRITE_PROTECTED The flash device is read only.\r
29 @retval EFI_UNSUPPORTED The flash device access is unsupported.\r
30 @retval EFI_INVALID_PARAMETER The input parameter is not valid.\r
31**/\r
32EFI_STATUS\r
33EFIAPI\r
34MicrocodeFlashWrite (\r
35 IN EFI_PHYSICAL_ADDRESS FlashAddress,\r
36 IN VOID *Buffer,\r
37 IN UINTN Length\r
38 )\r
39{\r
40 CopyMem((VOID *)(UINTN)(FlashAddress), Buffer, Length);\r
41 return EFI_SUCCESS;\r
42}\r