VirtualBox

source: vbox/trunk/src/VBox/Runtime/r0drv/os2/RTR0AssertPanicSystem-r0drv-os2.asm@ 59527

Last change on this file since 59527 was 13306, checked in by vboxsync, 16 years ago

IPRT,++: some assert.h cleanup, making a suitable place to call panic() in ring-0.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.2 KB
Line 
1; $Id: RTR0AssertPanicSystem-r0drv-os2.asm 13306 2008-10-15 21:17:04Z vboxsync $
2;; @file
3; IPRT - RTR0AssertPanicSystem, Ring-0 Driver, OS/2.
4;
5
6;
7; Copyright (c) 1999-2007 knut st. osmundsen <bird-src-spam@anduin.net>
8;
9; Permission is hereby granted, free of charge, to any person
10; obtaining a copy of this software and associated documentation
11; files (the "Software"), to deal in the Software without
12; restriction, including without limitation the rights to use,
13; copy, modify, merge, publish, distribute, sublicense, and/or sell
14; copies of the Software, and to permit persons to whom the
15; Software is furnished to do so, subject to the following
16; conditions:
17;
18; The above copyright notice and this permission notice shall be
19; included in all copies or substantial portions of the Software.
20;
21; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
22; EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
23; OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
24; NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
25; HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
26; WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
27; FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
28; OTHER DEALINGS IN THE SOFTWARE.
29;
30
31
32;*******************************************************************************
33;* Header Files *
34;*******************************************************************************
35%define RT_INCL_16BIT_SEGMENTS
36%include "iprt/asmdefs.mac"
37
38
39;*******************************************************************************
40;* Defined Constants And Macros *
41;*******************************************************************************
42%define DevHlp_InternalError 02bh
43
44
45;*******************************************************************************
46;* External Symbols *
47;*******************************************************************************
48extern KernThunkStackTo16
49extern KernThunkStackTo32
50extern NAME(g_szRTAssertMsg)
51extern NAME(g_cchRTAssertMsg)
52extern NAME(g_fpfnDevHlp)
53
54
55BEGINCODE
56
57BEGINPROC_EXPORTED RTR0AssertPanicSystem
58 push ebp
59 mov ebp, esp
60 push esi
61 push edi
62 push ds
63
64 ;
65 ; Try detect debug kernel... later one day.
66 ;
67
68
69 ;
70 ; Raise an IPE.
71 ;
72 call KernThunkStackTo16
73 ;jmp far dword NAME(RTR0AssertPanicSystem_16) wrt CODE16
74 db 066h
75 db 0eah
76 dw NAME(RTR0AssertPanicSystem_16) wrt CODE16
77 dw CODE16
78BEGINCODE16
79GLOBALNAME RTR0AssertPanicSystem_16
80 ; mov ax, seg NAME(g_szRTAssertMsg) - makes wlink crash.
81 mov ax, DATA16
82 mov ds, ax
83 mov si, NAME(g_szRTAssertMsg)
84 mov di, [NAME(g_cchRTAssertMsg)]
85 mov dl, DevHlp_InternalError
86 call far [NAME(g_fpfnDevHlp)]
87
88 ; Doesn't normally return, but in case it does...
89 ;jmp far dword NAME(RTR0AssertPanicSystem_32)
90 db 066h
91 db 0eah
92 dd NAME(RTR0AssertPanicSystem_32)
93 dw TEXT32 wrt FLAT
94BEGINCODE32:
95GLOBALNAME RTR0AssertPanicSystem_32
96 call KernThunkStackTo32
97 mov eax, 1
98 pop ds
99 pop edi
100 pop esi
101 leave
102 ret
103ENDPROC RTR0AssertPanicSystem
104
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette