Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ec/system76/ec: Add manual fan control #245

Open
wants to merge 1 commit into
base: system76
Choose a base branch
from
Open

Conversation

crawfxrd
Copy link
Member

@crawfxrd crawfxrd commented Dec 31, 2024

system76/ec#512 added a manual fan control option.

In PWM control mode, the system firmware or OS is responsible for setting the fan target duty to manage thermals. CTR0 in the EC code determines the maximum valid PWM duty, which is hard-coded to 255.

RPM target is not supported.

Requires: system76/ec#512

@crawfxrd crawfxrd force-pushed the fan-manual branch 3 times, most recently from 23f57a6 to 911711e Compare January 2, 2025 20:50
@crawfxrd crawfxrd marked this pull request as ready for review February 4, 2025 16:08
@crawfxrd crawfxrd requested review from a team February 4, 2025 16:08
@leviport
Copy link
Member

leviport commented Feb 4, 2025

This doesn't seem to compiling for me, using the firmware-open build.sh script. My submodules are updated, and I tried both with this branch checked out in the Coreboot submodule with master checked out in firmware-open, and with the fan-manual branch of firmware-open checked out.

Error output snippet below:

Click to expand
coreboot toolchain v2024-07-03_7c1813c137
    HOSTCC     cbfstool/linux_trampoline.o
    HOSTCC     cbfstool/cbfs-payload-linux.o
    HOSTCC     cbfstool/compress.o
    HOSTCC     cbfstool/lz4.o
    HOSTCC     cbfstool/lz4hc.o
    HOSTCC     cbfstool/lz4frame.o
    HOSTCC     cbfstool/xxhash.o
    HOSTCC     cbfstool/lz4_wrapper.o
    HOSTCC     cbfstool/lzma.o
    HOSTCC     cbfstool/LzFind.o
    HOSTCC     cbfstool/LzmaDec.o
    HOSTCC     cbfstool/LzmaEnc.o
    MAKE       /home/levi/repos/firmware-open/coreboot/vboot_lib/libvboot_host.a
    CC         bootblock/arch/x86/gdt_init.o
    CC         bootblock/arch/x86/id.o
    CC         bootblock/arch/x86/idt.o
    CC         bootblock/cpu/x86/early_reset.o
    CC         bootblock/cpu/x86/entry16.o
    CC         bootblock/cpu/x86/entry32.o
Error    6154 - Warnings detected during compilation (reporting warnings as errors)

dsdt.asl     28:    Name (RBUF, ResourceTemplate ()
Remark   2173 -             ^ Creation of named objects within a method is highly inefficient, use globals or method local variables instead (\_SB.PERC._CRS)

dsdt.asl    177:  Name (MCRS, ResourceTemplate ()
Remark   2173 -           ^ Creation of named objects within a method is highly inefficient, use globals or method local variables instead (\_SB.PCI0._CRS)

dsdt.asl    310:   Name (BUF0, ResourceTemplate ()
Remark   2173 -            ^ Creation of named objects within a method is highly inefficient, use globals or method local variables instead (\_SB.PCI0.PDRC._CRS)

dsdt.asl    351:  OperationRegion (PCRD, SystemMemor    CC         bootblock/cpu/x86/reset16.o
y, GPCR (Arg0, Arg1) + Arg2, 4)
Remark   2173 -                      ^ Creation of named objects within a method is highly inefficient, use globals or method local variables instead (\_SB.PCI0.RPCR)

dsdt.asl    360:  OperationRegion (PCRD, SystemMemory, GPCR (Arg0, Arg1) + Arg2, 4)
Remark   2173 -                      ^ Creation of named objects within a method is highly inefficient, use globals or method local variables instead (\_SB.PCI0.APCR)

dsdt.asl    370:  OperationRegion (PCRD, SystemMemory, GPCR (Arg0, Arg1) + Arg2, 4)
Remark   2173 -                      ^ Creation of named objects within a method is highly inefficient, use globals or method local variables instead (\_SB.PCI0.OPCR)

dsdt.asl    404:   Name (DSUU, ToUUID("f6c13ea5-65cd-461f-ab7a-29f7e8d5bd61"))
Remark   2184 -                                       Unknown UUID string ^

dsdt.asl    459:   Name (DSUU, ToUUID("f6c13ea5-65cd-461f-ab7a-29f7e8d5bd61"))
Remark   2184 -                                       Unknown UUID string ^

dsdt.asl    517:  OperationRegion (PREG, SystemMemory, GADD (Arg0), 4)
Remark   2173 -                      ^ Creation of named objects within a method is highly inefficient, use globals or method local variables instead (\_SB.PCI0.GRXS)

dsdt.asl    527:  OperationRegion (PREG, SystemMemory, GADD (Arg0), 4)
Remark   2173 -                      ^ Creation of named objects within a method is highly inefficient, use globals or method local variables instead (\_SB.PCI0.GTXS)

dsdt.asl    536:  OperationRegion (PREG, SystemMemory, GADD (Arg0), 4)
Remark   2173 -                      ^ Creation of named objects within a method is highly inefficient, use globals or method local variables instead (\_SB.PCI0.STXS)

dsdt.asl    545:  OperationRegion (PREG, SystemMemory, GADD (Arg0), 4)
Remark   2173 -                      ^ Creation of named objects within a method is highly inefficient, use globals or method local variables instead (\_SB.PCI0.CTXS)

dsdt.asl    554:  OperationRegion (PREG, SystemMemory, GADD (Arg0), 4)
Remark   2173 -                      ^ Creation of named objects within a method is highly inefficient, use globals or method local variables instead (\_SB.PCI0.GPMO)

dsdt.asl    564:  OperationRegion (PREG, SystemMemory, GADD (Arg0), 4)
Remark   2173 -                      ^ Creation of named objects within a method is highly inefficient, use globals or method local variables instead (\_SB.PCI0.GTXE)

dsdt.asl    574:  OperationRegion (PREG, SystemMemory, GADD (Arg0), 4)
Remark   2173 -                      ^ Creation of named objects within a method is highly inefficient, use globals or method local variables instead (\_SB.PCI0.GRXE)

dsdt.asl    584:  OperationRegion (PREG, SystemMemory, GADD (Arg0), 4)
Remark   2173 -                      ^ Creation of named objects within a method is highly inefficient, use globals or method local variables instead (\_SB.PCI0.GSCI)

dsdt.asl    833:  Name (UUID, ToUUID ("A69F886E-6CEB-4594-A41F-7B5DCE24C553"))
Remark   2184 -                                       Unknown UUID string ^

dsdt.asl    864:  Name (IQAA, Package () {
Remark   2173 -           ^ Creation of named objects within a method is highly inefficient, use globals or method local variables instead (\_SB.PCI0.IRQM)

dsdt.asl    869:  Name (IQAP, Package () {
Remark   2173 -           ^ Creation of named objects within a method is highly inefficient, use globals or method local variables instead (\_SB.PCI0.IRQM)

dsdt.asl    874:  Name (IQBA, Package () {
Remark   2173 -           ^ Creation of named objects within a method is highly inefficient, use globals or method local variables instead (\_SB.PCI0.IRQM)

dsdt.asl    879:  Name (IQBP, Package () {
Remark   2173 -           ^ Creation of named objects within a method is highly inefficient, use globals or method local variables instead (\_SB.PCI0.IRQM)

dsdt.asl    884:  Name (IQCA, Package () {
Remark   2173 -           ^ Creation of named objects within a method is highly inefficient, use globals or method local variables instead (\_SB.PCI0.IRQM)

dsdt.asl    889:  Name (IQCP, Package () {
Remark   2173 -           ^ Creation of named objects within a method is highly inefficient, use globals or method local variables instead (\_SB.PCI0.IRQM)

dsdt.asl    894:  Name (IQDA, Package () {
Remark   2173 -           ^ Creation of named objects within a method is highly inefficient, use globals or method local variables instead (\_SB.PCI0.IRQM)

dsdt.asl    899:  Name (IQDP, Package () {
Remark   2173 -           ^ Creation of named objects within a method is highly inefficient, use globals or method local variables instead (\_SB.PCI0.IRQM)

dsdt.asl   1256:  OperationRegion (PSCR, SystemMemory, (Arg2 << 16) + Local0, 0x10)
Remark   2173 -                      ^ Creation of named objects within a method is highly inefficient, use globals or method local variables instead (\_SB.PCI0.UPWE)

dsdt.asl   1839:  Method (_SFD, 2, Serialized) {
Warning  3133 -             ^ Unknown reserved name (_SFD)

dsdt.asl   2362:    ToUUID("6211e2c0-58a3-4af3-90e1-927a4e0c55a4"),
Remark   2184 -                            Unknown UUID string ^

dsdt.asl   2369:    ToUUID("efcc06cc-73ac-4bc3-b    CC         bootblock/soc/intel/common/block/cpu/car/cache_as_ram.o
ff0-76143807c389"),
Remark   2184 -                            Unknown UUID string ^

ASL Input:     dsdt.asl -   43619 bytes   1373 keywords      0 source lines

Compilation failed. 1 Errors, 1 Warnings, 28 Remarks
No AML files were generated due to compiler error(s)

system76/ec#512 added a manual fan control option.

In PWM control mode, the system firmware or OS is responsible for
setting the fan target duty to manage thermals. CTR0 in the EC code
determines the maximum valid PWM duty, which is hard-coded to 255.

RPM target is not supported.

Change-Id: Iba8cd5ac540f9fdc20473831787cafb6c1fd8129
Signed-off-by: Tim Crawford <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants