summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--QcomModulePkg/Include/Protocol/EFIChipInfo.h24
-rw-r--r--QcomModulePkg/Include/Protocol/EFIChipInfoTypes.h111
2 files changed, 100 insertions, 35 deletions
diff --git a/QcomModulePkg/Include/Protocol/EFIChipInfo.h b/QcomModulePkg/Include/Protocol/EFIChipInfo.h
index d3cb519d8b..b2f808fc25 100644
--- a/QcomModulePkg/Include/Protocol/EFIChipInfo.h
+++ b/QcomModulePkg/Include/Protocol/EFIChipInfo.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2015-2016, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2015-2016,2019 The Linux Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -67,12 +67,6 @@ extern EFI_GUID gEfiChipInfoProtocolGuid;
declaring space for the EFI_DALCHIPINFO_GETCHIPIDSTRING() function. */
#define EFICHIPINFO_MAX_ID_LENGTH 16
-/**
- Maximum length of a processor name string. This can be used
- by clients when declaring space for the
- EFI_DALCHIPINFO_GETPROCESSORNAMESTRING() function. */
-#define EFICHIPINFO_MAX_NAME_LENGTH 16
-
/** Macro to generate the hardware version number from a specified major
and minor number. This is used when comparing against the return value of
hw_version(). For example, to check if the version is at least Version 1.2: \n
@@ -105,22 +99,6 @@ typedef UINT32 EFIChipInfoModemType;
typedef UINT32 EFIChipInfoSerialNumType;
typedef UINT32 EFIChipInfoQFPROMChipIdType;
-/**
-Chip Foundry type.
-*/
-typedef enum {
- EFICHIPINFO_FOUNDRYID_UNKNOWN = 0,
- EFICHIPINFO_FOUNDRYID_TSMC = 1,
- EFICHIPINFO_FOUNDRYID_GF = 2,
- EFICHIPINFO_FOUNDRYID_SS = 3,
- EFICHIPINFO_FOUNDRYID_IBM = 4,
- EFICHIPINFO_FOUNDRYID_UMC = 5,
- EFICHIPINFO_FOUNDRYID_SMIC = 6,
-
- EFICHIPINFO_NUM_FOUNDRYIDS,
- EFICHIPINFO_FOUNDRYID_32BITS = 0x7FFFFFF
-} EFIChipInfoFoundryIdType;
-
/** @} */ /* end_addtogroup efi_chipInfo_data_types */
/*==============================================================================
diff --git a/QcomModulePkg/Include/Protocol/EFIChipInfoTypes.h b/QcomModulePkg/Include/Protocol/EFIChipInfoTypes.h
index 37f32a2a14..1bd5c44443 100644
--- a/QcomModulePkg/Include/Protocol/EFIChipInfoTypes.h
+++ b/QcomModulePkg/Include/Protocol/EFIChipInfoTypes.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2015-2016, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2015-2016,2019 The Linux Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -31,26 +31,73 @@
/** @addtogroup efi_chipInfo_constants
@{ */
+/** Macro to generate the hardware version number from a specified major
+ and minor number. This is used when comparing against the return value of
+ hw_version(). For example, to check if the version is at least Version 1.2: \n
+
+ @code
+ EFI_ChipInfo_GetVersion(h, &version);
+ if (version >= EFI_CHIPINFO_VERSION(1,2)) ...
+ @endcode
+*/
+#define EFI_CHIPINFO_VERSION(major, minor) (((major) << 16) | (minor))
+#define EFI_CHIPINFO_VERSION_UNKNOWN 0
+
+/** Maximum length of a chip ID string. This can be used by clients when
+ declaring space for the EFI_DALCHIPINFO_GETCHIPIDSTRING() function. */
+#define EFICHIPINFO_MAX_ID_LENGTH 16
+
+/**
+ Maximum length of a processor name string. This can be used
+ by clients when declaring space for the
+ EFI_DALCHIPINFO_GETPROCESSORNAMESTRING() function. */
+#define EFICHIPINFO_MAX_NAME_LENGTH EFICHIPINFO_MAX_ID_LENGTH
/**
Maximum number of CPU clusters supported by the GetDefectiveParts API
**/
#define EFICHIPINFO_MAX_CPU_CLUSTERS 4
+
+/**
+ * Other macros used to indicate unknown values
+ */
+#define EFICHIPINFO_RAW_VERSION_UNKNOWN 0x0
+#define EFICHIPINFO_RAW_ID_UNKNOWN 0x0
+#define EFICHIPINFO_SERIAL_NUM_UNKNOWN 0x0
+#define EFICHIPINFO_RAW_DEVICE_FAMILY_UNKNOWN 0x0
+#define EFICHIPINFO_RAW_DEVICE_NUMBER_UNKNOWN 0x0
+#define EFICHIPINFO_QFPROM_CHIPID_UNKNOWN 0x0
+
/** @endcond */
/** @addtogroup efi_chipInfo_data_types
@{ */
+/** Chip version with the major number in the upper 16 bits and the
+ minor number in the lower 16 bits. For example: \n
+ - Version 1.0 is 0x00010000
+ - Version 2.3 is 0x00020003
+
+ The #EFI_CHIPINFO_VERSION macro must be used to generate the
+ appropriate comparison value because the format is not guaranteed
+ to remain unchanged.
+*/
+typedef UINT32 EFIChipInfoVersionType;
+
+/** Stores information about modem hardware supported on the
+ platform. */
+typedef UINT32 EFIChipInfoModemType;
/** Chip identification. */
/* Any new IDs must be added to the end. */
-typedef enum {
+typedef enum
+{
/** @cond */
EFICHIPINFO_ID_UNKNOWN = 0, /**< Unknown chip. */
EFICHIPINFO_ID_MSM8998 = 292,
EFICHIPINFO_ID_APQ8098 = 319,
EFICHIPINFO_ID_SDM845 = 321,
- EFICHIPINFO_NUM_IDS = 341,
+ EFICHIPINFO_NUM_IDS = 401,
EFICHIPINFO_ID_32BITS = 0x7FFFFFF
/** @endcond */
} EFIChipInfoIdType;
@@ -58,28 +105,68 @@ typedef enum {
/** Chip family. This is the family type of the chip on which the software is
running. Each family may include multiple chip IDs.
*/
-typedef enum {
+typedef enum
+{
/** @cond */
EFICHIPINFO_FAMILY_UNKNOWN = 0, /**< Unknown family. */
EFICHIPINFO_FAMILY_MSM8998 = 67,
EFICHIPINFO_FAMILY_SDM845 = 79,
/** @cond */
- EFICHIPINFO_NUM_FAMILIES = 88,
+ EFICHIPINFO_NUM_FAMILIES = 102,
EFICHIPINFO_FAMILY_32BITS = 0x7FFFFFF
/** @endcond */
} EFIChipInfoFamilyType;
/**
+Chip serial number. Unique within each EfiChipInfoFamily.
+*/
+typedef UINT32 EFIChipInfoSerialNumType;
+
+/**
+Chip serial number as read from QFPROM.
+*/
+typedef UINT32 EFIChipInfoQFPROMChipIdType;
+
+/**
+Chip Foundry type.
+*/
+typedef enum
+{
+ EFICHIPINFO_FOUNDRYID_UNKNOWN = 0,
+ EFICHIPINFO_FOUNDRYID_TSMC = 1,
+ EFICHIPINFO_FOUNDRYID_GF = 2,
+ EFICHIPINFO_FOUNDRYID_SS = 3,
+ EFICHIPINFO_FOUNDRYID_IBM = 4,
+ EFICHIPINFO_FOUNDRYID_UMC = 5,
+ EFICHIPINFO_FOUNDRYID_SMIC = 6,
+
+ EFICHIPINFO_NUM_FOUNDRYIDS,
+ EFICHIPINFO_FOUNDRYID_32BITS = 0x7FFFFFF
+} EFIChipInfoFoundryIdType;
+
+/**
* Defective parts supported by the GetDefectivePart API
*/
-typedef enum {
- EFICHIPINFO_PART_UNKNOWN,
- EFICHIPINFO_PART_GPU,
- EFICHIPINFO_PART_VIDEO,
- EFICHIPINFO_PART_CAMERA,
- EFICHIPINFO_PART_DISPLAY,
- EFICHIPINFO_PART_AUDIO,
+typedef enum
+{
+ EFICHIPINFO_PART_UNKNOWN = 0,
+ EFICHIPINFO_PART_GPU = 1,
+ EFICHIPINFO_PART_VIDEO = 2,
+ EFICHIPINFO_PART_CAMERA = 3,
+ EFICHIPINFO_PART_DISPLAY = 4,
+ EFICHIPINFO_PART_AUDIO = 5,
+ EFICHIPINFO_PART_MODEM = 6,
+ EFICHIPINFO_PART_WLAN = 7,
+ EFICHIPINFO_PART_COMP = 8,
+ EFICHIPINFO_PART_SENSORS = 9,
+ EFICHIPINFO_PART_NPU = 10,
+ EFICHIPINFO_PART_SPSS = 11,
+ EFICHIPINFO_PART_NAV = 12,
+ /*
+ * TODO Add Group E parts
+ * once they've been finalized
+ */
EFICHIPINFO_NUM_PARTS,
EFICHIPINFO_PART_32BITS = 0x7FFFFFFF