1. 21 10月, 2017 1 次提交
  2. 01 9月, 2017 1 次提交
  3. 04 5月, 2017 3 次提交
    • S
      target/openrisc: Support non-busy idle state using PMR SPR · f4d1414a
      Stafford Horne 提交于
      The OpenRISC architecture has the Power Management Register (PMR)
      special purpose register to manage cpu power states.  The interesting
      modes are:
      
       * Doze Mode (DME) - Stop cpu except timer & pic - wake on interrupt
       * Sleep Mode (SME) - Stop cpu and all units - wake on interrupt
       * Suspend Model (SUME) - Stop cpu and all units - wake on reset
      
      The linux kernel will set DME when idle.
      
      This patch implements the PMR SPR and halts the qemu cpu when there is a
      change to DME or SME.  This means that openrisc qemu in no longer peggs
      a host cpu at 100%.
      
      In order for this to work we need to kick the CPU when timers are
      expired.  Update the cpu timer to kick the cpu upon each timer event.
      Reviewed-by: NRichard Henderson <rth@twiddle.net>
      Signed-off-by: NStafford Horne <shorne@gmail.com>
      f4d1414a
    • S
      target/openrisc: Remove duplicate features property · 48a1b62b
      Stafford Horne 提交于
      The features property has stored the exact same thing as the cpucfgr
      spr. Remove the feature enum and property as it is not needed.
      
      In order to preserve the behavior or keeping features accross reset this
      patch moves cpucfgr into the non reset region of the state struct.  Since
      the cpucfgr is read only this means we only need to sset cpucfgr once
      during class init.
      Signed-off-by: NStafford Horne <shorne@gmail.com>
      48a1b62b
    • S
      target/openrisc: implement shadow registers · d89e71e8
      Stafford Horne 提交于
      Shadow registers are part of the openrisc spec along with sr[cid], as
      part of the fast context switching feature.  When exceptions occur,
      instead of having to save registers to the stack if enabled the CID will
      increment and a new set of registers will be available.
      
      This patch only implements shadow registers which can be used as extra
      scratch registers via the mfspr and mtspr if required.  This is
      implemented in a way where it would be easy to add on the fast context
      switching, currently cid is hardcoded to 0.
      
      This is need for openrisc linux smp kernels to boot correctly.
      Signed-off-by: NStafford Horne <shorne@gmail.com>
      d89e71e8
  4. 21 4月, 2017 1 次提交
    • T
      target/openrisc: Implement EVBAR register · 356a2db3
      Tim 'mithro' Ansell 提交于
      Exception Vector Base Address Register (EVBAR) - This optional register
      can be used to apply an offset to the exception vector addresses.
      
      The significant bits (31-12) of the vector offset address for each
      exception depend on the setting of the Supervision Register (SR)'s EPH
      bit and the Exception Vector Base Address Register (EVBAR).
      
      Its presence is indicated by the EVBARP bit in the CPU Configuration
      Register (CPUCFGR).
      Signed-off-by: NTim 'mithro' Ansell <mithro@mithis.com>
      Signed-off-by: NStafford Horne <shorne@gmail.com>
      356a2db3
  5. 14 2月, 2017 10 次提交
  6. 13 1月, 2017 1 次提交
    • A
      qom/cpu: move tlb_flush to cpu_common_reset · 1f5c00cf
      Alex Bennée 提交于
      It is a common thing amongst the various cpu reset functions want to
      flush the SoftMMU's TLB entries. This is done either by calling
      tlb_flush directly or by way of a general memset of the CPU
      structure (sometimes both).
      
      This moves the tlb_flush call to the common reset function and
      additionally ensures it is only done for the CONFIG_SOFTMMU case and
      when tcg is enabled.
      
      In some target cases we add an empty end_of_reset_fields structure to the
      target vCPU structure so have a clear end point for any memset which
      is resetting value in the structure before CPU_COMMON (where the TLB
      structures are).
      
      While this is a nice clean-up in general it is also a precursor for
      changes coming to cputlb for MTTCG where the clearing of entries
      can't be done arbitrarily across vCPUs. Currently the cpu_reset
      function is usually called from the context of another vCPU as the
      architectural power up sequence is run. By using the cputlb API
      functions we can ensure the right behaviour in the future.
      Signed-off-by: NAlex Bennée <alex.bennee@linaro.org>
      Reviewed-by: NRichard Henderson <rth@twiddle.net>
      Reviewed-by: NDavid Gibson <david@gibson.dropbear.id.au>
      1f5c00cf
  7. 21 12月, 2016 1 次提交
    • T
      Move target-* CPU file into a target/ folder · fcf5ef2a
      Thomas Huth 提交于
      We've currently got 18 architectures in QEMU, and thus 18 target-xxx
      folders in the root folder of the QEMU source tree. More architectures
      (e.g. RISC-V, AVR) are likely to be included soon, too, so the main
      folder of the QEMU sources slowly gets quite overcrowded with the
      target-xxx folders.
      To disburden the main folder a little bit, let's move the target-xxx
      folders into a dedicated target/ folder, so that target-xxx/ simply
      becomes target/xxx/ instead.
      
      Acked-by: Laurent Vivier <laurent@vivier.eu> [m68k part]
      Acked-by: Bastian Koppelmann <kbastian@mail.uni-paderborn.de> [tricore part]
      Acked-by: Michael Walle <michael@walle.cc> [lm32 part]
      Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com> [s390x part]
      Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com> [s390x part]
      Acked-by: Eduardo Habkost <ehabkost@redhat.com> [i386 part]
      Acked-by: Artyom Tarasenko <atar4qemu@gmail.com> [sparc part]
      Acked-by: Richard Henderson <rth@twiddle.net> [alpha part]
      Acked-by: Max Filippov <jcmvbkbc@gmail.com> [xtensa part]
      Reviewed-by: David Gibson <david@gibson.dropbear.id.au> [ppc part]
      Acked-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com> [cris&microblaze part]
      Acked-by: Guan Xuetao <gxt@mprc.pku.edu.cn> [unicore32 part]
      Signed-off-by: NThomas Huth <thuth@redhat.com>
      fcf5ef2a
  8. 12 7月, 2016 1 次提交
  9. 29 6月, 2016 1 次提交
  10. 19 5月, 2016 1 次提交
  11. 13 5月, 2016 1 次提交
  12. 23 2月, 2016 1 次提交
  13. 07 10月, 2015 1 次提交
  14. 25 9月, 2015 1 次提交
  15. 11 9月, 2015 1 次提交
  16. 09 7月, 2015 1 次提交
  17. 30 4月, 2015 1 次提交
  18. 11 3月, 2015 1 次提交
    • E
      cpu: Make cpu_init() return QOM CPUState object · 2994fd96
      Eduardo Habkost 提交于
      Instead of making cpu_init() return CPUArchState, return CPUState.
      
      Changes were made using the Coccinelle semantic patch below.
      
        @@
        typedef CPUState;
        identifier e;
        expression args;
        type CPUArchState;
        @@
        -   e =
        +   cpu =
                cpu_init(args);
        -   if (!e) {
        +   if (!cpu) {
                ...
            }
        -   cpu = ENV_GET_CPU(env);
        +   e = cpu->env_ptr;
      
        @@
        identifier new_env, new_cpu, env, cpu;
        type CPUArchState;
        expression args;
        @@
        -{
        -   CPUState *cpu = ENV_GET_CPU(env);
        -   CPUArchState *new_env = cpu_init(args);
        -   CPUState *new_cpu = ENV_GET_CPU(new_env);
        +{
        +   CPUState *cpu = ENV_GET_CPU(env);
        +   CPUState *new_cpu = cpu_init(args);
        +   CPUArchState *new_env = new_cpu->env_ptr;
            ...
        }
      
        @@
        identifier c, cpu_init_func, cpu_model;
        type StateType, CPUType;
        @@
        -static inline StateType* cpu_init(const char *cpu_model)
        -{
        -   CPUType *c = cpu_init_func(cpu_model);
        (
        -   if (c == NULL) {
        -       return NULL;
        -   }
        -   return &c->env;
        |
        -   if (c) {
        -       return &c->env;
        -   }
        -   return NULL;
        )
        -}
        +#define cpu_init(cpu_model) CPU(cpu_init_func(cpu_model))
      
        @@
        identifier cpu_init_func;
        identifier model;
        @@
        -#define cpu_init(model) (&cpu_init_func(model)->env)
        +#define cpu_init(model) CPU(cpu_init_func(model))
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      Cc: Blue Swirl <blauwirbel@gmail.com>
      Cc: Guan Xuetao <gxt@mprc.pku.edu.cn>
      Cc: Riku Voipio <riku.voipio@iki.fi>
      Cc: Richard Henderson <rth@twiddle.net>
      Cc: Peter Maydell <peter.maydell@linaro.org>
      Cc: "Edgar E. Iglesias" <edgar.iglesias@gmail.com>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Michael Walle <michael@walle.cc>
      Cc: Aurelien Jarno <aurelien@aurel32.net>
      Cc: Leon Alrae <leon.alrae@imgtec.com>
      Cc: Anthony Green <green@moxielogic.com>
      Cc: Jia Liu <proljc@gmail.com>
      Cc: Alexander Graf <agraf@suse.de>
      Cc: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
      Cc: Max Filippov <jcmvbkbc@gmail.com>
      [AF: Fixed up cpu_copy() manually]
      Signed-off-by: NAndreas Färber <afaerber@suse.de>
      2994fd96
  19. 26 9月, 2014 1 次提交
  20. 14 3月, 2014 3 次提交
  21. 03 12月, 2013 1 次提交
  22. 20 11月, 2013 1 次提交
  23. 27 7月, 2013 1 次提交
  24. 23 7月, 2013 2 次提交
  25. 10 7月, 2013 2 次提交