From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=217.140.101.70; helo=foss.arm.com; envelope-from=chandni.cherukuri@arm.com; receiver=edk2-devel@lists.01.org Received: from foss.arm.com (usa-sjc-mx-foss1.foss.arm.com [217.140.101.70]) by ml01.01.org (Postfix) with ESMTP id 383AA211944D0 for ; Tue, 4 Dec 2018 20:16:44 -0800 (PST) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 8C6D015BF for ; Tue, 4 Dec 2018 20:16:43 -0800 (PST) Received: from mail-ed1-f42.google.com (usa-sjc-mx-foss1.foss.arm.com [217.140.101.70]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 52E5B3F7B4 for ; Tue, 4 Dec 2018 20:16:43 -0800 (PST) Received: by mail-ed1-f42.google.com with SMTP id o10so15796508edt.13 for ; Tue, 04 Dec 2018 20:16:43 -0800 (PST) X-Gm-Message-State: AA+aEWb3vQgur+pgl43uhxtcMY/dTWAJg5h5kHfcB30KMkK0YyCXutR0 SZkc6Bb8BQXfQaNAGD2CEb5zvFLoYPZFJLwWJVs= X-Google-Smtp-Source: AFSGD/XnD/OOscoiBYROFSeNLsf/Lsq0tid2Gjssw43iQcqnT9x0i1KIEOw5eBzE6VWX//Ex5KuObvzppbnC8IZjABk= X-Received: by 2002:a50:aed5:: with SMTP id f21mr20468174edd.120.1543983401738; Tue, 04 Dec 2018 20:16:41 -0800 (PST) MIME-Version: 1.0 References: <1543923378-16820-1-git-send-email-chandni.cherukuri@arm.com> <1543923378-16820-2-git-send-email-chandni.cherukuri@arm.com> In-Reply-To: From: chandni cherukuri Date: Wed, 5 Dec 2018 09:46:15 +0530 X-Gmail-Original-Message-ID: Message-ID: To: Ard Biesheuvel Cc: Chandni Cherukuri , edk2-devel@lists.01.org Subject: Re: [PATCH edk2-platforms 1/2] Platform/ARM/Sgi: fix incorrect check of config-id value X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Dec 2018 04:16:44 -0000 Content-Type: text/plain; charset="UTF-8" On Tue, Dec 4, 2018 at 8:26 PM Ard Biesheuvel wrote: > > On Tue, 4 Dec 2018 at 12:36, Chandni Cherukuri > 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 > > Cc: Leif Lindholm > > Contributed-under: TianoCore Contribution Agreement 1.1 > > Signed-off-by: Chandni Cherukuri > > --- > > 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