Quoting Justus Winter (2014-05-03 01:33:14) > This is a mostly verbatim copy of acpihalt.c from GRUB2 with a little > bit of glue code. > [...] > * i386/i386at/acpihalt.c: Likewise. > (grub_acpi_halt): Map physical addresses.
Hum. Maybe I'm holding stuff wrong. A little help please ;) This works if I build a stock gnumach (w/o any device drivers), boot it using qemu -kernel gnumach, get dropped into the kdb, I enter halt, qemu powers down. Setting GRUB_DEBUG to 1 (i386/i386at/grub_glue.c) enables all the logging from grub_dprintf and friends. Here is an excerpt from an successful run: db> halt Looking for RSDP. Scanning EBDA Looking for RSDP. Scanning BIOS Looking for RSDP. Scanning EBDA Looking for RSDP. Scanning BIOS rsdp1=c00f19b0 rsdp1->rsdt_addr=7fffad3 (I added this to print the physical address of the table) [...] However, when I use --enable-device-drivers=qemu it doesn't work: db> halt Looking for RSDP. Scanning EBDA Looking for RSDP. Scanning EBDA rsdp1=0 Hum. Maybe someone overwrote our precious EBDA table (whatever that is). It's supposed to be around physical address 0x40e. See acpi.c for the code looking for the RSDP. Also, when I shut down a system that made it to userspace, I can see this (with 60_bigmem.patch): init: notifying pfinet of shutdown...init: notifying tmpfs none of shutdown...init: notifying tmpfs none of shutdown...init: notifying tmpfs none of shutdown...init: notifying ext2fs device:hd0s1 of shutdown...init: halting Mach (flags 0x8)... panic: pmap_enter(80000000, 36c3000) falls in physical memory area! Cheers, Justus