]> git.proxmox.com Git - mirror_edk2.git/blame - IntelSiliconPkg/Feature/Capsule/Library/MicrocodeFlashAccessLibNull/MicrocodeFlashAccessLibNull.c
IntelSiliconPkg: Replace BSD License with BSD+Patent License
[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
8f7a05e1 5 SPDX-License-Identifier: BSD-2-Clause-Patent\r
c7829aa0
JY
6\r
7**/\r
8\r
9#include <PiDxe.h>\r
10\r
11#include <Library/BaseMemoryLib.h>\r
12#include <Library/MicrocodeFlashAccessLib.h>\r
13\r
14/**\r
15 Perform microcode write opreation.\r
16\r
17 @param[in] FlashAddress The address of flash device to be accessed.\r
18 @param[in] Buffer The pointer to the data buffer.\r
19 @param[in] Length The length of data buffer in bytes.\r
20\r
21 @retval EFI_SUCCESS The operation returns successfully.\r
22 @retval EFI_WRITE_PROTECTED The flash device is read only.\r
23 @retval EFI_UNSUPPORTED The flash device access is unsupported.\r
24 @retval EFI_INVALID_PARAMETER The input parameter is not valid.\r
25**/\r
26EFI_STATUS\r
27EFIAPI\r
28MicrocodeFlashWrite (\r
29 IN EFI_PHYSICAL_ADDRESS FlashAddress,\r
30 IN VOID *Buffer,\r
31 IN UINTN Length\r
32 )\r
33{\r
34 CopyMem((VOID *)(UINTN)(FlashAddress), Buffer, Length);\r
35 return EFI_SUCCESS;\r
36}\r