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 A72F5941154 for ; Tue, 19 Dec 2023 06:56:17 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=9FN6yJ1V30f+NKC2h6Bbl3CkCz4hLbY0RfeJ7L/3eIc=; c=relaxed/simple; d=groups.io; h=Message-ID:Date:MIME-Version:User-Agent: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-Type; s=20140610; t=1702968976; v=1; b=cudkEKEz4Wjbr7b6t1N6TDxwbkQpiLYga0cL0Gkp5cP/8jldIxWo1seYMU+CrveYFnMn5oDT gERVwuOhYyaVgQzg/cF541sD7ixtzMTj2R24WpOMZiaBqg9w5gqJkLplNI8N6EO8F1fOdDJEhcw qIf/ZfSrbxi0Lo4bt1oLS2EI= X-Received: by 127.0.0.2 with SMTP id PvFzYY7687511xss7oYIjRP1; Mon, 18 Dec 2023 22:56:16 -0800 X-Received: from mail.loongson.cn (mail.loongson.cn [114.242.206.163]) by mx.groups.io with SMTP id smtpd.web11.7103.1702968974205983516 for ; Mon, 18 Dec 2023 22:56:15 -0800 X-Received: from loongson.cn (unknown [10.40.24.149]) by gateway (Coremail) with SMTP id _____8AxFeuKPoFlNIcCAA--.8637S3; Tue, 19 Dec 2023 14:56:10 +0800 (CST) X-Received: from [10.40.24.149] (unknown [10.40.24.149]) by localhost.localdomain (Coremail) with SMTP id AQAAf8BxKXOKPoFlKOkLAA--.39792S3; Tue, 19 Dec 2023 14:56:10 +0800 (CST) Message-ID: <800ad7fb-3198-48b9-b3ba-f5174bad02ff@loongson.cn> Date: Tue, 19 Dec 2023 14:56:10 +0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [edk2-devel] [PATCH v4 12/37] UefiCpuPkg: Add CpuMmuLib.h to UefiCpuPkg To: "Ni, Ray" , "devel@edk2.groups.io" Cc: "Dong, Eric" , "Kumar, Rahul R" , Gerd Hoffmann , Leif Lindholm , Ard Biesheuvel , Sami Mujawar , Sunil V L , "Warkentin, Andrei" References: <20231212130932.2467028-1-lichao@loongson.cn> <20231212131216.2470799-1-lichao@loongson.cn> <17A0932406FD861E.11381@groups.io> <0e0d16f2-cf43-45cc-a79c-b27d556aa0ea@loongson.cn> From: "Chao Li" In-Reply-To: X-CM-TRANSID: AQAAf8BxKXOKPoFlKOkLAA--.39792S3 X-CM-SenderInfo: xolfxt3r6o00pqjv00gofq/1tbiAQAKCGWA-a4EHAACsv X-Coremail-Antispam: 1Uk129KBj9xXoWrKFyrGF1fJr4rGrWkuFW8KrX_yoWxZFc_ua 4UWw18Kw1DGa4DCw4DGF1Fyrn7Xa15ZF1Ut3W5Ja92yr9FvFyfArn7tFnI9ws5JrsYvrnY qa4q9Fn7ua4DXosvyTuYvTs0mTUanT9S1TB71UUUUU7qnTZGkaVYY2UrUUUUj1kv1TuYvT s0mT0YCTnIWjDUYxn0WfASr-VFAUDa7-sFnT9fnUUIcSsGvfJTRUUUbzkYFVCjjxCrM7AC 8VAFwI0_Jr0_Gr1l1xkIjI8I6I8E6xAIw20EY4v20xvaj40_Wr0E3s1l1IIY67AEw4v_Jr I_Jryl8cAvFVAK0II2c7xJM28CjxkF64kEwVA0rcxSw2x7M28EF7xvwVC0I7IYx2IY67AK xVWUCVW8JwA2z4x0Y4vE2Ix0cI8IcVCY1x0267AKxVW8JVWxJwA2z4x0Y4vEx4A2jsIE14 v26r4UJVWxJr1l84ACjcxK6I8E87Iv6xkF7I0E14v26r4UJVWxJr1le2I262IYc4CY6c8I j28IcVAaY2xG8wAqjxCEc2xF0cIa020Ex4CE44I27wAv7VC0I7IYx2IY67AKxVWUJVWUGw Av7VC2z280aVAFwI0_Jr0_Gr1lOx8S6xCaFVCjc4AY6r1j6r4UM4x0Y48IcVAKI48JMx8G jcxK6IxK0xIIj40E5I8CrwCF04k20xvY0x0EwIxGrwCFx2IqxVCFs4IE7xkEbVWUJVW8Jw C20s026c02F40E14v26r106r1rMI8I3I0E7480Y4vE14v26r106r1rMI8E67AF67kF1VAF wI0_Jw0_GFylIxkGc2Ij64vIr41lIxAIcVC0I7IYx2IY67AKxVWUJVWUCwCI42IY6xIIjx v20xvEc7CjxVAFwI0_Jr0_Gr1lIxAIcVCF04k26cxKx2IYs7xG6r1j6r1xMIIF0xvEx4A2 jsIE14v26r1j6r4UMIIF0xvEx4A2jsIEc7CjxVAFwI0_Gr0_Gr1UYxBIdaVFxhVjvjDU0x ZFpf9x07UEFAJUUUUU= 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,lichao@loongson.cn List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: cSwn9PBn2AQGkfrcKHPan2O0x7686176AA= Content-Type: multipart/alternative; boundary="------------loEdUpOpUr6iZgqaRVj00Adk" X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=cudkEKEz; dmarc=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 --------------loEdUpOpUr6iZgqaRVj00Adk Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable Hi Ray, Thanks, Chao On 2023/12/19 14:29, Ni, Ray wrote: >> Plan B: >> It only returns the attribute and length of the first part, leaving it u= p to the caller to decide to look for the next part. >> I'm leaning toward plan B, what do you think? > I like plan B as well. Do you think that "EndAddress" can be removed from= the param list? > > Imaging from caller perspective, the code can be like follows: > BaseAddress =3D 0; > While (TRUE) { > GetMemoryRegionAttributes ( > BaseAddress, > &Length, > &Attributes > ); > If (Length =3D=3D 0) { > Break; > } > // dump BaseAddress, Length, Attributes > BaseAddress +=3D Length; > } Cool, one more question: Do you mean the "Length" parameter will have both in/out properties? -=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 (#112700): https://edk2.groups.io/g/devel/message/112700 Mute This Topic: https://groups.io/mt/103129095/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- --------------loEdUpOpUr6iZgqaRVj00Adk Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

Hi Ray,


=
Thanks,
Chao
On 2023/12/19 14:29, Ni, Ray wrote:
Plan B:
It only returns the attribute and length of the first part, leaving it up t=
o the caller to decide to look for the next part.
I'm leaning toward plan B, what do you think?
I like plan B as well. Do you think that "EndAddress" can be removed from t=
he param list?

Imaging from caller perspective, the code can be like follows:
BaseAddress =3D 0;
While (TRUE) {
  GetMemoryRegionAttributes (
    BaseAddress,
    &Length,
    &Attributes
  );
  If (Length =3D=3D 0) {
    Break;
  }
  // dump BaseAddress, Length, Attributes
  BaseAddress +=3D Length;
}

Cool, one more question:

Do you mean the "Length" parameter will have both in/out properties?


    
_._,_._,_

Groups.io Links:

=20 You receive all messages sent to this group. =20 =20

View/Reply Online (#112700) | =20 | Mute= This Topic | New Topic
Your Subscriptio= n | Contact Group Owner | Unsubscribe [rebecca@openfw.io]

_._,_._,_
--------------loEdUpOpUr6iZgqaRVj00Adk--