Skip to content

Commit

Permalink
initrd/bin/talos-init: send IPL complete message to BMC
Browse files Browse the repository at this point in the history
BMC awaits this message before it takes control over CPU fans speed.

Signed-off-by: Krystian Hebel <[email protected]>
  • Loading branch information
krystian-hebel committed Feb 16, 2023
1 parent ffd8ab9 commit b137dd3
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 3 deletions.
2 changes: 1 addition & 1 deletion boards/talos-2_server/talos-2_server.config
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export CONFIG_USB_KEYBOARD=y
export CONFIG_BOOT_EXTRA_TTYS="tty0"

export CONFIG_TPM=y
export CONFIG_BOOTSCRIPT=/bin/gui-init
export CONFIG_BOOTSCRIPT=/bin/talos-init
export CONFIG_BOOT_REQ_HASH=n
export CONFIG_BOOT_REQ_ROLLBACK=n
export CONFIG_BOOT_KERNEL_REMOVE="quiet"
Expand Down
2 changes: 1 addition & 1 deletion boards/talos-2_workstation/talos-2_workstation.config
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export CONFIG_USB_KEYBOARD=y
export CONFIG_BOOT_EXTRA_TTYS="tty0"

export CONFIG_TPM=y
export CONFIG_BOOTSCRIPT=/bin/gui-init
export CONFIG_BOOTSCRIPT=/bin/talos-init
export CONFIG_BOOT_REQ_HASH=n
export CONFIG_BOOT_REQ_ROLLBACK=n
export CONFIG_BOOT_KERNEL_REMOVE="quiet"
Expand Down
12 changes: 12 additions & 0 deletions initrd/bin/talos-init
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/sh
# BMC on Talos must be informed that OS has been started in order to enable fan
# control. This is done by writing 0xFE to I/O ports 0x81 and 0x82 (in that
# order) through LPC connected to first CPU. LPC I/O space of first CPU is
# mapped to memory at 0x80060300D0010000, I/O port number has to be added to
# this address. Write can be performed using busybox's devmem applet.

devmem 0x80060300D0010081 8 254
devmem 0x80060300D0010082 8 254

# Proceed with standard init path
exec /bin/gui-init
2 changes: 1 addition & 1 deletion modules/coreboot
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ else ifeq "$(CONFIG_COREBOOT_VERSION)" "4.17"
EXTRA_FLAGS := -fdebug-prefix-map=$(pwd)=heads -gno-record-gcc-switches -Wno-error=packed-not-aligned -Wno-error=address-of-packed-member
else ifeq "$(CONFIG_COREBOOT_VERSION)" "talos_2"
coreboot_version = git
coreboot_commit_hash = 2207bbcccba31ad89cf21607b0d8d05d8dc47c03
coreboot_commit_hash = 88ca8667864ed75490307b23e9744e59c1ce8e41
coreboot_repo := https://github.com/Dasharo/coreboot

else
Expand Down

0 comments on commit b137dd3

Please sign in to comment.