diff options
| author | Park, Aiden <aiden.park@intel.com> | 2019-08-03 08:30:52 +0000 |
|---|---|---|
| committer | Bin Meng <bmeng.cn@gmail.com> | 2019-08-09 22:24:02 +0800 |
| commit | 14360bf0591c88c0af7c1792a331579443089f20 (patch) | |
| tree | e9e427dc9d262291d9dccb8ac3d3ebcffde8e969 /arch/x86/include/asm/arch-slimbootloader | |
| parent | 2869c3b3de390ed7dba3d854160d9b19dd4660a3 (diff) | |
| download | u-boot-14360bf0591c88c0af7c1792a331579443089f20.tar.gz u-boot-14360bf0591c88c0af7c1792a331579443089f20.tar.xz u-boot-14360bf0591c88c0af7c1792a331579443089f20.zip | |
x86: slimbootloader: Set TSC information for tsc_timer
Slim Bootloader already calibrated TSC and provides it to U-Boot.
Therefore, U-Boot does not have to re-calibrate TSC.
Configuring tsc_base and clock_rate makes x86 tsc_timer driver bypass
TSC calibration and use the provided TSC frequency.
- Get TSC frequency from performance info hob
- Set tsc_base and clock_rate for tsc_timer driver
Signed-off-by: Aiden Park <aiden.park@intel.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'arch/x86/include/asm/arch-slimbootloader')
| -rw-r--r-- | arch/x86/include/asm/arch-slimbootloader/slimbootloader.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/arch/x86/include/asm/arch-slimbootloader/slimbootloader.h b/arch/x86/include/asm/arch-slimbootloader/slimbootloader.h index 174a341d32..05dd1b2b44 100644 --- a/arch/x86/include/asm/arch-slimbootloader/slimbootloader.h +++ b/arch/x86/include/asm/arch-slimbootloader/slimbootloader.h @@ -24,6 +24,13 @@ 0xbb, 0x98, 0x95, 0x8d, 0x62, 0xde, 0x87, 0xf1) /** + * A GUID to get boot performance info hob which is provided by Slim Bootloader + */ +#define SBL_PERFORMANCE_INFO_GUID \ + EFI_GUID(0x868204be, 0x23d0, 0x4ff9, \ + 0xac, 0x34, 0xb9, 0x95, 0xac, 0x04, 0xb1, 0xb9) + +/** * A single entry of memory map information * * @addr: start address of a memory map entry @@ -84,4 +91,25 @@ struct sbl_serial_port_info { u32 rsvd1; }; +/** + * This includes timestamp data which has been collected in Slim Bootloader + * stages from the reset vector. In addition, this has TSC frequency in KHz to + * calculate each timestamp. + * + * @rev : revision of performance_info structure. currently 1. + * @rsvd : padding for alignment + * @count : the number of collected timestamp data + * @flags : only used in Slim Bootloader + * @frequency: tsc frequency in KHz + * @timestamp: the array of timestamp data which has 64-bit tsc value + */ +struct sbl_performance_info { + u8 rev; + u8 rsvd[3]; + u16 count; + u16 flags; + u32 frequency; + u64 timestamp[0]; +}; + #endif /* __SLIMBOOTLOADER_ARCH_H__ */ |
