acpica5 and acpi sub-modules (Re: cvs commit: src/sys/dev Makefile)
YONETANI Tomokazu
qhwt+dragonfly-submit at les.ath.cx
Thu Apr 29 01:25:52 PDT 2004
Hi.
On Mon, Apr 26, 2004 at 10:11:30AM +0900, YONETANI Tomokazu wrote:
> On Sun, Apr 25, 2004 at 01:42:25PM +0000, David Rhodus wrote:
> > Matthew Dillon wrote:
> >
> > >:drhodus 2004/04/23 21:11:10 PDT
> > >:
> > >:DragonFly src repository
> > >:
> > >: Modified files:
> > >: sys/dev Makefile
> > >: Log:
> > >: Add in the new acpica5 to the device build path.
> > >:
> > >: Revision Changes Path
> > >: 1.3 +1 -1 src/sys/dev/Makefile
> > >:
> > >:
> > >:http://www.dragonflybsd.org/cvsweb/src/sys/dev/Makefile.diff?r1=1.2&r2=1.3&f=h
> > >
> > > Ohhh... I don't know about that. I don't think I ever did any testing
> > > of it, or entirely finished bringing it in. This code should be
> > > considered extremely experiemental.
> > >
> > > Also there might be an issue with the boot loader automatically loading
> > > the module. It might be a good idea to rename the module for now.
> > >
> > >
> >
> > On the 20'something types of boards I tested this on, I found no
> > problems. Though
> > yes, it is a good idea to wait till we get past a stable tag for this.
>
> Does acpica5 successfully load when you're using UP kernel?
> I have only tested it with UP kernel, but it complains that
> required module `pci' is missing and wouldn't load. If I remove
> MODULE_DEPEND() from /sys/i386/acpica5/acpi_pci.c, it fails
> saying undefined symbol lapic_init . I've grep'ped it with
>
> $ grep -r lapic_init /sys/
>
> but no definition was found.
(Am I in his killfile?)
Ok, here's a patch that make acpica5 module and its sub-modules load
on my system. At the moment, the only acpi sub module is acpi_toshiba
because that's the only sub-module I can test. Acpi sub-modules are
kernel modules to access some special hardwares installed on some
PCs. acpi_toshiba is one of such sub-modules needed to do CPU throttle
and other things on Toshiba notebook PCs.
What the patch does:
- isolate module build directory from /sys/dev/acpica5 into
/sys/dev/acpi, so that sub-module can be built at the same time,
and new sub-modules can be populated without messing up acpica5
directory. /sys/dev/acpi roughly corresponds to /sys/modules/acpi
of FreeBSD. Makefiles are brought from FreeBSD without removing
$FreeBSD$ keywords.
- add "gross hack" from /sys/i386/i386/machdep.c,1.584 of FreeBSD,
and remove stale dependency to non-existing `pci' module, so that
acpi module loads.
- catch up with the change in src/sys/i386/include/acpica_machdep.h,v 1.5
from FreeBSD to quiet the warning. There's another place where it
produces `implicit declaration' warning for isab_attach(), but I'm not
sure how to fix this.
To apply the patch:
$ zcat acpi5.gz | patch -d /path/to/sys -p0
Tested with both gcc2 and gcc3 on UP kernel (and I'm using it now).
The patch does not connect /sys/dev/acpi to buildkernel, so you have to
either build and install it manually, or add `acpi' to SUBDIR in
/sys/dev/Makefile, to test this.
Thanks.
Attachment:
acpi5.gz
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bin00004.bin
Type: application/octet-stream
Size: 3441 bytes
Desc: "Description: application/gunzip"
URL: <http://lists.dragonflybsd.org/pipermail/submit/attachments/20040429/b9a16808/attachment-0018.bin>
More information about the Submit
mailing list