sb,soc/intel: Add wake source fields in GNVS

For the moment, these are most not used but become a necessity
for a unified <soc/nvs.h> approach.

They would be required for the implementation of _SWS method
for OSPM to determine the reason for system waking up. The related
hardware registers are present with these platforms.

It's expected that ACPI power-management related GNVS entries are
grouped together to form a single struct in later works.

Change-Id: I6d31d39ac1017cd6fdf0ac66b418d1fbb1edf8e0
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/50193
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Kyösti Mälkki 2021-01-29 23:14:53 +02:00
parent 68d68f1d7c
commit 8fee9951d3
15 changed files with 48 additions and 2 deletions

View file

@ -25,6 +25,7 @@ Field (GNVS, ByteAcc, NoLock, Preserve)
TLVL, 8, /* 0x13 - Throttle Level */
PPCM, 8, /* 0x14 - Maximum P-state usable by OS */
PM1I, 32, /* 0x15 - System Wake Source - PM1 Index */
GPEI, 32, /* 0x19 - GPE Wake Source */
/* Device Config */
Offset (0x20),

View file

@ -25,7 +25,8 @@ struct __packed global_nvs {
u8 tlvl; /* 0x13 - Throttle Level */
u8 ppcm; /* 0x14 - Maximum P-state usable by OS */
u32 pm1i; /* 0x15 - System Wake Source - PM1 Index */
u8 rsvd1[7];
u32 gpei; /* 0x19 - GPE Wake Source */
u8 rsvd1[3];
/* Device Config */
u8 s5u0; /* 0x20 - Enable USB0 in S5 */

View file

@ -8,6 +8,10 @@
struct __packed global_nvs {
uint32_t cbmc; /* 0x00 - 0x03 - coreboot Memory Console */
uint8_t pwrs; /* 0x4 - Power state (AC = 1) */
/* Required for future unified acpi_save_wake_source. */
uint32_t pm1i;
uint32_t gpei;
};
#endif /* SOC_INTEL_QUARK_NVS_H */

View file

@ -100,6 +100,9 @@ Field (GNVS, ByteAcc, NoLock, Preserve)
Offset (0xb2),
XHCI, 8,
PM1I, 32, // System Wake Source - PM1 Index
GPEI, 32, // GPE Wake Source
Offset (0xf5),
TPIQ, 8, // 0xf5 - trackpad IRQ value
CBMC, 32,

View file

@ -97,7 +97,11 @@ struct __packed global_nvs {
u8 rsvd11[6];
/* XHCI */
u8 xhci;
u8 rsvd12[65];
/* Required for future unified acpi_save_wake_source. */
u32 pm1i;
u32 gpei;
u8 rsvd12[57];
u8 tpiq; /* 0xf5 - trackpad IRQ value */
u32 cbmc;

View file

@ -101,4 +101,6 @@ Field (GNVS, ByteAcc, NoLock, Preserve)
DOCK, 8, // 0xf0 - Docking Status
BTEN, 8, // 0xf1 - Bluetooth Enable
CBMC, 32,
PM1I, 32, // System Wake Source - PM1 Index
GPEI, 32, // GPE Wake Source
}

View file

@ -98,6 +98,10 @@ struct __packed global_nvs {
u8 bten;
u32 cbmc;
/* Required for future unified acpi_save_wake_source. */
u32 pm1i;
u32 gpei;
};
#endif /* SOUTHBRIDGE_INTEL_I82801GX_NVS_H */

View file

@ -103,4 +103,7 @@ Field (GNVS, ByteAcc, NoLock, Preserve)
DOCK, 8, // 0xf0 - Docking Status
BTEN, 8, // 0xf1 - Bluetooth Enable
CBMC, 32,
PM1I, 32, // System Wake Source - PM1 Index
GPEI, 32, // GPE Wake Source
}

View file

@ -98,6 +98,10 @@ struct __packed global_nvs {
u8 bten;
u32 cbmc;
/* Required for future unified acpi_save_wake_source. */
u32 pm1i;
u32 gpei;
};
#endif /* SOUTHBRIDGE_INTEL_I82801IX_NVS_H */

View file

@ -103,4 +103,6 @@ Field (GNVS, ByteAcc, NoLock, Preserve)
DOCK, 8, // 0xf0 - Docking Status
BTEN, 8, // 0xf1 - Bluetooth Enable
CBMC, 32,
PM1I, 32, // System Wake Source - PM1 Index
GPEI, 32, // GPE Wake Source
}

View file

@ -97,6 +97,10 @@ struct __packed global_nvs {
u8 bten;
u32 cbmc;
/* Required for future unified acpi_save_wake_source. */
u32 pm1i;
u32 gpei;
};
#endif /* SOUTHBRIDGE_INTEL_I82801JX_NVS_H */

View file

@ -100,6 +100,9 @@ Field (GNVS, ByteAcc, NoLock, Preserve)
Offset (0xb2),
XHCI, 8,
CBMC, 32,
PM1I, 32, // System Wake Source - PM1 Index
GPEI, 32, // GPE Wake Source
}
/* Set flag to enable USB charging in S3 */

View file

@ -100,6 +100,10 @@ struct __packed global_nvs {
u8 xhci;
u32 cbmc;
/* Required for future unified acpi_save_wake_source. */
u32 pm1i;
u32 gpei;
};
#endif /* SOUTHBRIDGE_INTEL_IBEXPEAK_NVS_H */

View file

@ -93,6 +93,9 @@ Field (GNVS, ByteAcc, NoLock, Preserve)
Offset (0xa0),
CBMC, 32, // 0xa0 - coreboot mem console pointer
PM1I, 32, // System Wake Source - PM1 Index
GPEI, 32, // GPE Wake Source
}
/* Set flag to enable USB charging in S3 */

View file

@ -73,6 +73,10 @@ struct __packed global_nvs {
u32 s0b[8]; /* 0x60 - 0x7f - BAR0 */
u32 s1b[8]; /* 0x80 - 0x9f - BAR1 */
u32 cbmc; /* 0xa0 - 0xa3 - coreboot memconsole */
/* Required for future unified acpi_save_wake_source. */
u32 pm1i;
u32 gpei;
};
#endif /* SOUTHBRIDGE_INTEL_LYNXPOINT_NVS_H */