Re: [PATCH] hw/loongarch: Fix ACPI processor id off-by-one error

2023-08-21 Thread bibo mao
在 2023/8/21 09:29, Jiajie Chen 写道: > > On 2023/8/21 09:24, bibo mao wrote: >> + Add xianglai >> >> Good catch. >> >> In theory, it is logical id, and it can be not equal to physical id. >> However it must be equal to _UID in cpu dsdt table which is missing >> now. > > Yes, the logical id can be

Re: [PATCH] hw/loongarch: Fix ACPI processor id off-by-one error

2023-08-20 Thread bibo mao
在 2023/8/21 09:29, Jiajie Chen 写道: > > On 2023/8/21 09:24, bibo mao wrote: >> + Add xianglai >> >> Good catch. >> >> In theory, it is logical id, and it can be not equal to physical id. >> However it must be equal to _UID in cpu dsdt table which is missing >> now. > > Yes, the logical id can b

Re: [PATCH] hw/loongarch: Fix ACPI processor id off-by-one error

2023-08-20 Thread Jiajie Chen
On 2023/8/21 09:24, bibo mao wrote: + Add xianglai Good catch. In theory, it is logical id, and it can be not equal to physical id. However it must be equal to _UID in cpu dsdt table which is missing now. Yes, the logical id can be different from index. The spec says: If the processor struc

Re: [PATCH] hw/loongarch: Fix ACPI processor id off-by-one error

2023-08-20 Thread bibo mao
+ Add xianglai Good catch. In theory, it is logical id, and it can be not equal to physical id. However it must be equal to _UID in cpu dsdt table which is missing now. Can pptt table parse error be fixed if cpu dsdt table is added? Regards Bibo Mao 在 2023/8/20 18:56, Jiajie Chen 写道: > In hw/

[PATCH] hw/loongarch: Fix ACPI processor id off-by-one error

2023-08-20 Thread Jiajie Chen
In hw/acpi/aml-build.c:build_pptt() function, the code assumes that the ACPI processor id equals to the cpu index, for example if we have 8 cpus, then the ACPI processor id should be in range 0-7. However, in hw/loongarch/acpi-build.c:build_madt() function we broke the assumption. If we have 8 cpu