Need info about ACPI - implementing acer_acpi, amilo 1650g
Artur Bać
artur at ebasoft.com.pl
Sat Jan 26 10:01:51 PST 2008
Hello
I need little help in implementing acpi suplementary driver for my Laptop .
Abstract: I implement via acpi, a HotKey switch for enabling WiFi antena
In linux community there is acerhk and acer_acpi module wich does this for
linux. It works even on FujitsuSiemens Amilo1650G when on linux.
So, i dumped DSDT , then corrected errors and I try to find namespace and
method in acpi which is responsible for enablig such radio antena.
Digging in acerhk i found :
#define EC_STATUS_REG 0x66 /* Status register of EC (R) */
#define EC_CNTL_REG 0x66 /* Controller command register of EC (W) */
#define EC_DATA_REG 0x62 /* EC data register (R/W) */
and in acer_acpi
/*
* Magic Number
* Meaning is unknown - this number is required for writing to ACPI for AMW0
* (it's also used in acerhk when directly accessing the EC)
*/
#define ACER_AMW0_WRITE 0x9610
/*
* Bit masks for the old AMW0 interface
*/
#define ACER_AMW0_WIRELESS_MASK 0x35
#define ACER_AMW0_BLUETOOTH_MASK 0x34
#define ACER_AMW0_MAILLED_MASK 0x31
/*
* Acer ACPI method GUIDs
*/
#define AMW0_GUID1 "67C3371D-95A3-4C37-BB61-DD47B491DAAB"
#define WMID_GUID1 "6AF4F258-B401-42fd-BE91-3D4AC2D7C0D3"
#define WMID_GUID2 "95764E09-FB56-4e83-B31A-37761F60994A"
I tryed to much such things in my DSTD since acer_acpi worked with linux on my
laptop and i found in namespace \_SB.PCI0.LPC0.EC0
OperationRegion (ECO1, SystemIO, 0x62, 0x01)
OperationRegion (ECO2, SystemIO, 0x66, 0x01)
here is cut of my DSDT
Scope (\_SB)
{
Device (AMW0)
{
Method (_WED, 1, NotSerialized)
{
Store (0xB0, DBGP)
If (LEqual (Arg0, 0xB0))
{
Store (WLID, B0ED)
Return (B0ED)
}
}
}
Device (PCI0)
{
Device (LPC0)
{
Device (EC0)
{
Name (_HID, EisaId ("PNP0C09"))
Name (_GPE, 0x03)
Method (_STA, 0, NotSerialized)
{
Return (0x0F)
}
Name (_CRS, ResourceTemplate ()
{
IO (Decode16,
0x0062, // Range Minimum
0x0062, // Range Maximum
0x00, // Alignment
0x01, // Length
)
IO (Decode16,
0x0066, // Range Minimum
0x0066, // Range Maximum
0x00, // Alignment
0x01, // Length
)
})
OperationRegion (ECO1, SystemIO, 0x62, 0x01)
Field (ECO1, ByteAcc, Lock, Preserve)
{
PX62, 8
}
OperationRegion (ECO2, SystemIO, 0x66, 0x01)
Field (ECO2, ByteAcc, Lock, Preserve)
{
PX66, 8
}
Method (_REG, 2, NotSerialized)
{
If (LEqual (Arg0, 0x03))
{
Store (Arg1, ECON)
TINI ()
}
}
Since i'm not weak in C/C++ i'm able to write such kld module with Your help
and looking at other written by You in sys/acpi_module
Questions:
1) Is this namespace and registers the ones which I need to switch on/off wifi
antena, did I found crrect ones ?
2) Could any one give me hints/help how to move forward since there are
registers and normaly there should be some method to call, is the Method
(_REG, 2, NotSerialized) the one that schould be called by me, or maybe i
should use AMW0 methods ?
3)the FreeBSD module acpi_fujitsu will not work since it has different OMEID,
FujitsuSiemens AMilo has got "FUJ ", "W37 "
Any help will be apreciated.
--
Sincerelly
Artur Bać
More information about the freebsd-acpi
mailing list