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 the & but I checked the ACPI SPEC, it still an Integer operation. Because PCRR is return Integer. I have no idea to convert the Integer to byte, so I choice use the Package that we can avoid any convert. Yap, I thought DeRefOf works on Buffer as well but not in this case. Maybe it already has problem after I made it buffer overflow. I will try this if I have time. @Furquan, Have a great vacation. Thanks a lot.