Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1ocu9G-0000Nb-GX for mharc-grub-devel@gnu.org; Mon, 26 Sep 2022 15:52:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49630) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ocu8h-000066-5b; Mon, 26 Sep 2022 15:51:40 -0400 Received: from domu-toccata.ens-lyon.fr ([140.77.166.138]:44896 helo=sonata.ens-lyon.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ocu8f-00060v-Ep; Mon, 26 Sep 2022 15:51:38 -0400 Received: from localhost (localhost [127.0.0.1]) by sonata.ens-lyon.org (Postfix) with ESMTP id EFF072016B; Mon, 26 Sep 2022 21:51:32 +0200 (CEST) Received: from sonata.ens-lyon.org ([127.0.0.1]) by localhost (sonata.ens-lyon.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id dod_vI637YON; Mon, 26 Sep 2022 21:51:32 +0200 (CEST) Received: from begin (lfbn-bor-1-376-208.w109-215.abo.wanadoo.fr [109.215.91.208]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by sonata.ens-lyon.org (Postfix) with ESMTPSA id D3FBE20167; Mon, 26 Sep 2022 21:51:32 +0200 (CEST) Received: from samy by begin with local (Exim 4.96) (envelope-from ) id 1ocu8a-00H4gM-0r; Mon, 26 Sep 2022 21:51:32 +0200 Date: Mon, 26 Sep 2022 21:51:32 +0200 From: Samuel Thibault To: grub-devel@gnu.org Cc: bug-hurd@gnu.org Subject: [PATCH] templates: Add support for acpi on Hurd Message-ID: <20220926195132.dqhtgpfpim53tkzd@begin> Mail-Followup-To: grub-devel@gnu.org, bug-hurd@gnu.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: NeoMutt/20170609 (1.8.3) Received-SPF: pass client-ip=140.77.166.138; envelope-from=SRS0=tJJm=Z5=ens-lyon.org=samuel.thibault@bounce.ens-lyon.org; helo=sonata.ens-lyon.org X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Sep 2022 19:51:43 -0000 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 diff --git a/util/grub.d/10_hurd.in b/util/grub.d/10_hurd.in index 4294bbe4c..a021d02c2 100644 --- a/util/grub.d/10_hurd.in +++ b/util/grub.d/10_hurd.in @@ -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}'