Author: br
Date: Thu Oct 10 12:46:34 2019
New Revision: 353390
URL: https://svnweb.freebsd.org/changeset/base/353390

Log:
  Update Intel Processor Trace decoder library.
  
  Its latest version merged from:
  ^/vendor/processor-trace/892e12c5a27bda5806d1e63269986bb4171b5a8b
  
  Sponsored by: DARPA, AFRL

Added:
  head/contrib/processor-trace/include/pt_version.h   (contents, props changed)
  head/contrib/processor-trace/libipt/internal/include/pti-disp_default.h   
(contents, props changed)
  head/contrib/processor-trace/libipt/internal/include/pti-sib.h   (contents, 
props changed)
  head/contrib/processor-trace/libipt/test/src/ptunit-block_decoder.c   
(contents, props changed)
  head/contrib/processor-trace/libipt/test/src/ptunit-encoder.c   (contents, 
props changed)
  head/contrib/processor-trace/libipt/test/src/ptunit-insn_decoder.c   
(contents, props changed)
  head/contrib/processor-trace/libipt/test/src/ptunit-packet_decoder.c   
(contents, props changed)
Deleted:
  head/contrib/processor-trace/libipt/src/posix/init.c
  head/contrib/processor-trace/libipt/src/windows/init.c
Modified:
  head/contrib/processor-trace/include/posix/threads.h
  head/contrib/processor-trace/include/pt_compiler.h
  head/contrib/processor-trace/include/windows/inttypes.h
  head/contrib/processor-trace/include/windows/threads.h
  head/contrib/processor-trace/libipt/CMakeLists.txt
  head/contrib/processor-trace/libipt/include/intel-pt.h
  head/contrib/processor-trace/libipt/include/intel-pt.h.in
  head/contrib/processor-trace/libipt/internal/include/posix/pt_section_posix.h
  head/contrib/processor-trace/libipt/internal/include/pt_asid.h
  head/contrib/processor-trace/libipt/internal/include/pt_block_cache.h
  head/contrib/processor-trace/libipt/internal/include/pt_block_decoder.h
  head/contrib/processor-trace/libipt/internal/include/pt_config.h
  head/contrib/processor-trace/libipt/internal/include/pt_cpu.h
  head/contrib/processor-trace/libipt/internal/include/pt_cpuid.h
  head/contrib/processor-trace/libipt/internal/include/pt_decoder_function.h
  head/contrib/processor-trace/libipt/internal/include/pt_encoder.h
  head/contrib/processor-trace/libipt/internal/include/pt_event_queue.h
  head/contrib/processor-trace/libipt/internal/include/pt_ild.h
  head/contrib/processor-trace/libipt/internal/include/pt_image.h
  head/contrib/processor-trace/libipt/internal/include/pt_image_section_cache.h
  head/contrib/processor-trace/libipt/internal/include/pt_insn.h
  head/contrib/processor-trace/libipt/internal/include/pt_insn_decoder.h
  head/contrib/processor-trace/libipt/internal/include/pt_last_ip.h
  head/contrib/processor-trace/libipt/internal/include/pt_mapped_section.h
  head/contrib/processor-trace/libipt/internal/include/pt_msec_cache.h
  head/contrib/processor-trace/libipt/internal/include/pt_opcodes.h
  head/contrib/processor-trace/libipt/internal/include/pt_packet.h
  head/contrib/processor-trace/libipt/internal/include/pt_packet_decoder.h
  head/contrib/processor-trace/libipt/internal/include/pt_query_decoder.h
  head/contrib/processor-trace/libipt/internal/include/pt_retstack.h
  head/contrib/processor-trace/libipt/internal/include/pt_section.h
  head/contrib/processor-trace/libipt/internal/include/pt_section_file.h
  head/contrib/processor-trace/libipt/internal/include/pt_sync.h
  head/contrib/processor-trace/libipt/internal/include/pt_time.h
  head/contrib/processor-trace/libipt/internal/include/pt_tnt_cache.h
  head/contrib/processor-trace/libipt/internal/include/pti-disp-defs.h
  head/contrib/processor-trace/libipt/internal/include/pti-disp.h
  head/contrib/processor-trace/libipt/internal/include/pti-imm-defs.h
  head/contrib/processor-trace/libipt/internal/include/pti-imm.h
  head/contrib/processor-trace/libipt/internal/include/pti-modrm-defs.h
  head/contrib/processor-trace/libipt/internal/include/pti-modrm.h
  
head/contrib/processor-trace/libipt/internal/include/windows/pt_section_windows.h
  head/contrib/processor-trace/libipt/src/posix/pt_cpuid.c
  head/contrib/processor-trace/libipt/src/posix/pt_section_posix.c
  head/contrib/processor-trace/libipt/src/pt_asid.c
  head/contrib/processor-trace/libipt/src/pt_block_cache.c
  head/contrib/processor-trace/libipt/src/pt_block_decoder.c
  head/contrib/processor-trace/libipt/src/pt_config.c
  head/contrib/processor-trace/libipt/src/pt_cpu.c
  head/contrib/processor-trace/libipt/src/pt_decoder_function.c
  head/contrib/processor-trace/libipt/src/pt_encoder.c
  head/contrib/processor-trace/libipt/src/pt_error.c
  head/contrib/processor-trace/libipt/src/pt_event_queue.c
  head/contrib/processor-trace/libipt/src/pt_ild.c
  head/contrib/processor-trace/libipt/src/pt_image.c
  head/contrib/processor-trace/libipt/src/pt_image_section_cache.c
  head/contrib/processor-trace/libipt/src/pt_insn.c
  head/contrib/processor-trace/libipt/src/pt_insn_decoder.c
  head/contrib/processor-trace/libipt/src/pt_last_ip.c
  head/contrib/processor-trace/libipt/src/pt_msec_cache.c
  head/contrib/processor-trace/libipt/src/pt_packet.c
  head/contrib/processor-trace/libipt/src/pt_packet_decoder.c
  head/contrib/processor-trace/libipt/src/pt_query_decoder.c
  head/contrib/processor-trace/libipt/src/pt_retstack.c
  head/contrib/processor-trace/libipt/src/pt_section.c
  head/contrib/processor-trace/libipt/src/pt_section_file.c
  head/contrib/processor-trace/libipt/src/pt_sync.c
  head/contrib/processor-trace/libipt/src/pt_time.c
  head/contrib/processor-trace/libipt/src/pt_tnt_cache.c
  head/contrib/processor-trace/libipt/src/pt_version.c
  head/contrib/processor-trace/libipt/src/windows/pt_cpuid.c
  head/contrib/processor-trace/libipt/src/windows/pt_section_windows.c
  head/contrib/processor-trace/libipt/test/src/ptunit-asid.c
  head/contrib/processor-trace/libipt/test/src/ptunit-block_cache.c
  head/contrib/processor-trace/libipt/test/src/ptunit-config.c
  head/contrib/processor-trace/libipt/test/src/ptunit-cpp.cpp
  head/contrib/processor-trace/libipt/test/src/ptunit-cpu.c
  head/contrib/processor-trace/libipt/test/src/ptunit-event_queue.c
  head/contrib/processor-trace/libipt/test/src/ptunit-fetch.c
  head/contrib/processor-trace/libipt/test/src/ptunit-ild.c
  head/contrib/processor-trace/libipt/test/src/ptunit-image.c
  head/contrib/processor-trace/libipt/test/src/ptunit-image_section_cache.c
  head/contrib/processor-trace/libipt/test/src/ptunit-last_ip.c
  head/contrib/processor-trace/libipt/test/src/ptunit-mapped_section.c
  head/contrib/processor-trace/libipt/test/src/ptunit-msec_cache.c
  head/contrib/processor-trace/libipt/test/src/ptunit-packet.c
  head/contrib/processor-trace/libipt/test/src/ptunit-query.c
  head/contrib/processor-trace/libipt/test/src/ptunit-retstack.c
  head/contrib/processor-trace/libipt/test/src/ptunit-section-file.c
  head/contrib/processor-trace/libipt/test/src/ptunit-section.c
  head/contrib/processor-trace/libipt/test/src/ptunit-sync.c
  head/contrib/processor-trace/libipt/test/src/ptunit-time.c
  head/contrib/processor-trace/libipt/test/src/ptunit-tnt_cache.c
  head/lib/libipt/Makefile

Modified: head/contrib/processor-trace/include/posix/threads.h
==============================================================================
--- head/contrib/processor-trace/include/posix/threads.h        Thu Oct 10 
12:20:25 2019        (r353389)
+++ head/contrib/processor-trace/include/posix/threads.h        Thu Oct 10 
12:46:34 2019        (r353390)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014-2018, Intel Corporation
+ * Copyright (c) 2014-2019, Intel Corporation
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are met:

Modified: head/contrib/processor-trace/include/pt_compiler.h
==============================================================================
--- head/contrib/processor-trace/include/pt_compiler.h  Thu Oct 10 12:20:25 
2019        (r353389)
+++ head/contrib/processor-trace/include/pt_compiler.h  Thu Oct 10 12:46:34 
2019        (r353390)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017-2018, Intel Corporation
+ * Copyright (c) 2017-2019, Intel Corporation
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are met:

Added: head/contrib/processor-trace/include/pt_version.h
==============================================================================
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/contrib/processor-trace/include/pt_version.h   Thu Oct 10 12:46:34 
2019        (r353390)
@@ -0,0 +1,88 @@
+/*
+ * Copyright (c) 2018-2019, Intel Corporation
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ *  * Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ *  * Redistributions in binary form must reproduce the above copyright notice,
+ *    this list of conditions and the following disclaimer in the documentation
+ *    and/or other materials provided with the distribution.
+ *  * Neither the name of Intel Corporation nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef PT_VERSION_H
+#define PT_VERSION_H
+
+#include "intel-pt.h"
+
+#include <stdio.h>
+#include <inttypes.h>
+
+
+static inline int pt_fprint_version(FILE *file, struct pt_version version)
+{
+       if (version.build) {
+               if (version.ext && version.ext[0])
+                       return fprintf(file, "%" PRIu8 ".%" PRIu8 ".%" PRIu16
+                                      "-%" PRIu32 "-%s", version.major,
+                                      version.minor, version.patch,
+                                      version.build, version.ext);
+               else
+                       return fprintf(file, "%" PRIu8 ".%" PRIu8 ".%" PRIu16
+                                      "-%" PRIu32 "", version.major,
+                                      version.minor, version.patch,
+                                      version.build);
+       } else {
+               if (version.ext && version.ext[0])
+                       return fprintf(file, "%" PRIu8 ".%" PRIu8 ".%" PRIu16
+                                      "-%s", version.major, version.minor,
+                                      version.patch, version.ext);
+               else
+                       return fprintf(file, "%" PRIu8 ".%" PRIu8 ".%" PRIu16,
+                                      version.major, version.minor,
+                                      version.patch);
+       }
+}
+
+static inline int pt_print_version(struct pt_version version)
+{
+       return pt_fprint_version(stdout, version);
+}
+
+static inline void pt_print_tool_version(const char *name)
+{
+       struct pt_version v = {
+               /* .major = */ PT_VERSION_MAJOR,
+               /* .minor = */ PT_VERSION_MINOR,
+               /* .patch = */ PT_VERSION_PATCH,
+               /* .build = */ PT_VERSION_BUILD,
+               /* .ext = */ PT_VERSION_EXT
+       };
+
+       if (!name)
+               name = "<unknown>";
+
+       printf("%s-", name);
+       pt_print_version(v);
+       printf(" / libipt-");
+       pt_print_version(pt_library_version());
+       printf("\n");
+}
+
+#endif /* PT_VERSION_H */

Modified: head/contrib/processor-trace/include/windows/inttypes.h
==============================================================================
--- head/contrib/processor-trace/include/windows/inttypes.h     Thu Oct 10 
12:20:25 2019        (r353389)
+++ head/contrib/processor-trace/include/windows/inttypes.h     Thu Oct 10 
12:46:34 2019        (r353390)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013-2018, Intel Corporation
+ * Copyright (c) 2013-2019, Intel Corporation
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are met:

Modified: head/contrib/processor-trace/include/windows/threads.h
==============================================================================
--- head/contrib/processor-trace/include/windows/threads.h      Thu Oct 10 
12:20:25 2019        (r353389)
+++ head/contrib/processor-trace/include/windows/threads.h      Thu Oct 10 
12:46:34 2019        (r353390)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014-2018, Intel Corporation
+ * Copyright (c) 2014-2019, Intel Corporation
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are met:

Modified: head/contrib/processor-trace/libipt/CMakeLists.txt
==============================================================================
--- head/contrib/processor-trace/libipt/CMakeLists.txt  Thu Oct 10 12:20:25 
2019        (r353389)
+++ head/contrib/processor-trace/libipt/CMakeLists.txt  Thu Oct 10 12:46:34 
2019        (r353390)
@@ -1,4 +1,4 @@
-# Copyright (c) 2013-2018, Intel Corporation
+# Copyright (c) 2013-2019, Intel Corporation
 #
 # Redistribution and use in source and binary forms, with or without
 # modification, are permitted provided that the following conditions are met:
@@ -64,28 +64,28 @@ if (CMAKE_HOST_UNIX)
     internal/include/posix
   )
 
-  set(LIBIPT_FILES ${LIBIPT_FILES} src/posix/init.c)
   set(LIBIPT_SECTION_FILES ${LIBIPT_SECTION_FILES} 
src/posix/pt_section_posix.c)
 endif (CMAKE_HOST_UNIX)
 
 if (CMAKE_HOST_WIN32)
-  add_definitions(
-    # export libipt symbols
-    #
-    /Dpt_export=__declspec\(dllexport\)
-  )
+  if (BUILD_SHARED_LIBS)
+    add_definitions(
+      # export libipt symbols
+      #
+      /Dpt_export=__declspec\(dllexport\)
+    )
+  endif (BUILD_SHARED_LIBS)
 
   include_directories(
     internal/include/windows
   )
 
-  set(LIBIPT_FILES ${LIBIPT_FILES} src/windows/init.c)
   set(LIBIPT_SECTION_FILES ${LIBIPT_SECTION_FILES} 
src/windows/pt_section_windows.c)
 endif (CMAKE_HOST_WIN32)
 
 set(LIBIPT_FILES ${LIBIPT_FILES} ${LIBIPT_SECTION_FILES})
 
-add_library(libipt SHARED
+add_library(libipt
   ${LIBIPT_FILES}
 )
 
@@ -167,6 +167,24 @@ add_ptunit_c_test(fetch
   src/pt_encoder.c
   src/pt_config.c
 )
+add_ptunit_c_test(encoder
+  src/pt_encoder.c
+  src/pt_config.c
+)
+add_ptunit_c_test(packet_decoder
+  src/pt_packet_decoder.c
+  src/pt_packet.c
+  src/pt_config.c
+  src/pt_sync.c
+  src/pt_decoder_function.c
+  src/pt_query_decoder.c
+  src/pt_event_queue.c
+  src/pt_last_ip.c
+  src/pt_tnt_cache.c
+  src/pt_time.c
+)
+add_ptunit_c_test(insn_decoder ${LIBIPT_FILES})
+add_ptunit_c_test(block_decoder ${LIBIPT_FILES})
 
 add_ptunit_cpp_test(cpp)
 add_ptunit_libraries(cpp libipt)

Modified: head/contrib/processor-trace/libipt/include/intel-pt.h
==============================================================================
--- head/contrib/processor-trace/libipt/include/intel-pt.h      Thu Oct 10 
12:20:25 2019        (r353389)
+++ head/contrib/processor-trace/libipt/include/intel-pt.h      Thu Oct 10 
12:46:34 2019        (r353390)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013-2018, Intel Corporation
+ * Copyright (c) 2013-2019, Intel Corporation
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are met:
@@ -80,6 +80,7 @@ struct pt_block_decoder;
 /** The header version. */
 #define LIBIPT_VERSION_MAJOR ${PT_VERSION_MAJOR}
 #define LIBIPT_VERSION_MINOR ${PT_VERSION_MINOR}
+#define LIBIPT_VERSION_PATCH ${PT_VERSION_PATCH}
 
 #define LIBIPT_VERSION ((LIBIPT_VERSION_MAJOR << 8) + LIBIPT_VERSION_MINOR)
 
@@ -92,8 +93,8 @@ struct pt_version {
        /** Minor version number. */
        uint8_t minor;
 
-       /** Reserved bits. */
-       uint16_t reserved;
+       /** Patch level. */
+       uint16_t patch;
 
        /** Build number. */
        uint32_t build;
@@ -330,6 +331,16 @@ struct pt_errata {
         */
        uint32_t apl11:1;
 
+       /** SKL168: Intel(R) PT CYC Packets Can be Dropped When Immediately
+        *          Preceding PSB
+        *
+        * Due to a rare microarchitectural condition, generation of an Intel
+        * PT (Processor Trace) PSB (Packet Stream Boundary) packet can cause a
+        * single CYC (Cycle Count) packet, possibly along with an associated
+        * MTC (Mini Time Counter) packet, to be dropped.
+        */
+       uint32_t skl168:1;
+
        /* Reserve a few bytes for the future. */
        uint32_t reserved[15];
 };
@@ -348,13 +359,25 @@ struct pt_conf_flags {
 
                        /** End a block after a jump instruction. */
                        uint32_t end_on_jump:1;
+
+                       /** Preserve timing calibration on overflow. */
+                       uint32_t keep_tcal_on_ovf:1;
                } block;
 
                /** Flags for the instruction flow decoder. */
                struct {
                        /** Enable tick events for timing updates. */
                        uint32_t enable_tick_events:1;
+
+                       /** Preserve timing calibration on overflow. */
+                       uint32_t keep_tcal_on_ovf:1;
                } insn;
+
+               /** Flags for the query decoder. */
+               struct {
+                       /** Preserve timing calibration on overflow. */
+                       uint32_t keep_tcal_on_ovf:1;
+               } query;
 
                /* Reserve a few bytes for future extensions. */
                uint32_t reserved[4];

Modified: head/contrib/processor-trace/libipt/include/intel-pt.h.in
==============================================================================
--- head/contrib/processor-trace/libipt/include/intel-pt.h.in   Thu Oct 10 
12:20:25 2019        (r353389)
+++ head/contrib/processor-trace/libipt/include/intel-pt.h.in   Thu Oct 10 
12:46:34 2019        (r353390)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013-2018, Intel Corporation
+ * Copyright (c) 2013-2019, Intel Corporation
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are met:
@@ -80,6 +80,7 @@ struct pt_block_decoder;
 /** The header version. */
 #define LIBIPT_VERSION_MAJOR ${PT_VERSION_MAJOR}
 #define LIBIPT_VERSION_MINOR ${PT_VERSION_MINOR}
+#define LIBIPT_VERSION_PATCH ${PT_VERSION_PATCH}
 
 #define LIBIPT_VERSION ((LIBIPT_VERSION_MAJOR << 8) + LIBIPT_VERSION_MINOR)
 
@@ -92,8 +93,8 @@ struct pt_version {
        /** Minor version number. */
        uint8_t minor;
 
-       /** Reserved bits. */
-       uint16_t reserved;
+       /** Patch level. */
+       uint16_t patch;
 
        /** Build number. */
        uint32_t build;
@@ -330,6 +331,16 @@ struct pt_errata {
         */
        uint32_t apl11:1;
 
+       /** SKL168: Intel(R) PT CYC Packets Can be Dropped When Immediately
+        *          Preceding PSB
+        *
+        * Due to a rare microarchitectural condition, generation of an Intel
+        * PT (Processor Trace) PSB (Packet Stream Boundary) packet can cause a
+        * single CYC (Cycle Count) packet, possibly along with an associated
+        * MTC (Mini Time Counter) packet, to be dropped.
+        */
+       uint32_t skl168:1;
+
        /* Reserve a few bytes for the future. */
        uint32_t reserved[15];
 };
@@ -348,13 +359,25 @@ struct pt_conf_flags {
 
                        /** End a block after a jump instruction. */
                        uint32_t end_on_jump:1;
+
+                       /** Preserve timing calibration on overflow. */
+                       uint32_t keep_tcal_on_ovf:1;
                } block;
 
                /** Flags for the instruction flow decoder. */
                struct {
                        /** Enable tick events for timing updates. */
                        uint32_t enable_tick_events:1;
+
+                       /** Preserve timing calibration on overflow. */
+                       uint32_t keep_tcal_on_ovf:1;
                } insn;
+
+               /** Flags for the query decoder. */
+               struct {
+                       /** Preserve timing calibration on overflow. */
+                       uint32_t keep_tcal_on_ovf:1;
+               } query;
 
                /* Reserve a few bytes for future extensions. */
                uint32_t reserved[4];

Modified: 
head/contrib/processor-trace/libipt/internal/include/posix/pt_section_posix.h
==============================================================================
--- 
head/contrib/processor-trace/libipt/internal/include/posix/pt_section_posix.h   
    Thu Oct 10 12:20:25 2019        (r353389)
+++ 
head/contrib/processor-trace/libipt/internal/include/posix/pt_section_posix.h   
    Thu Oct 10 12:46:34 2019        (r353390)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015-2018, Intel Corporation
+ * Copyright (c) 2015-2019, Intel Corporation
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are met:

Modified: head/contrib/processor-trace/libipt/internal/include/pt_asid.h
==============================================================================
--- head/contrib/processor-trace/libipt/internal/include/pt_asid.h      Thu Oct 
10 12:20:25 2019        (r353389)
+++ head/contrib/processor-trace/libipt/internal/include/pt_asid.h      Thu Oct 
10 12:46:34 2019        (r353390)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014-2018, Intel Corporation
+ * Copyright (c) 2014-2019, Intel Corporation
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are met:

Modified: head/contrib/processor-trace/libipt/internal/include/pt_block_cache.h
==============================================================================
--- head/contrib/processor-trace/libipt/internal/include/pt_block_cache.h       
Thu Oct 10 12:20:25 2019        (r353389)
+++ head/contrib/processor-trace/libipt/internal/include/pt_block_cache.h       
Thu Oct 10 12:46:34 2019        (r353390)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016-2018, Intel Corporation
+ * Copyright (c) 2016-2019, Intel Corporation
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are met:

Modified: 
head/contrib/processor-trace/libipt/internal/include/pt_block_decoder.h
==============================================================================
--- head/contrib/processor-trace/libipt/internal/include/pt_block_decoder.h     
Thu Oct 10 12:20:25 2019        (r353389)
+++ head/contrib/processor-trace/libipt/internal/include/pt_block_decoder.h     
Thu Oct 10 12:46:34 2019        (r353390)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016-2018, Intel Corporation
+ * Copyright (c) 2016-2019, Intel Corporation
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are met:

Modified: head/contrib/processor-trace/libipt/internal/include/pt_config.h
==============================================================================
--- head/contrib/processor-trace/libipt/internal/include/pt_config.h    Thu Oct 
10 12:20:25 2019        (r353389)
+++ head/contrib/processor-trace/libipt/internal/include/pt_config.h    Thu Oct 
10 12:46:34 2019        (r353390)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015-2018, Intel Corporation
+ * Copyright (c) 2015-2019, Intel Corporation
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are met:

Modified: head/contrib/processor-trace/libipt/internal/include/pt_cpu.h
==============================================================================
--- head/contrib/processor-trace/libipt/internal/include/pt_cpu.h       Thu Oct 
10 12:20:25 2019        (r353389)
+++ head/contrib/processor-trace/libipt/internal/include/pt_cpu.h       Thu Oct 
10 12:46:34 2019        (r353390)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013-2018, Intel Corporation
+ * Copyright (c) 2013-2019, Intel Corporation
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are met:

Modified: head/contrib/processor-trace/libipt/internal/include/pt_cpuid.h
==============================================================================
--- head/contrib/processor-trace/libipt/internal/include/pt_cpuid.h     Thu Oct 
10 12:20:25 2019        (r353389)
+++ head/contrib/processor-trace/libipt/internal/include/pt_cpuid.h     Thu Oct 
10 12:46:34 2019        (r353390)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013-2018, Intel Corporation
+ * Copyright (c) 2013-2019, Intel Corporation
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are met:

Modified: 
head/contrib/processor-trace/libipt/internal/include/pt_decoder_function.h
==============================================================================
--- head/contrib/processor-trace/libipt/internal/include/pt_decoder_function.h  
Thu Oct 10 12:20:25 2019        (r353389)
+++ head/contrib/processor-trace/libipt/internal/include/pt_decoder_function.h  
Thu Oct 10 12:46:34 2019        (r353390)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013-2018, Intel Corporation
+ * Copyright (c) 2013-2019, Intel Corporation
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are met:

Modified: head/contrib/processor-trace/libipt/internal/include/pt_encoder.h
==============================================================================
--- head/contrib/processor-trace/libipt/internal/include/pt_encoder.h   Thu Oct 
10 12:20:25 2019        (r353389)
+++ head/contrib/processor-trace/libipt/internal/include/pt_encoder.h   Thu Oct 
10 12:46:34 2019        (r353390)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014-2018, Intel Corporation
+ * Copyright (c) 2014-2019, Intel Corporation
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are met:

Modified: head/contrib/processor-trace/libipt/internal/include/pt_event_queue.h
==============================================================================
--- head/contrib/processor-trace/libipt/internal/include/pt_event_queue.h       
Thu Oct 10 12:20:25 2019        (r353389)
+++ head/contrib/processor-trace/libipt/internal/include/pt_event_queue.h       
Thu Oct 10 12:46:34 2019        (r353390)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013-2018, Intel Corporation
+ * Copyright (c) 2013-2019, Intel Corporation
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are met:

Modified: head/contrib/processor-trace/libipt/internal/include/pt_ild.h
==============================================================================
--- head/contrib/processor-trace/libipt/internal/include/pt_ild.h       Thu Oct 
10 12:20:25 2019        (r353389)
+++ head/contrib/processor-trace/libipt/internal/include/pt_ild.h       Thu Oct 
10 12:46:34 2019        (r353390)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013-2018, Intel Corporation
+ * Copyright (c) 2013-2019, Intel Corporation
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are met:
@@ -96,11 +96,6 @@ static inline uint8_t pti_get_modrm_rm(const struct pt
 {
        return ild->modrm_byte & 7;
 }
-
-/* MAIN ENTRANCE POINTS */
-
-/* one time call. not thread safe init. call when single threaded. */
-extern void pt_ild_init(void);
 
 /* all decoding is multithread safe. */
 

Modified: head/contrib/processor-trace/libipt/internal/include/pt_image.h
==============================================================================
--- head/contrib/processor-trace/libipt/internal/include/pt_image.h     Thu Oct 
10 12:20:25 2019        (r353389)
+++ head/contrib/processor-trace/libipt/internal/include/pt_image.h     Thu Oct 
10 12:46:34 2019        (r353390)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013-2018, Intel Corporation
+ * Copyright (c) 2013-2019, Intel Corporation
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are met:

Modified: 
head/contrib/processor-trace/libipt/internal/include/pt_image_section_cache.h
==============================================================================
--- 
head/contrib/processor-trace/libipt/internal/include/pt_image_section_cache.h   
    Thu Oct 10 12:20:25 2019        (r353389)
+++ 
head/contrib/processor-trace/libipt/internal/include/pt_image_section_cache.h   
    Thu Oct 10 12:46:34 2019        (r353390)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016-2018, Intel Corporation
+ * Copyright (c) 2016-2019, Intel Corporation
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are met:

Modified: head/contrib/processor-trace/libipt/internal/include/pt_insn.h
==============================================================================
--- head/contrib/processor-trace/libipt/internal/include/pt_insn.h      Thu Oct 
10 12:20:25 2019        (r353389)
+++ head/contrib/processor-trace/libipt/internal/include/pt_insn.h      Thu Oct 
10 12:46:34 2019        (r353390)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016-2018, Intel Corporation
+ * Copyright (c) 2016-2019, Intel Corporation
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are met:

Modified: head/contrib/processor-trace/libipt/internal/include/pt_insn_decoder.h
==============================================================================
--- head/contrib/processor-trace/libipt/internal/include/pt_insn_decoder.h      
Thu Oct 10 12:20:25 2019        (r353389)
+++ head/contrib/processor-trace/libipt/internal/include/pt_insn_decoder.h      
Thu Oct 10 12:46:34 2019        (r353390)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013-2018, Intel Corporation
+ * Copyright (c) 2013-2019, Intel Corporation
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are met:

Modified: head/contrib/processor-trace/libipt/internal/include/pt_last_ip.h
==============================================================================
--- head/contrib/processor-trace/libipt/internal/include/pt_last_ip.h   Thu Oct 
10 12:20:25 2019        (r353389)
+++ head/contrib/processor-trace/libipt/internal/include/pt_last_ip.h   Thu Oct 
10 12:46:34 2019        (r353390)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013-2018, Intel Corporation
+ * Copyright (c) 2013-2019, Intel Corporation
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are met:

Modified: 
head/contrib/processor-trace/libipt/internal/include/pt_mapped_section.h
==============================================================================
--- head/contrib/processor-trace/libipt/internal/include/pt_mapped_section.h    
Thu Oct 10 12:20:25 2019        (r353389)
+++ head/contrib/processor-trace/libipt/internal/include/pt_mapped_section.h    
Thu Oct 10 12:46:34 2019        (r353390)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014-2018, Intel Corporation
+ * Copyright (c) 2014-2019, Intel Corporation
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are met:

Modified: head/contrib/processor-trace/libipt/internal/include/pt_msec_cache.h
==============================================================================
--- head/contrib/processor-trace/libipt/internal/include/pt_msec_cache.h        
Thu Oct 10 12:20:25 2019        (r353389)
+++ head/contrib/processor-trace/libipt/internal/include/pt_msec_cache.h        
Thu Oct 10 12:46:34 2019        (r353390)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017-2018, Intel Corporation
+ * Copyright (c) 2017-2019, Intel Corporation
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are met:

Modified: head/contrib/processor-trace/libipt/internal/include/pt_opcodes.h
==============================================================================
--- head/contrib/processor-trace/libipt/internal/include/pt_opcodes.h   Thu Oct 
10 12:20:25 2019        (r353389)
+++ head/contrib/processor-trace/libipt/internal/include/pt_opcodes.h   Thu Oct 
10 12:46:34 2019        (r353390)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013-2018, Intel Corporation
+ * Copyright (c) 2013-2019, Intel Corporation
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are met:

Modified: head/contrib/processor-trace/libipt/internal/include/pt_packet.h
==============================================================================
--- head/contrib/processor-trace/libipt/internal/include/pt_packet.h    Thu Oct 
10 12:20:25 2019        (r353389)
+++ head/contrib/processor-trace/libipt/internal/include/pt_packet.h    Thu Oct 
10 12:46:34 2019        (r353390)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014-2018, Intel Corporation
+ * Copyright (c) 2014-2019, Intel Corporation
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are met:

Modified: 
head/contrib/processor-trace/libipt/internal/include/pt_packet_decoder.h
==============================================================================
--- head/contrib/processor-trace/libipt/internal/include/pt_packet_decoder.h    
Thu Oct 10 12:20:25 2019        (r353389)
+++ head/contrib/processor-trace/libipt/internal/include/pt_packet_decoder.h    
Thu Oct 10 12:46:34 2019        (r353390)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014-2018, Intel Corporation
+ * Copyright (c) 2014-2019, Intel Corporation
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are met:

Modified: 
head/contrib/processor-trace/libipt/internal/include/pt_query_decoder.h
==============================================================================
--- head/contrib/processor-trace/libipt/internal/include/pt_query_decoder.h     
Thu Oct 10 12:20:25 2019        (r353389)
+++ head/contrib/processor-trace/libipt/internal/include/pt_query_decoder.h     
Thu Oct 10 12:46:34 2019        (r353390)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014-2018, Intel Corporation
+ * Copyright (c) 2014-2019, Intel Corporation
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are met:

Modified: head/contrib/processor-trace/libipt/internal/include/pt_retstack.h
==============================================================================
--- head/contrib/processor-trace/libipt/internal/include/pt_retstack.h  Thu Oct 
10 12:20:25 2019        (r353389)
+++ head/contrib/processor-trace/libipt/internal/include/pt_retstack.h  Thu Oct 
10 12:46:34 2019        (r353390)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013-2018, Intel Corporation
+ * Copyright (c) 2013-2019, Intel Corporation
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are met:

Modified: head/contrib/processor-trace/libipt/internal/include/pt_section.h
==============================================================================
--- head/contrib/processor-trace/libipt/internal/include/pt_section.h   Thu Oct 
10 12:20:25 2019        (r353389)
+++ head/contrib/processor-trace/libipt/internal/include/pt_section.h   Thu Oct 
10 12:46:34 2019        (r353390)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013-2018, Intel Corporation
+ * Copyright (c) 2013-2019, Intel Corporation
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are met:
@@ -162,10 +162,15 @@ struct pt_section {
  * The returned section is not mapped and starts with a user count of one and
  * instruction caching enabled.
  *
- * Returns a new section on success, NULL otherwise.
+ * Returns zero on success, a negative pt_error_code otherwise.
+ * Returns -pte_internal if @psection is NULL.
+ * Returns -pte_nomem when running out of memory.
+ * Returns -pte_bad_file if @filename cannot be opened.
+ * Returns -pte_invalid if @offset lies beyond @file.
+ * Returns -pte_invalid if @filename is too long.
  */
-extern struct pt_section *pt_mk_section(const char *file, uint64_t offset,
-                                       uint64_t size);
+extern int pt_mk_section(struct pt_section **psection, const char *filename,
+                        uint64_t offset, uint64_t size);
 
 /* Lock a section.
  *

Modified: head/contrib/processor-trace/libipt/internal/include/pt_section_file.h
==============================================================================
--- head/contrib/processor-trace/libipt/internal/include/pt_section_file.h      
Thu Oct 10 12:20:25 2019        (r353389)
+++ head/contrib/processor-trace/libipt/internal/include/pt_section_file.h      
Thu Oct 10 12:46:34 2019        (r353390)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013-2018, Intel Corporation
+ * Copyright (c) 2013-2019, Intel Corporation
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are met:

Modified: head/contrib/processor-trace/libipt/internal/include/pt_sync.h
==============================================================================
--- head/contrib/processor-trace/libipt/internal/include/pt_sync.h      Thu Oct 
10 12:20:25 2019        (r353389)
+++ head/contrib/processor-trace/libipt/internal/include/pt_sync.h      Thu Oct 
10 12:46:34 2019        (r353390)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014-2018, Intel Corporation
+ * Copyright (c) 2014-2019, Intel Corporation
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are met:

Modified: head/contrib/processor-trace/libipt/internal/include/pt_time.h
==============================================================================
--- head/contrib/processor-trace/libipt/internal/include/pt_time.h      Thu Oct 
10 12:20:25 2019        (r353389)
+++ head/contrib/processor-trace/libipt/internal/include/pt_time.h      Thu Oct 
10 12:46:34 2019        (r353390)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014-2018, Intel Corporation
+ * Copyright (c) 2014-2019, Intel Corporation
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are met:
@@ -166,6 +166,9 @@ struct pt_time_cal {
 
        /* A flag saying whether we have seen a MTC packet. */
        uint32_t have_mtc:1;
+
+       /* A flag saying whether we need to check for erratum SKL168. */
+       uint32_t check_skl168:1;
 };
 
 enum {
@@ -227,6 +230,10 @@ extern int pt_tcal_update_mtc(struct pt_time_cal *,
                              const struct pt_config *);
 extern int pt_tcal_update_cyc(struct pt_time_cal *,
                              const struct pt_packet_cyc *,
+                             const struct pt_config *);
+extern int pt_tcal_update_psb(struct pt_time_cal *,
+                             const struct pt_config *);
+extern int pt_tcal_update_ovf(struct pt_time_cal *,
                              const struct pt_config *);
 
 #endif /* PT_TIME_H */

Modified: head/contrib/processor-trace/libipt/internal/include/pt_tnt_cache.h
==============================================================================
--- head/contrib/processor-trace/libipt/internal/include/pt_tnt_cache.h Thu Oct 
10 12:20:25 2019        (r353389)
+++ head/contrib/processor-trace/libipt/internal/include/pt_tnt_cache.h Thu Oct 
10 12:46:34 2019        (r353390)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013-2018, Intel Corporation
+ * Copyright (c) 2013-2019, Intel Corporation
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are met:

Modified: head/contrib/processor-trace/libipt/internal/include/pti-disp-defs.h
==============================================================================
--- head/contrib/processor-trace/libipt/internal/include/pti-disp-defs.h        
Thu Oct 10 12:20:25 2019        (r353389)
+++ head/contrib/processor-trace/libipt/internal/include/pti-disp-defs.h        
Thu Oct 10 12:46:34 2019        (r353390)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013-2018, Intel Corporation
+ * Copyright (c) 2013-2019, Intel Corporation
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are met:

Modified: head/contrib/processor-trace/libipt/internal/include/pti-disp.h
==============================================================================
--- head/contrib/processor-trace/libipt/internal/include/pti-disp.h     Thu Oct 
10 12:20:25 2019        (r353389)
+++ head/contrib/processor-trace/libipt/internal/include/pti-disp.h     Thu Oct 
10 12:46:34 2019        (r353390)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013-2018, Intel Corporation
+ * Copyright (c) 2013-2019, Intel Corporation
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are met:

Added: head/contrib/processor-trace/libipt/internal/include/pti-disp_default.h
==============================================================================
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/contrib/processor-trace/libipt/internal/include/pti-disp_default.h     
Thu Oct 10 12:46:34 2019        (r353390)
@@ -0,0 +1,209 @@
+/*
+ * Copyright (c) 2017-2019, Intel Corporation
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ *  * Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ *  * Redistributions in binary form must reproduce the above copyright notice,
+ *    this list of conditions and the following disclaimer in the documentation
+ *    and/or other materials provided with the distribution.
+ *  * Neither the name of Intel Corporation nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef PTI_DISP_DEFAULT_H
+#define PTI_DISP_DEFAULT_H
+
+#include <stdint.h>
+
+
+static const uint8_t disp_default[4][4][8] = {
+       /* Effective Addressing Mode: ptem_unknown. */ {
+               /* MOD: 0 */ {
+                       /* RM: 0 */     0,
+                       /* RM: 1 */     0,
+                       /* RM: 2 */     0,
+                       /* RM: 3 */     0,
+                       /* RM: 4 */     0,
+                       /* RM: 5 */     0,
+                       /* RM: 6 */     0,
+                       /* RM: 7 */     0
+               },
+               /* MOD: 1 */ {
+                       /* RM: 0 */     0,
+                       /* RM: 1 */     0,
+                       /* RM: 2 */     0,
+                       /* RM: 3 */     0,
+                       /* RM: 4 */     0,
+                       /* RM: 5 */     0,
+                       /* RM: 6 */     0,
+                       /* RM: 7 */     0
+               },
+               /* MOD: 2 */ {
+                       /* RM: 0 */     0,
+                       /* RM: 1 */     0,
+                       /* RM: 2 */     0,
+                       /* RM: 3 */     0,
+                       /* RM: 4 */     0,
+                       /* RM: 5 */     0,
+                       /* RM: 6 */     0,
+                       /* RM: 7 */     0
+               },
+               /* MOD: 3 */ {
+                       /* RM: 0 */     0,
+                       /* RM: 1 */     0,
+                       /* RM: 2 */     0,
+                       /* RM: 3 */     0,
+                       /* RM: 4 */     0,
+                       /* RM: 5 */     0,
+                       /* RM: 6 */     0,
+                       /* RM: 7 */     0
+               }
+       },
+
+       /* Effective Addressing Mode: ptem_16bit. */ {
+               /* MOD: 0 */ {
+                       /* RM: 0 */     0,
+                       /* RM: 1 */     0,
+                       /* RM: 2 */     0,
+                       /* RM: 3 */     0,
+                       /* RM: 4 */     0,
+                       /* RM: 5 */     0,
+                       /* RM: 6 */     2,
+                       /* RM: 7 */     0
+               },
+               /* MOD: 1 */ {
+                       /* RM: 0 */     1,
+                       /* RM: 1 */     1,
+                       /* RM: 2 */     1,
+                       /* RM: 3 */     1,
+                       /* RM: 4 */     1,
+                       /* RM: 5 */     1,
+                       /* RM: 6 */     1,
+                       /* RM: 7 */     1
+               },
+               /* MOD: 2 */ {
+                       /* RM: 0 */     2,
+                       /* RM: 1 */     2,
+                       /* RM: 2 */     2,
+                       /* RM: 3 */     2,
+                       /* RM: 4 */     2,
+                       /* RM: 5 */     2,
+                       /* RM: 6 */     2,
+                       /* RM: 7 */     2
+               },
+               /* MOD: 3 */ {
+                       /* RM: 0 */     0,
+                       /* RM: 1 */     0,
+                       /* RM: 2 */     0,
+                       /* RM: 3 */     0,
+                       /* RM: 4 */     0,
+                       /* RM: 5 */     0,
+                       /* RM: 6 */     0,
+                       /* RM: 7 */     0
+               }
+       },
+
+       /* Effective Addressing Mode: ptem_32bit. */ {
+               /* MOD: 0 */ {
+                       /* RM: 0 */     0,
+                       /* RM: 1 */     0,
+                       /* RM: 2 */     0,
+                       /* RM: 3 */     0,
+                       /* RM: 4 */     0,
+                       /* RM: 5 */     4,
+                       /* RM: 6 */     0,
+                       /* RM: 7 */     0
+               },
+               /* MOD: 1 */ {
+                       /* RM: 0 */     1,
+                       /* RM: 1 */     1,
+                       /* RM: 2 */     1,
+                       /* RM: 3 */     1,
+                       /* RM: 4 */     1,
+                       /* RM: 5 */     1,
+                       /* RM: 6 */     1,
+                       /* RM: 7 */     1
+               },
+               /* MOD: 2 */ {
+                       /* RM: 0 */     4,
+                       /* RM: 1 */     4,
+                       /* RM: 2 */     4,
+                       /* RM: 3 */     4,
+                       /* RM: 4 */     4,
+                       /* RM: 5 */     4,
+                       /* RM: 6 */     4,
+                       /* RM: 7 */     4
+               },
+               /* MOD: 3 */ {
+                       /* RM: 0 */     0,
+                       /* RM: 1 */     0,
+                       /* RM: 2 */     0,
+                       /* RM: 3 */     0,
+                       /* RM: 4 */     0,
+                       /* RM: 5 */     0,
+                       /* RM: 6 */     0,
+                       /* RM: 7 */     0
+               }
+       },
+
+       /* Effective Addressing Mode: ptem_64bit. */ {
+               /* MOD: 0 */ {
+                       /* RM: 0 */     0,
+                       /* RM: 1 */     0,
+                       /* RM: 2 */     0,
+                       /* RM: 3 */     0,
+                       /* RM: 4 */     0,
+                       /* RM: 5 */     4,
+                       /* RM: 6 */     0,
+                       /* RM: 7 */     0
+               },
+               /* MOD: 1 */ {
+                       /* RM: 0 */     1,
+                       /* RM: 1 */     1,
+                       /* RM: 2 */     1,
+                       /* RM: 3 */     1,
+                       /* RM: 4 */     1,
+                       /* RM: 5 */     1,
+                       /* RM: 6 */     1,
+                       /* RM: 7 */     1
+               },
+               /* MOD: 2 */ {
+                       /* RM: 0 */     4,
+                       /* RM: 1 */     4,
+                       /* RM: 2 */     4,
+                       /* RM: 3 */     4,
+                       /* RM: 4 */     4,
+                       /* RM: 5 */     4,
+                       /* RM: 6 */     4,
+                       /* RM: 7 */     4
+               },
+               /* MOD: 3 */ {
+                       /* RM: 0 */     0,
+                       /* RM: 1 */     0,
+                       /* RM: 2 */     0,
+                       /* RM: 3 */     0,
+                       /* RM: 4 */     0,
+                       /* RM: 5 */     0,
+                       /* RM: 6 */     0,
+                       /* RM: 7 */     0
+               }
+       }
+};
+
+#endif /* PTI_DISP_DEFAULT_H */

Modified: head/contrib/processor-trace/libipt/internal/include/pti-imm-defs.h
==============================================================================
--- head/contrib/processor-trace/libipt/internal/include/pti-imm-defs.h Thu Oct 
10 12:20:25 2019        (r353389)
+++ head/contrib/processor-trace/libipt/internal/include/pti-imm-defs.h Thu Oct 
10 12:46:34 2019        (r353390)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013-2018, Intel Corporation
+ * Copyright (c) 2013-2019, Intel Corporation
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are met:

Modified: head/contrib/processor-trace/libipt/internal/include/pti-imm.h
==============================================================================
--- head/contrib/processor-trace/libipt/internal/include/pti-imm.h      Thu Oct 
10 12:20:25 2019        (r353389)
+++ head/contrib/processor-trace/libipt/internal/include/pti-imm.h      Thu Oct 
10 12:46:34 2019        (r353390)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013-2018, Intel Corporation
+ * Copyright (c) 2013-2019, Intel Corporation
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are met:

Modified: head/contrib/processor-trace/libipt/internal/include/pti-modrm-defs.h
==============================================================================
--- head/contrib/processor-trace/libipt/internal/include/pti-modrm-defs.h       
Thu Oct 10 12:20:25 2019        (r353389)
+++ head/contrib/processor-trace/libipt/internal/include/pti-modrm-defs.h       
Thu Oct 10 12:46:34 2019        (r353390)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013-2018, Intel Corporation
+ * Copyright (c) 2013-2019, Intel Corporation
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are met:

Modified: head/contrib/processor-trace/libipt/internal/include/pti-modrm.h
==============================================================================
--- head/contrib/processor-trace/libipt/internal/include/pti-modrm.h    Thu Oct 
10 12:20:25 2019        (r353389)
+++ head/contrib/processor-trace/libipt/internal/include/pti-modrm.h    Thu Oct 
10 12:46:34 2019        (r353390)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013-2018, Intel Corporation
+ * Copyright (c) 2013-2019, Intel Corporation
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are met:

Added: head/contrib/processor-trace/libipt/internal/include/pti-sib.h
==============================================================================
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/contrib/processor-trace/libipt/internal/include/pti-sib.h      Thu Oct 
10 12:46:34 2019        (r353390)
@@ -0,0 +1,209 @@
+/*
+ * Copyright (c) 2017-2019, Intel Corporation
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ *  * Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ *  * Redistributions in binary form must reproduce the above copyright notice,
+ *    this list of conditions and the following disclaimer in the documentation
+ *    and/or other materials provided with the distribution.
+ *  * Neither the name of Intel Corporation nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef PTI_SIB_H
+#define PTI_SIB_H
+
+#include <stdint.h>
+
+
+static const uint8_t has_sib[4][4][8] = {
+       /* Effective Addressing Mode: ptem_unknown. */ {
+               /* MOD: 0 */ {
+                       /* RM: 0 */     0,
+                       /* RM: 1 */     0,
+                       /* RM: 2 */     0,
+                       /* RM: 3 */     0,
+                       /* RM: 4 */     0,
+                       /* RM: 5 */     0,
+                       /* RM: 6 */     0,
+                       /* RM: 7 */     0
+               },
+               /* MOD: 1 */ {
+                       /* RM: 0 */     0,
+                       /* RM: 1 */     0,
+                       /* RM: 2 */     0,
+                       /* RM: 3 */     0,
+                       /* RM: 4 */     0,
+                       /* RM: 5 */     0,
+                       /* RM: 6 */     0,
+                       /* RM: 7 */     0
+               },
+               /* MOD: 2 */ {
+                       /* RM: 0 */     0,
+                       /* RM: 1 */     0,
+                       /* RM: 2 */     0,
+                       /* RM: 3 */     0,
+                       /* RM: 4 */     0,
+                       /* RM: 5 */     0,
+                       /* RM: 6 */     0,
+                       /* RM: 7 */     0
+               },
+               /* MOD: 3 */ {
+                       /* RM: 0 */     0,
+                       /* RM: 1 */     0,
+                       /* RM: 2 */     0,
+                       /* RM: 3 */     0,
+                       /* RM: 4 */     0,
+                       /* RM: 5 */     0,
+                       /* RM: 6 */     0,
+                       /* RM: 7 */     0
+               }
+       },
+
+       /* Effective Addressing Mode: ptem_16bit. */ {
+               /* MOD: 0 */ {
+                       /* RM: 0 */     0,
+                       /* RM: 1 */     0,
+                       /* RM: 2 */     0,
+                       /* RM: 3 */     0,
+                       /* RM: 4 */     0,
+                       /* RM: 5 */     0,
+                       /* RM: 6 */     0,
+                       /* RM: 7 */     0

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to