Print this page
9723 provide support for VMM's GDT handling
Reviewed by: Robert Mustacchi <rm@joyent.com>
Reviewed by: Patrick Mooney <patrick.mooney@joyent.com>

*** 11,49 **** /* * Copyright 2018 Joyent, Inc. */ - #if !defined(__lint) - .file "unix_sup.s" - #endif /* __lint */ - /* * Support routines for the unix kmdb module */ - #include <sys/asm_linkage.h> - #if defined(__lint) #include <sys/types.h> ! ulong_t ! kmdb_unix_getcr0(void) ! { return (0); } ! ulong_t ! kmdb_unix_getcr3(void) ! { return (0); } ! ulong_t ! kmdb_unix_getcr4(void) ! { return (0); } - #else /* __lint */ - - #if defined(__amd64) ENTRY(kmdb_unix_getcr0) movq %cr0, %rax ret SET_SIZE(kmdb_unix_getcr0) --- 11,34 ---- /* * Copyright 2018 Joyent, Inc. */ /* * Support routines for the unix kmdb module */ #if defined(__lint) #include <sys/types.h> ! #else ! #include <sys/asm_linkage.h> ! .file "unix_sup.s" ENTRY(kmdb_unix_getcr0) movq %cr0, %rax ret SET_SIZE(kmdb_unix_getcr0)
*** 60,88 **** ENTRY(kmdb_unix_getcr4) movq %cr4, %rax ret SET_SIZE(kmdb_unix_getcr4) ! #elif defined (__i386) ! ENTRY(kmdb_unix_getcr0) ! movl %cr0, %eax ret ! SET_SIZE(kmdb_unix_getcr0) ! ENTRY(kmdb_unix_getcr2) ! movl %cr2, %eax ! ret ! SET_SIZE(kmdb_unix_getcr2) ! ! ENTRY(kmdb_unix_getcr3) ! movl %cr3, %eax ! ret ! SET_SIZE(kmdb_unix_getcr3) ! ! ENTRY(kmdb_unix_getcr4) ! movl %cr4, %eax ! ret ! SET_SIZE(kmdb_unix_getcr4) ! ! #endif /* __i386 */ ! ! #endif /* __lint */ --- 45,55 ---- ENTRY(kmdb_unix_getcr4) movq %cr4, %rax ret SET_SIZE(kmdb_unix_getcr4) ! ENTRY(kmdb_unix_getgdtr) ! sgdt (%rdi) ret ! SET_SIZE(kmdb_unix_getgdtr) ! #endif /* !__lint */