patch to make enabling 64B L2 cache optional (tueidj)
[libogc.git] / libogc / decrementer.c
blob1204041ba5ac0e9b76b6a41cb4475c7808b0c6de
1 /*-------------------------------------------------------------
3 decrementer.c -- PPC decrementer exception support
5 Copyright (C) 2004
6 Michael Wiedenbauer (shagkur)
7 Dave Murphy (WinterMute)
9 This software is provided 'as-is', without any express or implied
10 warranty. In no event will the authors be held liable for any
11 damages arising from the use of this software.
13 Permission is granted to anyone to use this software for any
14 purpose, including commercial applications, and to alter it and
15 redistribute it freely, subject to the following restrictions:
17 1. The origin of this software must not be misrepresented; you
18 must not claim that you wrote the original software. If you use
19 this software in a product, an acknowledgment in the product
20 documentation would be appreciated but is not required.
22 2. Altered source versions must be plainly marked as such, and
23 must not be misrepresented as being the original software.
25 3. This notice may not be removed or altered from any source
26 distribution.
29 -------------------------------------------------------------*/
32 #include <gctypes.h>
33 #include <stdlib.h>
34 #include "asm.h"
35 #include "processor.h"
36 #include "lwp_threads.h"
37 #include "lwp_watchdog.h"
38 #include "context.h"
40 //#define _DECEX_DEBUG
42 #ifdef _DECEX_DEBUG
43 extern int printk(const char *fmt,...);
44 #endif
46 void __decrementer_init()
48 #ifdef _DECEX_DEBUG
49 printf("__decrementer_init()\n\n");
50 #endif
53 void c_decrementer_handler(frame_context *ctx)
55 #ifdef _DECEX_DEBUG
56 printk("c_decrementer_handler(%d)\n",_wd_ticks_since_boot);
57 #endif
58 __lwp_wd_tickle_ticks();