amd/stoneyridge: Add function to find PmControl register
Find the PmControl register's I/O address by checking the hardware in PMx62. Don't rely on the address being the coreboot default. PmControl is the first register in the AcpiPm1CntBlk. Change-Id: Ibb608dcaa7801af067d6edd86f92c117c2ac08a6 Signed-off-by: Marshall Dawson <marshalldawson3rd@gmail.com> Reviewed-on: https://review.coreboot.org/21882 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-by: Marc Jones <marc@marcjonesconsulting.com>
This commit is contained in:
committed by
Martin Roth
parent
f8bf9a7eaa
commit
813462ec31
@@ -202,6 +202,7 @@ u16 smi_read16(u8 reg);
|
|||||||
u32 smi_read32(u8 reg);
|
u32 smi_read32(u8 reg);
|
||||||
void smi_write16(u8 reg, u16 value);
|
void smi_write16(u8 reg, u16 value);
|
||||||
void smi_write32(u8 reg, u32 value);
|
void smi_write32(u8 reg, u32 value);
|
||||||
|
uint16_t pm_acpi_pm_cnt_blk(void);
|
||||||
int s3_load_nvram_early(int size, u32 *old_dword, int nvram_pos);
|
int s3_load_nvram_early(int size, u32 *old_dword, int nvram_pos);
|
||||||
void s3_resume_init_data(void *FchParams);
|
void s3_resume_init_data(void *FchParams);
|
||||||
int s3_save_nvram_early(u32 dword, int size, int nvram_pos);
|
int s3_save_nvram_early(u32 dword, int size, int nvram_pos);
|
||||||
|
@@ -64,3 +64,8 @@ void smi_write16(uint8_t offset, uint16_t value)
|
|||||||
{
|
{
|
||||||
write16((void *)(APU_SMI_BASE + offset), value);
|
write16((void *)(APU_SMI_BASE + offset), value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint16_t pm_acpi_pm_cnt_blk(void)
|
||||||
|
{
|
||||||
|
return pm_read16(PM1_CNT_BLK);
|
||||||
|
}
|
||||||
|
Reference in New Issue
Block a user