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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [uclinux/] [uClinux-2.0.x/] [include/] [asm-alpha/] [processor.h] - Blame information for rev 1778

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 199 simons
/*
2
 * include/asm-alpha/processor.h
3
 *
4
 * Copyright (C) 1994 Linus Torvalds
5
 */
6
 
7
#ifndef __ASM_ALPHA_PROCESSOR_H
8
#define __ASM_ALPHA_PROCESSOR_H
9
 
10
/*
11
 * We have a 41-bit user address space: 2TB user VM.
12
 * Under certain circumstances (e.g. when emulating 32-bit code)
13
 * we may want to voluntarily limit this...
14
 */
15
#define TASK_SIZE (0x40000000000UL)
16
#define MAX_USER_ADDR ((current->personality&ADDR_MAX_32BIT) ? 0x100000000UL : \
17
        ((current->personality & ADDR_MAX_31BIT) ? 0x80000000UL : \
18
                                                        0x40000000000UL))
19
#define MMAP_SEARCH_START ((current->personality & ADDR_MAX_31BIT) ? \
20
                        (MAX_USER_ADDR/2) : (MAX_USER_ADDR/3))
21
 
22
 
23
/*
24
 * Bus types
25
 */
26
#define EISA_bus 1
27
#define EISA_bus__is_a_macro /* for versions in ksyms.c */
28
#define MCA_bus 0
29
#define MCA_bus__is_a_macro /* for versions in ksyms.c */
30
 
31
/*
32
 * The alpha has no problems with write protection
33
 */
34
#define wp_works_ok 1
35
#define wp_works_ok__is_a_macro /* for versions in ksyms.c */
36
 
37
struct thread_struct {
38
        /* the fields below are used by PALcode and must match struct pcb: */
39
        unsigned long ksp;
40
        unsigned long usp;
41
        unsigned long ptbr;
42
        unsigned int pcc;
43
        unsigned int asn;
44
        unsigned long unique;
45
        /*
46
         * bit  0: floating point enable
47
         * bit 62: performance monitor enable
48
         */
49
        unsigned long pal_flags;
50
        unsigned long res1, res2;
51
 
52
        /* the fields below are Linux-specific: */
53
        /*
54
         * bit 0:       perform syscall argument validation (get/set_fs)
55
         * bit 1..5:    IEEE_TRAP_ENABLE bits (see fpu.h)
56
         * bit 17..21:  IEEE_STATUS bits (see fpu.h)
57
         */
58
        unsigned long flags;
59
};
60
 
61
#define INIT_MMAP { &init_mm, 0xfffffc0000000000,  0xfffffc0010000000, \
62
        PAGE_SHARED, VM_READ | VM_WRITE | VM_EXEC }
63
 
64
#define INIT_TSS  { \
65
        0, 0, 0, \
66
        0, 0, 0, \
67
        0, 0, 0, \
68
 
69
}
70
 
71
#define alloc_kernel_stack()    __get_free_page(GFP_KERNEL)
72
#define free_kernel_stack(page) free_page((page))
73
 
74
#include <asm/ptrace.h>
75
 
76
/*
77
 * Return saved PC of a blocked thread.  This assumes the frame
78
 * pointer is the 6th saved long on the kernel stack and that the
79
 * saved return address is the first long in the frame.  This all
80
 * holds provided the thread blocked through a call to schedule() ($15
81
 * is the frame pointer in schedule() and $15 is saved at offset 48 by
82
 * entry.S:do_switch_stack).
83
 */
84
extern inline unsigned long thread_saved_pc(struct thread_struct *t)
85
{
86
        unsigned long fp;
87
 
88
        fp = ((unsigned long*)t->ksp)[6];
89
        return *(unsigned long*)fp;
90
}
91
 
92
/*
93
 * Do necessary setup to start up a newly executed thread.
94
 */
95
extern void start_thread(struct pt_regs *, unsigned long, unsigned long);
96
 
97
#endif /* __ASM_ALPHA_PROCESSOR_H */

powered by: WebSVN 2.1.0

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