[edk2-devel] [edk2-platforms][PATCH V1 5/8] Platform/Sgi: ACPI PPTT table for RD-E1-Edge platform
PierreGondois
pierre.gondois at arm.com
Tue Apr 13 09:34:45 UTC 2021
Hi Pranav,
> + }
> +
> +#define PPTT_CORE_INIT(pid, cid,
> coreId) \
> + { \
> + /* Parameters for CPU Core
> */ \
> + EFI_ACPI_6_3_PPTT_STRUCTURE_PROCESSOR_INIT
> ( \
> + __builtin_offsetof (RDE1EDGE_PPTT_CORE, DCache), /* Length
> */ \
> + PPTT_PROCESSOR_CORE_THREADED_FLAGS, /* Flag
> */ \
> + __builtin_offsetof
> (EFI_ACPI_6_3_PROCESSOR_PROPERTIES_TOPOLOGY_TABLE, \
> + Package.Cluster[cid]), /* Parent
> */ \
> + 0, /* ACPI Id
> */ \
> + 2 /* Num of private
> resource */\
> + ), \
> + \
> + /* Offsets of the private resources
> */ \
> + { \
> + __builtin_offsetof
> (EFI_ACPI_6_3_PROCESSOR_PROPERTIES_TOPOLOGY_TABLE, \
> + Package.Cluster[cid].Core[coreId].DCache), \
> + __builtin_offsetof
> (EFI_ACPI_6_3_PROCESSOR_PROPERTIES_TOPOLOGY_TABLE, \
> + Package.Cluster[cid].Core[coreId].ICache) \
> + }, \
Would it be possible to use the edk2/MdePkg/Include/Base.h:OFFSET_OF()
macro to handle the different compilers ?
This modification could be applied to all the other PPTT tables in the set.
> + \
> + /* L1 Data cache parameters
> */ \
> + EFI_ACPI_6_3_PPTT_STRUCTURE_CACHE_INIT
> ( \
> + PPTT_CACHE_STRUCTURE_FLAGS, /* Flag
> */ \
> + __builtin_offsetof
> (EFI_ACPI_6_3_PROCESSOR_PROPERTIES_TOPOLOGY_TABLE, \
> + Package.Cluster[cid].Core[coreId].L2Cache), \
> + /* Next level of cache
> */ \
> + SIZE_32KB, /* Size
> */ \
> + 128, /* Num of sets
> */ \
> + 4, /* Associativity
> */ \
> + PPTT_DATA_CACHE_ATTR, /* Attributes
> */ \
> + 64 /* Line size
> */ \
> + ), \
> + \
[...]
> +
> +#pragma pack(1)
> +typedef struct {
> + EFI_ACPI_6_3_PPTT_STRUCTURE_PROCESSOR Thread;
> +} RDE1EDGE_PPTT_THREAD;
> +
> +typedef struct {
> + EFI_ACPI_6_3_PPTT_STRUCTURE_PROCESSOR Core;
> + UINT32 Offset[2];
Similarly to the the first patch, I think there should be 3 elements
(and if possible renamed to 'PrivateResources').
> + EFI_ACPI_6_3_PPTT_STRUCTURE_CACHE DCache;
> + EFI_ACPI_6_3_PPTT_STRUCTURE_CACHE ICache;
> + EFI_ACPI_6_3_PPTT_STRUCTURE_CACHE L2Cache;
> + RDE1EDGE_PPTT_THREAD Thread[THREAD_PER_CORE];
> +} RDE1EDGE_PPTT_CORE;
> +
> +typedef struct {
> + EFI_ACPI_6_3_PPTT_STRUCTURE_PROCESSOR Cluster;
> + UINT32 Offset;
> + EFI_ACPI_6_3_PPTT_STRUCTURE_CACHE L3Cache;
> + RDE1EDGE_PPTT_CORE Core[CORE_COUNT /
> THREAD_PER_CORE];
> +} RDE1EDGE_PPTT_CLUSTER;
> +
Regards,
Pierre
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#74023): https://edk2.groups.io/g/devel/message/74023
Mute This Topic: https://groups.io/mt/81798787/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-
More information about the edk2-devel-archive
mailing list