summaryrefslogtreecommitdiff
path: root/TrEE/inc
diff options
context:
space:
mode:
authorkarlf <[email protected]>2016-08-11 13:28:13 -0700
committerkarlf <[email protected]>2016-08-11 13:28:13 -0700
commit96eb96dfb613e4c745db6bd1f53a92fe7e2290fc (patch)
treead5f3ede5cbcd6b598677ce41bcf8318471bdd92 /TrEE/inc
parent687b274aa38fd05c8c26e3068932121876d7f745 (diff)
Updated for "Windows 10 Anniversary Update" (Version 1607)
Diffstat (limited to 'TrEE/inc')
-rw-r--r--TrEE/inc/SampleOSService.h66
-rw-r--r--TrEE/inc/SampleSecureService.h72
2 files changed, 138 insertions, 0 deletions
diff --git a/TrEE/inc/SampleOSService.h b/TrEE/inc/SampleOSService.h
new file mode 100644
index 00000000..57811456
--- /dev/null
+++ b/TrEE/inc/SampleOSService.h
@@ -0,0 +1,66 @@
+#pragma once
+
+//
+// Echo service
+// GUID {33C7FF13-50B0-454A-8BEB-F73EED6C0AF9}
+//
+DEFINE_GUID(GUID_ECHO_SERVICE,
+ 0x33c7ff13, 0x50b0, 0x454a, 0x8b, 0xeb, 0xf7, 0x3e, 0xed, 0x6c, 0xa, 0xf9);
+
+//
+// Copies the content of input buffer to output buffer
+//
+#define ECHO_SERVICE_ECHO 1
+
+//
+// Repeats the content of input buffer to output buffer
+//
+#define ECHO_SERVICE_REPEAT 2
+
+//
+// Copies the bytes of input buffer to output buffer in reverse order
+//
+#define ECHO_SERVICE_REVERSE 3
+
+//
+// Kernel memory service
+// {D28698A4-3B07-4F34-B65E-AE3DA6ACF2AC}
+//
+DEFINE_GUID(GUID_KERNEL_MEMORY_SERVICE,
+ 0xd28698a4, 0x3b07, 0x4f34, 0xb6, 0x5e, 0xae, 0x3d, 0xa6, 0xac, 0xf2, 0xac);
+
+//
+// Get a safe range of kernel address space that can be read from
+//
+// Input: None
+// Output: KERNEL_MEMORY_SAFE_RANGE
+//
+
+typedef struct _KERNEL_MEMORY_SAFE_RANGE {
+ ULONG64 Base;
+ ULONG Length;
+} KERNEL_MEMORY_SAFE_RANGE, *PKERNEL_MEMORY_SAFE_RANGE;
+
+#define KERNEL_MEMORY_SERVICE_GET_SAFE_RANGE 1
+
+//
+// Write a byte to kernel address space
+//
+// Input: KERNEL_MEMORY_WRITE_BYTE
+// Output: Previous UCHAR value at the address
+//
+
+typedef struct _KERNEL_MEMORY_WRITE_BYTE {
+ ULONG64 Address;
+ UCHAR Value;
+} KERNEL_MEMORY_WRITE_BYTE, *PKERNEL_MEMORY_WRITE_BYTE;
+
+#define KERNEL_MEMORY_SERVICE_WRITE_BYTE 2
+
+//
+// Read a byte from kernel address space
+//
+// Input: ULONG64 address of kernel memory to read
+// Output: UCHAR
+//
+#define KERNEL_MEMORY_SERVICE_READ_BYTE 3 \ No newline at end of file
diff --git a/TrEE/inc/SampleSecureService.h b/TrEE/inc/SampleSecureService.h
new file mode 100644
index 00000000..66ab6141
--- /dev/null
+++ b/TrEE/inc/SampleSecureService.h
@@ -0,0 +1,72 @@
+#pragma once
+
+//
+// Sample test service
+// {4AFA2AF5-0912-407B-8B12-AFFF4047672A}
+//
+DEFINE_GUID(GUID_SAMPLE_TEST_SERVICE,
+ 0x4afa2af5, 0x912, 0x407b, 0x8b, 0x12, 0xaf, 0xff, 0x40, 0x47, 0x67, 0x2a);
+
+//
+// Writes classic L"Hello, world!" message to output buffer.
+//
+#define TEST_SERVICE_HELLO_WORLD 1
+
+//
+// Writes 64-bit timestamp returned from KeQueryInterruptTimePrecise to output
+// buffer.
+//
+#define TEST_SERVICE_GET_INTERRUPT_TIME 2
+
+//
+// A request that is only available from kernel mode
+//
+// Input: None
+// Output: None
+#define TEST_SERVICE_KERNEL_ONLY 3
+
+//
+// The request will be completed asynchronously after given delay
+//
+// Input: ULONG (delay in msec)
+// Output: ULONG (0x12345678)
+#define TEST_SERVICE_DELAYED_COMPLETION 4
+
+//
+// Sample test service consuming sample OS service
+// {D69482F9-7347-431A-8409-F625BEB3469D}
+//
+DEFINE_GUID(GUID_SAMPLE_TEST2_SERVICE,
+ 0xd69482f9, 0x7347, 0x431a, 0x84, 0x9, 0xf6, 0x25, 0xbe, 0xb3, 0x46, 0x9d);
+
+//
+// Copies contents of input buffer to output buffer
+//
+#define TEST2_SERVICE_ECHO 1
+
+//
+// Copies contents of input buffer to output buffer twice, reversed
+//
+#define TEST2_SERVICE_ECHO_TWICE_REVERSED 2
+
+//
+// Other service I/O example
+//
+
+//
+// The request will be complete asynchronously after 1 second
+// Input : NULL-terminated WCHAR[], size includes the terminating NULL character
+// Output : None
+//
+#define IOCTL_TEST_DELAYED_COMPLETION CTL_CODE(FILE_DEVICE_TRUST_ENV, 0x800, METHOD_BUFFERED, FILE_ANY_ACCESS)
+
+//
+// Other device I/O example
+//
+
+//
+// Prints a string to debugger through DbgPrintEx
+// Input : NULL-terminated WCHAR[], size includes the terminating NULL character
+// Output : None
+//
+#define IOCTL_SAMPLE_DBGPRINT CTL_CODE(FILE_DEVICE_TRUST_ENV, 0x800, METHOD_BUFFERED, FILE_ANY_ACCESS) \ No newline at end of file