VirtualBox

source: vbox/trunk/src/VBox/ValidationKit/bootsectors/bs3-cpu-weird-1-template.mac@ 72549

Last change on this file since 72549 was 72176, checked in by vboxsync, 7 years ago

updates

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.6 KB
Line 
1; $Id: bs3-cpu-weird-1-template.mac 72176 2018-05-09 15:28:30Z vboxsync $
2;; @file
3; BS3Kit - bs3-cpu-weird-1 assembly template.
4;
5
6;
7; Copyright (C) 2007-2018 Oracle Corporation
8;
9; This file is part of VirtualBox Open Source Edition (OSE), as
10; available from http://www.virtualbox.org. This file is free software;
11; you can redistribute it and/or modify it under the terms of the GNU
12; General Public License (GPL) as published by the Free Software
13; Foundation, in version 2 as it comes in the "COPYING" file of the
14; VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15; hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16;
17; The contents of this file may alternatively be used under the terms
18; of the Common Development and Distribution License Version 1.0
19; (CDDL) only, as it comes in the "COPYING.CDDL" file of the
20; VirtualBox OSE distribution, in which case the provisions of the
21; CDDL are applicable instead of those of the GPL.
22;
23; You may elect to license modified versions of this file under the
24; terms and conditions of either the GPL or the CDDL or both.
25;
26
27
28;*********************************************************************************************************************************
29;* Header Files *
30;*********************************************************************************************************************************
31%include "bs3kit-template-header.mac" ; setup environment
32
33
34;*********************************************************************************************************************************
35;* External Symbols *
36;*********************************************************************************************************************************
37TMPL_BEGIN_TEXT
38
39
40;
41; Test code snippets containing code which differs between 16-bit, 32-bit
42; and 64-bit CPUs modes.
43;
44%ifdef BS3_INSTANTIATING_CMN
45
46
47;
48; Inhibited int 80h.
49;
50BS3_PROC_BEGIN_CMN bs3CpuWeird1_InhibitedInt80, BS3_PBC_NEAR
51 ; Load SS from stack. This instruction causes fusing.
52%if TMPL_BITS != 64
53 pop ss
54%else
55 mov ss, [rsp]
56%endif
57 ; The ring transition instruction.
58BS3_GLOBAL_NAME_EX BS3_CMN_NM(bs3CpuWeird1_InhibitedInt80_int80), , 0
59 int 80h
60 ; We shouldn't get here!
61.ud2_again:
62 ud2
63 jmp .ud2_again
64BS3_PROC_END_CMN bs3CpuWeird1_InhibitedInt80
65
66;
67; Inhibited int 3.
68;
69BS3_PROC_BEGIN_CMN bs3CpuWeird1_InhibitedInt3, BS3_PBC_NEAR
70 ; Load SS from stack. This instruction causes fusing.
71%if TMPL_BITS != 64
72 pop ss
73%else
74 mov ss, [rsp]
75%endif
76 ; The ring transition instruction.
77BS3_GLOBAL_NAME_EX BS3_CMN_NM(bs3CpuWeird1_InhibitedInt3_int3), , 0
78 int 3
79 ; We shouldn't get here!
80.ud2_again:
81 ud2
82 jmp .ud2_again
83AssertCompile(.ud2_again - BS3_CMN_NM(bs3CpuWeird1_InhibitedInt3_int3) == 2)
84BS3_PROC_END_CMN bs3CpuWeird1_InhibitedInt3
85
86
87;
88; Inhibited int3.
89;
90BS3_PROC_BEGIN_CMN bs3CpuWeird1_InhibitedBp, BS3_PBC_NEAR
91 ; Load SS from stack. This instruction causes fusing.
92%if TMPL_BITS != 64
93 pop ss
94%else
95 mov ss, [rsp]
96%endif
97 ; The ring transition instruction.
98BS3_GLOBAL_NAME_EX BS3_CMN_NM(bs3CpuWeird1_InhibitedBp_int3), , 0
99 int3
100 ; We shouldn't get here!
101.ud2_again:
102 ud2
103 jmp .ud2_again
104AssertCompile(.ud2_again - BS3_CMN_NM(bs3CpuWeird1_InhibitedBp_int3) == 1)
105BS3_PROC_END_CMN bs3CpuWeird1_InhibitedBp
106
107
108%endif ; BS3_INSTANTIATING_CMN
109
110%include "bs3kit-template-footer.mac" ; reset environment
111
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