soc/intel/cnvi: Deref BTRK as it might not exist
Check for the existence of BTRK method before attempting to call it, as coreboot doesn't enforce its creation. Change-Id: Ibb0dace635c6a014ce65ae3d1c96a92ff991ce5b Signed-off-by: Sean Rhodes <sean@starlabs.systems> Reviewed-on: https://review.coreboot.org/c/coreboot/+/86450 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
This commit is contained in:
parent
def337aa7e
commit
0476770659
1 changed files with 16 additions and 10 deletions
|
|
@ -129,11 +129,13 @@ static void cnvw_fill_ssdt(const struct device *dev)
|
|||
* If (((PCRR (CNVI_SIDEBAND_ID, CNVI_ABORT_PLDR) & CNVI_ABORT_REQUEST) == Zero))
|
||||
* {
|
||||
* Local2 = Zero
|
||||
* If ((\_SB.PCI0.GBTR() == One))
|
||||
* {
|
||||
* \_SB.PCI0.BTRK (Zero)
|
||||
* Sleep (105)
|
||||
* Local2 = One
|
||||
* If (CondRefOf (\_SB.PCI0.GBTR)) {
|
||||
* If ((\_SB.PCI0.GBTR() == One))
|
||||
* {
|
||||
* \_SB.PCI0.BTRK (Zero)
|
||||
* Sleep (105)
|
||||
* Local2 = One
|
||||
* }
|
||||
* }
|
||||
* PCRO (CNVI_SIDEBAND_ID, CNVI_ABORT_PLDR, CNVI_ABORT_REQUEST | CNVI_ABORT_ENABLE)
|
||||
* Sleep (10)
|
||||
|
|
@ -233,14 +235,18 @@ static void cnvw_fill_ssdt(const struct device *dev)
|
|||
acpigen_write_if_lequal_op_int(LOCAL0_OP, 0);
|
||||
{
|
||||
acpigen_write_store_int_to_op(0, LOCAL2_OP);
|
||||
acpigen_write_if_lequal_namestr_int("\\_SB.PCI0.GBTR", 1);
|
||||
acpigen_write_if_cond_ref_of("\\_SB.PCI0.GBTR");
|
||||
{
|
||||
acpigen_emit_namestring("\\_SB.PCI0.BTRK");
|
||||
acpigen_emit_byte(0);
|
||||
acpigen_write_if_lequal_namestr_int("\\_SB.PCI0.GBTR", 1);
|
||||
{
|
||||
acpigen_emit_namestring("\\_SB.PCI0.BTRK");
|
||||
acpigen_emit_byte(0);
|
||||
|
||||
acpigen_write_sleep(105);
|
||||
acpigen_write_sleep(105);
|
||||
|
||||
acpigen_write_store_ops(1, LOCAL2_OP);
|
||||
acpigen_write_store_ops(1, LOCAL2_OP);
|
||||
}
|
||||
acpigen_pop_len();
|
||||
}
|
||||
acpigen_pop_len();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue