[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v6 06/18] hw/arm/allwinner: add CPU Configuration module
From: |
Alex Bennée |
Subject: |
Re: [PATCH v6 06/18] hw/arm/allwinner: add CPU Configuration module |
Date: |
Tue, 03 Mar 2020 12:09:17 +0000 |
User-agent: |
mu4e 1.3.9; emacs 27.0.90 |
Niek Linnenbank <address@hidden> writes:
> Various Allwinner System on Chip designs contain multiple processors
> that can be configured and reset using the generic CPU Configuration
> module interface. This commit adds support for the Allwinner CPU
> configuration interface which emulates the following features:
>
> * CPU reset
> * CPU status
>
> Signed-off-by: Niek Linnenbank <address@hidden>
<snip>
> +
> +/* CPUCFG constants */
> +enum {
> + CPU_EXCEPTION_LEVEL_ON_RESET = 3, /* EL3 */
> +};
> +
> +static void allwinner_cpucfg_cpu_reset(AwCpuCfgState *s, uint8_t cpu_id)
> +{
> + int ret;
> +
> + trace_allwinner_cpucfg_cpu_reset(cpu_id, s->entry_addr);
> +
> + ret = arm_set_cpu_on(cpu_id, s->entry_addr, 0,
> + CPU_EXCEPTION_LEVEL_ON_RESET, false);
According to the arm_set_cpu_on code:
if (!target_aa64 && arm_feature(&target_cpu->env, ARM_FEATURE_AARCH64)) {
/*
* For now we don't support booting an AArch64 CPU in AArch32 mode
* TODO: We should add this support later
*/
qemu_log_mask(LOG_UNIMP,
"[ARM]%s: Starting AArch64 CPU %" PRId64
" in AArch32 mode is not supported yet\n",
__func__, cpuid);
return QEMU_ARM_POWERCTL_INVALID_PARAM;
}
Do you really want to reboot in aarch32 mode on a reset? If so we should
fix the TODO.
--
Alex Bennée
- [PATCH v6 00/18] Add Allwinner H3 SoC and Orange Pi PC Machine, Niek Linnenbank, 2020/03/01
- [PATCH v6 04/18] hw/arm/allwinner-h3: add USB host controller, Niek Linnenbank, 2020/03/01
- [PATCH v6 05/18] hw/arm/allwinner-h3: add System Control module, Niek Linnenbank, 2020/03/01
- [PATCH v6 10/18] hw/arm/allwinner-h3: add Boot ROM support, Niek Linnenbank, 2020/03/01
- [PATCH v6 07/18] hw/arm/allwinner: add Security Identifier device, Niek Linnenbank, 2020/03/01
- [PATCH v6 06/18] hw/arm/allwinner: add CPU Configuration module, Niek Linnenbank, 2020/03/01
- Re: [PATCH v6 06/18] hw/arm/allwinner: add CPU Configuration module,
Alex Bennée <=
[PATCH v6 15/18] tests/boot_linux_console: Add a SD card test for the OrangePi PC board, Niek Linnenbank, 2020/03/01
[PATCH v6 02/18] hw/arm: add Xunlong Orange Pi PC machine, Niek Linnenbank, 2020/03/01
[PATCH v6 17/18] tests/boot_linux_console: Test booting NetBSD via U-Boot on OrangePi PC, Niek Linnenbank, 2020/03/01
[PATCH v6 12/18] hw/arm/allwinner: add RTC device support, Niek Linnenbank, 2020/03/01
[PATCH v6 18/18] docs: add Orange Pi PC document, Niek Linnenbank, 2020/03/01