From patchwork Thu Nov 1 04:40:33 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 149922 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp344204ljp; Wed, 31 Oct 2018 21:38:43 -0700 (PDT) X-Google-Smtp-Source: AJdET5d6pyT52SXg+OMAmB6wxA5jkbzcgMll2B3XYGX1eQ0S0g8QGhtnCImJ9bD2QH4vdfaWFSpK X-Received: by 2002:a17:906:a4b:: with SMTP id x11-v6mr3061771ejf.27.1541047123422; Wed, 31 Oct 2018 21:38:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1541047123; cv=none; d=google.com; s=arc-20160816; b=fx8Py75Z4tW5Bi2h5Ft3j2faYo7JJTk0sVdLgy9zrrmvjwFHKkhhgVKB6wrqo/8jd7 +AZJHgz3KXfPABwWUamsAxmZ7vOBIeru3qel6pXTcYhXV+7DFAz4TUruh7/Y1LFOXJq/ ZbKTBk7L0kZa/QXjsUIHqYu7zXsLXmEsWaZbDbLWqtweSdel1yoHW/mkqlJgXlls6yYG n9vO/Sdn4bnc99KwZIRR3YeWLmb0ludnPXArILqPdWLFgXmW9U59YFjgzLKaULBnYdOv w4iKNdLDYOPL2oYHz8xfKeN3NXL8l7nU+Bu04ZjR8Q/C/kMLRH0SRa3/IqoFi24c0o8c APtg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :cc:mime-version:message-id:date:to:from:dkim-signature; bh=wjNBYXhXktpTHXKan3XVRcX2iAl9F2XEQ3qJjzunTuw=; b=I1BAiqJXaPc/EVz+t30y3XRVxVww3g7/bullVhYgj/KfeYlhZM3DVzRQ9hZEBLuUNY l+3fpPFid1r38vMANS1+qbLQWJv84CVvKOeTlr81iLrMDH8ppWEDWdDMLKdt508gH3Ts a7YX51qfGIknXXF7sO0j/zCoslpMUy/+f3sPLnGI61NKQ2yf2aA8XOYVLwVevOyFISYH eSdNhQylhTRcLQ8As20/pYl7pdTFn5/BeJvaynqnQTVHPLFrKvMtDAkeEDMrfw3XkFa8 3IhDZo/W3me6jAoGmzDL5TBiwgE/sATbSyDtqmUoOjvP+k9f6pjcBeVzGy1kAVVAbcqJ MDOQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=PFXhlX17; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.denx.de (dione.denx.de. [81.169.180.215]) by mx.google.com with ESMTP id w11-v6si4174706edu.214.2018.10.31.21.38.42; Wed, 31 Oct 2018 21:38:43 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) client-ip=81.169.180.215; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=PFXhlX17; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: by lists.denx.de (Postfix, from userid 105) id 8D17FC222F3; Thu, 1 Nov 2018 04:38:39 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_IN_MSPIKE_H2, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id BA464C222D9; Thu, 1 Nov 2018 04:38:37 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 74437C222D9; Thu, 1 Nov 2018 04:38:36 +0000 (UTC) Received: from mail-yw1-f68.google.com (mail-yw1-f68.google.com [209.85.161.68]) by lists.denx.de (Postfix) with ESMTPS id E0D1BC22045 for ; Thu, 1 Nov 2018 04:38:35 +0000 (UTC) Received: by mail-yw1-f68.google.com with SMTP id f192-v6so5817935ywh.7 for ; Wed, 31 Oct 2018 21:38:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=QnpYK87FhRgPs1Qwl4pRpDDqXOUSDhpuhVljb0fS0Ms=; b=PFXhlX17vt6K3N4b7VAgSmnWkgaU5VT5no/9gup5YK8buHYscaj3jejTBXpl6eZmyO gAItOygvOSQOq/s8qRcOhY3dvgvDGjLRFCK0YwVISjUYpfxBt8IO3PkFeEUPEgPhDIZ6 pDE+0KJA48gv6q07tBhFl45KfsXAI/sSlCPB4= 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:mime-version :content-transfer-encoding; bh=QnpYK87FhRgPs1Qwl4pRpDDqXOUSDhpuhVljb0fS0Ms=; b=EvUG0bBgvK6qa/p2BzuB/+gYVuJ2tcm+NjOxoCGty8p18e6drJucTv5oc+3VRzukjm CPBHgQWi1BuYlA7MKA2e/2ARVEV0q429HOL9eudkT9ir2xBS90h1lAfsuaCLlUric0U+ F4V2ZT5X8E/C29YOZ2FAKYav53kb7zqV7OORuC+hOZJv+ASRq5MV4qsTENrNCuN+Xs0t NPalv61xQAgfvDWDex5Aolh4SoNlCoLwV46w8IzXonXAmyq+UUzrPi/F4EO9jM5OQka8 WPEfr/gD1UGLpWWQBz3wW9uyZLBVREXAYsqQWS25RVFANBEfqrlXX5CRb5To4LeeRWNL BsVA== X-Gm-Message-State: AGRZ1gL2VuN6IlHQj/1+rE0KsfKU5Ba1cf5jRqeYZ4s+QCdQQ8dBYpN+ RkEFq0qJjWxAE2zCwujHKbs9qA== X-Received: by 2002:a81:1f43:: with SMTP id f64-v6mr6059793ywf.216.1541047114531; Wed, 31 Oct 2018 21:38:34 -0700 (PDT) Received: from linaro.org ([121.95.100.191]) by smtp.googlemail.com with ESMTPSA id u67-v6sm6514927ywd.14.2018.10.31.21.38.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 31 Oct 2018 21:38:33 -0700 (PDT) From: AKASHI Takahiro To: trini@konsulko.com, agraf@suse.de Date: Thu, 1 Nov 2018 13:40:33 +0900 Message-Id: <20181101044039.19755-1-takahiro.akashi@linaro.org> X-Mailer: git-send-email 2.19.0 MIME-Version: 1.0 Cc: xypron.glpk@gmx.de, u-boot@lists.denx.de Subject: [U-Boot] [PATCH 0/6] efi_loader: add HII database protocol X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" HII database protocol is the last missing (major?) piece of code so that we can run unmodified EDKII's shell and UEFI SCT on EFI-enabled u-boot. The original code was initially written by Leif and Rob a year ago[1], and now I'm reworking it. The implementation has not been much enhanced from the original, but I tried to give it clearer implementation to be able to add more functionality easily later on. I also addressed the comments by Alex[2] and added a self test on request of Heinrich. HII configuration routing protocol and access protocol have only a skeleton and should be implemented when we need to have *drivers* that require configuration mechanism. Concerns (if any): * missing features (see the commit log of patch#2) * unaligned access to *packed* structure in a package list should be cared? [1] https://lists.denx.de/pipermail/u-boot/2017-October/308999.html [2] https://lists.denx.de/pipermail/u-boot/2017-October/309116.html AKASHI Takahiro (4): efi: hii: add guid package support efi: hii: add keyboard layout package support efi: hii: add HII config routing/access protocols efi_selftest: add HII database protocols test Akashi, Takahiro (1): lib: add u16_strcpy/strdup functions Leif Lindholm (1): efi_loader: Initial HII database protocols include/charset.h | 18 + include/efi_api.h | 410 +++++++++ include/efi_loader.h | 8 + lib/charset.c | 29 + lib/efi_loader/Makefile | 1 + lib/efi_loader/efi_boottime.c | 18 + lib/efi_loader/efi_hii.c | 1053 ++++++++++++++++++++++ lib/efi_loader/efi_hii_config.c | 146 +++ lib/efi_selftest/Makefile | 1 + lib/efi_selftest/efi_selftest_hii.c | 882 ++++++++++++++++++ lib/efi_selftest/efi_selftest_hii_data.c | 450 +++++++++ 11 files changed, 3016 insertions(+) create mode 100644 lib/efi_loader/efi_hii.c create mode 100644 lib/efi_loader/efi_hii_config.c create mode 100644 lib/efi_selftest/efi_selftest_hii.c create mode 100644 lib/efi_selftest/efi_selftest_hii_data.c