Add support for the KernelWriteSRs and KernelReadSRs function

This commit is contained in:
Maschell 2020-05-29 19:53:48 +02:00
parent 15e71afb9e
commit 26452f32f3
3 changed files with 33 additions and 1 deletions

View File

@ -1,11 +1,16 @@
#pragma once
#include "kernel_defs.h"
#ifdef __cplusplus
extern "C"
{
#endif
#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);
void KernelReadPTE(uint32_t outputAddr, int32_t length);

View 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

View File

@ -1,4 +1,6 @@
:NAME homebrew_kernel
:TEXT
KernelCopyData
KernelCopyData
KernelWriteSRs
KernelReadSRs