hardware_properties.h 1.0 KB

123456789101112131415161718192021222324252627282930313233
  1. // SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project
  2. // SPDX-License-Identifier: GPL-2.0-or-later
  3. #pragma once
  4. #include <array>
  5. #include <tuple>
  6. #include "common/bit_util.h"
  7. #include "common/common_types.h"
  8. namespace Core {
  9. namespace Hardware {
  10. // The below clock rate is based on Switch's clockspeed being widely known as 1.020GHz
  11. // The exact value used is of course unverified.
  12. constexpr u64 BASE_CLOCK_RATE = 1019215872; // Switch cpu frequency is 1020MHz un/docked
  13. constexpr u64 CNTFREQ = 19200000; // Switch's hardware clock speed
  14. constexpr u32 NUM_CPU_CORES = 4; // Number of CPU Cores
  15. // Virtual to Physical core map.
  16. constexpr std::array<s32, Common::BitSize<u64>()> VirtualToPhysicalCoreMap{
  17. 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  18. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3,
  19. };
  20. // Cortex-A57 supports 4 memory watchpoints
  21. constexpr u64 NUM_WATCHPOINTS = 4;
  22. } // namespace Hardware
  23. } // namespace Core