soc/intel/common: Calculate and configure SF Mask 2
commit16ab9bdcd578612bb3822373547f939eb90afd82
authorSubrata Banik <subrata.banik@intel.com>
Fri, 30 Jul 2021 11:31:11 +0000 (30 17:01 +0530)
committerSubrata Banik <subrata.banik@intel.com>
Sun, 15 Aug 2021 06:58:09 +0000 (15 06:58 +0000)
tree2c92c93a063c57216182aaee0d13d7c244ef7877
parent83c9b3a599ede17e1c656feb8ef240ce0e3ad287
soc/intel/common: Calculate and configure SF Mask 2

As per TGL EDS, two ways will be controlled with one bit of SF QoS
register hence, this patch introduces SF_MASK_2WAYS_PER_BIT Kconfig to
allow SoC users to select SF_MASK_2WAYS_PER_BIT to follow the EDS
recommendation.

Calculate SF masks 2:
1. if CONFIG_SF_MASK_2WAYS_PER_BIT:
        a. data_ways = data_ways / 2

Also, program SF Mask#2 using below logic:
2. Set SF_MASK_2 = (1 << data_ways) - 1

Change-Id: I442bed75f13d26f357cfb32c54c5fe9efa4b474b
Signed-off-by: Subrata Banik <subrata.banik@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/56717
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
src/include/cpu/x86/msr.h
src/soc/intel/common/block/cpu/Kconfig
src/soc/intel/common/block/cpu/car/cache_as_ram.S