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