From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id BC49A81E19 for ; Thu, 17 Nov 2016 18:32:47 -0800 (PST) Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga101.jf.intel.com with ESMTP; 17 Nov 2016 18:32:52 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,655,1473145200"; d="scan'208";a="32651414" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by orsmga005.jf.intel.com with ESMTP; 17 Nov 2016 18:32:52 -0800 Received: from fmsmsx125.amr.corp.intel.com (10.18.125.40) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.248.2; Thu, 17 Nov 2016 18:32:52 -0800 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by FMSMSX125.amr.corp.intel.com (10.18.125.40) with Microsoft SMTP Server (TLS) id 14.3.248.2; Thu, 17 Nov 2016 18:32:52 -0800 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.239]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.96]) with mapi id 14.03.0248.002; Fri, 18 Nov 2016 10:32:50 +0800 From: "Zeng, Star" To: "Ni, Ruiyu" , "edk2-devel@lists.01.org" CC: "sean.brogan@microsoft.com" , "Zeng, Star" Thread-Topic: [edk2] [PATCH] PcAtChipsetPkg/PcRtc: Handle NULL table entry in RSDT/XSDT Thread-Index: AQHSPje6Ce4DHJraoEO+2JLjCJYnL6DYxVwAgAQ/QjCAAHdrAIAAj0uw Date: Fri, 18 Nov 2016 02:32:49 +0000 Message-ID: <0C09AFA07DD0434D9E2A0C6AEB048310395B83A4@shsmsx102.ccr.corp.intel.com> References: <20161114052622.166556-1-ruiyu.ni@intel.com> <734D49CCEBEEF84792F5B80ED585239D58E77C35@SHSMSX104.ccr.corp.intel.com> <0C09AFA07DD0434D9E2A0C6AEB048310395B6F01@shsmsx102.ccr.corp.intel.com> <734D49CCEBEEF84792F5B80ED585239D58E7FC70@SHSMSX104.ccr.corp.intel.com> In-Reply-To: <734D49CCEBEEF84792F5B80ED585239D58E7FC70@SHSMSX104.ccr.corp.intel.com> Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH] PcAtChipsetPkg/PcRtc: Handle NULL table entry in RSDT/XSDT X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Nov 2016 02:32:47 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable I agree to use FADT in commit log. I got the reason why "Table =3D 0;" needs. With that commit log updated, Reviewed-by: Star Zeng Thanks, Star -----Original Message----- From: Ni, Ruiyu=20 Sent: Friday, November 18, 2016 9:59 AM To: Zeng, Star ; edk2-devel@lists.01.org Cc: sean.brogan@microsoft.com Subject: RE: [edk2] [PATCH] PcAtChipsetPkg/PcRtc: Handle NULL table entry i= n RSDT/XSDT Regards, Ray >-----Original Message----- >From: Zeng, Star >Sent: Thursday, November 17, 2016 6:55 PM >To: Ni, Ruiyu ; edk2-devel@lists.01.org >Cc: sean.brogan@microsoft.com; Zeng, Star >Subject: RE: [edk2] [PATCH] PcAtChipsetPkg/PcRtc: Handle NULL table=20 >entry in RSDT/XSDT > >Hi Ray, > >Add two minor comments inline. > >Thanks, >Star >> -----Original Message----- >> From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf=20 >> Of Ruiyu Ni >> Sent: Monday, November 14, 2016 1:26 PM >> To: edk2-devel@lists.01.org >> Subject: [edk2] [PATCH] PcAtChipsetPkg/PcRtc: Handle NULL table entry=20 >> in RSDT/XSDT >> >> The ACPI code may reserve the first entry for a certain table (might=20 >> be FACS) to help with OS compatible issues. > >FACS is in FADT according to ACPI spec. > do you suggest to use FADT in commit message? >> We need to skip the NULL table entry in RSDT/XSDT. >> >> Contributed-under: TianoCore Contribution Agreement 1.0 >> Signed-off-by: Ruiyu Ni >> Cc: Sean Brogan >> --- >> PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcRtc.c | 5 +++++ >> 1 file changed, 5 insertions(+) >> >> diff --git a/PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcRtc.c >> b/PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcRtc.c >> index 2bb41e7..35e34b7 100644 >> --- a/PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcRtc.c >> +++ b/PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcRtc.c >> @@ -1230,6 +1230,11 @@ ScanTableInSDT ( >> // >> Table =3D 0; > >How about to remove this superfluous line " Table =3D 0;"? > // // Find FADT in RSDT // if (Fadt =3D=3D NULL && Rsdp->RsdtAddress !=3D 0) { Fadt =3D ScanTableInSDT ( (EFI_ACPI_DESCRIPTION_HEADER *) (UINTN) Rsdp->RsdtAddress, EFI_ACPI_2_0_FIXED_ACPI_DESCRIPTION_TABLE_SIGNATURE, sizeof (UINT32) ); } when above code runs in 64bit env, CopyMem only fills the 4-byte in Table l= eaving hi-4-byte un-initialized. so we need to set Table to 0 to fill hi-4-byte. >> CopyMem (&Table, (VOID *) (EntryBase + Index *=20 >> TablePointerSize), TablePointerSize); >> + >> + if (Table =3D=3D NULL) { >> + continue; >> + } >> >> + >> if (Table->Signature =3D=3D Signature) { >> return Table; >> } >> -- >> 2.9.0.windows.1 >> >> _______________________________________________ >> edk2-devel mailing list >> edk2-devel@lists.01.org >> https://lists.01.org/mailman/listinfo/edk2-devel