From patchwork Mon Apr 9 02:22:00 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ge Song X-Patchwork-Id: 896083 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40KDdb4CPjz9s5N for ; Mon, 9 Apr 2018 12:24:19 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="FGJkqZ9/"; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 40KDdb22lVzDrpX for ; Mon, 9 Apr 2018 12:24:19 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="FGJkqZ9/"; dkim-atps=neutral X-Original-To: petitboot@lists.ozlabs.org Delivered-To: petitboot@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gmail.com (client-ip=2607:f8b0:400e:c01::244; helo=mail-pl0-x244.google.com; envelope-from=songgebird@gmail.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="FGJkqZ9/"; dkim-atps=neutral Received: from mail-pl0-x244.google.com (mail-pl0-x244.google.com [IPv6:2607:f8b0:400e:c01::244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 40KDdR4tf3zDrpW for ; Mon, 9 Apr 2018 12:24:11 +1000 (AEST) Received: by mail-pl0-x244.google.com with SMTP id e22-v6so2464803plj.12 for ; Sun, 08 Apr 2018 19:24:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id; bh=j/p2TJ3AZGsLDvRAaIK6vkIN5+SWx131I5y0THi1bCU=; b=FGJkqZ9/dECYYAMC7P5ESC1EHdnCcj6OpaWj3v4HkdV6ejnUYr3OL8kuRviUe4ybc2 kZKE9MFCLVCVm7az9xeKwuLUIzAnykufutAlgJgLeUrSpsDjKu/MHBTk9zSUigFghAc1 D0MzSsUqGr7KztXLNQ2szO3GbyIah3PTBe7IbOlwE/fYr0wfv60KoKtIOPyL40+1hSCt A09hdVdZoBrkTDfEveUlqyRBIfJfQG4rQf1J9v4g3xem8+ioYsiAu2GY3Tx5eIsqNA5Y sX0fdCoYEzJrml2Mq6BFIi9qEdnRR1sUbj8U7cZoMR7oqiEPFhtwzggyKzdv+SGJNtAl FnQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id; bh=j/p2TJ3AZGsLDvRAaIK6vkIN5+SWx131I5y0THi1bCU=; b=WMinJUdP+NMnUlHbb7NiOSzffBW0N3qZmx/nhpTLm0clURBVj8jAUoWSPehWCc9W17 AzyU0kP+Y/kHEYKiqgJXMGC0XMrMUeRiOuV6cddBQSDhwk8DSMUGggqQznu68wZaP+2n 3AfpfVsdxtZ7mVKIJQxOAy/MQpGyrfVYr9FrtMUDkvrJbiGZvVZ6gRdXQwEbXWd6tNgE 3YP6zNc6ULViLGfwZhBVnW4lWB2veWDzRtJ+zXeapkWtaAEt3yYbq2zmUz+L6NhuT58u 9CRpReMMpZimXN2ao+d9V0AZ9VYDZHObwkqU9VUdtKxDX+5FVf+Z8rIlmROxMyVQalxW NyzA== X-Gm-Message-State: AElRT7HXR7c/G/97G476/efsdfM5I0SwEELHk0fOIF01ppOPPBlM13BR Cia15xZbuOwnhfEmf7q7vH9DOQ== X-Google-Smtp-Source: AIpwx4+1Ja6EBdtN7IjRiWM7ZaOVcK2qu+UxYMFBQk0BKUTNRbWtedjtFzDTGZ3poqObQHzBo4XHng== X-Received: by 2002:a17:902:76cb:: with SMTP id j11-v6mr35013008plt.117.1523240649495; Sun, 08 Apr 2018 19:24:09 -0700 (PDT) Received: from vbox.hxtcorp.net ([101.81.130.12]) by smtp.gmail.com with ESMTPSA id i127sm24587548pgc.12.2018.04.08.19.24.08 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 08 Apr 2018 19:24:09 -0700 (PDT) From: Ge Song X-Google-Original-From: Ge Song To: petitboot@lists.ozlabs.org Subject: [PATCH v2 0/2] Add support for arm64 efi-based platform Date: Mon, 9 Apr 2018 10:22:00 +0800 Message-Id: <20180409022202.16476-1-ge.song@hxt-semitech.com> X-Mailer: git-send-email 2.11.0 X-BeenThere: petitboot@lists.ozlabs.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: Petitboot bootloader development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: petitboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Petitboot" The patch provide support for platforms that adopt efi as their underlying firmware. Since on x86/x64 platforms, efi is the standard firmware and has well support from various devices. This extension seems unnecessary for these platforms. On arm64 servers, plenty of devices(especially for those bootable devices) cannot be supported from efi firmware. In this situation, linux&petitboot is the wonderful way to address the issue. Since efi is the primary firmware on arm64 servers, most of the management related works can be completed in that enviroment. Therefore some similar functions implemented in petitboot have been removed. --- Changes since V2: * Clean code style and revise some parts according to Geoff's suggestion. * Correct the mistake about copyright. * Add a test case for manipulating efi varibles Ge Song (2): lib: Support to deal with petitboot's configuration on efi-based platforms Platform: Add a platform definition which is suitable for arm64 Platform. discover/Makefile.am | 3 +- lib/Makefile.am | 2 + test/lib/Makefile.am | 3 +- lib/efi/efivar.h | 43 ++ discover/platform-arm64.c | 744 ++++++++++++++++++++ lib/efi/efivar.c | 179 +++++ test/lib/test-efivar.c | 68 ++ 7 files changed, 1040 insertions(+), 2 deletions(-) create mode 100644 lib/efi/efivar.h create mode 100644 discover/platform-arm64.c create mode 100644 lib/efi/efivar.c create mode 100644 test/lib/test-efivar.c