[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3] aspeed: Add boot stub for smp booting
From: |
Cédric Le Goater |
Subject: |
Re: [PATCH v3] aspeed: Add boot stub for smp booting |
Date: |
Fri, 8 May 2020 16:27:32 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 |
On 5/8/20 8:52 AM, Joel Stanley wrote:
> On Mon, 4 May 2020 at 08:20, Joel Stanley <address@hidden> wrote:
> ...
>
>> v3: Use WFI instead of WFE
>> v2: test for number of CPUs
>
>> +static void aspeed_write_smpboot(ARMCPU *cpu,
>> + const struct arm_boot_info *info)
>> +{
>> + static const uint32_t poll_mailbox_ready[] = {
>> + /*
>> + * r2 = per-cpu go sign value
>> + * r1 = AST_SMP_MBOX_FIELD_ENTRY
>> + * r0 = AST_SMP_MBOX_FIELD_GOSIGN
>> + */
>> + 0xee100fb0, /* mrc p15, 0, r0, c0, c0, 5 */
>> + 0xe21000ff, /* ands r0, r0, #255 */
>> + 0xe59f201c, /* ldr r2, [pc, #28] */
>> + 0xe1822000, /* orr r2, r2, r0 */
>> +
>> + 0xe59f1018, /* ldr r1, [pc, #24] */
>> + 0xe59f0018, /* ldr r0, [pc, #24] */
>> +
>> + 0xe320f003, /* wfi */
>
> I was wrong, wfi does not work in this case. I must have made a
> mistake when testing.
>
> Cédric, can you please confirm my testing is correct? I was using
> today's linux next, but anything newer than Linux 5.4 should have the
> same result.
Indeed, with OpenBMC kernel v5.4.32-260-g7dc9442bbe7d and wfi (patch v3),
[ 0.045214] smp: Bringing up secondary CPUs ...
[ 1.178127] CPU1: failed to come online
[ 1.187309] smp: Brought up 1 node, 1 CPU
[ 1.187590] SMP: Total of 1 processors activated (2250.00 BogoMIPS).
[ 1.187786] CPU: All CPU(s) started in HYP mode.
[ 1.187850] CPU: Virtualization extensions available.
When using wfe (patch v2),
[ 0.091092] smp: Bringing up secondary CPUs ...
[ 0.096628] smp: Brought up 1 node, 2 CPUs
[ 0.096718] SMP: Total of 2 processors activated (4500.00 BogoMIPS).
[ 0.096768] CPU: All CPU(s) started in HYP mode.
[ 0.096785] CPU: Virtualization extensions available.
Cheers,
C.