From patchwork Tue Mar 17 02:12:35 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 1255987 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=rJh3xQQX; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48hGsd3VYCz9sPF for ; Tue, 17 Mar 2020 13:12:53 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id B55D0818C7; Tue, 17 Mar 2020 03:12:39 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="rJh3xQQX"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 0957081915; Tue, 17 Mar 2020 03:12:27 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pf1-x441.google.com (mail-pf1-x441.google.com [IPv6:2607:f8b0:4864:20::441]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 0BD4E81915 for ; Tue, 17 Mar 2020 03:12:21 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=takahiro.akashi@linaro.org Received: by mail-pf1-x441.google.com with SMTP id d25so3031795pfn.6 for ; Mon, 16 Mar 2020 19:12:20 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=GA+p3fZ4j/59RBZM3JsheJYNrmN+Mkjqi5gFXxf8PRQ=; b=rJh3xQQX6Z7PmKOcG6cEvu3oBks2/axvIpfu6anZmdM0/D55MzekoYQ5hjssCwT/SQ kcNNO1PQ5H+fJWsubc9gnVvOno4J08IePFL5GSyXaQ6/uX2KSlejgOK758vE1UywMbvw r9zNBsOJx2fgM07JQPPnqaoL7hybFlWNhr5TnozTO+lfjRpJYF3Rh51j9Q1nguql25q5 UR5F9WkJ+yaTn0aRpqfp4ZP2hBS35amt/i7Z/HBLUKzSwmrrMXJ47TDK0jPPzBownI/D 1I3+SDNBSpjkzsg50k09JEowihLlzZftI0IvDbCHy7CMUaKbnhk5u9JFbPgtsO9Gz7iN Es2Q== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=GA+p3fZ4j/59RBZM3JsheJYNrmN+Mkjqi5gFXxf8PRQ=; b=LpkTZi/x0SvTH7RGYwlbE7M0JRsBdb0ZJegtzH0KTIlutBNJuYeKZX+8Zbv8COUwMe k5pmx00HRD0me8j8i8EbhF9vQBbw1yOFJWTihbj2jPBM+XpMryNmvYr/H8wBMzNFS4Vl jKqUZ9o5ZzpjO+mcNf5X8TBlUapbUkXnztI7JsSVo0UjzvKIUup/CorG4v3atxOsAh8A Xgg0gevk2JHqJsmuesZXBJtMFw56ZBHkJqX9s8YNFs8x8GtcqoHMR0/tqPORhSxrr6pp sJUvsJ2vL7jMnKp+ezN8barUfceikvyLFnfXDcjWVFG3m4TRj9BMinv9wzrQJTrC89Jg No5A== X-Gm-Message-State: ANhLgQ1hJINbdDA3vPx2G9n83QdPhnXHFx37u7Qjf5MLyDsIHbn2EDRR Nd1bxZ0uav03Rw3FdHwuHaEDGw== X-Google-Smtp-Source: ADFU+vt7Qj7QYPRbxnDH4OCM0FJHAcv7onIZYMcFme4dOsggC4CNd3Z7mUO4XA6PJOdm9pxCNrO3DQ== X-Received: by 2002:aa7:94a5:: with SMTP id a5mr2735806pfl.67.1584411139552; Mon, 16 Mar 2020 19:12:19 -0700 (PDT) Received: from linaro.org ([121.95.100.191]) by smtp.googlemail.com with ESMTPSA id x9sm1076796pfa.60.2020.03.16.19.12.18 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 16 Mar 2020 19:12:18 -0700 (PDT) From: AKASHI Takahiro To: xypron.glpk@gmx.de, agraf@csgraf.de Cc: ilias.apalodimas@linaro.org, sughosh.ganu@linaro.org, u-boot@lists.denx.de Subject: [RFC 02/14] efi_loader: define System Resource Table macros Date: Tue, 17 Mar 2020 11:12:35 +0900 Message-Id: <20200317021247.5849-3-takahiro.akashi@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200317021247.5849-1-takahiro.akashi@linaro.org> References: <20200317021247.5849-1-takahiro.akashi@linaro.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.30rc1 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" X-Virus-Scanned: clamav-milter 0.102.2 at phobos.denx.de X-Virus-Status: Clean Some of those values will be used in an implementation of UEFI firmware management protocol as part of my capsule update patch. Signed-off-by: AKASHI Takahiro Reviewed-by: Heinrich Schuchardt --- include/efi_api.h | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/include/efi_api.h b/include/efi_api.h index 73c0722b0168..a99cc7acc475 100644 --- a/include/efi_api.h +++ b/include/efi_api.h @@ -1627,4 +1627,31 @@ struct efi_unicode_collation_protocol { #define LOAD_OPTION_CATEGORY_BOOT 0x00000000 #define LOAD_OPTION_CATEGORY_APP 0x00000100 +/* + * System Resource Table + */ +/* Firmware Type Definitions */ +#define ESRT_FW_TYPE_UNKNOWN 0x00000000 +#define ESRT_FW_TYPE_SYSTEMFIRMWARE 0x00000001 +#define ESRT_FW_TYPE_DEVICEFIRMWARE 0x00000002 +#define ESRT_FW_TYPE_UEFIDRIVER 0x00000003 + +/* Last Attempt Status Values */ +#define LAST_ATTEMPT_STATUS_SUCCESS 0x00000000 +#define LAST_ATTEMPT_STATUS_ERROR_UNSUCCESSFUL 0x00000001 +#define LAST_ATTEMPT_STATUS_ERROR_INSUFFICIENT_RESOURCES 0x00000002 +#define LAST_ATTEMPT_STATUS_ERROR_INCORRECT_VERSION 0x00000003 +#define LAST_ATTEMPT_STATUS_ERROR_INVALID_FORMAT 0x00000004 +#define LAST_ATTEMPT_STATUS_ERROR_AUTH_ERROR 0x00000005 +#define LAST_ATTEMPT_STATUS_ERROR_PWR_EVT_AC 0x00000006 +#define LAST_ATTEMPT_STATUS_ERROR_PWR_EVT_BATT 0x00000007 +#define LAST_ATTEMPT_STATUS_ERROR_UNSATISFIED_DEPENDENCIES 0x00000008 + +/* + * The LastAttemptStatus values of 0x1000 - 0x4000 are reserved for vendor + * usage. + */ +#define LAST_ATTEMPT_STATUS_ERROR_UNSUCCESSFUL_VENDOR_RANGE_MIN 0x00001000 +#define LAST_ATTEMPT_STATUS_ERROR_UNSUCCESSFUL_VENDOR_RANGE_MAX 0x00004000 + #endif