mgh: fix for default HDD DMA mode, that wasn't correctly set
[open-ps2-loader.git] / modules / debug / ioptrap / breakpoint.c
blob53828eea8a7038910e379cd862c373a342e92346
1 /*
2 # _____ ___ ____ ___ ____
3 # ____| | ____| | | |____|
4 # | ___| |____ ___| ____| | \ PS2DEV Open Source Project.
5 #-----------------------------------------------------------------------
6 # Copyright 2001-2004, ps2dev - http://www.ps2dev.org
7 # Licenced under Academic Free License version 2.0
8 # Review ps2sdk README & LICENSE files for further details.
10 # $Id: breakpoint.c 577 2004-09-14 14:41:46Z pixel $
13 #include "ioptrap.h"
15 void set_dba(u32 v) {
16 __asm__ __volatile__("mtc0 %0, $5" : : "r" (v));
19 void set_dbam(u32 v) {
20 __asm__ __volatile__("mtc0 %0, $9" : : "r" (v));
23 void set_dcic(u32 v) {
24 __asm__ __volatile__("mtc0 %0, $7" : : "r" (v));
27 u32 get_dba() {
28 u32 v;
29 __asm__ __volatile__("mfc0 %0, $5" : "=&r" (v));
30 return v;
33 u32 get_dbam() {
34 u32 v;
35 __asm__ __volatile__("mfc0 %0, $9" : "=&r" (v));
36 return v;
39 u32 get_dcic() {
40 u32 v;
41 __asm__ __volatile__("mfc0 %0, $7" : "=&r" (v));
42 return v;