DynamicTablesPkg: Adds X64 namespace object

REF:https://bugzilla.tianocore.org/show_bug.cgi?id=4781
Adds empty X64 namespace object for future use.

Cc: Sami Mujawar <Sami.Mujawar@arm.com>
Cc: Pierre Gondois <pierre.gondois@arm.com>
Signed-off-by: Abdul Lateef Attar <AbdulLateef.Attar@amd.com>
This commit is contained in:
Abdul Lateef Attar 2024-07-31 10:51:52 +00:00 committed by mergify[bot]
parent 87d3a6272c
commit 967cbd87b7
4 changed files with 72 additions and 0 deletions

View File

@ -1,12 +1,14 @@
/** @file
Copyright (c) 2017 - 2024, Arm Limited. All rights reserved.
Copyright (c) 2024 Advanced Micro Devices, Inc. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
@par Glossary:
- Cm or CM - Configuration Manager
- Obj or OBJ - Object
- X64 or x64 - X64 Architecture
**/
#ifndef CONFIGURATION_MANAGER_OBJECT_H_
@ -15,6 +17,7 @@
#include <ArchCommonNameSpaceObjects.h>
#include <ArmNameSpaceObjects.h>
#include <StandardNameSpaceObjects.h>
#include <X64NameSpaceObjects.h>
#pragma pack(1)
@ -32,6 +35,7 @@ Bits: [31:28] - Name Space ID
0000 - Standard
0001 - Arch Common
0010 - ARM
0011 - X64
1111 - Custom/OEM
All other values are reserved.
@ -83,6 +87,7 @@ typedef enum ObjectNameSpaceID {
EObjNameSpaceStandard, ///< Standard Objects Namespace
EObjNameSpaceArchCommon, ///< Arch Common Objects Namespace
EObjNameSpaceArm, ///< ARM Objects Namespace
EObjNameSpaceX64, ///< X64 Objects Namespace
EObjNameSpaceOem = 0xF, ///< OEM Objects Namespace
EObjNameSpaceMax,
} EOBJECT_NAMESPACE_ID;
@ -178,4 +183,14 @@ typedef struct CmObjDescriptor {
#define CREATE_CM_OEM_OBJECT_ID(ObjectId) \
(CREATE_CM_OBJECT_ID (EObjNameSpaceOem, ObjectId))
/** This macro returns a Configuration Manager Object ID
in the X64 Object Namespace.
@param [in] ObjectId The Object ID.
@retval Returns X64 Configuration Manager Object ID.
**/
#define CREATE_CM_X64_OBJECT_ID(ObjectId) \
(CREATE_CM_OBJECT_ID (EObjNameSpaceX64, ObjectId))
#endif // CONFIGURATION_MANAGER_OBJECT_H_

View File

@ -0,0 +1,26 @@
/** @file
Defines the X64 Namespace Object.
Copyright (c) 2024 Advanced Micro Devices, Inc. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
@par Glossary:
- Cm or CM - Configuration Manager
- Obj or OBJ - Object
- X64 or x64 - X64 Architecture
**/
#ifndef X64_NAMESPACE_OBJECTS_H_
#define X64_NAMESPACE_OBJECTS_H_
/** The EX64_OBJECT_ID enum describes the Object IDs
in the X64 Namespace
*/
typedef enum X64ObjectID {
EX64ObjReserved, ///< 0 - Reserved
EX64ObjMax
} EX64_OBJECT_ID;
#endif // X64_NAMESPACE_OBJECTS_H_

View File

@ -2,6 +2,7 @@
Configuration Manager Object parser.
Copyright (c) 2021 - 2023, ARM Limited. All rights reserved.<BR>
Copyright (C) 2024 Advanced Micro Devices, Inc. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
@ -729,6 +730,13 @@ STATIC CONST CM_OBJ_PARSER_ARRAY ArmNamespaceObjectParser[] = {
CM_PARSER_ADD_OBJECT_RESERVED (EArmObjMax)
};
/** A parser for X64 namespace objects.
*/
STATIC CONST CM_OBJ_PARSER_ARRAY X64NamespaceObjectParser[] = {
CM_PARSER_ADD_OBJECT_RESERVED (EX64ObjReserved),
CM_PARSER_ADD_OBJECT_RESERVED (EX64ObjMax)
};
/** A parser for EStdObjCfgMgrInfo.
*/
STATIC CONST CM_OBJ_PARSER StdObjCfgMgrInfoParser[] = {
@ -1070,6 +1078,22 @@ ParseCmObjDesc (
ParserArray = &ArchCommonNamespaceObjectParser[ObjId];
break;
case EObjNameSpaceX64:
if (ObjId >= EX64ObjMax) {
ASSERT (0);
return;
}
if (ObjId >= ARRAY_SIZE (X64NamespaceObjectParser)) {
DEBUG ((DEBUG_ERROR, "ObjId 0x%x is missing from the X64NamespaceObjectParser array\n", ObjId));
ASSERT (0);
return;
}
ParserArray = &X64NamespaceObjectParser[ObjId];
break;
default:
// Not supported
DEBUG ((DEBUG_ERROR, "NameSpaceId 0x%x, ObjId 0x%x is not supported by the parser\n", NameSpaceId, ObjId));

View File

@ -421,6 +421,7 @@ The CM_OBJECT_ID type is used to identify the Configuration Manager
| 0000b | Standard | |
| 0001b | Arch Common | |
| 0010b | ARM | |
| 0011b | X64 | |
| 1111b | Custom/OEM | |
| `*` | All other values are reserved. | |
@ -498,3 +499,9 @@ The CM_OBJECT_ID type is used to identify the Configuration Manager
| 25 | P-State Dependency (PSD) Info | |
| `*` | All other values are reserved. | |
#### Object ID's in the X64 Namespace:
| ID | Description | Comments |
| ---: | :-------------------------- | :--- |
| 0 | Reserved | |
| `*` | All other values are reserved. | |