Message ID | 1491046162-53797-11-git-send-email-chenhui.sun@linaro.org |
---|---|
State | New |
Headers | show |
Series | D03/D05 platforms bug fix | expand |
On Sat, Apr 01, 2017 at 07:29:15PM +0800, Chenhui Sun wrote: > 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 <heyi.guo@linaro.org> > Signed-off-by: Yi Li <phoenix.liyi@huawei.com> > Signed-off-by: Chenhui Sun <chenhui.sun@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org> Pushed. > --- > Drivers/Block/ramdisk/ramdisk.c | 13 +++++++++++++ > 1 file changed, 13 insertions(+) > > diff --git a/Drivers/Block/ramdisk/ramdisk.c b/Drivers/Block/ramdisk/ramdisk.c > index 21e090b..1403018 100644 > --- a/Drivers/Block/ramdisk/ramdisk.c > +++ b/Drivers/Block/ramdisk/ramdisk.c > @@ -200,6 +200,18 @@ UINT8 TestSize(UINT32 ts) > > EFI_SYSTEM_TABLE BackupSystemTable; > > +STATIC > +EFI_STATUS > +EFIAPI > +RamDiskReset( > + IN EFI_BLOCK_IO_PROTOCOL *This, > + IN BOOLEAN ExtendedVerification > +) > +{ > + return EFI_SUCCESS; > +} > + > + > /* > * Entry point for RamDisk driver. > */ > @@ -274,6 +286,7 @@ EFI_STATUS InitializeRamDiskDriver( > RamDiskDev->BlkIo.ReadBlocks = RamDiskReadBlocks; > RamDiskDev->BlkIo.WriteBlocks = RamDiskWriteBlocks; > RamDiskDev->BlkIo.FlushBlocks = RamDiskFlushBlocks; > + RamDiskDev->BlkIo.Reset = RamDiskReset; > > RamDiskDev->DevicePath = DuplicateDevicePath((EFI_DEVICE_PATH*)&RamDiskDevicePath); > > -- > 1.9.1 >
diff --git a/Drivers/Block/ramdisk/ramdisk.c b/Drivers/Block/ramdisk/ramdisk.c index 21e090b..1403018 100644 --- a/Drivers/Block/ramdisk/ramdisk.c +++ b/Drivers/Block/ramdisk/ramdisk.c @@ -200,6 +200,18 @@ UINT8 TestSize(UINT32 ts) EFI_SYSTEM_TABLE BackupSystemTable; +STATIC +EFI_STATUS +EFIAPI +RamDiskReset( + IN EFI_BLOCK_IO_PROTOCOL *This, + IN BOOLEAN ExtendedVerification +) +{ + return EFI_SUCCESS; +} + + /* * Entry point for RamDisk driver. */ @@ -274,6 +286,7 @@ EFI_STATUS InitializeRamDiskDriver( RamDiskDev->BlkIo.ReadBlocks = RamDiskReadBlocks; RamDiskDev->BlkIo.WriteBlocks = RamDiskWriteBlocks; RamDiskDev->BlkIo.FlushBlocks = RamDiskFlushBlocks; + RamDiskDev->BlkIo.Reset = RamDiskReset; RamDiskDev->DevicePath = DuplicateDevicePath((EFI_DEVICE_PATH*)&RamDiskDevicePath);