Skip to content
Snippets Groups Projects
  1. Jan 01, 2020
  2. Nov 27, 2019
    • Lioncash's avatar
      core/memory: Migrate over Write{8, 16, 32, 64, Block} to the Memory class · e4c381b8
      Lioncash authored
      The Write functions are used slightly less than the Read functions,
      which make these a bit nicer to move over.
      
      The only adjustments we really need to make here are to Dynarmic's
      exclusive monitor instance. We need to keep a reference to the currently
      active memory instance to perform exclusive read/write operations.
      e4c381b8
    • Lioncash's avatar
      core/memory: Migrate over Read{8, 16, 32, 64, Block} to the Memory class · b05bfc60
      Lioncash authored
      With all of the trivial parts of the memory interface moved over, we can
      get right into moving over the bits that are used.
      
      Note that this does require the use of GetInstance from the global
      system instance to be used within hle_ipc.cpp and the gdbstub. This is
      fine for the time being, as they both already rely on the global system
      instance in other functions. These will be removed in a change directed
      at both of these respectively.
      
      For now, it's sufficient, as it still accomplishes the goal of
      de-globalizing the memory code.
      b05bfc60
    • Lioncash's avatar
      core: Prepare various classes for memory read/write migration · 536fc7f0
      Lioncash authored
      Amends a few interfaces to be able to handle the migration over to the
      new Memory class by passing the class by reference as a function
      parameter where necessary.
      
      Notably, within the filesystem services, this eliminates two ReadBlock()
      calls by using the helper functions of HLERequestContext to do that for
      us.
      536fc7f0
  3. Nov 12, 2019
  4. Oct 11, 2019
  5. Oct 09, 2019
  6. Sep 30, 2019
  7. Jul 11, 2019
    • Lioncash's avatar
      core/arm: Remove obsolete Unicorn memory mapping · 70624e1c
      Lioncash authored
      This was initially necessary when AArch64 JIT emulation was in its
      infancy and all memory-related instructions weren't implemented.
      
      Given the JIT now has all of these facilities implemented, we can remove
      these functions from the CPU interface.
      70624e1c
  8. Jun 10, 2019
  9. Apr 12, 2019
    • Lioncash's avatar
      core/cpu_core_manager: Create threads separately from initialization. · f2331a80
      Lioncash authored
      Our initialization process is a little wonky than one would expect when
      it comes to code flow. We initialize the CPU last, as opposed to
      hardware, where the CPU obviously needs to be first, otherwise nothing
      else would work, and we have code that adds checks to get around this.
      
      For example, in the page table setting code, we check to see if the
      system is turned on before we even notify the CPU instances of a page
      table switch. This results in dead code (at the moment), because the
      only time a page table switch will occur is when the system is *not*
      running, preventing the emulated CPU instances from being notified of a
      page table switch in a convenient manner (technically the code path
      could be taken, but we don't emulate the process creation svc handlers
      yet).
      
      This moves the threads creation into its own member function of the core
      manager and restores a little order (and predictability) to our
      initialization process.
      
      Previously, in the multi-threaded cases, we'd kick off several threads
      before even the main kernel process was created and ready to execute (gross!).
      Now the initialization process is like so:
      
      Initialization:
        1. Timers
      
        2. CPU
      
        3. Kernel
      
        4. Filesystem stuff (kind of gross, but can be amended trivially)
      
        5. Applet stuff (ditto in terms of being kind of gross)
      
        6. Main process (will be moved into the loading step in a following
                         change)
      
        7. Telemetry (this should be initialized last in the future).
      
        8. Services (4 and 5 should ideally be alongside this).
      
        9. GDB (gross. Uses namespace scope state. Needs to be refactored into a
                class or booted altogether).
      
        10. Renderer
      
        11. GPU (will also have its threads created in a separate step in a
                 following change).
      
      Which... isn't *ideal* per-se, however getting rid of the wonky
      intertwining of CPU state initialization out of this mix gets rid of
      most of the footguns when it comes to our initialization process.
      f2331a80
  10. Apr 08, 2019
    • Lioncash's avatar
      kernel/svc: Deglobalize the supervisor call handlers · b117ca5f
      Lioncash authored
      Adjusts the interface of the wrappers to take a system reference, which
      allows accessing a system instance without using the global accessors.
      
      This also allows getting rid of all global accessors within the
      supervisor call handling code. While this does make the wrappers
      themselves slightly more noisy, this will be further cleaned up in a
      follow-up. This eliminates the global system accessors in the current
      code while preserving the existing interface.
      b117ca5f
  11. Apr 07, 2019
  12. Apr 04, 2019
    • Lioncash's avatar
      core: Add missing override specifiers where applicable · 5b0a9f8b
      Lioncash authored
      Applies the override specifier where applicable. In the case of
      destructors that are  defaulted in their definition, they can
      simply be removed.
      
      This also removes the unnecessary inclusions being done in audin_u and
      audrec_u, given their close proximity.
      5b0a9f8b
  13. Feb 16, 2019
  14. Feb 12, 2019
  15. Dec 19, 2018
  16. Dec 18, 2018
  17. Dec 03, 2018
  18. Oct 15, 2018
  19. Oct 10, 2018
    • Lioncash's avatar
      kernel/thread: Use a regular pointer for the owner/current process · 5c040859
      Lioncash authored
      There's no real need to use a shared pointer in these cases, and only
      makes object management more fragile in terms of how easy it would be to
      introduce cycles. Instead, just do the simple thing of using a regular
      pointer. Much of this is just a hold-over from citra anyways.
      
      It also doesn't make sense from a behavioral point of view for a
      process' thread to prolong the lifetime of the process itself (the
      process is supposed to own the thread, not the other way around).
      5c040859
  20. Oct 04, 2018
    • Lioncash's avatar
      kernel/thread: Make all instance variables private · baed7e1f
      Lioncash authored
      Many of the member variables of the thread class aren't even used
      outside of the class itself, so there's no need to make those variables
      public. This change follows in the steps of the previous changes that
      made other kernel types' members private.
      
      The main motivation behind this is that the Thread class will likely
      change in the future as emulation becomes more accurate, and letting
      random bits of the emulator access data members of the Thread class
      directly makes it a pain to shuffle around and/or modify internals.
      Having all data members public like this also makes it difficult to
      reason about certain bits of behavior without first verifying what parts
      of the core actually use them.
      
      Everything being public also generally follows the tendency for changes
      to be introduced in completely different translation units that would
      otherwise be better introduced as an addition to the Thread class'
      public interface.
      baed7e1f
  21. Sep 30, 2018
    • Lioncash's avatar
      kernel/process: Make data member variables private · cf9d6c6f
      Lioncash authored
      Makes the public interface consistent in terms of how accesses are done
      on a process object. It also makes it slightly nicer to reason about the
      logic of the process class, as we don't want to expose everything to
      external code.
      cf9d6c6f
    • Lioncash's avatar
      arm_interface: Add missing fpsr/tpidr members to the ThreadContext struct · 16145e2f
      Lioncash authored
      Internally within the kernel, it also includes a member variable for the
      floating-point status register, and TPIDR, so we should do the same here to match
      it.
      
      While we're at it, also fix up the size of the struct and add a static
      assertion to ensure it always stays the correct size.
      16145e2f
  22. Sep 25, 2018
  23. Sep 23, 2018
  24. Sep 20, 2018
  25. Sep 19, 2018
  26. Sep 18, 2018
    • Lioncash's avatar
      arm_dynarmic: Correct ExclusiveWrite128()'s operation · ead2a4ee
      Lioncash authored
      Previously the second half of the value being written would overwrite
      the first half. Thankfully this wasn't a bug that was being encountered,
      as the function is currently unused.
      ead2a4ee
    • Lioncash's avatar
      arm_interface: Remove ARM11-isms from the CPU interface · b51e7e02
      Lioncash authored
      This modifies the CPU interface to more accurately match an
      AArch64-supporting CPU as opposed to an ARM11 one. Two of the methods
      don't even make sense to keep around for this interface, as Adv Simd is
      used, rather than the VFP in the primary execution state. This is
      essentially a modernization change that should have occurred from the
      get-go.
      b51e7e02
  27. Sep 15, 2018
  28. Sep 04, 2018
    • Markus Wick's avatar
      Update microprofile scopes. · 10bc7259
      Markus Wick authored
      Blame the subsystems which deserve the blame :)
      
      The updated list is not complete, just the ones I've spotted on random sampling the stack trace.
      10bc7259
  29. Aug 31, 2018
    • Lioncash's avatar
      core/core: Replace includes with forward declarations where applicable · 4a587b81
      Lioncash authored
      The follow-up to e2457418, which
      replaces most of the includes in the core header with forward declarations.
      
      This makes it so that if any of the headers the core header was
      previously including change, then no one will need to rebuild the bulk
      of the core, due to core.h being quite a prevalent inclusion.
      
      This should make turnaround for changes much faster for developers.
      4a587b81
  30. Aug 25, 2018
  31. Aug 16, 2018
    • MerryMage's avatar
      dynarmic: Update to 550d662 · 94329038
      MerryMage authored
      550d662 load_store_exclusive: Define s == t state to be Constraint_NONE
      0b69381 A64/translate: Allow for unpredictable behaviour to be defined
      6d236d4 system: Implement MRS CNTFRQ_EL0
      6cbb6fb A32/testenv: Add missing headers
      6729328 externals: Update xbyak to v5.67
      1812bd2 Squashed 'externals/xbyak/' changes from 2794cde7..671fc805
      9a95802 externals: Document subtrees
      714a840 A64: Implement SQ{ADD, SUB}, and UQ{ADD, SUB}'s vector variants
      8cab459 A64: Implement UQADD/UQSUB's scalar variants
      18a8151 ir: Add opcodes for unsigned saturating add and subtract
      a5660ee x64/reg_alloc: Use type alias for array returned by GetArgumentInfo()
      29489b5 ir/value: Use type alias CoprocessorInfo for std::array<u8, 8>
      e23ba26 status_register_access: Add support for bits 0 and 1 of mask to MSR
      55190bd fuzz_with_unicorn: Split utility functions into fuzz_util
      23b049d A32/translate/load_store: Correct detection of writeback
      7ec9f15 A32/translate: Add TranslateSingleInstruction
      efeecb4 A32/ir_emitter: Bug fix: IREmitter::ExceptionRaised using incorrect opcode
      08d1d19 A32/decoders: Split instruction list into include file
      2d929cc tests: Refactor unicorn_emu to allow for A32 unicorn
      f672368 microinstruction: Improve assert messages
      7ebff50 emit_x64_vector: EmitVectorNarrow16: AVX512 implementation
      edce230 emit_x64_vector: EmitVectorNarrow32: prefer pblendw to loading constant
      94329038
  32. Aug 13, 2018
Loading