Files
Espresso/include/ksymtab.h

24 lines
690 B
C
Raw Normal View History

2025-07-03 20:30:21 -05:00
#ifndef _KSYMTAB_H
#define _KSYMTAB_H
#include <types.h>
2025-07-04 14:23:29 -05:00
typedef struct kfunc {
/*
Bit 31 = 1 -> driver/module function, Bit 31 = 0 -> kernel function
Bits 30-20 -> module/driver ID (11 bits)
Bits 19-0 -> function ID (20 bits)
*/
uint32_t id;
uint32_t addr; /* Pointer to function, 0x0 if nonexistent */
} kfunc_t;
uint64_t kfunc_call(kfunc_t* func, uint32_t a, uint32_t b, uint32_t c, uint32_t d);
uint64_t call_kfunc_by_id(uint32_t id, uint32_t a, uint32_t b, uint32_t c, uint32_t d);
uint32_t add_kfunc(void* addr, bool module, uint16_t module_id, uint32_t function_id);
kfunc_t make_kfunc(void* addr, bool module, uint16_t module_id, uint32_t function_id);
2025-07-03 20:30:21 -05:00
#endif