From 801ead7b6c4086a5375856e05ac3ad7d33cda08e Mon Sep 17 00:00:00 2001 From: wangyue Date: Sat, 18 Mar 2017 09:04:15 +0800 Subject: Hisilicon/FlashFvbDxe: Add Reset interface for block IO protocol Add Reset interface for block IO protocol to make it compliant with UEFI specification, or it will cause exception when the interface is called. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Heyi Guo Signed-off-by: Yi Li Signed-off-by: Chenhui Sun Reviewed-by: Leif Lindholm --- Chips/Hisilicon/Drivers/FlashFvbDxe/FlashFvbDxe.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Chips/Hisilicon/Drivers/FlashFvbDxe/FlashFvbDxe.c b/Chips/Hisilicon/Drivers/FlashFvbDxe/FlashFvbDxe.c index 544228a..7c6b64c 100644 --- a/Chips/Hisilicon/Drivers/FlashFvbDxe/FlashFvbDxe.c +++ b/Chips/Hisilicon/Drivers/FlashFvbDxe/FlashFvbDxe.c @@ -444,6 +444,18 @@ FvbGetBlockSize ( return Status; } +STATIC +EFI_STATUS +EFIAPI +FvbReset( + IN EFI_BLOCK_IO_PROTOCOL *This, + IN BOOLEAN ExtendedVerification +) +{ + return EFI_SUCCESS; +} + + /** Reads the specified number of bytes into a buffer from the specified block. @@ -921,6 +933,7 @@ FlashCreateInstance ( Instance->Size = FlashSize; Instance->BlockIoProtocol.Media = &Instance->Media; + Instance->BlockIoProtocol.Reset = FvbReset; Instance->Media.MediaId = MediaId; Instance->Media.BlockSize = BlockSize; Instance->Media.LastBlock = (FlashSize / BlockSize) - 1; -- cgit v1.2.3