2022-04-23 09:59:50 +01:00
|
|
|
// SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project
|
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
2020-02-11 23:56:24 +00:00
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2021-01-20 05:07:07 +00:00
|
|
|
#include <array>
|
2020-02-14 02:08:49 +00:00
|
|
|
#include <tuple>
|
|
|
|
|
2021-01-20 05:07:07 +00:00
|
|
|
#include "common/bit_util.h"
|
2020-02-11 23:56:24 +00:00
|
|
|
#include "common/common_types.h"
|
|
|
|
|
|
|
|
namespace Core {
|
|
|
|
|
|
|
|
namespace Hardware {
|
|
|
|
|
|
|
|
// The below clock rate is based on Switch's clockspeed being widely known as 1.020GHz
|
|
|
|
// The exact value used is of course unverified.
|
|
|
|
constexpr u64 BASE_CLOCK_RATE = 1019215872; // Switch cpu frequency is 1020MHz un/docked
|
|
|
|
constexpr u64 CNTFREQ = 19200000; // Switch's hardware clock speed
|
|
|
|
constexpr u32 NUM_CPU_CORES = 4; // Number of CPU Cores
|
2020-02-13 21:01:44 +00:00
|
|
|
|
2021-01-20 05:07:07 +00:00
|
|
|
// Virtual to Physical core map.
|
|
|
|
constexpr std::array<s32, Common::BitSize<u64>()> VirtualToPhysicalCoreMap{
|
|
|
|
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,
|
|
|
|
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,
|
2020-02-13 21:01:44 +00:00
|
|
|
};
|
|
|
|
|
2022-06-06 17:56:01 +01:00
|
|
|
// Cortex-A57 supports 4 memory watchpoints
|
|
|
|
constexpr u64 NUM_WATCHPOINTS = 4;
|
|
|
|
|
2021-01-20 05:07:07 +00:00
|
|
|
} // namespace Hardware
|
|
|
|
|
2020-02-11 23:56:24 +00:00
|
|
|
} // namespace Core
|