diff mbox

[1/2] target-arm: Allow CPU "any" for system-mode emulation

Message ID 1436208832-17651-2-git-send-email-meadori@codesourcery.com
State New
Headers show

Commit Message

Meador Inge July 6, 2015, 6:53 p.m. UTC
From: Meador Inge <meadori@codesourcery.com>

The "any" CPU is useful for cases where the system-mode
emulator is being used to work with a wide array of
bare-metal C/C++ applications that have been compiled
in different ways.

Signed-off-by: Meador Inge <meadori@codesourcery.com>
---
 target-arm/cpu.c | 4 ----
 1 file changed, 4 deletions(-)

Comments

Peter Crosthwaite July 6, 2015, 9:51 p.m. UTC | #1
On Mon, Jul 6, 2015 at 11:53 AM,  <meadori@codesourcery.com> wrote:
> From: Meador Inge <meadori@codesourcery.com>
>
> The "any" CPU is useful for cases where the system-mode
> emulator is being used to work with a wide array of
> bare-metal C/C++ applications that have been compiled
> in different ways.
>

What is the system being created in this case though? Are you using -M
virt and can it reliably create usable systems with CPU type
substitutions?

Regards,
Peter

> Signed-off-by: Meador Inge <meadori@codesourcery.com>
> ---
>  target-arm/cpu.c | 4 ----
>  1 file changed, 4 deletions(-)
>
> diff --git a/target-arm/cpu.c b/target-arm/cpu.c
> index 80669a6..3665f6b 100644
> --- a/target-arm/cpu.c
> +++ b/target-arm/cpu.c
> @@ -1243,7 +1243,6 @@ static void pxa270c5_initfn(Object *obj)
>      cpu->reset_sctlr = 0x00000078;
>  }
>
> -#ifdef CONFIG_USER_ONLY
>  static void arm_any_initfn(Object *obj)
>  {
>      ARMCPU *cpu = ARM_CPU(obj);
> @@ -1258,7 +1257,6 @@ static void arm_any_initfn(Object *obj)
>      set_feature(&cpu->env, ARM_FEATURE_CRC);
>      cpu->midr = 0xffffffff;
>  }
> -#endif
>
>  #endif /* !defined(CONFIG_USER_ONLY) || !defined(TARGET_AARCH64) */
>
> @@ -1305,10 +1303,8 @@ static const ARMCPUInfo arm_cpus[] = {
>      { .name = "pxa270-b1",   .initfn = pxa270b1_initfn },
>      { .name = "pxa270-c0",   .initfn = pxa270c0_initfn },
>      { .name = "pxa270-c5",   .initfn = pxa270c5_initfn },
> -#ifdef CONFIG_USER_ONLY
>      { .name = "any",         .initfn = arm_any_initfn },
>  #endif
> -#endif
>      { .name = NULL }
>  };
>
> --
> 1.8.1.1
>
>
diff mbox

Patch

diff --git a/target-arm/cpu.c b/target-arm/cpu.c
index 80669a6..3665f6b 100644
--- a/target-arm/cpu.c
+++ b/target-arm/cpu.c
@@ -1243,7 +1243,6 @@  static void pxa270c5_initfn(Object *obj)
     cpu->reset_sctlr = 0x00000078;
 }
 
-#ifdef CONFIG_USER_ONLY
 static void arm_any_initfn(Object *obj)
 {
     ARMCPU *cpu = ARM_CPU(obj);
@@ -1258,7 +1257,6 @@  static void arm_any_initfn(Object *obj)
     set_feature(&cpu->env, ARM_FEATURE_CRC);
     cpu->midr = 0xffffffff;
 }
-#endif
 
 #endif /* !defined(CONFIG_USER_ONLY) || !defined(TARGET_AARCH64) */
 
@@ -1305,10 +1303,8 @@  static const ARMCPUInfo arm_cpus[] = {
     { .name = "pxa270-b1",   .initfn = pxa270b1_initfn },
     { .name = "pxa270-c0",   .initfn = pxa270c0_initfn },
     { .name = "pxa270-c5",   .initfn = pxa270c5_initfn },
-#ifdef CONFIG_USER_ONLY
     { .name = "any",         .initfn = arm_any_initfn },
 #endif
-#endif
     { .name = NULL }
 };