ACPI driver loaded at boot time

- the acpi driver is part of the ramdisk and if present the rc script
  starts it before pci is started as pci needs if APIC mode is turned
  on.
This commit is contained in:
Tomas Hruby 2010-09-02 15:44:36 +00:00
parent 9560b6dea8
commit 7ae6f8740d
5 changed files with 36 additions and 4 deletions

View file

@ -2,6 +2,12 @@
PROGRAMS=ahci at_wini bios_wini cdprobe dev2name floppy loadramdisk mount \
newroot pci sh service sysenv mfs ext2
# acpi is not compiled with ack
.if ${COMPILER_TYPE} == "gnu"
PROGRAMS += acpi
.endif
EXTRA=system.conf passwd rs.single
CPPFLAGS+= -I${MINIXSRCDIR}/servers -I${MINIXSRCDIR}
@ -22,7 +28,7 @@ image.c: bintoc image
bintoc: bintoc.c
$(CC) -o $@ bintoc.c
image: proto.gen mtab rc $(PROGRAMS) $(EXTRA)
image: proto.gen mtab rc $(EXTRA)
mkfs.mfs image proto.gen || { rm -f image; false; }
ahci: ../ahci/ahci
@ -49,6 +55,12 @@ floppy: ../floppy/floppy
../floppy/floppy:
$(MAKE) -C ../floppy
acpi: ../acpi/acpi
install -s ../$@/$@ $@
../acpi/acpi:
$(MAKE) -C ../acpi
pci: ../pci/pci
install -s ../$@/$@ $@
@ -124,7 +136,7 @@ passwd: ../../etc/passwd
rs.single: ../../etc/rs.single
install -s ../../etc/$@ $@
proto.gen: $(MAKEDEV) proto.sh proto
proto.gen: $(PROGRAMS) $(MAKEDEV) proto.sh proto
sh -e proto.sh >proto.gen
.include <bsd.prog.mk>

View file

@ -1,5 +1,5 @@
boot
320 440
420 440
d--755 0 0
bin d--755 0 0
cdprobe ---755 0 0 cdprobe
@ -12,6 +12,7 @@ d--755 0 0
sysenv ---755 0 0 sysenv
$
sbin d--755 0 0
@ACPI@
ahci ---755 0 0 ahci
at_wini ---755 0 0 at_wini
bios_wini ---755 0 0 bios_wini

View file

@ -1,6 +1,11 @@
#!/bin/sh
PATH=/bin:/sbin:/usr/bin:/usr/sbin
sed -n '1,/@DEV/p' <proto | grep -v @DEV@
sed -n '1,/@ACPI/p' <proto | grep -v @ACPI@
if [ -e acpi ]
then
echo " acpi ---755 0 0 acpi"
fi
sed -n '/@ACPI/,/@DEV/p' <proto | grep -v -e @ACPI@ -e @DEV@
(
cd /dev
ls -aln | grep '^[bc]' | egrep -v ' (fd1|fd0p|tcp|eth|ip|udp|tty[pq]|pty)' | grep -v 13, | \

View file

@ -5,6 +5,10 @@ exec >/dev/log
exec 2>/dev/log
exec </dev/null
if [ -e /sbin/acpi ]
then
/bin/service -c up /sbin/acpi
fi
/bin/service -c up /sbin/pci
/bin/service -cn up /sbin/floppy -dev /dev/fd0
if [ X`/bin/sysenv bios_wini` = Xyes ]

View file

@ -361,6 +361,16 @@ service is
uid 0;
};
service acpi
{
io ALL;
system
PRIVCTL # 4
DEVIO # 21
;
uid 0;
};
service pci
{
io cf8:8 # PCI bus controller