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 8D1C3D8053F for ; Fri, 13 Oct 2023 17:29:37 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=Ux1h71uP8a6lifcHZuHfiS6pUXzMd9Oo2ycu6zJJ6MY=; 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=1697218176; v=1; b=rr5UzhbZhyATIIqBgUCQD3thQilKyzll8I66GmmiQZFFjqhMHNhO2Zt9CZl+8dqw2v/JVAzh MsSyEDmtwq5dB/lWksv6KeQTuBDSVf1R1Q/EFpmSlx9wrTvUagM5yevsHuJYnFO+5jWWNhHNPLj Gq/S5JTMwrKvpmP6Yfj1nZBI= X-Received: by 127.0.0.2 with SMTP id 86SuYY7687511xUYl4MLtZHJ; Fri, 13 Oct 2023 10:29:36 -0700 X-Received: from mail-wr1-f53.google.com (mail-wr1-f53.google.com [209.85.221.53]) by mx.groups.io with SMTP id smtpd.web10.44932.1697218175330395921 for ; Fri, 13 Oct 2023 10:29:35 -0700 X-Received: by mail-wr1-f53.google.com with SMTP id ffacd0b85a97d-317c3ac7339so2174867f8f.0 for ; Fri, 13 Oct 2023 10:29:35 -0700 (PDT) X-Gm-Message-State: E5FnhVNZ44IQo3YNkvI45NIAx7686176AA= X-Google-Smtp-Source: AGHT+IGazOX8KJ6TWQud5axPIiqOoOo6XDvHL0MeUT9+cy9vm5aFlP3M0RuKvadjn+ZD2wqICPZ8RA== X-Received: by 2002:adf:e542:0:b0:31a:d4e1:ea30 with SMTP id z2-20020adfe542000000b0031ad4e1ea30mr23988759wrm.17.1697218173490; Fri, 13 Oct 2023 10:29:33 -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 co25-20020a0564020c1900b0053e36dd75dfsm1316265edb.35.2023.10.13.10.29.32 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 13 Oct 2023 10:29:33 -0700 (PDT) Message-ID: <7f3f36ac-2e7c-4861-885f-6bed69fff1db@linaro.org> Date: Fri, 13 Oct 2023 19:29:31 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [edk2-devel] [PATCH edk2-platforms WIP 0/5] Provide EHCI or XHCI USB controller To: devel@edk2.groups.io, Gerd Hoffmann Cc: Leif Lindholm , Ard Biesheuvel , Jeremy Linton References: <20231013-ehci-xhci-fix-v1-0-f56f28e70e36@linaro.org> <178DADF696DC483E.8679@groups.io> From: "Marcin Juszkiewicz" Organization: Linaro In-Reply-To: <178DADF696DC483E.8679@groups.io> 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=rr5UzhbZ; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=linaro.org (policy=none) W dniu 13.10.2023 o 15:31, Marcin Juszkiewicz via groups.io pisze: > W dniu 13.10.2023 o 15:24, Gerd Hoffmann pisze: > >>> So two solutions came to my mind: >>> >>> 1. rewrite DSDT generation into C >> >> You might want have a look at DynamicTablesPkg/ for that > > Wasn't is involving using ConfigurationManager? Or maybe I just had > wrong assumption after reading code. >>> 2. provide EHCI/XHCI in SSDT table instead of DSDT >> >> Should work, except that I'd suggest to worry about xhci only. >> ehci never actually worked anyway, so why advertise it to the OS in the >> first place? > > Good point. Got rid of EHCI at all. On >= 0.3 XHCI is created, otherwise there is no USB controller in DSDT. >> 3. Add a _STA AML function to the XHCI DSDT description, which is able >> to figure whenever XHCI is present. >> >> We had that in qemu years ago, before switching to full DSDT generation, >> where the _STA functions checked some bit in PCI config space of the ISA >> bridge to figure whenever specific isa devices (floppy, serial/parallel >> port) are present or not. > Will look. Our XHCI is on sysbus so checking PCI_config is not an option. 4. Add variable in ASL + check in _STA for it. And alter that variable from C code once DSDT is done. Kind of what Ampere does in JadePkg/**/AcpiDsdt.c file. I am also thinking of going back to 2nd version and handle it on ExitBootServicesEvent event (again: Ampere/JadePkg). All ACPI tables should be ready at that moment... -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#109607): https://edk2.groups.io/g/devel/message/109607 Mute This Topic: https://groups.io/mt/101938735/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-