Bug #1589

ACPI update

Added by polachok about 5 years ago. Updated over 4 years ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:polachok% Done:

0%

Category:-
Target version:-

Description

I am working on updating ACPI to modern state and ACPI interrupt
routing. You can get the current code here [1]. It's going not bad but
I have some questions which I need answers for before moving on.

1) Locking. I have no idea which one should be used. There're 2
families of locking macros: ACPI_SERIAL_* and ACPI_LOCK_*
(see sys/dev/acpica5/acpivar.h). FreeBSD uses mtx_* for ACPI_LOCK
and sx_* for ACPI_SERIAL.

2) APIC. Current APIC code doesn't allow setting interrupts from other
subsystems and changing interrupts after boot, but this is required for
BUS_CONFIG_INTR to work.

[1] http://gitweb.dragonflybsd.org/~polachok/dragonfly.git/newacpi

History

#1 Updated by dillon about 5 years ago

: I am working on updating ACPI to modern state and ACPI interrupt
: routing. You can get the current code here [1]. It's going not bad but
: I have some questions which I need answers for before moving on.
:
: 1) Locking. I have no idea which one should be used. There're 2
: families of locking macros: ACPI_SERIAL_* and ACPI_LOCK_*
: (see sys/dev/acpica5/acpivar.h). FreeBSD uses mtx_* for ACPI_LOCK
: and sx_* for ACPI_SERIAL.

Either a lockmgr lock or our new mtx* lock (which are blockable locks
like lockmgr locks) for both. Our mtx lock API is different from
FreeBSD's (not meant to be API compatible).

: 2) APIC. Current APIC code doesn't allow setting interrupts from other
: subsystems and changing interrupts after boot, but this is required for
: BUS_CONFIG_INTR to work.

Could you expand on this a bit? We set aside a fixed number of vectors
but that's the only real limitation that I can think of.

-Matt
Matthew Dillon
<>

#2 Updated by polachok about 5 years ago

I'm planning to commit this on the weekend, so please test the branch
[1] or, alternatively, you can download cd [2] or usb [3] image. PCI
part is not enabled by default.

[1] http://gitweb.dragonflybsd.org/~polachok/dragonfly.git/newacpi
[2] http://polachok.v12.su/dfly.iso.bz2
[3] http://polachok.v12.su/dfly.img.bz2

#3 Updated by eocallaghan about 5 years ago

Works fine here, Lenovo X301.
Although hitting the function key for suspend/resume does nothing
although I assume its normal as its a livecd?

Cheers,
Edward.

2009/11/5 Alexander Polakov <>:
> 2009/10/26, Alexander Polakov <>:
>>  I am working on updating ACPI to modern state and ACPI interrupt
>>  routing. You can get the current code here [1]. It's going not bad but
>>  I have some questions which I need answers for before moving on.
> I'm planning to commit this on the weekend, so please test the branch
> [1] or, alternatively, you can download cd [2] or usb [3] image. PCI
> part is not enabled by default.
>
> [1] http://gitweb.dragonflybsd.org/~polachok/dragonfly.git/newacpi
> [2] http://polachok.v12.su/dfly.iso.bz2
> [3] http://polachok.v12.su/dfly.img.bz2
>

#4 Updated by ahuete.devel about 5 years ago

Hi Polachok,

I've just tried the USB image in my Acer Aspire One. It boots fine but
once it reaches the part where the login is displayed, it shows the
DFBSD logo like in a infinite loop and no login prompt is showed. I
can't try CD ISO because this notebook lacks of CD drive.

Cheers,
Antonio Huete

2009/11/5 Alexander Polakov <>:
> 2009/10/26, Alexander Polakov <>:
>>  I am working on updating ACPI to modern state and ACPI interrupt
>>  routing. You can get the current code here [1]. It's going not bad but
>>  I have some questions which I need answers for before moving on.
> I'm planning to commit this on the weekend, so please test the branch
> [1] or, alternatively, you can download cd [2] or usb [3] image. PCI
> part is not enabled by default.
>
> [1] http://gitweb.dragonflybsd.org/~polachok/dragonfly.git/newacpi
> [2] http://polachok.v12.su/dfly.iso.bz2
> [3] http://polachok.v12.su/dfly.img.bz2
>

#5 Updated by justin about 5 years ago

> Hi Polachok,
>
> I've just tried the USB image in my Acer Aspire One. It boots fine but
> once it reaches the part where the login is displayed, it shows the
> DFBSD logo like in a infinite loop and no login prompt is showed. I
> can't try CD ISO because this notebook lacks of CD drive.

What does the "normal" DragonFly USB image do? If that one has the same
problem, then we know it's not the ACPI changes causing it. Plus I'm
curious to see if it works on that model Acer - I don't recall if it was
tried before.

#6 Updated by eocallaghan about 5 years ago

Hi,

Its got nothing to do with the ACPI changes.
I also seen this, move to another virtual terminal. Your see gettty
pegging the cpu at around 97% as it loops. (if I am thinking of the
same bug I saw the other day), any way, does not look complex to fix.

Cheers,
Edward.

2009/11/7 <>:
>> Hi Polachok,
>>
>> I've just tried the USB image in my Acer Aspire One. It boots fine but
>> once it reaches the part where the login is displayed, it shows the
>> DFBSD logo like in a infinite loop and no login prompt is showed. I
>> can't try CD ISO because this notebook lacks of CD drive.
>
> What does the "normal" DragonFly USB image do?  If that one has the same
> problem, then we know it's not the ACPI changes causing it.  Plus I'm
> curious to see if it works on that model Acer - I don't recall if it was
> tried before.
>
>

#7 Updated by Johannes.Hofmann about 5 years ago

Alexander Polakov <> wrote:
> 2009/10/26, Alexander Polakov <>:
>> I am working on updating ACPI to modern state and ACPI interrupt
>> routing. You can get the current code here [1]. It's going not bad but
>> I have some questions which I need answers for before moving on.
> I'm planning to commit this on the weekend, so please test the branch
> [1] or, alternatively, you can download cd [2] or usb [3] image. PCI
> part is not enabled by default.
>
> [1] http://gitweb.dragonflybsd.org/~polachok/dragonfly.git/newacpi

Boots and works fine on a Thinkpad X60s. APIC_IO needs still to be
commented out, otherwise it hangs on boot after detecting the ahci
based disk (same as with current ACPI).

Cheers,
Johannes

#8 Updated by eocallaghan about 5 years ago

Ah, well there was a fix for the AHCI stuff committed after the git
base of this ACPI branch and it was not rebased before the ISO was
spun, so its most likely fixed once this ACPI stuff hits the main tree
Johannes.

2009/11/7 Johannes Hofmann <>:
> Alexander Polakov <> wrote:
>> 2009/10/26, Alexander Polakov <>:
>>>  I am working on updating ACPI to modern state and ACPI interrupt
>>>  routing. You can get the current code here [1]. It's going not bad but
>>>  I have some questions which I need answers for before moving on.
>> I'm planning to commit this on the weekend, so please test the branch
>> [1] or, alternatively, you can download cd [2] or usb [3] image. PCI
>> part is not enabled by default.
>>
>> [1] http://gitweb.dragonflybsd.org/~polachok/dragonfly.git/newacpi
>
> Boots and works fine on a Thinkpad X60s. APIC_IO needs still to be
> commented out, otherwise it hangs on boot after detecting the ahci
> based disk (same as with current ACPI).
>
> Cheers,
> Johannes
>

#9 Updated by eocallaghan about 5 years ago

I spotted a nasty looking problem:

ACPI Warning: Cannot release the ACPI Global Lock, it has not acquired 20090521
evmisc-629
ACPI Exception: AE_NOT_ACQUIRED, Could not release Global Lock 20090521 exutils-426

Could you have a look into this please polachok.

Thanks,
Edward.

#10 Updated by polachok about 5 years ago

Can you please try this diff [1] ? I don't have hardware with both SMP and EC.

[1] http://leaf.dragonflybsd.org/~polachok/acpi-ec-lock.diff

#11 Updated by dillon about 5 years ago

:Alexander Polakov <> added the comment:
:
:Can you please try this diff [1] ? I don't have hardware with both SMP and =
:EC.
:
:[1] http://leaf.dragonflybsd.org/~polachok/acpi-ec-lock.diff
:

How can I tell if I have this feature? What is acpi-ec?

-Matt
Matthew Dillon
<>

#12 Updated by TGEN about 5 years ago

Matthew Dillon wrote:
> :Alexander Polakov <> added the comment:
> :
> :Can you please try this diff [1] ? I don't have hardware with both SMP and =
> :EC.
> :
> :[1] http://leaf.dragonflybsd.org/~polachok/acpi-ec-lock.diff
>
> How can I tell if I have this feature? What is acpi-ec?

That is an ACPI Embedded Controller, a microcontroller device which
manages a system and offers an interface via ACPI to query its status
and execute commands. Examples are setting brightness levels on an LCD
screen if the graphics controller doesn't allow you to set it, advanced
queries regarding the state of a battery in a laptop, acceleration
sensors, the ThinkLight in IBM/Lenovo ThinkPad laptops, etc. Most
(modern) laptops have one, and if you see acpi_ec attach in dmesg you
probably do as well.

Cheers,
--
Thomas E. Spanjaard

#13 Updated by alexh over 4 years ago

The ACPI update seems to work decently. If new problems crop up they should and
will be reported separately anyways, so I'm closing this.

Cheers,
Alex Hornung

Also available in: Atom PDF