mirror of
https://github.com/wiiu-env/libkernel.git
synced 2025-02-16 12:49:12 +01:00
Add support for the KernelWriteSRs and KernelReadSRs function
This commit is contained in:
parent
15e71afb9e
commit
26452f32f3
@ -1,11 +1,16 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include "kernel_defs.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C"
|
extern "C"
|
||||||
{
|
{
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
|
|
||||||
|
extern void KernelReadSRs(sr_table_t* table);
|
||||||
|
extern void KernelWriteSRs(sr_table_t* table);
|
||||||
extern void KernelCopyData(uint32_t dst, uint32_t src, uint32_t len);
|
extern void KernelCopyData(uint32_t dst, uint32_t src, uint32_t len);
|
||||||
|
|
||||||
void KernelReadPTE(uint32_t outputAddr, int32_t length);
|
void KernelReadPTE(uint32_t outputAddr, int32_t length);
|
||||||
|
25
include/kernel/kernel_defs.h
Normal file
25
include/kernel/kernel_defs.h
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
typedef struct _sr_table_t {
|
||||||
|
uint32_t value[16];
|
||||||
|
uint32_t sdr1;
|
||||||
|
} sr_table_t;
|
||||||
|
|
||||||
|
typedef struct _bat_t {
|
||||||
|
uint32_t h;
|
||||||
|
uint32_t l;
|
||||||
|
} bat_t;
|
||||||
|
|
||||||
|
typedef struct _bat_table_t {
|
||||||
|
bat_t bat[8];
|
||||||
|
} bat_table_t;
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
@ -1,4 +1,6 @@
|
|||||||
:NAME homebrew_kernel
|
:NAME homebrew_kernel
|
||||||
|
|
||||||
:TEXT
|
:TEXT
|
||||||
KernelCopyData
|
KernelCopyData
|
||||||
|
KernelWriteSRs
|
||||||
|
KernelReadSRs
|
Loading…
x
Reference in New Issue
Block a user