Message ID | 1479122995-50330-19-git-send-email-heyi.guo@linaro.org |
---|---|
State | Superseded |
Headers | show |
While I agree this is a reasonable interpretation of how ProcessorID can be populated on an ARM system, there is no example in either SMBIOS 3.0 or in SBBR pointing this out. What is the reasoning behind this, and what is the intended use? Regards, Leif On Mon, Nov 14, 2016 at 07:29:45PM +0800, Heyi Guo wrote: > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Heyi Guo <heyi.guo@linaro.org> > --- > .../Hisilicon/Drivers/Smbios/ProcessorSubClassDxe/ProcessorSubClass.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/Chips/Hisilicon/Drivers/Smbios/ProcessorSubClassDxe/ProcessorSubClass.c b/Chips/Hisilicon/Drivers/Smbios/ProcessorSubClassDxe/ProcessorSubClass.c > index 07dae5f..005d28f 100644 > --- a/Chips/Hisilicon/Drivers/Smbios/ProcessorSubClassDxe/ProcessorSubClass.c > +++ b/Chips/Hisilicon/Drivers/Smbios/ProcessorSubClassDxe/ProcessorSubClass.c > @@ -490,6 +490,7 @@ AddSmbiosProcessorTypeTable ( > CHAR16 *CpuVersion; > STRING_REF TokenToUpdate; > > + UINT64 *ProcessorId; > Type4Record = NULL; > ProcessorManuStr = NULL; > ProcessorVersionStr = NULL; > @@ -614,6 +615,8 @@ AddSmbiosProcessorTypeTable ( > Type4Record->ProcessorCharacteristics = ProcessorCharacteristics.Data; > > Type4Record->ExternalClock = (UINT16)(ArmReadCntFrq() / 1000 / 1000); > + ProcessorId = (UINT64 *)&(Type4Record->ProcessorId); > + *ProcessorId = ArmReadMidr(); > > OptionalStrStart = (CHAR8 *) (Type4Record + 1); > UnicodeStrToAsciiStr (ProcessorSocketStr, OptionalStrStart); > -- > 1.9.1 >
diff --git a/Chips/Hisilicon/Drivers/Smbios/ProcessorSubClassDxe/ProcessorSubClass.c b/Chips/Hisilicon/Drivers/Smbios/ProcessorSubClassDxe/ProcessorSubClass.c index 07dae5f..005d28f 100644 --- a/Chips/Hisilicon/Drivers/Smbios/ProcessorSubClassDxe/ProcessorSubClass.c +++ b/Chips/Hisilicon/Drivers/Smbios/ProcessorSubClassDxe/ProcessorSubClass.c @@ -490,6 +490,7 @@ AddSmbiosProcessorTypeTable ( CHAR16 *CpuVersion; STRING_REF TokenToUpdate; + UINT64 *ProcessorId; Type4Record = NULL; ProcessorManuStr = NULL; ProcessorVersionStr = NULL; @@ -614,6 +615,8 @@ AddSmbiosProcessorTypeTable ( Type4Record->ProcessorCharacteristics = ProcessorCharacteristics.Data; Type4Record->ExternalClock = (UINT16)(ArmReadCntFrq() / 1000 / 1000); + ProcessorId = (UINT64 *)&(Type4Record->ProcessorId); + *ProcessorId = ArmReadMidr(); OptionalStrStart = (CHAR8 *) (Type4Record + 1); UnicodeStrToAsciiStr (ProcessorSocketStr, OptionalStrStart);
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Heyi Guo <heyi.guo@linaro.org> --- .../Hisilicon/Drivers/Smbios/ProcessorSubClassDxe/ProcessorSubClass.c | 3 +++ 1 file changed, 3 insertions(+)