Opened 11 years ago

Closed 7 months ago

#2841 closed bug (not reproducible)

ACPI parser error

Reported by: nopper Owned by: ithamar
Priority: normal Milestone: R1
Component: Drivers/ACPI Version: R1/pre-alpha1
Keywords: Cc: fredrik.holmqvist@…
Blocked By: Blocking:
Has a Patch: no Platform: x86

Description

I got this while using acpi_thermal driver (cat /dev/power/acpi_thermal/0):

KERN: acpi_thermal: read()
KERN: acpi_thermal: GetThermalType()
KERN: ACPI Error (evregion-0426): No handler for Region [EC__] (0x90afa320) [EmbeddedControl] [20080701]
KERN: ACPI Error (exfldio-0390): Region EmbeddedControl(3) has no handler [20080701]
KERN: ACPI Error (psparse-0627): Method parse/execution failed [\_TZ_.THRM._TMP] (Node 0x90af9820), AE_NOT_EXIST
KERN: acpi_thermal: GotBasicTemperatures()

I think that's a problem relative to the bus manager in general (evaluate_method?)

Attachments (5)

acpi-battery.png (113.7 KB) - added by nopper 10 years ago.
acpi-battery.diff (20.9 KB) - added by nopper 10 years ago.
Typo fix
syslog (356.5 KB) - added by nopper 8 years ago.
namespace.log (26.5 KB) - added by nopper 8 years ago.
namespace.2.log (26.5 KB) - added by nopper 8 years ago.

Download all attachments as: .zip

Change History (29)

comment:1 in reply to:  description Changed 11 years ago by nopper

I got these errors also using my driver that manages the battery. I need this function to test and then to release the code.

comment:2 Changed 10 years ago by nopper

This is a first attempt to port the linux acpi_battery module to haiku.

comment:3 Changed 10 years ago by stippi

Pretty cool. But you have some left-overs in your code, like turning on ACPI unconditionally (you need to change your "kernel" settings file instead) and also there are coding style violations/inconsistencies. If you could go over your patch again and look for coding style issues, that would be great! Thanks a lot for your work! BTW, Is there a userland application already which can work with this driver, or is this something that would need to be done yet?

comment:4 Changed 10 years ago by ithamar

Owner: changed from axeld to ithamar
Status: newassigned

I've just started to look at this, but I get reasonable values with the current acpi_thermal driver on my EeePC 900, doing a cat /dev/power/acpi_thermal/0.... I'll try this patch and see if the battery driver gives me reasonable values too.

@nopper, could you attach the output of /dev/acpi/namespace here, just to see if we might be looking at an ACPI Table issue here?

comment:5 Changed 10 years ago by ithamar

ok, after installing the battery driver it is unable to find the battery device, whilst there are multiple listed in the /dev/acpi/namespace output. One device is found without a name. I'm going to dive into the enumeration code, as that seems to fail, as the tables contain the battery device (see /dev/acpi/namespace output), but no acpi device node is generated for it.

I guess the bug that is causing this _might_ also cause the problem you're seeing. Will report back when I find this bugger ;)

comment:6 Changed 10 years ago by axeld

BTW the PowerStatus application should be extended to work with this driver once it's ready :-)

I also wouldn't mind to have a userland API for it that's part of a power management framework that figures out the details itself. But that's something for R2 (we need something to improve upon, right? ;-)).

comment:7 Changed 10 years ago by ithamar

ok, some more status here.... It seems (using dm_tree from KDL) that the device nodes for _all_ ACPI devices are actually being created, and with the appropriate paths/hids. The main problem seems to be that the *_support() functions in the drivers only get to see a subset of these, and therefore don't get to see the battery.

Will start looking into why this is this weekend. Expect a fix soon ;)

@Axel: Will take a look at the PowerStatus application, didn't even know we had it :P And yeah, lets get the basic tech working for R1, and leave R2 to use it intelligently ;)

comment:8 Changed 10 years ago by axeld

There are a number of rules how the devices are iterated, and when supports_device() is being called. Either ACPI does not use the right flags for the nodes, or the device manager is at fault.

PowerStatus is currently not on the image, as APM is problematic, and ACPI is not only turned off by default, but also does not deliver the information yet :-)

comment:9 Changed 10 years ago by ithamar

ok, got further now. ACPI sets B_FIND_CHILD_ON_DEMAND | B_FIND_MULTIPLE_CHILDREN as flags on the nodes, and when removing ON_DEMAND, the device manager actually calls supports_device() for all ACPI devices. Going to have a look at the device manager code what ON_DEMAND _exactly_ does, and try to figure out if this is a bug in acpi or the device manager ;)

comment:10 Changed 10 years ago by nopper

Tested on my PC seems working. Someone please test it :)

Changed 10 years ago by nopper

Attachment: acpi-battery.png added

comment:11 Changed 10 years ago by monni

There's a typo in the diff:

rechareable -> rechargeable

Changed 10 years ago by nopper

Attachment: acpi-battery.diff added

Typo fix

comment:12 Changed 10 years ago by nopper

Thanks for the notice monni. Fixed

comment:13 Changed 10 years ago by tqh

Cc: fredrik.holmqvist@… added

Our ACPI is updated quite a bit since your latest work. Would mind retrying.

comment:14 Changed 10 years ago by tqh

Would you mind...

comment:15 Changed 10 years ago by mmadia

Component: DriversDrivers/ACPI

comment:16 Changed 8 years ago by scottmc

can you recheck this with a recent Haiku build and let us know the current status?

comment:17 Changed 8 years ago by nopper

Sorry I am a little busy these days. By the way I will test it as soon as possible.

Changed 8 years ago by nopper

Attachment: syslog added

comment:18 Changed 8 years ago by nopper

Actually the output produced is messed up with hrev42149. I've also attached the syslog file also so you can take a deeper look.

comment:19 Changed 8 years ago by tqh

Could you attach the output of more -f /dev/acpi/namespace?

comment:20 Changed 8 years ago by nopper

Ok I am attaching the log. By the way when I try to cat the file I get this message printed on the stderr also:

cat: /dev/acpi/namespace: Bad semaphore ID

Changed 8 years ago by nopper

Attachment: namespace.log added

Changed 8 years ago by nopper

Attachment: namespace.2.log added

comment:21 Changed 8 years ago by nopper

This is instead what I get by reading the acpi_battery file:

~> cat /dev/power/acpi_battery/0 
Battery Status:
 State 402890752, Current Rate -2145965088, Capacity -2070331884, Voltage -2147064566

Battery Info:
 Power Unit -2133007292, Design Capacity -2070332052, Last Full Charge 12870, Technology -2133007292
 Design Voltage -2133092560, Design Capacity Warning -2070331988, Design Capacity Low -2133088960, Capacity Granularity1 0, Capacity Granularity1 0
 Model Number =P<>, Serial Number =P<>, Type >ü<>, OEM Info B

comment:22 Changed 11 months ago by waddlesplash

Still an issue?

comment:23 Changed 11 months ago by nopper

I don't own the hardware anymore and don't have the time to test this. Not sure if ithamar@ has any updates on this. Otherwise you can mark this as obsolete given that more than 10 years have passed.

comment:24 Changed 7 months ago by waddlesplash

Resolution: not reproducible
Status: in-progressclosed
Note: See TracTickets for help on using tickets.