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

View File

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

View File

@ -1,6 +1,11 @@
#!/bin/sh #!/bin/sh
PATH=/bin:/sbin:/usr/bin:/usr/sbin 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 cd /dev
ls -aln | grep '^[bc]' | egrep -v ' (fd1|fd0p|tcp|eth|ip|udp|tty[pq]|pty)' | grep -v 13, | \ 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 2>/dev/log
exec </dev/null exec </dev/null
if [ -e /sbin/acpi ]
then
/bin/service -c up /sbin/acpi
fi
/bin/service -c up /sbin/pci /bin/service -c up /sbin/pci
/bin/service -cn up /sbin/floppy -dev /dev/fd0 /bin/service -cn up /sbin/floppy -dev /dev/fd0
if [ X`/bin/sysenv bios_wini` = Xyes ] if [ X`/bin/sysenv bios_wini` = Xyes ]

View File

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