public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: chandni cherukuri <chandni.cherukuri@arm.com>
To: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Chandni Cherukuri <chandni.cherukuri@arm.com>, edk2-devel@lists.01.org
Subject: Re: [PATCH edk2-platforms 1/2] Platform/ARM/Sgi: fix incorrect check of config-id value
Date: Wed, 5 Dec 2018 09:46:15 +0530	[thread overview]
Message-ID: <CADXzzgo5xPD1x1kaq8j0Yi+pOG9oJ+tOkPiJZWwELJ3WDtBLmQ@mail.gmail.com> (raw)
In-Reply-To: <CAKv+Gu9EovE2Xp6n=+mjVhd1nm4qtjg2cmXpOBcHpbQbGysbzw@mail.gmail.com>

On Tue, Dec 4, 2018 at 8:26 PM Ard Biesheuvel <ard.biesheuvel@linaro.org> wrote:
>
> On Tue, 4 Dec 2018 at 12:36, Chandni Cherukuri
> <chandni.cherukuri@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.biesheuvel@linaro.org>
> > Cc: Leif Lindholm <leif.lindholm@linaro.org>
> > Contributed-under: TianoCore Contribution Agreement 1.1
> > Signed-off-by: Chandni Cherukuri <chandni.cherukuri@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


  reply	other threads:[~2018-12-05  4:16 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-04 11:36 [PATCH edk2-platforms 0/2] Use NT_FW_CONFIG instead of HW_CONFIG Chandni Cherukuri
2018-12-04 11:36 ` [PATCH edk2-platforms 1/2] Platform/ARM/Sgi: fix incorrect check of config-id value Chandni Cherukuri
2018-12-04 14:55   ` Ard Biesheuvel
2018-12-05  4:16     ` chandni cherukuri [this message]
2018-12-04 11:36 ` [PATCH edk2-platforms 2/2] Platform/ARM/Sgi: Use NT_FW_CONFIG instead of HW_CONFIG Chandni Cherukuri
2018-12-06 15:42   ` Thomas Abraham
2018-12-06 16:55     ` Ard Biesheuvel
2018-12-06 18:01       ` Thomas Abraham

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CADXzzgo5xPD1x1kaq8j0Yi+pOG9oJ+tOkPiJZWwELJ3WDtBLmQ@mail.gmail.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox