OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [linux/] [linux-2.4/] [arch/] [arm/] [tools/] [getconstants.c] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1275 phoenix
/*
2
 *  linux/arch/arm/tools/getconsdata.c
3
 *
4
 *  Copyright (C) 1995-2001 Russell King
5
 *
6
 * This program is free software; you can redistribute it and/or modify
7
 * it under the terms of the GNU General Public License version 2 as
8
 * published by the Free Software Foundation.
9
 */
10
#include <linux/config.h>
11
#include <linux/sched.h>
12
#include <linux/mm.h>
13
 
14
#include <asm/pgtable.h>
15
#include <asm/uaccess.h>
16
 
17
/*
18
 * Make sure that the compiler and target are compatible.
19
 */
20
#if defined(__APCS_32__) && defined(CONFIG_CPU_26)
21
#error Your compiler targets APCS-32 but this kernel requires APCS-26
22
#endif
23
#if defined(__APCS_26__) && defined(CONFIG_CPU_32)
24
#error Your compiler targets APCS-26 but this kernel requires APCS-32
25
#endif
26
 
27
#define OFF_TSK(n) (unsigned long)&(((struct task_struct *)0)->n)
28
 
29
#define DEFN(name,off) asm("\n#define "name" %0" :: "I" (off))
30
 
31
void func(void)
32
{
33
DEFN("TSK_SIGPENDING",          OFF_TSK(sigpending));
34
DEFN("TSK_ADDR_LIMIT",          OFF_TSK(addr_limit));
35
DEFN("TSK_NEED_RESCHED",        OFF_TSK(need_resched));
36
DEFN("TSK_PTRACE",              OFF_TSK(ptrace));
37
DEFN("TSK_USED_MATH",           OFF_TSK(used_math));
38
 
39
DEFN("TSS_SAVE",                OFF_TSK(thread.save));
40
DEFN("TSS_FPESAVE",             OFF_TSK(thread.fpstate.soft.save));
41
 
42
#ifdef CONFIG_CPU_32
43
DEFN("TSS_DOMAIN",              OFF_TSK(thread.domain));
44
 
45
DEFN("HPTE_TYPE_SMALL",         PTE_TYPE_SMALL);
46
DEFN("HPTE_AP_READ",            PTE_AP_READ);
47
DEFN("HPTE_AP_WRITE",           PTE_AP_WRITE);
48
 
49
DEFN("LPTE_PRESENT",            L_PTE_PRESENT);
50
DEFN("LPTE_YOUNG",              L_PTE_YOUNG);
51
DEFN("LPTE_BUFFERABLE",         L_PTE_BUFFERABLE);
52
DEFN("LPTE_CACHEABLE",          L_PTE_CACHEABLE);
53
DEFN("LPTE_USER",               L_PTE_USER);
54
DEFN("LPTE_WRITE",              L_PTE_WRITE);
55
DEFN("LPTE_EXEC",               L_PTE_EXEC);
56
DEFN("LPTE_DIRTY",              L_PTE_DIRTY);
57
#endif
58
 
59
#ifdef CONFIG_CPU_26
60
DEFN("PAGE_PRESENT",            _PAGE_PRESENT);
61
DEFN("PAGE_READONLY",           _PAGE_READONLY);
62
DEFN("PAGE_NOT_USER",           _PAGE_NOT_USER);
63
DEFN("PAGE_OLD",                _PAGE_OLD);
64
DEFN("PAGE_CLEAN",              _PAGE_CLEAN);
65
#endif
66
 
67
DEFN("PAGE_SZ",                 PAGE_SIZE);
68
 
69
DEFN("SYS_ERROR0",              0x9f0000);
70
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.