On Tue, Dec 4, 2018 at 8:26 PM Ard Biesheuvel <ard.biesheu...@linaro.org> wrote:
>
> On Tue, 4 Dec 2018 at 12:36, Chandni Cherukuri
> <chandni.cheruk...@arm.com> wrote:
> >
> > On SGI platform, the value of configuration ID can be zero.
> > So avoid returning an error from the function that creates
> > the system ID HOB in case the value of the configuration ID
> > is zero.
> >
> > While at it, improve some of the error messages as well.
> >
>
> So the platform ID is still guaranteed to be non-zero?
>
>

Platform ID is the part number of the platform and it is a
unique 12-bit value as specified by the SGI platform
specification. So it is guaranteed to be non-zero value.

Thanks
Chandni

> > Cc: Ard Biesheuvel <ard.biesheu...@linaro.org>
> > Cc: Leif Lindholm <leif.lindh...@linaro.org>
> > Contributed-under: TianoCore Contribution Agreement 1.1
> > Signed-off-by: Chandni Cherukuri <chandni.cheruk...@arm.com>
> > ---
> >  Platform/ARM/SgiPkg/Library/SgiPlatformPei/SgiPlatformPeim.c | 6 +++---
> >  1 file changed, 3 insertions(+), 3 deletions(-)
> >
> > diff --git a/Platform/ARM/SgiPkg/Library/SgiPlatformPei/SgiPlatformPeim.c 
> > b/Platform/ARM/SgiPkg/Library/SgiPlatformPei/SgiPlatformPeim.c
> > index 15ea571..065b23d 100644
> > --- a/Platform/ARM/SgiPkg/Library/SgiPlatformPei/SgiPlatformPeim.c
> > +++ b/Platform/ARM/SgiPkg/Library/SgiPlatformPei/SgiPlatformPeim.c
> > @@ -67,7 +67,7 @@ GetSgiSystemId (
> >
> >    Property = fdt_getprop (HwCfgDtBlob, Offset, "platform-id", NULL);
> >    if (Property == NULL) {
> > -    DEBUG ((DEBUG_ERROR, "Platform Id is NULL\n"));
> > +    DEBUG ((DEBUG_ERROR, "platform-id property not found\n"));
> >      return EFI_INVALID_PARAMETER;
> >    }
> >
> > @@ -75,7 +75,7 @@ GetSgiSystemId (
> >
> >    Property = fdt_getprop (HwCfgDtBlob, Offset, "config-id", NULL);
> >    if (Property == NULL) {
> > -    DEBUG ((DEBUG_ERROR, "Config Id is NULL\n"));
> > +    DEBUG ((DEBUG_ERROR, "config-id property not found\n"));
> >      return EFI_INVALID_PARAMETER;
> >    }
> >
> > @@ -121,7 +121,7 @@ SgiPlatformPeim (
> >      return EFI_INVALID_PARAMETER;
> >    }
> >
> > -  if (HobData->PlatformId == 0 || HobData->ConfigId == 0) {
> > +  if (HobData->PlatformId == 0) {
> >      ASSERT (FALSE);
> >      return EFI_INVALID_PARAMETER;
> >    }
> > --
> > 2.7.4
> >
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to