From patchwork Sat Apr 1 11:29:15 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chenhui Sun X-Patchwork-Id: 96569 Delivered-To: patch@linaro.org Received: by 10.140.89.233 with SMTP id v96csp1124432qgd; Sat, 1 Apr 2017 04:36:15 -0700 (PDT) X-Received: by 10.55.147.131 with SMTP id v125mr6618999qkd.39.1491046575863; Sat, 01 Apr 2017 04:36:15 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id p19si968209qkp.175.2017.04.01.04.36.15; Sat, 01 Apr 2017 04:36:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linaro-uefi-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linaro-uefi-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=linaro-uefi-bounces@lists.linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 91BF3608C2; Sat, 1 Apr 2017 11:36:15 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 6305263664; Sat, 1 Apr 2017 11:34:55 +0000 (UTC) X-Original-To: linaro-uefi@lists.linaro.org Delivered-To: linaro-uefi@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 8AB2863660; Sat, 1 Apr 2017 11:34:50 +0000 (UTC) Received: from mail-pg0-f42.google.com (mail-pg0-f42.google.com [74.125.83.42]) by lists.linaro.org (Postfix) with ESMTPS id B115163665 for ; Sat, 1 Apr 2017 11:34:07 +0000 (UTC) Received: by mail-pg0-f42.google.com with SMTP id 21so89674772pgg.1 for ; Sat, 01 Apr 2017 04:34:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=lIiZhsC5RzlGqfctKZby81+3dEsaRK0rS283uhjAP3Q=; b=RZFzJEbeHihUL4KWVdAb/8ETDG481mlIwMT3Cgj/1gAENDOfamIDod5RxtgEHEDZi+ fAlF9f3OYmEBu88dInRzpZeITz6hQrtETHQWXwTuxkcOOr1zGcrvS2EZPCUqqC+JJZlF 13VksYUWo94SVuNNGQIqpozc5FbBTU+sSs0jqpF5bwCSt2Ox/OesShBz2gOPKl5GqvW8 XZxyqvXChvvnnv9GUQ8M957iLJRZ4s7oA7WLaf4B7rAA981pixvZk1YHm8FjWltl7vre El1EAyXi0lCRbo5/3JR+5fFknYsmdioEsUHpW8Eti53Jw7jpLVJWie90AP6F0lf0TrQB z9wg== X-Gm-Message-State: AFeK/H2jyS7CyVUAx5AvFDBVXBqOiGKRifpO1DJ0SZthWL3KRxfDn5ODAp2NWnq2rhQ/3XjNOTo= X-Received: by 10.98.155.149 with SMTP id e21mr7260582pfk.24.1491046446999; Sat, 01 Apr 2017 04:34:06 -0700 (PDT) Received: from localhost.localdomain ([119.145.15.121]) by smtp.gmail.com with ESMTPSA id a62sm15704868pgc.60.2017.04.01.04.34.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 01 Apr 2017 04:34:06 -0700 (PDT) From: Chenhui Sun To: leif.lindholm@linaro.org, linaro-uefi@lists.linaro.org, graeme.gregory@linaro.org Date: Sat, 1 Apr 2017 19:29:15 +0800 Message-Id: <1491046162-53797-11-git-send-email-chenhui.sun@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1491046162-53797-1-git-send-email-chenhui.sun@linaro.org> References: <1491046162-53797-1-git-send-email-chenhui.sun@linaro.org> Cc: Yi Li , Chenhui Sun , sunchenhui@huawei.com, wanghuiqiang@huawei.com Subject: [Linaro-uefi] [Linaro-uefi v2 10/17] Hisilicon/RamDisk: Add Reset interface for block IO protocol X-BeenThere: linaro-uefi@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: linaro-uefi-bounces@lists.linaro.org Sender: "Linaro-uefi" 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 --- 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);