public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH v1] ArmPkg/Smbios: Fix max cache size 2 wrong issue
@ 2021-10-14  7:23 Ming Huang
  2021-10-14 10:07 ` [edk2-devel] " Leif Lindholm
  2021-10-14 12:05 ` Rebecca Cran
  0 siblings, 2 replies; 4+ messages in thread
From: Ming Huang @ 2021-10-14  7:23 UTC (permalink / raw)
  To: devel, ardb+tianocore, leif; +Cc: ming.huang-, Ming Huang

As SMBIOS spec, bit-31 of maximum cache size 2 should be 1
for 64K granularity.

Signed-off-by: Ming Huang <huangming@linux.alibaba.com>
---
 ArmPkg/Universal/Smbios/ProcessorSubClassDxe/ProcessorSubClass.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ArmPkg/Universal/Smbios/ProcessorSubClassDxe/ProcessorSubClass.c b/ArmPkg/Universal/Smbios/ProcessorSubClassDxe/ProcessorSubClass.c
index fb484086a4..4b409ff745 100644
--- a/ArmPkg/Universal/Smbios/ProcessorSubClassDxe/ProcessorSubClass.c
+++ b/ArmPkg/Universal/Smbios/ProcessorSubClassDxe/ProcessorSubClass.c
@@ -219,7 +219,7 @@ ConfigureCacheArchitectureInformation (
     CacheSize32 = CacheSize16;
   } else if ((CacheSize64 / 64) < MAX_INT16) {
     CacheSize16 = (1 << 15) | (CacheSize64 / 64);
-    CacheSize32 = CacheSize16;
+    CacheSize32 = (1 << 31) | (CacheSize64 / 64);
   } else {
     if ((CacheSize64 / 1024) <= 2047) {
       CacheSize32 = CacheSize64;
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [edk2-devel] [PATCH v1] ArmPkg/Smbios: Fix max cache size 2 wrong issue
  2021-10-14  7:23 [PATCH v1] ArmPkg/Smbios: Fix max cache size 2 wrong issue Ming Huang
@ 2021-10-14 10:07 ` Leif Lindholm
  2021-10-14 12:05 ` Rebecca Cran
  1 sibling, 0 replies; 4+ messages in thread
From: Leif Lindholm @ 2021-10-14 10:07 UTC (permalink / raw)
  To: devel, huangming; +Cc: ardb+tianocore, ming.huang-, Rebecca Cran

+Rebecca

On Thu, Oct 14, 2021 at 15:23:14 +0800, Ming Huang wrote:
> As SMBIOS spec, bit-31 of maximum cache size 2 should be 1
> for 64K granularity.
> 
> Signed-off-by: Ming Huang <huangming@linux.alibaba.com>
> ---
>  ArmPkg/Universal/Smbios/ProcessorSubClassDxe/ProcessorSubClass.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/ArmPkg/Universal/Smbios/ProcessorSubClassDxe/ProcessorSubClass.c b/ArmPkg/Universal/Smbios/ProcessorSubClassDxe/ProcessorSubClass.c
> index fb484086a4..4b409ff745 100644
> --- a/ArmPkg/Universal/Smbios/ProcessorSubClassDxe/ProcessorSubClass.c
> +++ b/ArmPkg/Universal/Smbios/ProcessorSubClassDxe/ProcessorSubClass.c
> @@ -219,7 +219,7 @@ ConfigureCacheArchitectureInformation (
>      CacheSize32 = CacheSize16;
>    } else if ((CacheSize64 / 64) < MAX_INT16) {
>      CacheSize16 = (1 << 15) | (CacheSize64 / 64);
> -    CacheSize32 = CacheSize16;
> +    CacheSize32 = (1 << 31) | (CacheSize64 / 64);
>    } else {
>      if ((CacheSize64 / 1024) <= 2047) {
>        CacheSize32 = CacheSize64;
> -- 
> 2.17.1
> 
> 
> 
> 
> 
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [edk2-devel] [PATCH v1] ArmPkg/Smbios: Fix max cache size 2 wrong issue
  2021-10-14  7:23 [PATCH v1] ArmPkg/Smbios: Fix max cache size 2 wrong issue Ming Huang
  2021-10-14 10:07 ` [edk2-devel] " Leif Lindholm
@ 2021-10-14 12:05 ` Rebecca Cran
  2021-10-15 10:52   ` Leif Lindholm
  1 sibling, 1 reply; 4+ messages in thread
From: Rebecca Cran @ 2021-10-14 12:05 UTC (permalink / raw)
  To: devel, huangming, ardb+tianocore, leif; +Cc: ming.huang-

Reviewed-by: Rebecca Cran <rebecca@nuviainc.com>


On 10/14/21 1:23 AM, Ming Huang wrote:
> As SMBIOS spec, bit-31 of maximum cache size 2 should be 1
> for 64K granularity.
>
> Signed-off-by: Ming Huang <huangming@linux.alibaba.com>
> ---
>   ArmPkg/Universal/Smbios/ProcessorSubClassDxe/ProcessorSubClass.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/ArmPkg/Universal/Smbios/ProcessorSubClassDxe/ProcessorSubClass.c b/ArmPkg/Universal/Smbios/ProcessorSubClassDxe/ProcessorSubClass.c
> index fb484086a4..4b409ff745 100644
> --- a/ArmPkg/Universal/Smbios/ProcessorSubClassDxe/ProcessorSubClass.c
> +++ b/ArmPkg/Universal/Smbios/ProcessorSubClassDxe/ProcessorSubClass.c
> @@ -219,7 +219,7 @@ ConfigureCacheArchitectureInformation (
>       CacheSize32 = CacheSize16;
>     } else if ((CacheSize64 / 64) < MAX_INT16) {
>       CacheSize16 = (1 << 15) | (CacheSize64 / 64);
> -    CacheSize32 = CacheSize16;
> +    CacheSize32 = (1 << 31) | (CacheSize64 / 64);
>     } else {
>       if ((CacheSize64 / 1024) <= 2047) {
>         CacheSize32 = CacheSize64;

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [edk2-devel] [PATCH v1] ArmPkg/Smbios: Fix max cache size 2 wrong issue
  2021-10-14 12:05 ` Rebecca Cran
@ 2021-10-15 10:52   ` Leif Lindholm
  0 siblings, 0 replies; 4+ messages in thread
From: Leif Lindholm @ 2021-10-15 10:52 UTC (permalink / raw)
  To: Rebecca Cran; +Cc: devel, huangming, ardb+tianocore, ming.huang-

On Thu, Oct 14, 2021 at 06:05:59 -0600, Rebecca Cran wrote:
> Reviewed-by: Rebecca Cran <rebecca@nuviainc.com>

Acked-by: Leif Lindholm <leif@nuviainc.com>

Merged as 7e43d3e08611.

Thanks!

/
    Leif

> 
> On 10/14/21 1:23 AM, Ming Huang wrote:
> > As SMBIOS spec, bit-31 of maximum cache size 2 should be 1
> > for 64K granularity.
> > 
> > Signed-off-by: Ming Huang <huangming@linux.alibaba.com>
> > ---
> >   ArmPkg/Universal/Smbios/ProcessorSubClassDxe/ProcessorSubClass.c | 2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/ArmPkg/Universal/Smbios/ProcessorSubClassDxe/ProcessorSubClass.c b/ArmPkg/Universal/Smbios/ProcessorSubClassDxe/ProcessorSubClass.c
> > index fb484086a4..4b409ff745 100644
> > --- a/ArmPkg/Universal/Smbios/ProcessorSubClassDxe/ProcessorSubClass.c
> > +++ b/ArmPkg/Universal/Smbios/ProcessorSubClassDxe/ProcessorSubClass.c
> > @@ -219,7 +219,7 @@ ConfigureCacheArchitectureInformation (
> >       CacheSize32 = CacheSize16;
> >     } else if ((CacheSize64 / 64) < MAX_INT16) {
> >       CacheSize16 = (1 << 15) | (CacheSize64 / 64);
> > -    CacheSize32 = CacheSize16;
> > +    CacheSize32 = (1 << 31) | (CacheSize64 / 64);
> >     } else {
> >       if ((CacheSize64 / 1024) <= 2047) {
> >         CacheSize32 = CacheSize64;

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-10-15 10:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-10-14  7:23 [PATCH v1] ArmPkg/Smbios: Fix max cache size 2 wrong issue Ming Huang
2021-10-14 10:07 ` [edk2-devel] " Leif Lindholm
2021-10-14 12:05 ` Rebecca Cran
2021-10-15 10:52   ` Leif Lindholm

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox