Cleanup in elf.c with .bss section clean; adm command mounts cdrom instead of floppy...
[ZeXOS.git] / kernel / arch / ppc / include / ctx.h
blobd6032fb029105d95b3410a7ada87a4ce64056a18
1 /*
2 * ZeX/OS
3 * Copyright (C) 2008 Tomas 'ZeXx86' Jedrzejek (zexx86@zexos.org)
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
20 #ifndef _ARM_CTX_H
21 #define _ARM_CTX_H
23 #include <build.h>
25 #ifdef ARCH_arm
27 #define ARM_STACKALIGN(a, b) ((a) & ~((b)-1))
29 /* arm exception iframe */
30 struct arm_ex_iframe {
31 unsigned *spsr;
32 unsigned *r0;
33 unsigned *r1;
34 unsigned *r2;
35 unsigned *r3;
36 unsigned *r12;
37 unsigned *lr;
38 unsigned *pc;
41 struct arm_fault_frame {
42 unsigned *spsr;
43 unsigned *usp;
44 unsigned *ulr;
45 unsigned r[13];
46 unsigned *pc;
49 /* arm context structure for task switch */
50 struct arm_ctx_frame {
51 unsigned *r4;
52 unsigned *r5;
53 unsigned *r6;
54 unsigned *r7;
55 unsigned *r8;
56 unsigned *r9;
57 unsigned *r10;
58 unsigned *r11;
59 unsigned *lr;
60 unsigned *usp;
61 unsigned *ulr;
64 extern void arm_task_switch (unsigned **old_sp, unsigned *new_sp);
66 typedef unsigned (task_handler_t) ();
68 #endif
70 #endif