diff options
author | Shuo Liu <shuo.liu@intel.com> | 2024-06-08 02:49:41 +0800 |
---|---|---|
committer | Lean Sheng Tan <sheng.tan@9elements.com> | 2024-10-11 19:37:14 +0000 |
commit | 177bb5e9b9789cc830f504815e711973190def4e (patch) | |
tree | 82df8492318af277542e5459cacea3e770e00eb2 /src | |
parent | b9bf4464f2e31d3dd8bc11b6e14fde2cdb9c44d1 (diff) |
soc/intel/xeon_sp: Revise IIO domain ACPI name encoding
GNR/SRF supports up to 18 logical IIO stacks. Revise IIO domain
ACPI name encoding in below form to support GNR/SRF,
prefix (16 bit) | socket (3-bit) | stack (5-bit)
Change-Id: I6f4c3c22980f2797dd47c8e0d684e0a3175030b7
Signed-off-by: Shuo Liu <shuo.liu@intel.com>
Signed-off-by: Jincheng Li <jincheng.li@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84310
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/soc/intel/xeon_sp/acpi.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/soc/intel/xeon_sp/acpi.c b/src/soc/intel/xeon_sp/acpi.c index e0c2f3bfb2..33db9e65b4 100644 --- a/src/soc/intel/xeon_sp/acpi.c +++ b/src/soc/intel/xeon_sp/acpi.c @@ -100,16 +100,16 @@ void iio_domain_set_acpi_name(struct device *dev, const char *prefix) .domain_path = dev_get_domain_id(dev) }; - assert(dn.socket < CONFIG_MAX_SOCKET); - assert(dn.stack < 16); + assert(dn.socket < 8); + assert(dn.stack < 32); assert(prefix != NULL && strlen(prefix) == 2); - if (dn.socket >= CONFIG_MAX_SOCKET || dn.stack >= 16 || + if (dn.socket >= 8 || dn.stack >= 32 || !prefix || strlen(prefix) != 2) return; char *name = xmalloc(ACPI_NAME_BUFFER_SIZE); - snprintf(name, ACPI_NAME_BUFFER_SIZE, "%s%1X%1X", prefix, dn.socket, dn.stack); + snprintf(name, ACPI_NAME_BUFFER_SIZE, "%s%02X", prefix, ((dn.socket << 5) + dn.stack)); dev->name = name; } |