summaryrefslogtreecommitdiff
path: root/include/dolphin/os/OSMemory.h
blob: a022f6c5aeed08eb5d8a19cd8ad163a78a525372 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#ifndef OSMEMORY_H
#define OSMEMORY_H

#include "dolphin/os/OSInterrupt.h"

#ifdef __cplusplus
extern "C" {
#endif

#define OS_PROTECT_CHAN0 0
#define OS_PROTECT_CHAN1 1
#define OS_PROTECT_CHAN2 2
#define OS_PROTECT_CHAN3 3

#define OS_PROTECT_CONTROL_NONE 0x00
#define OS_PROTECT_CONTROL_READ 0x01
#define OS_PROTECT_CONTROL_WRITE 0x02
#define OS_PROTECT_CONTROL_RDWR (OS_PROTECT_CONTROL_READ | OS_PROTECT_CONTROL_WRITE)

u32 OSGetConsoleSimulatedMemSize();
static void MEMIntrruptHandler(__OSInterrupt interrupt, struct OSContext* context);
void OSProtectRange(u32 channel, void* address, u32 nBytes, u32 control);
static void Config24MB(void);
static void Config48MB(void);
static void RealMode(u32 config);
void __OSInitMemoryProtection(void);

#ifdef __cplusplus
};
#endif

#endif /* OSMEMORY_H */