SimpleOS

LXR

Navigation



Site hébergé par : enix

The LXR Cross Referencer for SOS

source navigation ]
diff markup ]
identifier search ]
general search ]
 
 
Article:1 ] [ 2 ] [ 3 ] [ 4 ] [ 5 ] [ 6 ] [ 6.5 ] [ 7 ] [ 7.5 ] [ 8 ] [ 9 ] [ 9.5 ]

Diff markup

Differences between /hwcore/exception.h (Article 5) and /hwcore/exception.h (Article 7)


001 /* Copyright (C) 2004  David Decotigny            001 /* Copyright (C) 2004  David Decotigny
002    Copyright (C) 1999  Free Software Foundatio << 
003                                                   002 
004    This program is free software; you can redi    003    This program is free software; you can redistribute it and/or
005    modify it under the terms of the GNU Genera    004    modify it under the terms of the GNU General Public License
006    as published by the Free Software Foundatio    005    as published by the Free Software Foundation; either version 2
007    of the License, or (at your option) any lat    006    of the License, or (at your option) any later version.
008                                                   007    
009    This program is distributed in the hope tha    008    This program is distributed in the hope that it will be useful,
010    but WITHOUT ANY WARRANTY; without even the     009    but WITHOUT ANY WARRANTY; without even the implied warranty of
011    MERCHANTABILITY or FITNESS FOR A PARTICULAR    010    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
012    GNU General Public License for more details    011    GNU General Public License for more details.
013                                                   012    
014    You should have received a copy of the GNU     013    You should have received a copy of the GNU General Public License
015    along with this program; if not, write to t    014    along with this program; if not, write to the Free Software
016    Foundation, Inc., 59 Temple Place - Suite 3    015    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
017    USA.                                           016    USA. 
018 */                                                017 */
019 #ifndef _SOS_HWEXCEPT_H_                          018 #ifndef _SOS_HWEXCEPT_H_
020 #define _SOS_HWEXCEPT_H_                          019 #define _SOS_HWEXCEPT_H_
021                                                   020 
022 /**                                               021 /**
023  * @file exception.c                              022  * @file exception.c
024  *                                                023  *
025  * Hardware exception routines management.        024  * Hardware exception routines management.
026  */                                               025  */
027                                                   026 
028 #ifndef ASM_SOURCE                                027 #ifndef ASM_SOURCE
029 #  include <sos/errno.h>                          028 #  include <sos/errno.h>
                                                   >> 029 #  include "cpu_context.h"
030 #endif                                            030 #endif
031                                                   031 
032 /**                                               032 /**
033  * Standard Intel x86 exceptions.                 033  * Standard Intel x86 exceptions.
034  *                                                034  *
035  * @see Intel x86 doc vol 3, section 5.12.        035  * @see Intel x86 doc vol 3, section 5.12.
036  */                                               036  */
037 #define SOS_EXCEPT_DIVIDE_ERROR                   037 #define SOS_EXCEPT_DIVIDE_ERROR                  0         // No error code
038 #define SOS_EXCEPT_DEBUG                          038 #define SOS_EXCEPT_DEBUG                         1         // No error code
039 #define SOS_EXCEPT_NMI_INTERRUPT                  039 #define SOS_EXCEPT_NMI_INTERRUPT                 2         // No error code
040 #define SOS_EXCEPT_BREAKPOINT                     040 #define SOS_EXCEPT_BREAKPOINT                    3         // No error code
041 #define SOS_EXCEPT_OVERFLOW                       041 #define SOS_EXCEPT_OVERFLOW                      4         // No error code
042 #define SOS_EXCEPT_BOUND_RANGE_EXCEDEED           042 #define SOS_EXCEPT_BOUND_RANGE_EXCEDEED          5         // No error code
043 #define SOS_EXCEPT_INVALID_OPCODE                 043 #define SOS_EXCEPT_INVALID_OPCODE                6         // No error code
044 #define SOS_EXCEPT_DEVICE_NOT_AVAILABLE           044 #define SOS_EXCEPT_DEVICE_NOT_AVAILABLE          7         // No error code
045 #define SOS_EXCEPT_DOUBLE_FAULT                   045 #define SOS_EXCEPT_DOUBLE_FAULT                  8         // Yes (Zero)
046 #define SOS_EXCEPT_COPROCESSOR_SEGMENT_OVERRUN    046 #define SOS_EXCEPT_COPROCESSOR_SEGMENT_OVERRUN   9         // No error code
047 #define SOS_EXCEPT_INVALID_TSS                    047 #define SOS_EXCEPT_INVALID_TSS                  10         // Yes
048 #define SOS_EXCEPT_SEGMENT_NOT_PRESENT            048 #define SOS_EXCEPT_SEGMENT_NOT_PRESENT          11         // Yes
049 #define SOS_EXCEPT_STACK_SEGMENT_FAULT            049 #define SOS_EXCEPT_STACK_SEGMENT_FAULT          12         // Yes
050 #define SOS_EXCEPT_GENERAL_PROTECTION             050 #define SOS_EXCEPT_GENERAL_PROTECTION           13         // Yes
051 #define SOS_EXCEPT_PAGE_FAULT                     051 #define SOS_EXCEPT_PAGE_FAULT                   14         // Yes
052 #define SOS_EXCEPT_INTEL_RESERVED_1               052 #define SOS_EXCEPT_INTEL_RESERVED_1             15         // No
053 #define SOS_EXCEPT_FLOATING_POINT_ERROR           053 #define SOS_EXCEPT_FLOATING_POINT_ERROR         16         // No
054 #define SOS_EXCEPT_ALIGNEMENT_CHECK               054 #define SOS_EXCEPT_ALIGNEMENT_CHECK             17         // Yes (Zero)
055 #define SOS_EXCEPT_MACHINE_CHECK                  055 #define SOS_EXCEPT_MACHINE_CHECK                18         // No
056 #define SOS_EXCEPT_INTEL_RESERVED_2               056 #define SOS_EXCEPT_INTEL_RESERVED_2             19         // No
057 #define SOS_EXCEPT_INTEL_RESERVED_3               057 #define SOS_EXCEPT_INTEL_RESERVED_3             20         // No
058 #define SOS_EXCEPT_INTEL_RESERVED_4               058 #define SOS_EXCEPT_INTEL_RESERVED_4             21         // No
059 #define SOS_EXCEPT_INTEL_RESERVED_5               059 #define SOS_EXCEPT_INTEL_RESERVED_5             22         // No
060 #define SOS_EXCEPT_INTEL_RESERVED_6               060 #define SOS_EXCEPT_INTEL_RESERVED_6             23         // No
061 #define SOS_EXCEPT_INTEL_RESERVED_7               061 #define SOS_EXCEPT_INTEL_RESERVED_7             24         // No
062 #define SOS_EXCEPT_INTEL_RESERVED_8               062 #define SOS_EXCEPT_INTEL_RESERVED_8             25         // No
063 #define SOS_EXCEPT_INTEL_RESERVED_9               063 #define SOS_EXCEPT_INTEL_RESERVED_9             26         // No
064 #define SOS_EXCEPT_INTEL_RESERVED_10              064 #define SOS_EXCEPT_INTEL_RESERVED_10            27         // No
065 #define SOS_EXCEPT_INTEL_RESERVED_11              065 #define SOS_EXCEPT_INTEL_RESERVED_11            28         // No
066 #define SOS_EXCEPT_INTEL_RESERVED_12              066 #define SOS_EXCEPT_INTEL_RESERVED_12            29         // No
067 #define SOS_EXCEPT_INTEL_RESERVED_13              067 #define SOS_EXCEPT_INTEL_RESERVED_13            30         // No
068 #define SOS_EXCEPT_INTEL_RESERVED_14              068 #define SOS_EXCEPT_INTEL_RESERVED_14            31         // No
069                                                   069 
070 #ifndef ASM_SOURCE                                070 #ifndef ASM_SOURCE
071                                                   071 
072 typedef void (*sos_exception_handler_t)(int ex !! 072 typedef void (*sos_exception_handler_t)(int exception_number,
                                                   >> 073                                         struct sos_cpu_state *cpu_kstate);
073                                                   074 
074 sos_ret_t sos_exceptions_setup(void);          !! 075 sos_ret_t sos_exception_subsystem_setup(void);
075 sos_ret_t sos_exception_set_routine(int except    076 sos_ret_t sos_exception_set_routine(int exception_number,
076                                     sos_except    077                                     sos_exception_handler_t routine);
077 sos_exception_handler_t sos_exception_get_rout    078 sos_exception_handler_t sos_exception_get_routine(int exception_number);
                                                   >> 079 
                                                   >> 080 const char * sos_exception_get_name(int exception_number);
078 #endif /* ! ASM_SOURCE */                         081 #endif /* ! ASM_SOURCE */
079                                                   082 
080 #endif /* _SOS_HWEXCEPT_H_ */                     083 #endif /* _SOS_HWEXCEPT_H_ */
                                                      

source navigation ] diff markup ] identifier search ] general search ]