[edk2-devel] [edk2-platforms][PATCH V1 5/8] Platform/Sgi: ACPI PPTT table for RD-E1-Edge platform

Pranav Madhu pranav.madhu at arm.com
Tue Apr 20 06:02:12 UTC 2021


Hi Pierre,

Thanks for reviewing this patch.

> 
> 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 ?

Yes, will update

> 
> 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

Regards,
Pranav


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#74293): https://edk2.groups.io/g/devel/message/74293
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