From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (NAM10-DM6-obe.outbound.protection.outlook.com [40.92.41.61]) by mx.groups.io with SMTP id smtpd.web10.687.1597091313723667105 for ; Mon, 10 Aug 2020 13:28:33 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="body hash did not verify" header.i=@outlook.com header.s=selector1 header.b=gm3Ijrjt; spf=pass (domain: outlook.com, ip: 40.92.41.61, mailfrom: michael.kubacki@outlook.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZqikDSp2UgIw5+ofoF/1UGclm1HERmSleuK7ppuln+HAmgf54wbGIcZfE62c+E/Ju6kiDlZceGL7+7zqlb8F3fGOvMo3FC3bRCCrXFIEBoZ0MJZeZ7E5eWFiVbjJsIckjy+4BoHS6TYySmq3IFF553NYyyztj9LxoLTCMrk4kZpddReKeVFO+IO1AjjUC3nwddAkXtcHPvjlz/NwpAiaxZtaqlWjPogsYGYBrPgGxllkXiwBqq3xbr8Lh9dhTZbGTnWXhLct92LvnfYRu5ETiEHg/ZtRGBBcPTLIG0DfDphYOvcOC2AbgriRCEl0fABDz0YjquFHyGZlIZ1C82NJ7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=dJfFAGXqfq4jvIrPrraT7C6bqFCbWftUZhExvRvwAOI=; b=CoxjRKzac9DOtTXx9YnpvRv1VDyhb1k9NJbdZiJ2JRvekntND1HewuqWKjx74DhqJrJZR2LJ4+Iqyx3eEtS2lSTuJIL65lmOW+LB991H6MY9p+V/RGBwZB2+/q4F6toea9YZl6xsgZALNJqs+q/U8hym31AfxvzSD2SX0WV+LEFCnqhrfVie5A72WCRgv0cV6Z/CifEjhT7HToBeptHEUv4Fwv9uXUYXfcg8v2U3exDOLPkMuV/yr91/Dywkbb0p0I2IqlOcZGz05FG/Hhjxq/oD3F7Gsukna/WLCrpn4Stu5mPk0e81wlass4gNN/tNot5VwOsygKgE6lJanaHqWA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=dJfFAGXqfq4jvIrPrraT7C6bqFCbWftUZhExvRvwAOI=; b=gm3Ijrjt6fslJjunhyXRfyQ4Ntejkig9dfUixT/F4q/bAx41oVAju06MSy7YHtSCP+2Ku577cWNDOWIgkE45tRYN5uutEnI5bzKbCZVpv7JijcO5+p64khSVVkS7zPE1i1Iqcy+kLHBNqLKS14k9PR14BcOxo4JeXe6mHC1zjkHV/jueV/1lm4FgZ5WZOkMiueyV8VHgBI+R+CUY/SCf5W9WD8v5SiG5AIZ9aWo8/zELD5CW+tvXI6TfvBTErc1QeJgL4MOSeYzuVVo6hwk7UhB+96v+6hfaZHNyCX+9O3Tzfk2+pEn+47UiMTibJKgOnMmw+9R+PBDlFkOvJNVdEw== Received: from MW2NAM10FT048.eop-nam10.prod.protection.outlook.com (2a01:111:e400:7e87::42) by MW2NAM10HT102.eop-nam10.prod.protection.outlook.com (2a01:111:e400:7e87::283) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3261.16; Mon, 10 Aug 2020 20:28:31 +0000 Received: from MWHPR07MB3440.namprd07.prod.outlook.com (2a01:111:e400:7e87::44) by MW2NAM10FT048.mail.protection.outlook.com (2a01:111:e400:7e87::98) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3261.16 via Frontend Transport; Mon, 10 Aug 2020 20:28:31 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:ADA9128B37A9096884D2217B2E06A9121F05253F1873FCA29139984AB5CBB29F;UpperCasedChecksum:898B4D9AC2025E8B6A07E525BC8F0B308009E244E677BE1EF1FEB941B29D1958;SizeAsReceived:7775;Count:49 Received: from MWHPR07MB3440.namprd07.prod.outlook.com ([fe80::9856:570e:1735:974e]) by MWHPR07MB3440.namprd07.prod.outlook.com ([fe80::9856:570e:1735:974e%7]) with mapi id 15.20.3261.024; Mon, 10 Aug 2020 20:28:31 +0000 From: "Michael Kubacki" To: devel@edk2.groups.io CC: Liming Gao , Michael D Kinney , Guomin Jiang , Wei6 Xu Subject: [PATCH v2 2/6] FmpDevicePkg: Add LastAttemptStatus.h Date: Mon, 10 Aug 2020 13:27:49 -0700 Message-ID: X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200810202753.1318-1-michael.kubacki@outlook.com> References: <20200810202753.1318-1-michael.kubacki@outlook.com> X-ClientProxiedBy: MWHPR13CA0008.namprd13.prod.outlook.com (2603:10b6:300:16::18) To MWHPR07MB3440.namprd07.prod.outlook.com (2603:10b6:301:69::28) Return-Path: michael.kubacki@outlook.com X-Microsoft-Original-Message-ID: <20200810202753.1318-3-michael.kubacki@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (2001:4898:80e8:1:cc6:648f:7db1:5bf9) by MWHPR13CA0008.namprd13.prod.outlook.com (2603:10b6:300:16::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3283.10 via Frontend Transport; Mon, 10 Aug 2020 20:28:31 +0000 X-Mailer: git-send-email 2.28.0.windows.1 X-Microsoft-Original-Message-ID: <20200810202753.1318-3-michael.kubacki@outlook.com> X-TMN: [MPdOn5m0k3QVs618980LCG/ps1e+CdsvriBptDE3jcS4jCPvFsEZaXRbrm3UOd3m] X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 49 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: c35b6796-f873-448f-0e7e-08d83d6bf278 X-MS-TrafficTypeDiagnostic: MW2NAM10HT102: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: buJpBHHxNMYv1ZJsbiKn+jpdrzol0Z98mNk8EUbxwRYsiqkmAuV9iAuqpBpSgzz3GwjD4x2ZVrwxGgQadDaewDvsaCuuGWOjnLPxWcIAdpV3iXgwVcy0HaeP9LIVoMrBUdZts6M/HNzTSGUCmeJo/Iq+ubb7cHOSTNDnhcuPAetG77JYq7H6IsPAC1SeL1++Bvva9mKkKtXjUtVXLGK+FQ== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:0;SRV:;IPV:NLI;SFV:NSPM;H:MWHPR07MB3440.namprd07.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:;DIR:OUT;SFP:1901; X-MS-Exchange-AntiSpam-MessageData: DohqDDq+bqLvBz7Fv9dtIfyqph0/Gb8zrbVh7Iu5FHPRTjNnxrLraG5rOczzPNpS8R3PYyV5dG+9j+BmfQvYsJ0wsJVI9aYnecfiieE89vGSSr0w2LCPXl3HF/3ZBMKO3yfGrD6FaKsqZX9qQ1Sin23Gi9EocRtdRTbjKnZOkbGGSN760GPFQ7QMB/0FXIAEve1Z17K41WxFxJMMXCSBbg== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: c35b6796-f873-448f-0e7e-08d83d6bf278 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Aug 2020 20:28:31.3453 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-AuthSource: MW2NAM10FT048.eop-nam10.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW2NAM10HT102 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain From: Michael Kubacki Introduces a header file to contain Last Attempt Status codes that define granular FmpDevicePkg usage of the UEFI Specification defined vendor range. The vendor range is described in UEFI Specification 2.8A section 23.4. With this change, FmpDevicePkg currently defines three subranges of the Last Attempt Status vendor range: 1. Driver - Codes returned from operations performed by the FmpDxe driver. 2. Dependency - Codes returned from FMP dependency related functionality (e.g. FmpDependencyLib). 3. Library - Codes returned from FmpDeviceLib instances. Cc: Liming Gao Cc: Michael D Kinney Cc: Guomin Jiang Cc: Wei6 Xu Signed-off-by: Michael Kubacki --- FmpDevicePkg/PrivateInclude/LastAttemptStatus.h | 81 ++++++++++++++++++++ 1 file changed, 81 insertions(+) diff --git a/FmpDevicePkg/PrivateInclude/LastAttemptStatus.h b/FmpDevicePkg= /PrivateInclude/LastAttemptStatus.h new file mode 100644 index 000000000000..01e96b23edad --- /dev/null +++ b/FmpDevicePkg/PrivateInclude/LastAttemptStatus.h @@ -0,0 +1,81 @@ +/** @file + Defines last attempt status codes used in FmpDevicePkg. + + Copyright (c) Microsoft Corporation.
+ + SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + +#ifndef __FMP_LAST_ATTEMPT_STATUS_H__ +#define __FMP_LAST_ATTEMPT_STATUS_H__ + +// +// Size of the error code range for FMP driver-specific errors +// +#define LAST_ATTEMPT_STATUS_DRIVER_ERROR_COUNT 0x80 + +// +// Size of the error code range for FMP dependency related errors +// +#define LAST_ATTEMPT_STATUS_DEPENDENCY_ERROR_COUNT 0x20 + +#define LAST_ATTEMPT_STATUS_DRIVER_MAX_ERROR_CODE_VALUE LAST_ATTEMPT_S= TATUS_ERROR_UNSUCCESSFUL_VENDOR_RANGE_MIN + \ + LAST_ATTEMPT_S= TATUS_DRIVER_ERROR_COUNT - 1 + +#define LAST_ATTEMPT_STATUS_DEPENDENCY_MAX_ERROR_CODE_VALUE LAST_ATTEMPT_S= TATUS_DRIVER_MAX_ERROR_CODE_VALUE + \ + LAST_ATTEMPT_S= TATUS_DEPENDENCY_ERROR_COUNT + +#define LAST_ATTEMPT_STATUS_LIBRARY_MAX_ERROR_CODE_VALUE LAST_ATTEMPT_S= TATUS_ERROR_UNSUCCESSFUL_VENDOR_RANGE_MAX - 1 + +// +// Last attempt status codes defined for additional granularity in the FMP= stack. +// +// These codes are defined within the higher-level UEFI specification defi= ned UNSUCCESSFUL_VENDOR_RANGE. +// +// The following last attempt status code ranges are defined for the follo= wing corresponding component: +// * LAST_ATTEMPT_STATUS_DRIVER - FMP driver +// * LAST_ATTEMPT_STATUS_DEPENDENCY - FMP dependency functionality +// * LAST_ATTEMPT_STATUS_LIBRARY - FMP device library instances +// +enum LAST_ATTEMPT_STATUS_EXPANDED_ERROR_LIST +{ + LAST_ATTEMPT_STATUS_DRIVER_ERROR_GET_FMP_HEADER =3D LAST= _ATTEMPT_STATUS_ERROR_UNSUCCESSFUL_VENDOR_RANGE_MIN, + LAST_ATTEMPT_STATUS_DRIVER_ERROR_PROGRESS_CALLBACK_ERROR , + LAST_ATTEMPT_STATUS_DRIVER_ERROR_CHECK_POWER_API , + LAST_ATTEMPT_STATUS_DRIVER_ERROR_CHECK_SYS_THERMAL_API , + LAST_ATTEMPT_STATUS_DRIVER_ERROR_THERMAL , + LAST_ATTEMPT_STATUS_DRIVER_ERROR_CHECK_SYS_ENV_API , + LAST_ATTEMPT_STATUS_DRIVER_ERROR_SYSTEM_ENV , + LAST_ATTEMPT_STATUS_DRIVER_ERROR_GET_FMP_HEADER_SIZE , + LAST_ATTEMPT_STATUS_DRIVER_ERROR_GET_ALL_HEADER_SIZE , + LAST_ATTEMPT_STATUS_DRIVER_ERROR_GET_FMP_HEADER_VERSION , + LAST_ATTEMPT_STATUS_DRIVER_ERROR_IMAGE_NOT_PROVIDED , + LAST_ATTEMPT_STATUS_DRIVER_ERROR_IMAGE_NOT_UPDATABLE , + LAST_ATTEMPT_STATUS_DRIVER_ERROR_INVALID_CERTIFICATE , + LAST_ATTEMPT_STATUS_DRIVER_ERROR_INVALID_IMAGE_INDEX , + LAST_ATTEMPT_STATUS_DRIVER_ERROR_INVALID_KEY_LENGTH , + LAST_ATTEMPT_STATUS_DRIVER_ERROR_INVALID_KEY_LENGTH_VALUE , + LAST_ATTEMPT_STATUS_DRIVER_ERROR_VERSION_TOO_LOW , + LAST_ATTEMPT_STATUS_DRIVER_ERROR_DEVICE_LOCKED , + LAST_ATTEMPT_STATUS_DRIVER_ERROR_IMAGE_AUTH_FAILURE , + LAST_ATTEMPT_STATUS_DRIVER_ERROR_PROTOCOL_ARG_MISSING , + LAST_ATTEMPT_STATUS_DRIVER_ERROR_MAX_ERROR_CODE =3D LAST= _ATTEMPT_STATUS_DRIVER_MAX_ERROR_CODE_VALUE, + + LAST_ATTEMPT_STATUS_DEPENDENCY_ERROR_GET_DEPEX_FAILURE , + LAST_ATTEMPT_STATUS_DEPENDENCY_ERROR_NO_END_OPCODE , + LAST_ATTEMPT_STATUS_DEPENDENCY_ERROR_UNKNOWN_OPCODE , + LAST_ATTEMPT_STATUS_DEPENDENCY_ERROR_MEMORY_ALLOCATION_FAILED , + LAST_ATTEMPT_STATUS_DEPENDENCY_ERROR_GUID_BEYOND_DEPEX , + LAST_ATTEMPT_STATUS_DEPENDENCY_ERROR_VERSION_BEYOND_DEPEX , + LAST_ATTEMPT_STATUS_DEPENDENCY_ERROR_VERSION_STR_BEYOND_DEPEX , + LAST_ATTEMPT_STATUS_DEPENDENCY_ERROR_FMP_NOT_FOUND , + LAST_ATTEMPT_STATUS_DEPENDENCY_ERROR_PUSH_FAILURE , + LAST_ATTEMPT_STATUS_DEPENDENCY_ERROR_POP_FAILURE , + LAST_ATTEMPT_STATUS_DEPENDENCY_ERROR_MAX_ERROR_CODE =3D LAST= _ATTEMPT_STATUS_DEPENDENCY_MAX_ERROR_CODE_VALUE, + + LAST_ATTEMPT_STATUS_LIBRARY_ERROR_MIN_ERROR_CODE , + LAST_ATTEMPT_STATUS_LIBRARY_ERROR_MAX_ERROR_CODE =3D LAST= _ATTEMPT_STATUS_LIBRARY_MAX_ERROR_CODE_VALUE +}; + +#endif --=20 2.28.0.windows.1