EricR Lai has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/37685 )
Change subject: soc/intel/cannonlake: Move GPIO PM configuration to soc level ......................................................................
Patch Set 17:
Patch Set 17:
PCRR return Integer and one buffer is a byte.
Yes, that is correct. If you intend to use Buffer(), then it will have to be something like this: GPMB[Local0] = PCRR (Local1, GPIO_MISCCFG) & MISCCFG_ENABLE_GPIO_PM_CONFIG to ensure that the data is smaller than a byte.
Another interesting thing is we may consider the object. I can't printf %o GPMB[local] or DeRefOf(GPMB[local]). The log message of both will show [reference object] not value
That doesn't sound correct. For both Buffer() and Package(), the right way to access an element is using DerefOf(). Section 5.4 of this doc has some good examples: https://acpica.org/sites/acpica/files/asl_tutorial_v20190625.pdf
I tried Local2 = PCRR (Local1, GPIO_MISCCFG) & MISCCFG_ENABLE_GPIO_PM_CONFIG then print Local2. It seems still a whole Integer. Below is spec in ACPI6.0 AndTerm := And ( Source1, // TermArg => Integer Source2, // TermArg => Integer Result // Target ) => Integer