Revert "[hle] constexpr handler dispatch maps, introduce version gating (#4480)" (#4532)

This reverts commit 218c6705d9.

- [x] I have read and followed the [Contribution Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/CONTRIBUTING.md#code-contributions).
- [x] I have read and followed the [AI Policy](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/AI.md).
- [x] I have read and followed the [Coding Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/Coding.md) to the best of my ability.

-------------------

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4532
Reviewed-by: lizzie <lizzie@eden-emu.dev>
Reviewed-by: CamilleLaVey <camillelavey99@gmail.com>
Reviewed-by: Maufeat <sahyno1996@gmail.com>
This commit is contained in:
PavelBARABANOV
2026-10-15 08:45:15 +02:00
committed by crueter
parent 14da4482a4
commit e255c20db4
588 changed files with 14723 additions and 12534 deletions
+46 -44
View File
@@ -15,62 +15,64 @@ namespace Service::PCIe {
class ISession final : public ServiceFramework<ISession> {
public:
explicit ISession(Core::System& system_) : ServiceFramework{system_, "ISession"} {}
explicit ISession(Core::System& system_) : ServiceFramework{system_, "ISession"} {
// clang-format off
static const FunctionInfo functions[] = {
{0, nullptr, "QueryFunctions"},
{1, nullptr, "AcquireFunction"},
{2, nullptr, "ReleaseFunction"},
{3, nullptr, "GetFunctionState"},
{4, nullptr, "GetBarProfile"},
{5, nullptr, "ReadConfig"},
{6, nullptr, "WriteConfig"},
{7, nullptr, "ReadBarRegion"},
{8, nullptr, "WriteBarRegion"},
{9, nullptr, "FindCapability"},
{10, nullptr, "FindExtendedCapability"},
{11, nullptr, "MapDma"},
{12, nullptr, "UnmapDma"},
{13, nullptr, "UnmapDmaBusAddress"},
{14, nullptr, "GetDmaBusAddress"},
{15, nullptr, "GetDmaBusAddressRange"},
{16, nullptr, "SetDmaEnable"},
{17, nullptr, "AcquireIrq"},
{18, nullptr, "ReleaseIrq"},
{19, nullptr, "SetIrqEnable"},
{20, nullptr, "GetIrqEvent"},
{21, nullptr, "SetAspmEnable"},
{22, nullptr, "SetResetUponResumeEnable"},
{23, nullptr, "ResetFunction"},
};
// clang-format on
static constexpr auto functions = CreateStaticMap(
FunctionInfo{0, nullptr, "QueryFunctions"},
FunctionInfo{1, nullptr, "AcquireFunction"},
FunctionInfo{2, nullptr, "ReleaseFunction"},
FunctionInfo{3, nullptr, "GetFunctionState"},
FunctionInfo{4, nullptr, "GetBarProfile"},
FunctionInfo{5, nullptr, "ReadConfig"},
FunctionInfo{6, nullptr, "WriteConfig"},
FunctionInfo{7, nullptr, "ReadBarRegion"},
FunctionInfo{8, nullptr, "WriteBarRegion"},
FunctionInfo{9, nullptr, "FindCapability"},
FunctionInfo{10, nullptr, "FindExtendedCapability"},
FunctionInfo{11, nullptr, "MapDma"},
FunctionInfo{12, nullptr, "UnmapDma"},
FunctionInfo{13, nullptr, "UnmapDmaBusAddress"},
FunctionInfo{14, nullptr, "GetDmaBusAddress"},
FunctionInfo{15, nullptr, "GetDmaBusAddressRange"},
FunctionInfo{16, nullptr, "SetDmaEnable"},
FunctionInfo{17, nullptr, "AcquireIrq"},
FunctionInfo{18, nullptr, "ReleaseIrq"},
FunctionInfo{19, nullptr, "SetIrqEnable"},
FunctionInfo{20, nullptr, "GetIrqEvent"},
FunctionInfo{21, nullptr, "SetAspmEnable"},
FunctionInfo{22, nullptr, "SetResetUponResumeEnable"},
FunctionInfo{23, nullptr, "ResetFunction"}
);
std::optional<FunctionInfoBase> FindRequest(u32 key) override {
return HandlerTableGenerateWithFind(key, functions);
RegisterHandlers(functions);
}
};
class PCIE final : public ServiceFramework<PCIE> {
public:
explicit PCIE(Core::System& system_) : ServiceFramework{system_, "pcie"} {}
explicit PCIE(Core::System& system_) : ServiceFramework{system_, "pcie"} {
// clang-format off
static const FunctionInfo functions[] = {
{0, nullptr, "RegisterClassDriver"},
{1, nullptr, "QueryFunctionsUnregistered"},
};
// clang-format on
static constexpr auto functions = CreateStaticMap(
FunctionInfo{0, nullptr, "RegisterClassDriver"},
FunctionInfo{1, nullptr, "QueryFunctionsUnregistered"}
);
std::optional<FunctionInfoBase> FindRequest(u32 key) override {
return HandlerTableGenerateWithFind(key, functions);
RegisterHandlers(functions);
}
};
class PCIE_LOG final : public ServiceFramework<PCIE_LOG> {
public:
explicit PCIE_LOG(Core::System& system_) : ServiceFramework{system_, "pcie:log"} {}
static constexpr auto functions = CreateStaticMap(
FunctionInfo{0, nullptr, "GetLoggedState"},
FunctionInfo{1, nullptr, "GetLoggedStateEvent"}
);
std::optional<FunctionInfoBase> FindRequest(u32 key) override {
return HandlerTableGenerateWithFind(key, functions);
explicit PCIE_LOG(Core::System& system_) : ServiceFramework{system_, "pcie:log"} {
// clang-format off
static const FunctionInfo functions[] = {
{0, nullptr, "GetLoggedState"},
{1, nullptr, "GetLoggedStateEvent"},
};
// clang-format on
RegisterHandlers(functions);
}
};