mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-08-11 18:50:55 +00:00
ppu_initialize_syscalls draft
This commit is contained in:
parent
3a5efe9809
commit
8209e6c1e3
2 changed files with 11 additions and 1 deletions
|
@ -142,6 +142,7 @@ cfg::set_entry g_cfg_load_libs(cfg::root.core, "Load libraries");
|
||||||
|
|
||||||
extern cfg::map_entry<ppu_decoder_type> g_cfg_ppu_decoder;
|
extern cfg::map_entry<ppu_decoder_type> g_cfg_ppu_decoder;
|
||||||
|
|
||||||
|
extern void ppu_initialize_syscalls();
|
||||||
extern std::string ppu_get_function_name(const std::string& module, u32 fnid);
|
extern std::string ppu_get_function_name(const std::string& module, u32 fnid);
|
||||||
extern std::string ppu_get_variable_name(const std::string& module, u32 vnid);
|
extern std::string ppu_get_variable_name(const std::string& module, u32 vnid);
|
||||||
extern void ppu_register_range(u32 addr, u32 size);
|
extern void ppu_register_range(u32 addr, u32 size);
|
||||||
|
@ -234,6 +235,8 @@ struct ppu_linkage_info
|
||||||
// Initialize static modules.
|
// Initialize static modules.
|
||||||
static void ppu_initialize_modules(const std::shared_ptr<ppu_linkage_info>& link)
|
static void ppu_initialize_modules(const std::shared_ptr<ppu_linkage_info>& link)
|
||||||
{
|
{
|
||||||
|
ppu_initialize_syscalls();
|
||||||
|
|
||||||
const std::initializer_list<const ppu_static_module*> registered
|
const std::initializer_list<const ppu_static_module*> registered
|
||||||
{
|
{
|
||||||
&ppu_module_manager::cellAdec,
|
&ppu_module_manager::cellAdec,
|
||||||
|
|
|
@ -62,12 +62,14 @@ extern std::string ppu_get_syscall_name(u64 code);
|
||||||
|
|
||||||
static constexpr ppu_function_t null_func = nullptr;
|
static constexpr ppu_function_t null_func = nullptr;
|
||||||
|
|
||||||
|
std::array<ppu_function_t, 1024> g_ppu_syscall_table{};
|
||||||
|
|
||||||
// UNS = Unused
|
// UNS = Unused
|
||||||
// ROOT = Root
|
// ROOT = Root
|
||||||
// DBG = Debug
|
// DBG = Debug
|
||||||
// PM = Product Mode
|
// PM = Product Mode
|
||||||
// AuthID = Authentication ID
|
// AuthID = Authentication ID
|
||||||
std::array<ppu_function_t, 1024> g_ppu_syscall_table
|
const std::array<ppu_function_t, 1024> s_ppu_syscall_table
|
||||||
{
|
{
|
||||||
null_func,
|
null_func,
|
||||||
BIND_FUNC(sys_process_getpid), //1 (0x001)
|
BIND_FUNC(sys_process_getpid), //1 (0x001)
|
||||||
|
@ -986,6 +988,11 @@ void fmt_class_string<CellError>::format(std::string& out, u64 arg)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
extern void ppu_initialize_syscalls()
|
||||||
|
{
|
||||||
|
g_ppu_syscall_table = s_ppu_syscall_table;
|
||||||
|
}
|
||||||
|
|
||||||
extern void ppu_execute_syscall(ppu_thread& ppu, u64 code)
|
extern void ppu_execute_syscall(ppu_thread& ppu, u64 code)
|
||||||
{
|
{
|
||||||
if (code < g_ppu_syscall_table.size())
|
if (code < g_ppu_syscall_table.size())
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue