Attention is currently required from: Arthur Heymans, Christian Walter, Jincheng Li, Johnny Lin, Jonathan Zhang, Lean Sheng Tan, Patrick Rudolph, Tim Chu.
Hello Jincheng Li,
I'd like you to do a code review. Please visit
https://review.coreboot.org/c/coreboot/+/84310?usp=email
to review the following change.
Change subject: soc/intel/xeon_sp: Revise IIO domain ACPI name encoding ......................................................................
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 --- M src/soc/intel/xeon_sp/acpi.c 1 file changed, 4 insertions(+), 4 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/10/84310/1
diff --git a/src/soc/intel/xeon_sp/acpi.c b/src/soc/intel/xeon_sp/acpi.c index e0c2f3b..33db9e6 100644 --- a/src/soc/intel/xeon_sp/acpi.c +++ b/src/soc/intel/xeon_sp/acpi.c @@ -100,16 +100,16 @@ .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; }