Skip to content

Commit

Permalink
mb/system76/*: Disable IME by CMOS option
Browse files Browse the repository at this point in the history
Add CMOS option to set IME mode. Default to "Disable" for CNL and TGL-H,
and "Enable" for TGL-U. Not set for KBL, which uses ME_CLEANER.

HECI device must be enabled in devicetree for switching modes to
function correctly.

The option table is shrunk 1 byte to force coreboot to invalid the table
and write the new defaults. This will ensure the IME is in the correct
mode on the next update.

Signed-off-by: Tim Crawford <tcrawford@system76.com>
Change-Id: Ie2191292cde5b44087c78f32487b035e64467e5f
  • Loading branch information
crawfxrd committed Nov 19, 2021
1 parent 66ca23d commit beabfe8
Show file tree
Hide file tree
Showing 29 changed files with 111 additions and 29 deletions.
1 change: 1 addition & 0 deletions src/mainboard/system76/addw1/cmos.default
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
boot_option=Fallback
debug_level=Debug
me_state=Disable
9 changes: 7 additions & 2 deletions src/mainboard/system76/addw1/cmos.layout
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,15 @@ entries
400 8 r 0 century

412 4 e 6 debug_level
984 16 h 0 check_sum
416 1 e 2 me_state
417 3 h 0 me_state_counter
976 16 h 0 check_sum

enumerations

2 0 Enable
2 1 Disable

4 0 Fallback
4 1 Normal

Expand All @@ -31,4 +36,4 @@ enumerations

checksums

checksum 408 983 984
checksum 408 975 976
1 change: 1 addition & 0 deletions src/mainboard/system76/bonw14/cmos.default
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
boot_option=Fallback
debug_level=Debug
me_state=Disable
9 changes: 7 additions & 2 deletions src/mainboard/system76/bonw14/cmos.layout
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,15 @@ entries
400 8 r 0 century

412 4 e 6 debug_level
984 16 h 0 check_sum
416 1 e 2 me_state
417 3 h 0 me_state_counter
976 16 h 0 check_sum

enumerations

2 0 Enable
2 1 Disable

4 0 Fallback
4 1 Normal

Expand All @@ -31,4 +36,4 @@ enumerations

checksums

checksum 408 983 984
checksum 408 975 976
1 change: 1 addition & 0 deletions src/mainboard/system76/cml-u/cmos.default
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
boot_option=Fallback
debug_level=Debug
me_state=Disable
9 changes: 7 additions & 2 deletions src/mainboard/system76/cml-u/cmos.layout
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,15 @@ entries
400 8 r 0 century

412 4 e 6 debug_level
984 16 h 0 check_sum
416 1 e 2 me_state
417 3 h 0 me_state_counter
976 16 h 0 check_sum

enumerations

2 0 Enable
2 1 Disable

4 0 Fallback
4 1 Normal

Expand All @@ -31,4 +36,4 @@ enumerations

checksums

checksum 408 983 984
checksum 408 975 976
1 change: 1 addition & 0 deletions src/mainboard/system76/darp7/cmos.default
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
boot_option=Fallback
debug_level=Debug
me_state=Enable
9 changes: 7 additions & 2 deletions src/mainboard/system76/darp7/cmos.layout
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,15 @@ entries
400 8 r 0 century

412 4 e 6 debug_level
984 16 h 0 check_sum
416 1 e 2 me_state
417 3 h 0 me_state_counter
976 16 h 0 check_sum

enumerations

2 0 Enable
2 1 Disable

4 0 Fallback
4 1 Normal

Expand All @@ -31,4 +36,4 @@ enumerations

checksums

checksum 408 983 984
checksum 408 975 976
1 change: 1 addition & 0 deletions src/mainboard/system76/galp5/cmos.default
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
boot_option=Fallback
debug_level=Debug
me_state=Enable
9 changes: 7 additions & 2 deletions src/mainboard/system76/galp5/cmos.layout
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,15 @@ entries
400 8 r 0 century

412 4 e 6 debug_level
984 16 h 0 check_sum
416 1 e 2 me_state
417 3 h 0 me_state_counter
976 16 h 0 check_sum

enumerations

2 0 Enable
2 1 Disable

4 0 Fallback
4 1 Normal

Expand All @@ -31,4 +36,4 @@ enumerations

checksums

checksum 408 983 984
checksum 408 975 976
1 change: 1 addition & 0 deletions src/mainboard/system76/gaze15/cmos.default
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
boot_option=Fallback
debug_level=Debug
me_state=Disable
9 changes: 7 additions & 2 deletions src/mainboard/system76/gaze15/cmos.layout
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,15 @@ entries
400 8 r 0 century

412 4 e 6 debug_level
984 16 h 0 check_sum
416 1 e 2 me_state
417 3 h 0 me_state_counter
976 16 h 0 check_sum

enumerations

2 0 Enable
2 1 Disable

4 0 Fallback
4 1 Normal

Expand All @@ -31,4 +36,4 @@ enumerations

checksums

checksum 408 983 984
checksum 408 975 976
1 change: 1 addition & 0 deletions src/mainboard/system76/gaze16/cmos.default
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
boot_option=Fallback
debug_level=Debug
me_state=Disable
9 changes: 7 additions & 2 deletions src/mainboard/system76/gaze16/cmos.layout
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,15 @@ entries
400 8 r 0 century

412 4 e 6 debug_level
984 16 h 0 check_sum
416 1 e 2 me_state
417 3 h 0 me_state_counter
976 16 h 0 check_sum

enumerations

2 0 Enable
2 1 Disable

4 0 Fallback
4 1 Normal

Expand All @@ -31,4 +36,4 @@ enumerations

checksums

checksum 408 983 984
checksum 408 975 976
4 changes: 3 additions & 1 deletion src/mainboard/system76/gaze16/devicetree.cb
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,9 @@ chip soc/intel/tigerlake
device i2c 15 on end
end
end
device ref heci1 on end
device ref heci1 on
register "HeciEnabled" = "1"
end
device ref uart2 on
# Debug console
register "SerialIoUartMode[PchSerialIoIndexUART2]" = "PchSerialIoSkipInit"
Expand Down
1 change: 1 addition & 0 deletions src/mainboard/system76/lemp10/cmos.default
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
boot_option=Fallback
debug_level=Debug
me_state=Enable
9 changes: 7 additions & 2 deletions src/mainboard/system76/lemp10/cmos.layout
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,15 @@ entries
400 8 r 0 century

412 4 e 6 debug_level
984 16 h 0 check_sum
416 1 e 2 me_state
417 3 h 0 me_state_counter
976 16 h 0 check_sum

enumerations

2 0 Enable
2 1 Disable

4 0 Fallback
4 1 Normal

Expand All @@ -31,4 +36,4 @@ enumerations

checksums

checksum 408 983 984
checksum 408 975 976
1 change: 1 addition & 0 deletions src/mainboard/system76/lemp9/cmos.default
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
boot_option=Fallback
debug_level=Debug
me_state=Disable
9 changes: 7 additions & 2 deletions src/mainboard/system76/lemp9/cmos.layout
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,15 @@ entries
400 8 r 0 century

412 4 e 6 debug_level
984 16 h 0 check_sum
416 1 e 2 me_state
417 3 h 0 me_state_counter
976 16 h 0 check_sum

enumerations

2 0 Enable
2 1 Disable

4 0 Fallback
4 1 Normal

Expand All @@ -31,4 +36,4 @@ enumerations

checksums

checksum 408 983 984
checksum 408 975 976
1 change: 1 addition & 0 deletions src/mainboard/system76/oryp5/cmos.default
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
boot_option=Fallback
debug_level=Debug
me_state=Disable
9 changes: 7 additions & 2 deletions src/mainboard/system76/oryp5/cmos.layout
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,15 @@ entries
400 8 r 0 century

412 4 e 6 debug_level
984 16 h 0 check_sum
416 1 e 2 me_state
417 3 h 0 me_state_counter
976 16 h 0 check_sum

enumerations

2 0 Enable
2 1 Disable

4 0 Fallback
4 1 Normal

Expand All @@ -31,4 +36,4 @@ enumerations

checksums

checksum 408 983 984
checksum 408 975 976
1 change: 1 addition & 0 deletions src/mainboard/system76/oryp6/cmos.default
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
boot_option=Fallback
debug_level=Debug
me_state=Disable
9 changes: 7 additions & 2 deletions src/mainboard/system76/oryp6/cmos.layout
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,15 @@ entries
400 8 r 0 century

412 4 e 6 debug_level
984 16 h 0 check_sum
416 1 e 2 me_state
417 3 h 0 me_state_counter
976 16 h 0 check_sum

enumerations

2 0 Enable
2 1 Disable

4 0 Fallback
4 1 Normal

Expand All @@ -31,4 +36,4 @@ enumerations

checksums

checksum 408 983 984
checksum 408 975 976
1 change: 1 addition & 0 deletions src/mainboard/system76/oryp8/cmos.default
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
boot_option=Fallback
debug_level=Debug
me_state=Disable
9 changes: 7 additions & 2 deletions src/mainboard/system76/oryp8/cmos.layout
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,15 @@ entries
400 8 r 0 century

412 4 e 6 debug_level
984 16 h 0 check_sum
416 1 e 2 me_state
417 3 h 0 me_state_counter
976 16 h 0 check_sum

enumerations

2 0 Enable
2 1 Disable

4 0 Fallback
4 1 Normal

Expand All @@ -31,4 +36,4 @@ enumerations

checksums

checksum 408 983 984
checksum 408 975 976
4 changes: 3 additions & 1 deletion src/mainboard/system76/oryp8/devicetree.cb
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,9 @@ chip soc/intel/tigerlake
device i2c 2c on end
end
end
device ref heci1 on end
device ref heci1 on
register "HeciEnabled" = "1"
end
device ref uart2 on
# Debug console
register "SerialIoUartMode[PchSerialIoIndexUART2]" = "PchSerialIoSkipInit"
Expand Down
1 change: 1 addition & 0 deletions src/mainboard/system76/whl-u/cmos.default
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
boot_option=Fallback
debug_level=Debug
me_state=Disable
9 changes: 7 additions & 2 deletions src/mainboard/system76/whl-u/cmos.layout
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,15 @@ entries
400 8 r 0 century

412 4 e 6 debug_level
984 16 h 0 check_sum
416 1 e 2 me_state
417 3 h 0 me_state_counter
976 16 h 0 check_sum

enumerations

2 0 Enable
2 1 Disable

4 0 Fallback
4 1 Normal

Expand All @@ -31,4 +36,4 @@ enumerations

checksums

checksum 408 983 984
checksum 408 975 976
2 changes: 1 addition & 1 deletion src/mainboard/system76/whl-u/devicetree.cb
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ chip soc/intel/cannonlake
device pci 15.1 off end # I2C #1
device pci 15.2 off end # I2C #2
device pci 15.3 off end # I2C #3
device pci 16.0 off end # Management Engine Interface 1
device pci 16.0 on end # Management Engine Interface 1
device pci 16.1 off end # Management Engine Interface 2
device pci 16.2 off end # Management Engine IDE-R
device pci 16.3 off end # Management Engine KT Redirection
Expand Down

0 comments on commit beabfe8

Please sign in to comment.