From patchwork Sat Apr 1 11:29:14 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chenhui Sun X-Patchwork-Id: 96568 Delivered-To: patch@linaro.org Received: by 10.140.89.233 with SMTP id v96csp1124348qgd; Sat, 1 Apr 2017 04:35:59 -0700 (PDT) X-Received: by 10.55.141.5 with SMTP id p5mr6651593qkd.322.1491046559708; Sat, 01 Apr 2017 04:35:59 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id g17si7164008qta.51.2017.04.01.04.35.59; Sat, 01 Apr 2017 04:35:59 -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 67E7F60747; Sat, 1 Apr 2017 11:35:59 +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_H2, 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 3F3B563662; Sat, 1 Apr 2017 11:34:53 +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 6AD8F6365F; Sat, 1 Apr 2017 11:34:48 +0000 (UTC) Received: from mail-pf0-f172.google.com (mail-pf0-f172.google.com [209.85.192.172]) by lists.linaro.org (Postfix) with ESMTPS id A1A5263661 for ; Sat, 1 Apr 2017 11:34:02 +0000 (UTC) Received: by mail-pf0-f172.google.com with SMTP id s16so15305541pfs.0 for ; Sat, 01 Apr 2017 04:34:02 -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=QqtXZGao5cAKWmnAZZmVsadiA2cL5pWz8z1VcKO/kLQ=; b=n+yL8zhpgdg5M6q1LWE7mcUucvkcerpTEhExNrH+V10geqlV54JK72qTWMkxqrrkiT WU+5DsrMA9E42DDrWx1oKw6+yf5LCEBzXaehz4nXh8/ExT66dfwcV6wQv8zgRYO9xaFM EC60KiXeSds8oRJdt5Mewn1yggEi3O+EdLNKDS6KBHN2pddUsBLushEen2ofxiFL4ttL VLfZWm93El/FHkM9MUFtuJm/Hmf46zQEsDObCvHhH8R7B1joMCWwoQLeyTY4OC1Jp5oF 5Z+5PHZN+jinZQ/CzRxhhbcPSElWUX2SjWqvkftS7aAUGqcr5kq+iBXtErNgfxgBTFun TzZQ== X-Gm-Message-State: AFeK/H2yorqari1QFxOLJY9PnC6p6xSdOLabkVuxPL9aw4i9npg3AkoowSPJdVu4DoQdK7sG1Nc= X-Received: by 10.99.127.29 with SMTP id a29mr7504862pgd.11.1491046441978; Sat, 01 Apr 2017 04:34:01 -0700 (PDT) Received: from localhost.localdomain ([119.145.15.121]) by smtp.gmail.com with ESMTPSA id a62sm15704868pgc.60.2017.04.01.04.33.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 01 Apr 2017 04:34:01 -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:14 +0800 Message-Id: <1491046162-53797-10-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 09/17] Hisilicon/FlashFvbDxe: 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 --- 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;