public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* How to look up ACPI device node from DXE driver
@ 2017-05-16 12:55 Evgeny Yakovlev
  2017-05-18 10:59 ` Laszlo Ersek
  0 siblings, 1 reply; 3+ messages in thread
From: Evgeny Yakovlev @ 2017-05-16 12:55 UTC (permalink / raw)
  To: edk2-devel

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.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: How to look up ACPI device node from DXE driver
  2017-05-16 12:55 How to look up ACPI device node from DXE driver Evgeny Yakovlev
@ 2017-05-18 10:59 ` Laszlo Ersek
  2017-05-18 11:54   ` Evgeny Yakovlev
  0 siblings, 1 reply; 3+ messages in thread
From: Laszlo Ersek @ 2017-05-18 10:59 UTC (permalink / raw)
  To: Evgeny Yakovlev, edk2-devel

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: How to look up ACPI device node from DXE driver
  2017-05-18 10:59 ` Laszlo Ersek
@ 2017-05-18 11:54   ` Evgeny Yakovlev
  0 siblings, 0 replies; 3+ messages in thread
From: Evgeny Yakovlev @ 2017-05-18 11:54 UTC (permalink / raw)
  To: Laszlo Ersek; +Cc: edk2-devel

Thanks Laszlo! EFI_ACPI_SDT_PROTOCOL is indeed helpful.

2017-05-18 13:59 GMT+03:00 Laszlo Ersek <lersek@redhat.com>:

> 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
>


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-05-18 11:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-16 12:55 How to look up ACPI device node from DXE driver Evgeny Yakovlev
2017-05-18 10:59 ` Laszlo Ersek
2017-05-18 11:54   ` Evgeny Yakovlev

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox