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 749559417CE for ; Tue, 17 Oct 2023 13:18:30 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=vhahRGRIM1bn8Y7VKeqQzltJRB6hlR7Gg0h0dFpG/mE=; c=relaxed/simple; d=groups.io; h=Message-ID:Date:MIME-Version:User-Agent:Subject:To:Cc:References:From:Organization: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=1697548708; v=1; b=f/C/a1V7qttMNM8if4NIDKYuRrBc2D4I4z8nVzaxHwCuAuyNODFZbAz8NCW2Se4kGvD3Rm1N iP3ikQNTFsxksQOu8xFx7HYJu1PoChsvBdzshb5Op+FoqigC/Gmr4OuXVBTPjUbDdcn51JxW7f9 DtBc4Ce+LetRDwjYA7lcnyV8= X-Received: by 127.0.0.2 with SMTP id kQ9HYY7687511xWq1P4t0277; Tue, 17 Oct 2023 06:18:28 -0700 X-Received: from mail-ed1-f42.google.com (mail-ed1-f42.google.com [209.85.208.42]) by mx.groups.io with SMTP id smtpd.web11.213847.1697548708065003911 for ; Tue, 17 Oct 2023 06:18:28 -0700 X-Received: by mail-ed1-f42.google.com with SMTP id 4fb4d7f45d1cf-523100882f2so9487545a12.2 for ; Tue, 17 Oct 2023 06:18:27 -0700 (PDT) X-Gm-Message-State: 4JfWcQTswgrzafQJ57cS5Kzkx7686176AA= X-Google-Smtp-Source: AGHT+IHU1MvG6OhYKTBUX7u2K5XM6uYd3zkG992SCK4XHKMydVfUjkuqaX9FjEUlTopdCX/U1eTewA== X-Received: by 2002:a50:d69a:0:b0:53e:468d:64a9 with SMTP id r26-20020a50d69a000000b0053e468d64a9mr1753838edi.21.1697548706502; Tue, 17 Oct 2023 06:18:26 -0700 (PDT) X-Received: from [192.168.200.206] (83.11.27.172.ipv4.supernova.orange.pl. [83.11.27.172]) by smtp.gmail.com with ESMTPSA id n30-20020a50935e000000b0053e31113ff7sm1206063eda.94.2023.10.17.06.18.25 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 17 Oct 2023 06:18:26 -0700 (PDT) Message-ID: Date: Tue, 17 Oct 2023 15:18:24 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [edk2-devel] [PATCH edk2-platforms v2 0/4] Provide XHCI USB controller only for newer hardware To: Nhi Pham , devel@edk2.groups.io Cc: Leif Lindholm , Ard Biesheuvel , Jeremy Linton , Chuong Tran , Rebecca Cran References: <20231016-ehci-xhci-fix-v2-0-cec625451daf@linaro.org> <0fb28403-2174-43ab-b064-bc829bf6808f@os.amperecomputing.com> From: "Marcin Juszkiewicz" Organization: Linaro In-Reply-To: <0fb28403-2174-43ab-b064-bc829bf6808f@os.amperecomputing.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,marcin.juszkiewicz@linaro.org List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: Content-Language: pl-PL, en-GB, en-HK Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b="f/C/a1V7"; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=linaro.org (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 W dniu 17.10.2023 o 13:46, Nhi Pham pisze: >> >> Then looked again at code from >> Ampere/JadePkg/Drivers/AcpiPlatformDxe/AcpiDsdt.c and noticed >> UpdateStatusMethodObject() function. Copied some code and it worked. > > Could you please check whether we can replace the > UpdateStatusMethodObject() function with the > AcpiAmlObjectUpdateInteger() function provided by AcpiLib? AcpiAmlObjectUpdateInteger() finds \\_SB.USB0._STA, checks Buffer[0] and quits because it is AML_METHOD_OP while it only works for AML_NAME_OP. So I went a way I had in meantime. Added AML variable into DSDT and then have _STA method return it's value (as I set it to either 0xF or 0x0). DSDT.asl snippet: ---------------------------------------------------------------------- // USB XHCI Host Controller Device (USB0) { Name (_HID, "PNP0D10") // _HID: Hardware ID Name (_UID, 0x00) // _UID: Unique ID Name (_CCA, 0x01) // _CCA: Cache Coherency Attribute Name (XHCI, 0xF) // will be set using AcpiLib Method (_STA) { Return (XHCI) } ---------------------------------------------------------------------- And then: // UpdateStatusMethodObject (AcpiSdtProtocol, TableHandle, "\\_SB.USB0._STA", 0x0); AcpiAmlObjectUpdateInteger (AcpiSdtProtocol, TableHandle, "\\_SB.USB0.XHCI", 0x0); With this change code works as expected. Thanks! Will send v3. -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#109680): https://edk2.groups.io/g/devel/message/109680 Mute This Topic: https://groups.io/mt/101992601/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-