From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-yw0-x231.google.com (mail-yw0-x231.google.com [IPv6:2607:f8b0:4002:c05::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id D50F621AEBAA5 for ; Thu, 18 May 2017 04:54:42 -0700 (PDT) Received: by mail-yw0-x231.google.com with SMTP id b68so19475283ywe.3 for ; Thu, 18 May 2017 04:54:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=HyCvu2btR9epi3tnpOMAfagQ7uP/nzsJq/ZbrwSW4a8=; b=hS4c1sUr18a1zYRBgZeAkV291jtPzLWM+svFtnEFlIkA5g4mbFK7dFzmnSNPTIjzNG P81Kalye6We4Wk5cgPk5vvN8/Qkz/62pP6pXvG1ANBCYwvr/VC13CiHvEglYi5hGUvlE T9Q2WW3c8TPaHHb1nfiZyvAJy3LmFJGlyuCNYnMwJC/ifUd3BZkphaNhrGPkeZBjaS67 2/RMclykshIVzPCkYP8CB+Ue6FyVuXi+OH18lfCiHMu+p+tWXFqlp8hX2QOOMDbwn8TJ eQm6/AvYgJr+0iD+kXxZNULmfHwRpqZiQk77xKHtKDNzeLkwgPd/U+NR5OWPSGU2lLMv K3bg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=HyCvu2btR9epi3tnpOMAfagQ7uP/nzsJq/ZbrwSW4a8=; b=C3t1ngvOEupTokuYNsmYZnOISfBRUJhaHePRnY7fPor8b0RJ3G3fN58XObIpufWmPm 24zNhZEJ5YSelxltKt9De3uEp9JCldbP1T+vuh1yNFGm/KetEK/+5EuVhBBJEW1er2Fl uPSeyUK5LVweuI0a+VPLEY5xFQ+Cgg5bVk3UAkNuGgNfNnjQE3/CN9/LlbfKCWmHR3Ua /TUsN+jR5F/MjjJrd0CPhDEE9B2O35H/TkOYfsL6vwWAUy2ESu5I22WqxEapTxx5L3DC JxrJQ5Sx3rbqGbt6YE1d52ezNqaGWBi10QNpkkN+0e3pX4dcR+UYo0gKOhRV67ndIkL6 5m/g== X-Gm-Message-State: AODbwcB9kI2F8gOEUApJ0bklJp7qv4xf9Z4i4HBiWuEhlCwsPkb4DSVc 6WHJ4bxd5FNuzsPULGbE514m8RdmXQ== X-Received: by 10.129.131.70 with SMTP id t67mr2829525ywf.317.1495108482054; Thu, 18 May 2017 04:54:42 -0700 (PDT) MIME-Version: 1.0 Received: by 10.13.230.213 with HTTP; Thu, 18 May 2017 04:54:41 -0700 (PDT) In-Reply-To: <0a8ddf35-cafa-1591-5d5b-5251227f2da1@redhat.com> References: <0a8ddf35-cafa-1591-5d5b-5251227f2da1@redhat.com> From: Evgeny Yakovlev Date: Thu, 18 May 2017 14:54:41 +0300 Message-ID: To: Laszlo Ersek Cc: edk2-devel@lists.01.org X-Content-Filtered-By: Mailman/MimeDel 2.1.22 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 11:54:43 -0000 Content-Type: text/plain; charset="UTF-8" Thanks Laszlo! EFI_ACPI_SDT_PROTOCOL is indeed helpful. 2017-05-18 13:59 GMT+03:00 Laszlo Ersek : > 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 >