ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.6.tar.bz2
[linux-2.6.git] / include / asm-um / archparam-i386.h
1 /* 
2  * Copyright (C) 2000, 2001 Jeff Dike (jdike@karaya.com)
3  * Licensed under the GPL
4  */
5
6 #ifndef __UM_ARCHPARAM_I386_H
7 #define __UM_ARCHPARAM_I386_H
8
9 /********* Bits for asm-um/elf.h ************/
10
11 #include "user.h"
12
13 #define ELF_PLATFORM "i586"
14
15 #define ELF_ET_DYN_BASE (2 * TASK_SIZE / 3)
16
17 typedef struct user_i387_struct elf_fpregset_t;
18 typedef unsigned long elf_greg_t;
19
20 #define ELF_NGREG (sizeof (struct user_regs_struct) / sizeof(elf_greg_t))
21 typedef elf_greg_t elf_gregset_t[ELF_NGREG];
22
23 #define ELF_DATA        ELFDATA2LSB
24 #define ELF_ARCH        EM_386
25
26 #define ELF_PLAT_INIT(regs, load_addr) do { \
27         PT_REGS_EBX(regs) = 0; \
28         PT_REGS_ECX(regs) = 0; \
29         PT_REGS_EDX(regs) = 0; \
30         PT_REGS_ESI(regs) = 0; \
31         PT_REGS_EDI(regs) = 0; \
32         PT_REGS_EBP(regs) = 0; \
33         PT_REGS_EAX(regs) = 0; \
34 } while(0)
35
36 /* Shamelessly stolen from include/asm-i386/elf.h */
37
38 #define ELF_CORE_COPY_REGS(pr_reg, regs) do {   \
39         pr_reg[0] = PT_REGS_EBX(regs);          \
40         pr_reg[1] = PT_REGS_ECX(regs);          \
41         pr_reg[2] = PT_REGS_EDX(regs);          \
42         pr_reg[3] = PT_REGS_ESI(regs);          \
43         pr_reg[4] = PT_REGS_EDI(regs);          \
44         pr_reg[5] = PT_REGS_EBP(regs);          \
45         pr_reg[6] = PT_REGS_EAX(regs);          \
46         pr_reg[7] = PT_REGS_DS(regs);           \
47         pr_reg[8] = PT_REGS_ES(regs);           \
48         /* fake once used fs and gs selectors? */       \
49         pr_reg[9] = PT_REGS_DS(regs);           \
50         pr_reg[10] = PT_REGS_DS(regs);          \
51         pr_reg[11] = PT_REGS_SYSCALL_NR(regs);  \
52         pr_reg[12] = PT_REGS_IP(regs);          \
53         pr_reg[13] = PT_REGS_CS(regs);          \
54         pr_reg[14] = PT_REGS_EFLAGS(regs);      \
55         pr_reg[15] = PT_REGS_SP(regs);          \
56         pr_reg[16] = PT_REGS_SS(regs);          \
57 } while(0);
58
59 /********* Bits for asm-um/delay.h **********/
60
61 typedef unsigned long um_udelay_t;
62
63 /********* Nothing for asm-um/hardirq.h **********/
64
65 /********* Nothing for asm-um/hw_irq.h **********/
66
67 /********* Nothing for asm-um/string.h **********/
68
69 #endif
70
71 /*
72  * Overrides for Emacs so that we follow Linus's tabbing style.
73  * Emacs will notice this stuff at the end of the file and automatically
74  * adjust the settings for this buffer only.  This must remain at the end
75  * of the file.
76  * ---------------------------------------------------------------------------
77  * Local variables:
78  * c-file-style: "linux"
79  * End:
80  */