3 Copyright (c) 2004 - 2016, Intel Corporation. All rights reserved.<BR>
5 This program and the accompanying materials are licensed and made available under
6 the terms and conditions of the BSD License that accompanies this distribution.
7 The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php.
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
19 #include <Library/FlashDeviceLib.h>
20 #include <Library/DebugLib.h>
21 #include <Library/BaseLib.h>
22 #include <Library/UefiBootServicesTableLib.h>
23 #include <Library/BaseMemoryLib.h>
24 #include "SpiChipDefinitions.h"
26 extern UINTN FlashDeviceBase
;
28 extern EFI_SPI_PROTOCOL
*mSpiProtocol
;
31 The library constructuor.
33 The function does the necessary initialization work for this library
34 instance. Please put all initialization works in it.
36 @param[in] ImageHandle The firmware allocated handle for the UEFI image.
37 @param[in] SystemTable A pointer to the EFI system table.
39 @retval EFI_SUCCESS The function always return EFI_SUCCESS for now.
40 It will ASSERT on error for debug version.
41 @retval EFI_ERROR Please reference LocateProtocol for error code details.
46 LibFvbFlashDeviceSupportInit (
47 IN EFI_HANDLE ImageHandle
,
48 IN EFI_SYSTEM_TABLE
*SystemTable
52 Status
= gBS
->LocateProtocol (
55 (VOID
**)&mSpiProtocol
57 ASSERT_EFI_ERROR (Status
);
58 // There is no need to call Init, because Runtime or SMM FVB already does that.
59 DEBUG((EFI_D_ERROR
, "LibFvbFlashDeviceSupportInit - no init\n"));