public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Jonathan Cameron via groups.io" <jonathan.cameron=huawei.com@groups.io>
To: Yuquan Wang <wangyuquan1236@phytium.com.cn>
Cc: <ardb+tianocore@kernel.org>, <quic_llindhol@quicinc.com>,
	<peter.maydell@linaro.org>, <devel@edk2.groups.io>,
	<qemu-devel@nongnu.org>, <linux-cxl@vger.kernel.org>,
	<chenbaozi@phytium.com.cn>, <wangyinfeng@phytium.com.cn>,
	<shuyiqi@phytium.com.cn>
Subject: Re: [edk2-devel] [RFC PATCH edk2-platforms 1/2] SbsaQemu: Add acpi0016 & acpi0017 objects into DSDT
Date: Fri, 30 Aug 2024 11:59:51 +0100	[thread overview]
Message-ID: <20240830115951.0000783b@Huawei.com> (raw)
In-Reply-To: <20240830031545.548789-2-wangyuquan1236@phytium.com.cn>

On Fri, 30 Aug 2024 11:15:44 +0800
Yuquan Wang <wangyuquan1236@phytium.com.cn> wrote:

> This adds relevant definitions and descriptions of acpi0016 and
> acpi0017 to support CXL.
> 
> With the implementation of pxb-cxl on the original pcie host bridge,
> the previous space layout of mmio32 & mmio64 have to be divided to
> provide the mmio space for cxl host bridge.
> 
> I'm not sure if the new space layout would bring a series of bad
> influence, but it seems that the base address and size of cxl host
> bridge is ok.
> 
> Signed-off-by: Yuquan Wang <wangyuquan1236@phytium.com.cn>

I'll go as far as saying this looks about right to me, but needs
some more eyes to be more certain. 
Trivial comments inline.

Jonathan

> diff --git a/Silicon/Qemu/SbsaQemu/AcpiTables/Dsdt.asl b/Silicon/Qemu/SbsaQemu/AcpiTables/Dsdt.asl
> index c134fb66e860..94d0b2cbb118 100644
> --- a/Silicon/Qemu/SbsaQemu/AcpiTables/Dsdt.asl
> +++ b/Silicon/Qemu/SbsaQemu/AcpiTables/Dsdt.asl

> @@ -483,5 +849,45 @@ DefinitionBlock ("DsdtTable.aml", "DSDT",
>          }
>        } // End _OSC
>      }
> +
> +    Scope (\_SB)
> +    {
> +        // CXL Root for OS Driver
> +        Device (CXLM)
> +        {
> +            Name (_HID, "ACPI0017")  // _HID: Hardware ID
> +            Method (_STA, 0, NotSerialized)  // _STA: Status
> +            {
> +                Return (0x0B)
> +            }
> +
> +            Method (_DSM, 4, Serialized)  // _DSM: Device-Specific Method
> +            {
> +                If ((Arg0 == ToUUID ("f365f9a6-a7de-4071-a66a-b40c0b4f8e52") /* Unknown UUID */))
Name that UUID in the comment.  I was thinking you didn't have QTG querying supported
because oddly I can't remember the uuid :)

> +                {
> +                    If ((Arg2 == Zero))
> +                    {
> +                        Return (Buffer (One)
> +                        {
> +                         0x01                                             // .
> +                        })
> +                    }
> +
> +                    If ((Arg2 == One))
> +                    {
> +                        Return (Package (0x02)
> +                        {
> +                            One,
> +                            Package (0x02)
> +                            {
> +                                Zero,
> +                                One
Hmm. I probably have this wrong in the qemu code, but it should be safe.
This is saying QTG 0 default with fallback to 1.  We don't have anything
in group 1.
Ah well never mind.  
> +                            }
> +                        })
> +                    }
> +                }
> +            }
> +        }
> +    }
>    } // Scope (_SB)
>  }





-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#120446): https://edk2.groups.io/g/devel/message/120446
Mute This Topic: https://groups.io/mt/108173684/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



  reply	other threads:[~2024-08-30 10:59 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-30  3:15 [edk2-devel] [RFC PATCH edk2-platforms 0/2] add basic support for CXL on sbsa-ref Yuquan Wang
2024-08-30  3:15 ` [edk2-devel] [RFC PATCH edk2-platforms 1/2] SbsaQemu: Add acpi0016 & acpi0017 objects into DSDT Yuquan Wang
2024-08-30 10:59   ` Jonathan Cameron via groups.io [this message]
2024-08-30  3:15 ` [edk2-devel] [RFC PATCH edk2-platforms 2/2] SbsaQemu: AcpiTables: Add CEDT Table Yuquan Wang
2024-08-30 10:31   ` Jonathan Cameron via groups.io

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=20240830115951.0000783b@Huawei.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