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.
6 *
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.
10 */
11
12/*
13 * Copyright 2018 Joyent, Inc.
14 */
15
16/*
17 * Support routines for the unix kmdb module
18 */
19
20#if defined(__lint)
21
22#include <sys/types.h>
23
24#else
25
26#include <sys/asm_linkage.h>
27
28	.file	"unix_sup.s"
29
30	ENTRY(kmdb_unix_getcr0)
31	movq %cr0, %rax
32	ret
33	SET_SIZE(kmdb_unix_getcr0)
34
35	ENTRY(kmdb_unix_getcr2)
36	movq %cr2, %rax
37	ret
38	SET_SIZE(kmdb_unix_getcr2)
39
40	ENTRY(kmdb_unix_getcr3)
41	movq %cr3, %rax
42	ret
43	SET_SIZE(kmdb_unix_getcr3)
44
45	ENTRY(kmdb_unix_getcr4)
46	movq %cr4, %rax
47	ret
48	SET_SIZE(kmdb_unix_getcr4)
49
50	ENTRY(kmdb_unix_getgdtr)
51	sgdt (%rdi)
52	ret
53	SET_SIZE(kmdb_unix_getgdtr)
54
55#endif /* !__lint */
56