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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [ecos-3.0/] [packages/] [hal/] [synth/] [i386linux/] [current/] [include/] [var_io.h] - Blame information for rev 834

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

Line No. Rev Author Line
1 786 skrzyp
#ifndef CYGONCE_HAL_VAR_IO_H
2
#define CYGONCE_HAL_VAR_IO_H
3
 
4
//=============================================================================
5
//
6
//      var_io.h
7
//
8
//      Processor-specific I/O support
9
//
10
//=============================================================================
11
// ####ECOSGPLCOPYRIGHTBEGIN####                                            
12
// -------------------------------------------                              
13
// This file is part of eCos, the Embedded Configurable Operating System.   
14
// Copyright (C) 2003, 2005 Free Software Foundation, Inc.                  
15
//
16
// eCos is free software; you can redistribute it and/or modify it under    
17
// the terms of the GNU General Public License as published by the Free     
18
// Software Foundation; either version 2 or (at your option) any later      
19
// version.                                                                 
20
//
21
// eCos is distributed in the hope that it will be useful, but WITHOUT      
22
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or    
23
// FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License    
24
// for more details.                                                        
25
//
26
// You should have received a copy of the GNU General Public License        
27
// along with eCos; if not, write to the Free Software Foundation, Inc.,    
28
// 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.            
29
//
30
// As a special exception, if other files instantiate templates or use      
31
// macros or inline functions from this file, or you compile this file      
32
// and link it with other works to produce a work based on this file,       
33
// this file does not by itself cause the resulting work to be covered by   
34
// the GNU General Public License. However the source code for this file    
35
// must still be made available in accordance with section (3) of the GNU   
36
// General Public License v2.                                               
37
//
38
// This exception does not invalidate any other reasons why a work based    
39
// on this file might be covered by the GNU General Public License.         
40
// -------------------------------------------                              
41
// ####ECOSGPLCOPYRIGHTEND####                                              
42
//=============================================================================
43
//#####DESCRIPTIONBEGIN####
44
//
45
// Author(s):   bartv
46
// Date:        2003-10-08
47
// Usage:       #include <cyg/hal/hal_io.h>
48
//
49
//####DESCRIPTIONEND####
50
//
51
//=============================================================================
52
 
53
#include <cyg/infra/cyg_type.h>
54
 
55
// In theory an application signal handler can just return straight to
56
// the kernel. In reality this is usually the case as well, but with
57
// some kernel versions on some processors it is necessary instead to
58
// exit via a sigreturn system call.
59
externC void    cyg_hal_sys_restore(void);
60
externC void    cyg_hal_sys_restore_rt(void);
61
 
62
#define CYG_HAL_SYS_SIGACTION_ADJUST(_sig_, _sigaction_)    \
63
    CYG_MACRO_START                                         \
64
    (_sigaction_)->hal_flags    |= CYG_HAL_SYS_SA_RESTORER; \
65
    (_sigaction_)->hal_restorer = &cyg_hal_sys_restore;     \
66
    CYG_MACRO_END
67
 
68
// Additional information passed to a signal handler. This is useful
69
// for e.g. profiling.
70
struct cyg_hal_sys_sigcontext {
71
    unsigned short  hal_gs;
72
    unsigned short  hal_gsh;
73
    unsigned short  hal_fs;
74
    unsigned short  hal_fsh;
75
    unsigned short  hal_es;
76
    unsigned short  hal_esh;
77
    unsigned short  hal_ds;
78
    unsigned short  hal_dsh;
79
    unsigned long   hal_edi;
80
    unsigned long   hal_esi;
81
    unsigned long   hal_ebp;
82
    unsigned long   hal_esp;
83
    unsigned long   hal_ebx;
84
    unsigned long   hal_edx;
85
    unsigned long   hal_ecx;
86
    unsigned long   hal_eax;
87
    unsigned long   hal_trapno;
88
    unsigned long   hal_err;
89
    unsigned long   hal_eip;
90
    unsigned short  hal_cs;
91
    unsigned short  hal_csh;
92
    unsigned long   hal_eflags;
93
    unsigned long   hal_esp_at_signal;
94
    unsigned short  hal_ss;
95
    unsigned short  hal_ssh;
96
    void*           hal_fpstate;
97
    unsigned long   hal_oldmask;
98
    unsigned long   hal_cr2;
99
};
100
 
101
//--------------------------------------------------------------------------
102
#endif // CYGONCE_HAL_VAR_IO_H
103
// End of var_io.h

powered by: WebSVN 2.1.0

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