9723 provide support for VMM's GDT handling
[unleashed.git] / usr / src / cmd / mdb / i86pc / modules / unix / unix_sup.s
blob5984a121320c70500c854664be87c62ae78d9105
1 /*
2 * This file and its contents are supplied under the terms of the
3 * Common Development and Distribution License ("CDDL"), version 1.0.
4 * You may only use this file in accordance with the terms of version
5 * 1.0 of the CDDL.
7 * A full copy of the text of the CDDL should have accompanied this
8 * source. A copy of the CDDL is also available via the Internet at
9 * http://www.illumos.org/license/CDDL.
13 * Copyright 2018 Joyent, Inc.
17 * Support routines for the unix kmdb module
20 #if defined(__lint)
22 #include <sys/types.h>
24 #else
26 #include <sys/asm_linkage.h>
28 .file "unix_sup.s"
30 ENTRY(kmdb_unix_getcr0)
31 movq %cr0, %rax
32 ret
33 SET_SIZE(kmdb_unix_getcr0)
35 ENTRY(kmdb_unix_getcr2)
36 movq %cr2, %rax
37 ret
38 SET_SIZE(kmdb_unix_getcr2)
40 ENTRY(kmdb_unix_getcr3)
41 movq %cr3, %rax
42 ret
43 SET_SIZE(kmdb_unix_getcr3)
45 ENTRY(kmdb_unix_getcr4)
46 movq %cr4, %rax
47 ret
48 SET_SIZE(kmdb_unix_getcr4)
50 ENTRY(kmdb_unix_getgdtr)
51 sgdt (%rdi)
52 ret
53 SET_SIZE(kmdb_unix_getgdtr)
55 #endif /* !__lint */