From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 78A399419B1 for ; Fri, 5 Jan 2024 13:56:31 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=LbclR3M/U0d05UzQRtp7puIPx1L5siNVgI5sf/KAj5k=; c=relaxed/simple; d=groups.io; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From:In-Reply-To:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type:Content-Transfer-Encoding; s=20140610; t=1704462990; v=1; b=g0TUIL/BxXFhRxep73wi8CV/Me2IgQaqac8gl7S10+xYR49QDm9itegc7c/EaQwEIYNAsM6p Pni/NQBy7QLinUEXkpgJzTLa8elBxNoqeY8phLux5jAyAt7fgJZSJAZkXDQ+blo+1pO5H/+nM79 Zg42TbSCko/HAmke0nDZmqTk= X-Received: by 127.0.0.2 with SMTP id hDL4YY7687511xHoovLK6her; Fri, 05 Jan 2024 05:56:30 -0800 X-Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.groups.io with SMTP id smtpd.web11.23770.1704462989467473895 for ; Fri, 05 Jan 2024 05:56:29 -0800 X-Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-443-7dxt_3oNPgCRPfdrJeWLUg-1; Fri, 05 Jan 2024 08:56:25 -0500 X-MC-Unique: 7dxt_3oNPgCRPfdrJeWLUg-1 X-Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id D734F88CC40; Fri, 5 Jan 2024 13:56:24 +0000 (UTC) X-Received: from [10.39.193.6] (unknown [10.39.193.6]) by smtp.corp.redhat.com (Postfix) with ESMTPS id EF20D3C25; Fri, 5 Jan 2024 13:56:23 +0000 (UTC) Message-ID: <84ec1806-f42e-4fbf-2ee2-96ce2496478a@redhat.com> Date: Fri, 5 Jan 2024 14:56:23 +0100 MIME-Version: 1.0 Subject: Re: [edk2-devel] [PATCH 2/2] UefiCpuPkg: Check lower 24 bits of ProcessorNumber To: "Ni, Ray" , "devel@edk2.groups.io" , "Tan, Dun" Cc: "Kumar, Rahul R" , Gerd Hoffmann , "Xu, Min M" References: <20240104073216.1327-1-dun.tan@intel.com> <20240104073216.1327-3-dun.tan@intel.com> <6973746b-9361-4a0c-396a-96997064603a@redhat.com> From: "Laszlo Ersek" In-Reply-To: X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,lersek@redhat.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: QMFs79hAc5zXsbR3MHIrLDLqx7686176AA= Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b="g0TUIL/B"; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=redhat.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io On 1/5/24 13:55, Ni, Ray wrote: >>> - if (ProcessorNumber !=3D 0) { >>> + // >>> + // Lower 24 bits contains the actual processor number. >>> + // >>> + if ((ProcessorNumber & (CPU_V2_EXTENDED_TOPOLOGY - 1)) !=3D 0) { > I suggest we explicitly use BIT24 instead of CPU_V2_EXTENDED_TOPOLOGY. > Using BIT24 clearly tells that processor number only occupies the lower 2= 4 bits. Yes, I've noticed this discrepancy too; I agree BIT24 is clearer here! >=20 >=20 >>> return EFI_NOT_FOUND; >>> } >>> >> >> Reviewed-by: Laszlo Ersek >=20 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#113287): https://edk2.groups.io/g/devel/message/113287 Mute This Topic: https://groups.io/mt/103518743/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/leave/12367111/7686176/19134562= 12/xyzzy [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-