Skip to content

Commit e8df441

Browse files
coolstarcrawfxrd
authored andcommitted
soc/intel/tigerlake: Remove IOM Mctp command from TCSS ASL
Port fix from Alder Lake to not set/reset IOM MCTP during D3 cold entry or exit. Ports 5008d34 ("soc/intel/adl: Remove IOM Mctp command from TCSS ASL"): > Recently as part of s0ix hang issue, it was found that sending IOM > MCTP command as part of TCSS D3 Cold enter-exit sequence created an > issue. > We discovered that due to change in hardware sequence, ADL should not > set/reset IOM MCTP during D3 cold entry or exit. This patch removes > the bit setting from ASL file to prevent hang in the system. > This patch also removes obsolete Pcode mailbox communication which > is no longer required for ADL. > BUG=b:220796339 > BRANCH=firmware-brya-14505.B > TEST=Check if hang issue is resolved with the CL and no other > regression > observed > https://review.coreboot.org/c/coreboot/+/62861 Test: build/boot drobit to Win11. Verify TCSS XHCI power management working and USB Root Hub doesn't Code 43 in device manager Change-Id: I40a537fd2b0c821caf282f52aaff1874f54325f1 Signed-off-by: CoolStar <[email protected]> Reviewed-on: https://review.coreboot.org/c/coreboot/+/80719 Reviewed-by: Matt DeVillier <[email protected]> Reviewed-by: Paul Menzel <[email protected]> Tested-by: build bot (Jenkins) <[email protected]>
1 parent e824c88 commit e8df441

File tree

1 file changed

+1
-142
lines changed

1 file changed

+1
-142
lines changed

src/soc/intel/tigerlake/acpi/tcss.asl

Lines changed: 1 addition & 142 deletions
Original file line numberDiff line numberDiff line change
@@ -363,12 +363,6 @@ Scope (\_SB.PCI0)
363363
Offset(0x10),
364364
RBAR, 64 /* RegBar, offset 0x7110 in MCHBAR */
365365
}
366-
Field (MBAR, DWordAcc, NoLock, Preserve)
367-
{
368-
Offset(0x304), /* PRIMDN_MASK1_0_0_0_MCHBAR_IMPH, offset 0x7404 */
369-
, 31,
370-
TCD3, 1 /* [31:31] TCSS IN D3 bit */
371-
}
372366

373367
/*
374368
* Operation region defined to access the pCode mailbox interface. Get the MCHBAR
@@ -404,101 +398,6 @@ Scope (\_SB.PCI0)
404398
Return (0)
405399
}
406400

407-
/*
408-
* Method to send pCode MailBox command TCSS_DEVEN_MAILBOX_SUBCMD_GET_STATUS
409-
*
410-
* Result will be updated in DATA[1:0]
411-
* DATA[0:0] TCSS_DEVEN_CURRENT_STATE:
412-
* 0 - TCSS Deven in normal state.
413-
* 1 - TCSS Deven is cleared by BIOS Mailbox request.
414-
* DATA[1:1] TCSS_DEVEN_REQUEST_STATUS:
415-
* 0 - IDLE. TCSS DEVEN has reached its final requested state.
416-
* 1 - In Progress. TCSS DEVEN is currently in progress of switching state
417-
* according to given request (bit 0 reflects source state).
418-
*
419-
* Return 0x00 - TCSS Deven in normal state
420-
* 0x01 - TCSS Deven is cleared by BIOS Mailbox request
421-
* 0x1x - TCSS Deven is in progress of switching state according to given request
422-
* 0xFE - Command timeout
423-
* 0xFF - Command corrupt
424-
*/
425-
Method (DSGS, 0)
426-
{
427-
If ((PMBY () == 0)) {
428-
PMBC = MAILBOX_BIOS_CMD_TCSS_DEVEN_INTERFACE
429-
PSCM = TCSS_DEVEN_MAILBOX_SUBCMD_GET_STATUS
430-
PMBR = 1
431-
If (PMBY () == 0) {
432-
Local0 = PMBD
433-
Local1 = PMBC
434-
Stall (10)
435-
If ((Local0 != PMBD) || (Local1 != PMBC)) {
436-
Printf("pCode MailBox is corrupt.")
437-
Return (0xFF)
438-
}
439-
Return (Local0)
440-
} Else {
441-
Printf("pCode MailBox is not ready.")
442-
Return (0xFE)
443-
}
444-
} Else {
445-
Printf("pCode MailBox is not ready.")
446-
Return (0xFE)
447-
}
448-
}
449-
450-
/*
451-
* Method to send pCode MailBox command TCSS_DEVEN_MAILBOX_SUBCMD_TCSS_CHANGE_REQ
452-
*
453-
* Arg0 : 0 - Restore to previously saved value of TCSS DEVEN
454-
* 1 - Save current TCSS DEVEN value and clear it
455-
*
456-
* Return 0x00 - MAILBOX_BIOS_CMD_CLEAR_TCSS_DEVEN command completed
457-
* 0xFD - Input argument is invalid
458-
* 0xFE - Command timeout
459-
* 0xFF - Command corrupt
460-
*/
461-
Method (DSCR, 1)
462-
{
463-
If (Arg0 > 1) {
464-
Printf("pCode MailBox is corrupt.")
465-
Return (0xFD)
466-
}
467-
If ((PMBY () == 0)) {
468-
PMBC = MAILBOX_BIOS_CMD_TCSS_DEVEN_INTERFACE
469-
PSCM = TCSS_DEVEN_MAILBOX_SUBCMD_TCSS_CHANGE_REQ
470-
PMBD = Arg0
471-
PMBR = 1
472-
If ((PMBY () == 0)) {
473-
Local0 = PMBD
474-
Local1 = PMBC
475-
Stall (10)
476-
If ((Local0 != PMBD) || (Local1 != PMBC)) {
477-
Printf("pCode MailBox is corrupt.")
478-
Return (0xFF)
479-
}
480-
/* Poll TCSS_DEVEN_REQUEST_STATUS, timeout value is 10ms. */
481-
Local0 = 0
482-
While ((DSGS () & 0x10) && (Local0 < 100)) {
483-
Stall (100)
484-
Local0++
485-
}
486-
If (Local0 == 100) {
487-
Printf("pCode MailBox is not ready.")
488-
Return (0xFE)
489-
} Else {
490-
Return (0x00)
491-
}
492-
} Else {
493-
Printf("pCode MailBox is not ready.")
494-
Return (0xFE)
495-
}
496-
} Else {
497-
Printf("pCode MailBox is not ready.")
498-
Return (0xFE)
499-
}
500-
}
501-
502401
/*
503402
* IOM REG BAR Base address is in offset 0x7110 in MCHBAR.
504403
*/
@@ -707,26 +606,7 @@ Scope (\_SB.PCI0)
707606
}
708607
Else
709608
{
710-
/*
711-
* Program IOP MCTP Drop (TCSS_IN_D3) after D3 cold exit and
712-
* acknowledgement by IOM.
713-
*/
714-
TCD3 = 0
715-
/*
716-
* If the TCSS Deven is cleared by BIOS Mailbox request, then
717-
* restore to previously saved value of TCSS DEVNE.
718-
*/
719-
Local0 = 0
720-
While (\_SB.PCI0.TXHC.VDID == 0xFFFFFFFF) {
721-
If (DSGS () == 1) {
722-
DSCR (0)
723-
}
724-
Local0++
725-
If (Local0 == 5) {
726-
Printf("pCode mailbox command failed.")
727-
Break
728-
}
729-
}
609+
Printf("TCSS D3 exit.");
730610
}
731611
}
732612
Else {
@@ -743,27 +623,6 @@ Scope (\_SB.PCI0)
743623
Return
744624
}
745625

746-
/*
747-
* If the TCSS Deven in normal state, then Save current TCSS DEVEN value and
748-
* clear it.
749-
*/
750-
Local0 = 0
751-
While (\_SB.PCI0.TXHC.VDID != 0xFFFFFFFF) {
752-
If (DSGS () == 0) {
753-
DSCR (1)
754-
}
755-
Local0++
756-
If (Local0 == 5) {
757-
Printf("pCode mailbox command failed.")
758-
Break
759-
}
760-
}
761-
762-
/*
763-
* Program IOM MCTP Drop (TCSS_IN_D3) in D3Cold entry before entering D3 cold.
764-
*/
765-
TCD3 = 1
766-
767626
/* Request IOM for D3 cold entry sequence. */
768627
TD3C = 1
769628
}

0 commit comments

Comments
 (0)