From patchwork Fri Dec 14 10:10:37 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 153796 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp1874681ljp; Fri, 14 Dec 2018 02:07:33 -0800 (PST) X-Google-Smtp-Source: AFSGD/Ul/r99nRsBs/WDZiC6N7sP50xlco3AaPo5atUHL2f53Sub9Wy/bm7kIqG2VqumInW+q25n X-Received: by 2002:a17:906:4003:: with SMTP id v3-v6mr2007267ejj.240.1544782053914; Fri, 14 Dec 2018 02:07:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544782053; cv=none; d=google.com; s=arc-20160816; b=dQn7sJ+czvemykyC6aOsyXNHBHNPTyBrqUTvaxGuwUk3Lga2+R1WwbwQqwQuNERuOI MUscxYqLlKV6zvx8NMskRyJe49gQ8zbYo3YT7MLb17vjNz51esDPvLmTrIYF7IsLdJpi KNfVuXZtANU7x7KnaUO0CA/HxAdSWDyQo/O8ia5ziR7pkv+hZIH7znwVHHQqH0xi/8jw rhVH8QP2nt8L4+dILv9QmwlTdSlM2YxzzGvORoVzWNA39bka0nTWkt8NmGC0ZyZqE/uz teoxDhKjCaNxP1tOZawFBfa49lzDdGXe8H42iOCddYrsfaHCdho3fveYdZ2W19xcnb5/ 6QXw== 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=kS7l4rJZX2JH201NpOLkWk6Hlz2LvCq6Vbvr+SysQY0=; b=b1z5gdtWrTAyRpo+MxYMaJdtDfJ5bQYsq/+GhJAJMgBpx3oY61ARSlo5bSSHLPhYxR gN1s21Z5p5b3KKRtWDmiKgx91a4bLXsj+nJ2l4Zh33t8SwN9bwiIM2uZYOnvw3JkFHBG m5/Lj/FYyogdPsdb6OYhxgap+BIJNcaPfyWivaqyXASUbLLw2treNu0uaO5GXS8eBA2W yOZS+Pko3noMtAF87gn15+Rq3mTw0YWf/sdT/xOQfBICrH2Jkw1yiPIxkkrWSOVD7xPD aNGd+iODhXQCR1buwnemN42q0JnPrNDHD2RYiGML1U0ZouDnOXXu6B7EvdMVxsJes12G vacA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=Prbsk8K2; 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 s8-v6si1036573eja.42.2018.12.14.02.07.33; Fri, 14 Dec 2018 02:07:33 -0800 (PST) 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=Prbsk8K2; 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 7457AC225C8; Fri, 14 Dec 2018 10:07:31 +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_H3, RCVD_IN_MSPIKE_WL, 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 8D273C21F8A; Fri, 14 Dec 2018 10:07:29 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 2EAD4C21F8A; Fri, 14 Dec 2018 10:07:28 +0000 (UTC) Received: from mail-yw1-f65.google.com (mail-yw1-f65.google.com [209.85.161.65]) by lists.denx.de (Postfix) with ESMTPS id 942C6C21F49 for ; Fri, 14 Dec 2018 10:07:27 +0000 (UTC) Received: by mail-yw1-f65.google.com with SMTP id j6so2051911ywj.6 for ; Fri, 14 Dec 2018 02:07:27 -0800 (PST) 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=5IGWp4KftsXs+/gNP6JXJ1r0kNLjypiDaMWMNL7C1mE=; b=Prbsk8K2qWFJF4n6V0xEw2T4GFLRbujYyv5Bb+mzP8ikd/bMruFQM7fdAXEkd8T5L1 6G5BZ6l5KcFAbORQ2UQlpqfxJL3MTya/5aTxMydbVatO/cHyFYz54drtch/bKjRh2eZv hd4h5mOgBPoSzs03tedZUKFPLVwQfH6RZ5+Jc= 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=5IGWp4KftsXs+/gNP6JXJ1r0kNLjypiDaMWMNL7C1mE=; b=bH3y8vsq6dnji2gGekEJStTfVNP84H4xdJZlOL6tOOSQXjHC9pn/uyJzHJlbHz7muE j2gt1boag9BBjPTux1LozyLbXrxEalD5Psldmpx1WjjTv4YOIBkX3NuKr4Sknl+BF+PD SrzxmpGFuAfd3iSjWG7k3yGzZS1f3zYZhXaWc9E4hrUFXghftkOSgVSh+ShEpM58BAvK T+8JfDaoZXPKC6apA5ZmFys7vUN1ZWjltFIeocHEIFle7PBQ1qJxfaQpmeVmPQuBCBZS 9PTprJxbBjwpjeeDcyB/QlVEEfN/Xv9i9GSDvHzFXCP21DnnjkYsBtIo6N4qJAHgYDKY nJlw== X-Gm-Message-State: AA+aEWYG71zWCHsYll/aQZo3cfDzwcTSVmKzkJiAqwdcX2iBijVTknde 0WgeCkxRBALOCyGtvWR6vGPveQ== X-Received: by 2002:a81:ac56:: with SMTP id z22mr2401982ywj.40.1544782046217; Fri, 14 Dec 2018 02:07:26 -0800 (PST) Received: from linaro.org ([121.95.100.191]) by smtp.googlemail.com with ESMTPSA id v128sm705434ywf.44.2018.12.14.02.07.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 14 Dec 2018 02:07:25 -0800 (PST) From: AKASHI Takahiro To: trini@konsulko.com, agraf@suse.de, xypron.glpk@gmx.de Date: Fri, 14 Dec 2018 19:10:37 +0900 Message-Id: <20181214101043.14067-1-takahiro.akashi@linaro.org> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 Cc: u-boot@lists.denx.de Subject: [U-Boot] [RESEND PATCH v2 0/6] subject: 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. # Please note that a bunch of warnings are generated by checkpatch.pl, # but there are also good reasons for not fixing them. Concerns (if any): * missing features (see the commit log of patch#2) * unaligned access to *packed* structure in a package list should be cared? Changes in v2 (Nov 16, 2018) * add some descriptions to newly added functions * rename EFI_HII_PACKAGE_[TYPE|LEN]_* to __EFI_HII_PACKAGE_[TYPE|LEN]_* as they are of internal use only * cast a return value (of efi_status_t) to "unsigned int" for printing [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 | 23 + include/efi_api.h | 419 +++++++++ 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 | 1046 +++++++++++++++++++++ lib/efi_selftest/efi_selftest_hii_data.c | 452 ++++++++++ 11 files changed, 3196 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