From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 3E36621A16EDE for ; Thu, 18 May 2017 03:59:02 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B0643C04B927; Thu, 18 May 2017 10:59:01 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com B0643C04B927 Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=lersek@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com B0643C04B927 Received: from lacos-laptop-7.usersys.redhat.com (ovpn-116-86.phx2.redhat.com [10.3.116.86]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1A0361811C; Thu, 18 May 2017 10:59:00 +0000 (UTC) To: Evgeny Yakovlev , edk2-devel@lists.01.org References: From: Laszlo Ersek Message-ID: <0a8ddf35-cafa-1591-5d5b-5251227f2da1@redhat.com> Date: Thu, 18 May 2017 12:59:00 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.0 MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Thu, 18 May 2017 10:59:01 +0000 (UTC) Subject: Re: How to look up ACPI device node from DXE driver X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 May 2017 10:59:02 -0000 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit On 05/16/17 14:55, Evgeny Yakovlev wrote: > I am writing a DXE driver for a paravirtualized HyperV storage device for > OvmfPkg. Host hypervisor exposes the presence of this device through ACPI > device node in DSDT. Specific AML path itself may be different from host to > host but device UID is always a string: "VMBus". > > I was hoping to be able to walk DSDT table in my DXE driver to locate this > device node and start publishing necessary protocols, but I am having > trouble figuring out how to do this, i.e. are there any support libraries > or protocols to traverse ACPI tables or how do I have to do that manually. > Will be glad for any advice, thanks. This is one of the goals that EFI_ACPI_SDT_PROTOCOL serves. The protocol is specified in Volume 5 of the PI spec. In edk2, the protocol is produced by MdeModulePkg/Universal/Acpi/AcpiTableDxe when the gEfiMdeModulePkgTokenSpaceGuid.PcdInstallAcpiSdtProtocol Feature PCD is set to TRUE. I think there are a handful (?) of protocol consumers in edk2 as well, for example in QuarkPlatformPkg/Acpi/Dxe/AcpiPlatform/ Thanks, Laszlo