From patchwork Fri Nov 16 01:18:31 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 151264 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp7714676ljp; Thu, 15 Nov 2018 17:16:33 -0800 (PST) X-Google-Smtp-Source: AJdET5emPN6U3DDtYvfTwKA/Gfwv+pdK17OhV21r1L5zbftFm7PxyuwoYFpiYED70VvtphkiWSrl X-Received: by 2002:a50:b243:: with SMTP id o61-v6mr7682552edd.109.1542330993815; Thu, 15 Nov 2018 17:16:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542330993; cv=none; d=google.com; s=arc-20160816; b=X2Db5hfUnDjVDRDeXU3e0RzUFQ+J0ju34JxtmhTrT2vm8g90CCMv7YLGKHz4CC/f7w JzlC4Elr6MasndaGQGkIb/TIVvyc4CGpUqCgeY7/UrnkbITrAZdKZwzlzpmiTCcq3RrB 92R6x3kX4eF5b4+HCLdZzfEg57iwjBcqUWKmeVwLAUTs7M/786v9sqtYjs3X4PsP93R6 f/n0UMf64AVycf8OepT1jIrFZ/nNHE8iYXh73KKlcBN6ty+6eD3DFA8tIwt95L4ORkvi uDpZ9BI0XiOpEJrpli4W+XkR3da3oB0G0j349rFS8be/TJ5cjChu7ZmaGIEUgwm5pkPh o/+w== 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=ICBkCeCdHqBChz5GzSmcKpAgNND+3qBt9tUlrJVxofI=; b=AJQehjUF/9Iqu5n88By7DxHEBHBSVbNlEx288U3VObke5IO8uftI0lvlhfv9qHAvRF RSBZhtxC9qRgUCqkI2QM05HpI4GgNQKiM8FfNJNjWpl4oZvz31kYb/RketkQlbYG1jpN T3cm2aTrfBWLIWwj503yydamgsUBQVr/NbVfQ0AdEql+vM6Apa3pSgmuH0efl71SEoaT mgprD54Em984XKYfVXzIVhIfeh+kW3kYPr3CSHuPlsEo+5Q348++EJtDqk+leb9JjuuF JLvtxzoofdZxqfYSuev7OHEs2lcmdFeI9uk8qB4XKo05YdRNN8Z8e1Ja1wwu2PKeWMit mjsg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=JSo7jYcY; 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 n26si398060edd.409.2018.11.15.17.16.33; Thu, 15 Nov 2018 17:16: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=JSo7jYcY; 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 0A626C22242; Fri, 16 Nov 2018 01:16:29 +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 248E8C21FBF; Fri, 16 Nov 2018 01:16:28 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 487BEC21FBF; Fri, 16 Nov 2018 01:16:27 +0000 (UTC) Received: from mail-yw1-f67.google.com (mail-yw1-f67.google.com [209.85.161.67]) by lists.denx.de (Postfix) with ESMTPS id BB11DC21F97 for ; Fri, 16 Nov 2018 01:16:26 +0000 (UTC) Received: by mail-yw1-f67.google.com with SMTP id k6-v6so9454322ywa.11 for ; Thu, 15 Nov 2018 17:16:26 -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=PflLYDdTxN5l0RcXZ9hrDEWLz/yZES23CpB7qFilGOk=; b=JSo7jYcYgNlpNc5IexqLcZpC9D9Y1L+CKlwKYIR1kdZTY2usek2+x8PqNr+8GPFQY7 WiuG11N1cEhfnNarDKvPBvxdC+ls0zar5sIjkLaxKH8/GpM+URG6D0us3rnHxuB8/1uA x2I66+TSpc8MCfrJ5LH0GdjjFmS0znBiR/pYQ= 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=PflLYDdTxN5l0RcXZ9hrDEWLz/yZES23CpB7qFilGOk=; b=YyZJ5XZnezPQghUvsqePm3oIOvwYEZPADMPwONMP0GWPS3EzzXQ4LrNVBq07+rIbQO zWZP5uOTsBzJFVhmNkq3+Pqso96HWewCPRPVY18ByKiCbD8GyzDUqeYQEfwdIjf0434/ /87PO0cCvLiZWrFv/7Nl4okJfaQmDoiPvehnlIShAiTUxA0rL/Uoan1XWmsXSghVPjmy lM1UnUXR6s5sODJ2CpO7xZb71FTHQimKw5ifxJCSFiOo6G3tuH6zXh3Dz/GBIK2Ji3ra KCCIGxbAWw95WNTv9r+s4uWpBG//Qnjx+R/x8u9mrtttY3HsRDpFPfeVeRbsB4F0vT+9 8xqQ== X-Gm-Message-State: AGRZ1gISq19WR8z15JNEG1GBtAhArHzvrJrydwEqn/Wq0/RRBJq94g5s iuJs4LNJNUTeb6zXC991S0NEpw== X-Received: by 2002:a81:39d5:: with SMTP id g204-v6mr8362069ywa.408.1542330985400; Thu, 15 Nov 2018 17:16:25 -0800 (PST) Received: from linaro.org ([121.95.100.191]) by smtp.googlemail.com with ESMTPSA id 79-v6sm7664138ywr.13.2018.11.15.17.16.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 15 Nov 2018 17:16:24 -0800 (PST) From: AKASHI Takahiro To: trini@konsulko.com, agraf@suse.de Date: Fri, 16 Nov 2018 10:18:31 +0900 Message-Id: <20181116011837.27542-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 v2 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. # 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