From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933734AbbJANGN (ORCPT ); Thu, 1 Oct 2015 09:06:13 -0400 Received: from mga14.intel.com ([192.55.52.115]:56506 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933205AbbJANGK (ORCPT ); Thu, 1 Oct 2015 09:06:10 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.17,617,1437462000"; d="scan'208";a="655852342" From: "Kweh, Hock Leong" To: Matt Fleming , Greg Kroah-Hartman Cc: Ong Boon Leong , LKML , linux-efi@vger.kernel.org, Sam Protsenko , Peter Jones , Andy Lutomirski , Roy Franz , Borislav Petkov , James Bottomley , Linux FS Devel , "Kweh, Hock Leong" , Fleming Matt Subject: [PATCH v6 0/2] Enable capsule loader interface for efi firmware updating Date: Fri, 2 Oct 2015 05:05:52 +0800 Message-Id: <1443733554-22743-1-git-send-email-hock.leong.kweh@intel.com> X-Mailer: git-send-email 1.7.9.5 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: "Kweh, Hock Leong" Dear maintainers & communities, This patchset is created on top of Matt's patchset: 1.)https://lkml.org/lkml/2014/10/7/390 "[PATCH 1/2] efi: Move efi_status_to_err() to efi.h" 2.)https://lkml.org/lkml/2014/10/7/391 "[PATCH 2/2] efi: Capsule update support" It expose a misc char interface for user to upload the capsule binary and calling efi_capsule_update() API to pass the binary to EFI firmware. The steps to update efi firmware are: 1.) cat firmware.cap > /dev/efi_capsule_loader 2.) reboot Any failed upload error message will be returned while doing "cat" through Write() function call. Tested the code with Intel Quark Galileo platform. Thanks. --- changelog v6: * clean up on error handling for better code flow and review * clean up on pr_err() for critical error only * design taking care writing block that below PAGE_SIZE * once error has occurred, design will return -EIO until file close * document design expectations/scenarios in the code * change the dynamic allocation cap_info struct to statically allocated changelog v5: * changed to new design without leveraging firmware_class API * use misc_char device interface instead of sysfs * error return through file Write() function call Kweh, Hock Leong (2): efi: export efi_capsule_supported() function symbol efi: a misc char interface for user to update efi firmware drivers/firmware/efi/Kconfig | 10 ++ drivers/firmware/efi/Makefile | 1 drivers/firmware/efi/capsule.c | 1 drivers/firmware/efi/efi-capsule-loader.c | 246 +++++++++++++++++++++++++++++ 4 files changed, 258 insertions(+) create mode 100644 drivers/firmware/efi/efi-capsule-loader.c -- 1.7.9.5