templates: Add support for acpi on Hurd
PATCH 1/1 templates: Add support for acpi on Hurd
This adds acpi as bootstrap module whenever it is available. This opens the path for proper IRQ routing for fully-userland disk drivers.
Signed-off-by Samuel Thibault <[email protected]>
util/grub.d/10_hurd.in +24 -0
@@ -68,6 +68,12 @@ for i in /hurd/${hurd_fs}.static /hurd/exec ; do fi done +if test -e '/hurd/acpi.static' ; then + acpi=true +else + acpi=false +fi + if test -e '/hurd/pci-arbiter.static' ; then pci_arbiter=true else
@@ -153,6 +159,24 @@ EOF echo '$(echo "$message" | grub_quote)' EOF + if [ "$acpi" = true ] ; then + if [ "$pci_arbiter" = true ] ; then + next_task='${pci-task}' + elif [ "$rumpdisk" = true ] ; then + next_task='${disk-task}' + else + next_task='${fs-task}' + fi + sed "s/^/$submenu_indentation/" << EOF + module /hurd/acpi.static acpi \\ + $host_ports \\ + --next-task='$next_task' \\ + '\$(acpi-task=task-create)' $resume_task +EOF + host_ports="" + resume_task="" + fi + if [ "$pci_arbiter" = true ] ; then if [ "$rumpdisk" = true ] ; then next_task='${disk-task}'
Quoted 4 lines · Samuel Thibault
This adds acpi as bootstrap module whenever it is available. This opens the path for proper IRQ routing for fully-userland disk drivers.
Signed-off-by Samuel Thibault <[email protected]>
Reviewed-by Daniel Kiper <[email protected]>
Daniel
PATCH 1/1 templates: Start pci-arbiter before acpi on Hurd
In reply to Samuel Thibaultacpi actually needs to access PCI, while pci-arbiter will not be making use of ACPI, so we need to start acpi first.
Signed-off-by Samuel Thibault <[email protected]>
util/grub.d/10_hurd.in +14 -14
@@ -68,18 +68,18 @@ for i in /hurd/${hurd_fs}.static /hurd/exec ; do fi done -if test -e '/hurd/acpi.static' ; then - acpi=true -else - acpi=false -fi - if test -e '/hurd/pci-arbiter.static' ; then pci_arbiter=true else pci_arbiter=false fi +if test -e '/hurd/acpi.static' ; then + acpi=true +else + acpi=false +fi + if test -e '/hurd/rumpdisk.static' ; then rumpdisk=true else
@@ -159,35 +159,35 @@ EOF echo '$(echo "$message" | grub_quote)' EOF - if [ "$acpi" = true ] ; then - if [ "$pci_arbiter" = true ] ; then - next_task='${pci-task}' + if [ "$pci_arbiter" = true ] ; then + if [ "$acpi" = true ] ; then + next_task='${acpi-task}' elif [ "$rumpdisk" = true ] ; then next_task='${disk-task}' else next_task='${fs-task}' fi sed "s/^/$submenu_indentation/" << EOF - module /hurd/acpi.static acpi \\ + module /hurd/pci-arbiter.static pci-arbiter \\ $host_ports \\ --next-task='$next_task' \\ - '\$(acpi-task=task-create)' $resume_task + '\$(pci-task=task-create)' $resume_task EOF host_ports="" resume_task="" fi - if [ "$pci_arbiter" = true ] ; then + if [ "$acpi" = true ] ; then if [ "$rumpdisk" = true ] ; then next_task='${disk-task}' else next_task='${fs-task}' fi sed "s/^/$submenu_indentation/" << EOF - module /hurd/pci-arbiter.static pci-arbiter \\ + module /hurd/acpi.static acpi \\ $host_ports \\ --next-task='$next_task' \\ - '\$(pci-task=task-create)' $resume_task + '\$(acpi-task=task-create)' $resume_task EOF host_ports="" resume_task=""
Re: [PATCH] templates: Start pci-arbiter before acpi on Hurd
Quoted 4 lines · Samuel Thibault
acpi actually needs to access PCI, while pci-arbiter will not be making use of ACPI, so we need to start acpi first.
Signed-off-by Samuel Thibault <[email protected]>
Reviewed-by Daniel Kiper <[email protected]>
Daniel