Skip to content

Commit fa2597f

Browse files
author
Stanislav Shwartsman
committed
add FRED feature bit and CPUID reporting
add fred.cc dummy file add FRED MSR enums to msr.h shape of ERETS add FRED MSR MSRs to msr.cc FRED Event Delivery initial code 64-bit CR4 support fred ISA decoding and other random stuff FRED modifies behavior of existing instructions added LKGS emulation continue implementation, mainly VMX support self use CR4 class in VMX host and guest state structures CSL is MSR_IA32_FRED_CONFIG[1:0], not extra state fixed non-printable character in comment, continue implementation support also CR4_HI print in debug dump implement loading of CS and SS in ERETU started VMX support for FRED other way of handling FredEventDelivery add (c) continue implementation mention FRED in CHANGES proper way to load CS and SS in ERETU
1 parent c201529 commit fa2597f

37 files changed

+1494
-170
lines changed

bochs/CHANGES

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ Detailed change log :
1111
- CPU emulation and instrumentation
1212
- CPU: Implemented MOVRS ISA support: MOVRS, AVX10.2 MOVRS, AMX MOVRS
1313
- CPU: implemented IA32_APERF (0xe7) and IA32_MPERF (0xe8) MSRs
14+
- CPU: implemented Flexible Return and Delivery (FRED) architecture emulation
1415
- Added new BX_INSTR_CPUID instrumentation callback, see instrumentation.txt doc for description
1516
- Bugfixes for CPU emulation correctness
1617

bochs/build/win32/vs2019-workspace/vs2019-plugins/cpu.vcxproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,7 @@
263263
<ClCompile Include="..\cpu\flag_ctrl.cc" />
264264
<ClCompile Include="..\cpu\flag_ctrl_pro.cc" />
265265
<ClCompile Include="..\cpu\fpu_emu.cc" />
266+
<ClCompile Include="..\cpu\fred.cc" />
266267
<ClCompile Include="..\cpu\gf2.cc" />
267268
<ClCompile Include="..\cpu\icache.cc" />
268269
<ClCompile Include="..\cpu\init.cc" />

bochs/build/win32/vs2019-workspace/vs2019/cpu.vcxproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,7 @@
263263
<ClCompile Include="..\cpu\flag_ctrl.cc" />
264264
<ClCompile Include="..\cpu\flag_ctrl_pro.cc" />
265265
<ClCompile Include="..\cpu\fpu_emu.cc" />
266+
<ClCompile Include="..\cpu\fred.cc" />
266267
<ClCompile Include="..\cpu\gf2.cc" />
267268
<ClCompile Include="..\cpu\icache.cc" />
268269
<ClCompile Include="..\cpu\init.cc" />

bochs/config.h.in

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -625,6 +625,7 @@ typedef Bit32u bx_phy_address;
625625
#define BX_SUPPORT_PKEYS 0
626626
#define BX_SUPPORT_CET 0
627627
#define BX_SUPPORT_UINTR 0
628+
#define BX_SUPPORT_FRED 0
628629
#define BX_SUPPORT_MONITOR_MWAIT 0
629630
#define BX_SUPPORT_PERFMON 0
630631
#define BX_SUPPORT_MEMTYPE 0
@@ -638,6 +639,10 @@ typedef Bit32u bx_phy_address;
638639
#error "UINTR require x86-64 support"
639640
#endif
640641

642+
#if BX_SUPPORT_FRED && BX_SUPPORT_X86_64 == 0
643+
#error "FRED require x86-64 support"
644+
#endif
645+
641646
#if BX_SUPPORT_SVM && BX_SUPPORT_X86_64 == 0
642647
#error "SVM require x86-64 support"
643648
#endif

bochs/configure

Lines changed: 67 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1070,6 +1070,7 @@ enable_svm
10701070
enable_protection_keys
10711071
enable_cet
10721072
enable_uintr
1073+
enable_fred
10731074
enable_3dnow
10741075
enable_alignment_check
10751076
enable_monitor_mwait
@@ -1811,6 +1812,7 @@ Optional Features:
18111812
User-Mode Protection Keys support (no)
18121813
--enable-cet Control Flow Enforcement Technology support (no)
18131814
--enable-uintr for User Level Interrupt support (no)
1815+
--enable-fred for Flexible Interrupt Delivery FRED support (no)
18141816
--enable-3dnow 3DNow! support (no - incomplete)
18151817
--enable-alignment-check
18161818
alignment check (#AC) support (yes, if cpu level >
@@ -6281,7 +6283,7 @@ ia64-*-hpux*)
62816283
;;
62826284
*-*-irix6*)
62836285
# Find out which ABI we are using.
6284-
echo '#line 6284 "configure"' > conftest.$ac_ext
6286+
echo '#line 6286 "configure"' > conftest.$ac_ext
62856287
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
62866288
(eval $ac_compile) 2>&5
62876289
ac_status=$?
@@ -7794,11 +7796,11 @@ else case e in #(
77947796
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
77957797
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
77967798
-e 's:$: $lt_compiler_flag:'`
7797-
(eval echo "\"\$as_me:7797: $lt_compile\"" >&5)
7799+
(eval echo "\"\$as_me:7799: $lt_compile\"" >&5)
77987800
(eval "$lt_compile" 2>conftest.err)
77997801
ac_status=$?
78007802
cat conftest.err >&5
7801-
echo "$as_me:7801: \$? = $ac_status" >&5
7803+
echo "$as_me:7803: \$? = $ac_status" >&5
78027804
if (exit $ac_status) && test -s "$ac_outfile"; then
78037805
# The compiler can only warn and ignore the option if not recognized
78047806
# So say no if there are warnings
@@ -8029,11 +8031,11 @@ else case e in #(
80298031
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
80308032
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
80318033
-e 's:$: $lt_compiler_flag:'`
8032-
(eval echo "\"\$as_me:8032: $lt_compile\"" >&5)
8034+
(eval echo "\"\$as_me:8034: $lt_compile\"" >&5)
80338035
(eval "$lt_compile" 2>conftest.err)
80348036
ac_status=$?
80358037
cat conftest.err >&5
8036-
echo "$as_me:8036: \$? = $ac_status" >&5
8038+
echo "$as_me:8038: \$? = $ac_status" >&5
80378039
if (exit $ac_status) && test -s "$ac_outfile"; then
80388040
# The compiler can only warn and ignore the option if not recognized
80398041
# So say no if there are warnings
@@ -8098,11 +8100,11 @@ else case e in #(
80988100
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
80998101
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
81008102
-e 's:$: $lt_compiler_flag:'`
8101-
(eval echo "\"\$as_me:8101: $lt_compile\"" >&5)
8103+
(eval echo "\"\$as_me:8103: $lt_compile\"" >&5)
81028104
(eval "$lt_compile" 2>out/conftest.err)
81038105
ac_status=$?
81048106
cat out/conftest.err >&5
8105-
echo "$as_me:8105: \$? = $ac_status" >&5
8107+
echo "$as_me:8107: \$? = $ac_status" >&5
81068108
if (exit $ac_status) && test -s out/conftest2.$ac_objext
81078109
then
81088110
# The compiler can only warn and ignore the option if not recognized
@@ -9940,7 +9942,7 @@ else
99409942
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
99419943
lt_status=$lt_dlunknown
99429944
cat > conftest.$ac_ext <<EOF
9943-
#line 9943 "configure"
9945+
#line 9945 "configure"
99449946
#include "confdefs.h"
99459947

99469948
#if HAVE_DLFCN_H
@@ -10036,7 +10038,7 @@ else
1003610038
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1003710039
lt_status=$lt_dlunknown
1003810040
cat > conftest.$ac_ext <<EOF
10039-
#line 10039 "configure"
10041+
#line 10041 "configure"
1004010042
#include "confdefs.h"
1004110043

1004210044
#if HAVE_DLFCN_H
@@ -12158,11 +12160,11 @@ else case e in #(
1215812160
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
1215912161
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
1216012162
-e 's:$: $lt_compiler_flag:'`
12161-
(eval echo "\"\$as_me:12161: $lt_compile\"" >&5)
12163+
(eval echo "\"\$as_me:12163: $lt_compile\"" >&5)
1216212164
(eval "$lt_compile" 2>conftest.err)
1216312165
ac_status=$?
1216412166
cat conftest.err >&5
12165-
echo "$as_me:12165: \$? = $ac_status" >&5
12167+
echo "$as_me:12167: \$? = $ac_status" >&5
1216612168
if (exit $ac_status) && test -s "$ac_outfile"; then
1216712169
# The compiler can only warn and ignore the option if not recognized
1216812170
# So say no if there are warnings
@@ -12227,11 +12229,11 @@ else case e in #(
1222712229
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
1222812230
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
1222912231
-e 's:$: $lt_compiler_flag:'`
12230-
(eval echo "\"\$as_me:12230: $lt_compile\"" >&5)
12232+
(eval echo "\"\$as_me:12232: $lt_compile\"" >&5)
1223112233
(eval "$lt_compile" 2>out/conftest.err)
1223212234
ac_status=$?
1223312235
cat out/conftest.err >&5
12234-
echo "$as_me:12234: \$? = $ac_status" >&5
12236+
echo "$as_me:12236: \$? = $ac_status" >&5
1223512237
if (exit $ac_status) && test -s out/conftest2.$ac_objext
1223612238
then
1223712239
# The compiler can only warn and ignore the option if not recognized
@@ -13267,7 +13269,7 @@ else
1326713269
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1326813270
lt_status=$lt_dlunknown
1326913271
cat > conftest.$ac_ext <<EOF
13270-
#line 13270 "configure"
13272+
#line 13272 "configure"
1327113273
#include "confdefs.h"
1327213274

1327313275
#if HAVE_DLFCN_H
@@ -13363,7 +13365,7 @@ else
1336313365
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1336413366
lt_status=$lt_dlunknown
1336513367
cat > conftest.$ac_ext <<EOF
13366-
#line 13366 "configure"
13368+
#line 13368 "configure"
1336713369
#include "confdefs.h"
1336813370

1336913371
#if HAVE_DLFCN_H
@@ -14184,11 +14186,11 @@ else case e in #(
1418414186
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
1418514187
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
1418614188
-e 's:$: $lt_compiler_flag:'`
14187-
(eval echo "\"\$as_me:14187: $lt_compile\"" >&5)
14189+
(eval echo "\"\$as_me:14189: $lt_compile\"" >&5)
1418814190
(eval "$lt_compile" 2>conftest.err)
1418914191
ac_status=$?
1419014192
cat conftest.err >&5
14191-
echo "$as_me:14191: \$? = $ac_status" >&5
14193+
echo "$as_me:14193: \$? = $ac_status" >&5
1419214194
if (exit $ac_status) && test -s "$ac_outfile"; then
1419314195
# The compiler can only warn and ignore the option if not recognized
1419414196
# So say no if there are warnings
@@ -14253,11 +14255,11 @@ else case e in #(
1425314255
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
1425414256
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
1425514257
-e 's:$: $lt_compiler_flag:'`
14256-
(eval echo "\"\$as_me:14256: $lt_compile\"" >&5)
14258+
(eval echo "\"\$as_me:14258: $lt_compile\"" >&5)
1425714259
(eval "$lt_compile" 2>out/conftest.err)
1425814260
ac_status=$?
1425914261
cat out/conftest.err >&5
14260-
echo "$as_me:14260: \$? = $ac_status" >&5
14262+
echo "$as_me:14262: \$? = $ac_status" >&5
1426114263
if (exit $ac_status) && test -s out/conftest2.$ac_objext
1426214264
then
1426314265
# The compiler can only warn and ignore the option if not recognized
@@ -16222,11 +16224,11 @@ else case e in #(
1622216224
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
1622316225
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
1622416226
-e 's:$: $lt_compiler_flag:'`
16225-
(eval echo "\"\$as_me:16225: $lt_compile\"" >&5)
16227+
(eval echo "\"\$as_me:16227: $lt_compile\"" >&5)
1622616228
(eval "$lt_compile" 2>conftest.err)
1622716229
ac_status=$?
1622816230
cat conftest.err >&5
16229-
echo "$as_me:16229: \$? = $ac_status" >&5
16231+
echo "$as_me:16231: \$? = $ac_status" >&5
1623016232
if (exit $ac_status) && test -s "$ac_outfile"; then
1623116233
# The compiler can only warn and ignore the option if not recognized
1623216234
# So say no if there are warnings
@@ -16457,11 +16459,11 @@ else case e in #(
1645716459
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
1645816460
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
1645916461
-e 's:$: $lt_compiler_flag:'`
16460-
(eval echo "\"\$as_me:16460: $lt_compile\"" >&5)
16462+
(eval echo "\"\$as_me:16462: $lt_compile\"" >&5)
1646116463
(eval "$lt_compile" 2>conftest.err)
1646216464
ac_status=$?
1646316465
cat conftest.err >&5
16464-
echo "$as_me:16464: \$? = $ac_status" >&5
16466+
echo "$as_me:16466: \$? = $ac_status" >&5
1646516467
if (exit $ac_status) && test -s "$ac_outfile"; then
1646616468
# The compiler can only warn and ignore the option if not recognized
1646716469
# So say no if there are warnings
@@ -16526,11 +16528,11 @@ else case e in #(
1652616528
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
1652716529
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
1652816530
-e 's:$: $lt_compiler_flag:'`
16529-
(eval echo "\"\$as_me:16529: $lt_compile\"" >&5)
16531+
(eval echo "\"\$as_me:16531: $lt_compile\"" >&5)
1653016532
(eval "$lt_compile" 2>out/conftest.err)
1653116533
ac_status=$?
1653216534
cat out/conftest.err >&5
16533-
echo "$as_me:16533: \$? = $ac_status" >&5
16535+
echo "$as_me:16535: \$? = $ac_status" >&5
1653416536
if (exit $ac_status) && test -s out/conftest2.$ac_objext
1653516537
then
1653616538
# The compiler can only warn and ignore the option if not recognized
@@ -18368,7 +18370,7 @@ else
1836818370
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1836918371
lt_status=$lt_dlunknown
1837018372
cat > conftest.$ac_ext <<EOF
18371-
#line 18371 "configure"
18373+
#line 18373 "configure"
1837218374
#include "confdefs.h"
1837318375

1837418376
#if HAVE_DLFCN_H
@@ -18464,7 +18466,7 @@ else
1846418466
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1846518467
lt_status=$lt_dlunknown
1846618468
cat > conftest.$ac_ext <<EOF
18467-
#line 18467 "configure"
18469+
#line 18469 "configure"
1846818470
#include "confdefs.h"
1846918471

1847018472
#if HAVE_DLFCN_H
@@ -20222,7 +20224,7 @@ else
2022220224
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
2022320225
lt_status=$lt_dlunknown
2022420226
cat > conftest.$ac_ext <<EOF
20225-
#line 20225 "configure"
20227+
#line 20227 "configure"
2022620228
#include "confdefs.h"
2022720229

2022820230
#if HAVE_DLFCN_H
@@ -24689,6 +24691,41 @@ if test "$support_uintr" -gt 0 -a "$use_x86_64" = 0; then
2468924691
as_fn_error $? "User Level Interrupt feature emulation require x86-64 enabled" "$LINENO" 5
2469024692
fi
2469124693

24694+
support_fred=0
24695+
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Flexible Interrupt Delivery FRED support (experimental)" >&5
24696+
printf %s "checking for Flexible Interrupt Delivery FRED support (experimental)... " >&6; }
24697+
# Check whether --enable-fred was given.
24698+
if test ${enable_fred+y}
24699+
then :
24700+
enableval=$enable_fred; if test "$enableval" = yes; then
24701+
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24702+
printf "%s\n" "yes" >&6; }
24703+
printf "%s\n" "#define BX_SUPPORT_FRED 1" >>confdefs.h
24704+
24705+
support_fred=1
24706+
elif test "$enableval" = no; then
24707+
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
24708+
printf "%s\n" "no" >&6; }
24709+
printf "%s\n" "#define BX_SUPPORT_FRED 0" >>confdefs.h
24710+
24711+
fi
24712+
24713+
else case e in #(
24714+
e)
24715+
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
24716+
printf "%s\n" "no" >&6; }
24717+
printf "%s\n" "#define BX_SUPPORT_FRED 0" >>confdefs.h
24718+
24719+
24720+
;;
24721+
esac
24722+
fi
24723+
24724+
24725+
if test "$support_fred" -gt 0 -a "$use_x86_64" = 0; then
24726+
as_fn_error $? "Flexible Interrupt Delivery (FRED) emulation require x86-64 enabled" "$LINENO" 5
24727+
fi
24728+
2469224729
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 3DNow! support" >&5
2469324730
printf %s "checking for 3DNow! support... " >&6; }
2469424731
# Check whether --enable-3dnow was given.
@@ -24797,8 +24834,8 @@ esac
2479724834
fi
2479824835

2479924836

24800-
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for limited hardware performance monitoring emulation support (experimental)" >&5
24801-
printf %s "checking for limited hardware performance monitoring emulation support (experimental)... " >&6; }
24837+
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for limited hardware performance monitoring emulation support" >&5
24838+
printf %s "checking for limited hardware performance monitoring emulation support... " >&6; }
2480224839
# Check whether --enable-perfmon was given.
2480324840
if test ${enable_perfmon+y}
2480424841
then :

bochs/configure.ac

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1285,6 +1285,29 @@ if test "$support_uintr" -gt 0 -a "$use_x86_64" = 0; then
12851285
AC_MSG_ERROR([User Level Interrupt feature emulation require x86-64 enabled])
12861286
fi
12871287
1288+
support_fred=0
1289+
AC_MSG_CHECKING(for Flexible Interrupt Delivery FRED support (experimental))
1290+
AC_ARG_ENABLE(fred,
1291+
AS_HELP_STRING([--enable-fred], [for Flexible Interrupt Delivery FRED support (no)]),
1292+
[if test "$enableval" = yes; then
1293+
AC_MSG_RESULT(yes)
1294+
AC_DEFINE(BX_SUPPORT_FRED, 1)
1295+
support_fred=1
1296+
elif test "$enableval" = no; then
1297+
AC_MSG_RESULT(no)
1298+
AC_DEFINE(BX_SUPPORT_FRED, 0)
1299+
fi
1300+
],
1301+
[
1302+
AC_MSG_RESULT(no)
1303+
AC_DEFINE(BX_SUPPORT_FRED, 0)
1304+
]
1305+
)
1306+
1307+
if test "$support_fred" -gt 0 -a "$use_x86_64" = 0; then
1308+
AC_MSG_ERROR([Flexible Interrupt Delivery (FRED) emulation require x86-64 enabled])
1309+
fi
1310+
12881311
AC_MSG_CHECKING(for 3DNow! support)
12891312
AC_ARG_ENABLE(3dnow,
12901313
AS_HELP_STRING([--enable-3dnow], [3DNow! support (no - incomplete)]),
@@ -1351,7 +1374,7 @@ AC_ARG_ENABLE(monitor_mwait,
13511374
]
13521375
)
13531376
1354-
AC_MSG_CHECKING(for limited hardware performance monitoring emulation support (experimental))
1377+
AC_MSG_CHECKING(for limited hardware performance monitoring emulation support)
13551378
AC_ARG_ENABLE(perfmon,
13561379
AS_HELP_STRING([--enable-perfmon], [support for limited hardware performance monitoring emulation (yes, if cpu level > 5 - experimental)]),
13571380
[if test "$enableval" = yes; then

bochs/cpu/Makefile.in

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ OBJS64 = \
149149
cmpccxadd64.o \
150150
vapic.o \
151151
uintr.o \
152+
fred.o
152153

153154
BX_INCLUDES = ../bochs.h ../config.h
154155

@@ -792,6 +793,12 @@ tasking.o: tasking.@CPP_SUFFIX@ ../bochs.h ../config.h ../osdep.h ../logio.h \
792793
fpu/status_w.h fpu/control_w.h crregs.h descriptor.h decoder/instr.h \
793794
lazy_flags.h tlb.h icache.h xmm.h vmx.h vmx_ctrls.h stack.h access.h \
794795
svm.h
796+
fred.o: fred.@CPP_SUFFIX@ ../bochs.h ../config.h ../osdep.h ../logio.h \
797+
../misc/bswap.h cpu.h decoder/decoder.h decoder/features.h \
798+
../instrument/stubs/instrument.h i387.h \
799+
softfloat3e/include/softfloat_types.h ../config.h fpu/tag_w.h \
800+
fpu/status_w.h fpu/control_w.h crregs.h descriptor.h decoder/instr.h \
801+
lazy_flags.h tlb.h icache.h xmm.h vmx.h vmx_ctrls.h stack.h access.h
795802
uintr.o: uintr.@CPP_SUFFIX@ ../bochs.h ../config.h ../osdep.h ../logio.h \
796803
../misc/bswap.h cpu.h decoder/decoder.h decoder/features.h \
797804
../instrument/stubs/instrument.h i387.h \

bochs/cpu/call_far.cc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,12 @@ BX_CPU_C::call_protected(bxInstruction_c *i, Bit16u cs_raw, bx_address disp)
171171
BX_ERROR(("call_protected: gate type %u unsupported in long mode", (unsigned) gate_descriptor.type));
172172
exception(BX_GP_EXCEPTION, cs_raw & 0xfffc);
173173
}
174+
#if BX_SUPPORT_FRED
175+
if (BX_CPU_THIS_PTR cr4.get_FRED()) {
176+
BX_ERROR(("call_protected: call gate not allowed when FRED is enabled"));
177+
exception(BX_GP_EXCEPTION, cs_raw & 0xfffc);
178+
}
179+
#endif
174180
// gate descriptor must be present else #NP(gate selector)
175181
if (! IS_PRESENT(gate_descriptor)) {
176182
BX_ERROR(("call_protected: call gate not present"));

0 commit comments

Comments
 (0)