diff options
author | David <25727384+ogniK5377@users.noreply.github.com> | 2018-01-21 23:59:50 +0100 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2018-01-21 23:59:50 +0100 |
commit | eeb3b5eed7645bee468b9d19325cb29877d62e82 (patch) | |
tree | f79ce7893a6d6c0a8eb3984edded9887660323ac /src/core/hle/service/nvdrv/devices/nvhost_ctrl.h | |
parent | Merge pull request #128 from Subv/parcel_query (diff) | |
download | yuzu-eeb3b5eed7645bee468b9d19325cb29877d62e82.tar yuzu-eeb3b5eed7645bee468b9d19325cb29877d62e82.tar.gz yuzu-eeb3b5eed7645bee468b9d19325cb29877d62e82.tar.bz2 yuzu-eeb3b5eed7645bee468b9d19325cb29877d62e82.tar.lz yuzu-eeb3b5eed7645bee468b9d19325cb29877d62e82.tar.xz yuzu-eeb3b5eed7645bee468b9d19325cb29877d62e82.tar.zst yuzu-eeb3b5eed7645bee468b9d19325cb29877d62e82.zip |
Diffstat (limited to 'src/core/hle/service/nvdrv/devices/nvhost_ctrl.h')
-rw-r--r-- | src/core/hle/service/nvdrv/devices/nvhost_ctrl.h | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/src/core/hle/service/nvdrv/devices/nvhost_ctrl.h b/src/core/hle/service/nvdrv/devices/nvhost_ctrl.h new file mode 100644 index 000000000..abce35e17 --- /dev/null +++ b/src/core/hle/service/nvdrv/devices/nvhost_ctrl.h @@ -0,0 +1,48 @@ +// Copyright 2018 yuzu emulator team +// Licensed under GPLv2 or any later version +// Refer to the license.txt file included. + +#pragma once + +#include <array> +#include <cstdlib> +#include <cstring> +#include <vector> +#include "common/common_types.h" +#include "core/hle/service/nvdrv/devices/nvdevice.h" + +namespace Service { +namespace Nvidia { +namespace Devices { + +class nvhost_ctrl final : public nvdevice { +public: + nvhost_ctrl() = default; + ~nvhost_ctrl() override = default; + + u32 ioctl(u32 command, const std::vector<u8>& input, std::vector<u8>& output) override; + +private: + enum IoctlCommands { + IocSyncptReadCommand = 0xC0080014, + IocSyncptIncrCommand = 0x40040015, + IocSyncptWaitCommand = 0xC00C0016, + IocModuleMutexCommand = 0x40080017, + IocModuleRegRDWRCommand = 0xC008010E, + IocSyncptWaitexCommand = 0xC0100019, + IocSyncptReadMaxCommand = 0xC008001A, + IocGetConfigCommand = 0xC183001B, + }; + + struct IocGetConfigParams { + std::array<char, 0x41> domain_str; + std::array<char, 0x41> param_str; + std::array<char, 0x101> config_str; + }; + + u32 NvOsGetConfigU32(const std::vector<u8>& input, std::vector<u8>& output); +}; + +} // namespace Devices +} // namespace Nvidia +} // namespace Service |