leechcorepyc 2.18.9__tar.gz → 2.19.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (91) hide show
  1. {leechcorepyc-2.18.9/leechcorepyc.egg-info → leechcorepyc-2.19.2}/PKG-INFO +1 -1
  2. {leechcorepyc-2.18.9 → leechcorepyc-2.19.2}/includes/leechcore.h +1 -1
  3. {leechcorepyc-2.18.9 → leechcorepyc-2.19.2}/leechcore/device_fpga.c +198 -65
  4. {leechcorepyc-2.18.9 → leechcorepyc-2.19.2}/leechcore/device_hibr.c +1 -0
  5. {leechcorepyc-2.18.9 → leechcorepyc-2.19.2}/leechcore/leechcore.h +1 -1
  6. {leechcorepyc-2.18.9 → leechcorepyc-2.19.2}/leechcore/leechrpc_c.c +56 -31
  7. {leechcorepyc-2.18.9 → leechcorepyc-2.19.2}/leechcore/leechrpc_h.h +1 -1
  8. {leechcorepyc-2.18.9 → leechcorepyc-2.19.2}/leechcore/ob/ob.h +28 -14
  9. {leechcorepyc-2.18.9 → leechcorepyc-2.19.2}/leechcore/ob/ob_bytequeue.c +16 -12
  10. {leechcorepyc-2.18.9 → leechcorepyc-2.19.2}/leechcore/ob/ob_map.c +932 -928
  11. {leechcorepyc-2.18.9 → leechcorepyc-2.19.2}/leechcore/version.h +3 -3
  12. {leechcorepyc-2.18.9 → leechcorepyc-2.19.2}/leechcore_device_rawtcp/version.h +3 -3
  13. {leechcorepyc-2.18.9 → leechcorepyc-2.19.2/leechcorepyc.egg-info}/PKG-INFO +1 -1
  14. {leechcorepyc-2.18.9 → leechcorepyc-2.19.2}/setup.py +1 -1
  15. {leechcorepyc-2.18.9 → leechcorepyc-2.19.2}/MANIFEST.in +0 -0
  16. {leechcorepyc-2.18.9 → leechcorepyc-2.19.2}/Makefile +0 -0
  17. {leechcorepyc-2.18.9 → leechcorepyc-2.19.2}/README +0 -0
  18. {leechcorepyc-2.18.9 → leechcorepyc-2.19.2}/files/dummy +0 -0
  19. {leechcorepyc-2.18.9 → leechcorepyc-2.19.2}/includes/leechcore_device.h +0 -0
  20. {leechcorepyc-2.18.9 → leechcorepyc-2.19.2}/includes/libpdbcrust.h +0 -0
  21. {leechcorepyc-2.18.9 → leechcorepyc-2.19.2}/includes/vmmdll.h +0 -0
  22. {leechcorepyc-2.18.9 → leechcorepyc-2.19.2}/includes/vmmyara.h +0 -0
  23. {leechcorepyc-2.18.9 → leechcorepyc-2.19.2}/leechcore/Makefile +0 -0
  24. {leechcorepyc-2.18.9 → leechcorepyc-2.19.2}/leechcore/device_file.c +0 -0
  25. {leechcorepyc-2.18.9 → leechcorepyc-2.19.2}/leechcore/device_pmem.c +0 -0
  26. {leechcorepyc-2.18.9 → leechcorepyc-2.19.2}/leechcore/device_tmd.c +0 -0
  27. {leechcorepyc-2.18.9 → leechcorepyc-2.19.2}/leechcore/device_usb3380.c +0 -0
  28. {leechcorepyc-2.18.9 → leechcorepyc-2.19.2}/leechcore/device_vmm.c +0 -0
  29. {leechcorepyc-2.18.9 → leechcorepyc-2.19.2}/leechcore/device_vmware.c +0 -0
  30. {leechcorepyc-2.18.9 → leechcorepyc-2.19.2}/leechcore/leechcore.c +0 -0
  31. {leechcorepyc-2.18.9 → leechcorepyc-2.19.2}/leechcore/leechcore.rc +0 -0
  32. {leechcorepyc-2.18.9 → leechcorepyc-2.19.2}/leechcore/leechcore_device.h +0 -0
  33. {leechcorepyc-2.18.9 → leechcorepyc-2.19.2}/leechcore/leechcore_internal.h +0 -0
  34. {leechcorepyc-2.18.9 → leechcorepyc-2.19.2}/leechcore/leechrpc.h +0 -0
  35. {leechcorepyc-2.18.9 → leechcorepyc-2.19.2}/leechcore/leechrpc.idl +0 -0
  36. {leechcorepyc-2.18.9 → leechcorepyc-2.19.2}/leechcore/leechrpcclient.c +0 -0
  37. {leechcorepyc-2.18.9 → leechcorepyc-2.19.2}/leechcore/leechrpcshared.c +0 -0
  38. {leechcorepyc-2.18.9 → leechcorepyc-2.19.2}/leechcore/memmap.c +0 -0
  39. {leechcorepyc-2.18.9 → leechcorepyc-2.19.2}/leechcore/ob/ob_core.c +0 -0
  40. {leechcorepyc-2.18.9 → leechcorepyc-2.19.2}/leechcore/ob/ob_set.c +0 -0
  41. {leechcorepyc-2.18.9 → leechcorepyc-2.19.2}/leechcore/oscompatibility.c +0 -0
  42. {leechcorepyc-2.18.9 → leechcorepyc-2.19.2}/leechcore/oscompatibility.h +0 -0
  43. {leechcorepyc-2.18.9 → leechcorepyc-2.19.2}/leechcore/util.c +0 -0
  44. {leechcorepyc-2.18.9 → leechcorepyc-2.19.2}/leechcore/util.h +0 -0
  45. {leechcorepyc-2.18.9 → leechcorepyc-2.19.2}/leechcore_device_qemu/Makefile +0 -0
  46. {leechcorepyc-2.18.9 → leechcorepyc-2.19.2}/leechcore_device_qemu/leechcore_device_qemu.c +0 -0
  47. {leechcorepyc-2.18.9 → leechcorepyc-2.19.2}/leechcore_device_rawtcp/Makefile +0 -0
  48. {leechcorepyc-2.18.9 → leechcorepyc-2.19.2}/leechcore_device_rawtcp/leechcore_device_rawtcp.c +0 -0
  49. {leechcorepyc-2.18.9 → leechcorepyc-2.19.2}/leechcore_device_rawtcp/oscompatibility.c +0 -0
  50. {leechcorepyc-2.18.9 → leechcorepyc-2.19.2}/leechcore_device_rawtcp/oscompatibility.h +0 -0
  51. {leechcorepyc-2.18.9 → leechcorepyc-2.19.2}/leechcore_device_rawtcp/plugin.rc +0 -0
  52. {leechcorepyc-2.18.9 → leechcorepyc-2.19.2}/leechcore_device_rawtcp/resource.h +0 -0
  53. {leechcorepyc-2.18.9 → leechcorepyc-2.19.2}/leechcore_ft601_driver_linux/Makefile +0 -0
  54. {leechcorepyc-2.18.9 → leechcorepyc-2.19.2}/leechcore_ft601_driver_linux/fpga_libusb.c +0 -0
  55. {leechcorepyc-2.18.9 → leechcorepyc-2.19.2}/leechcore_ft601_driver_linux/fpga_libusb.h +0 -0
  56. {leechcorepyc-2.18.9 → leechcorepyc-2.19.2}/leechcore_ft601_driver_linux/leechcore_ft601_driver_linux.c +0 -0
  57. {leechcorepyc-2.18.9 → leechcorepyc-2.19.2}/leechcore_ft601_driver_linux/leechcore_ft601_driver_linux.h +0 -0
  58. {leechcorepyc-2.18.9 → leechcorepyc-2.19.2}/leechcorepyc/__init__.py +0 -0
  59. {leechcorepyc-2.18.9 → leechcorepyc-2.19.2}/leechcorepyc.c +0 -0
  60. {leechcorepyc-2.18.9 → leechcorepyc-2.19.2}/leechcorepyc.egg-info/SOURCES.txt +0 -0
  61. {leechcorepyc-2.18.9 → leechcorepyc-2.19.2}/leechcorepyc.egg-info/dependency_links.txt +0 -0
  62. {leechcorepyc-2.18.9 → leechcorepyc-2.19.2}/leechcorepyc.egg-info/top_level.txt +0 -0
  63. {leechcorepyc-2.18.9 → leechcorepyc-2.19.2}/leechcorepyc.h +0 -0
  64. {leechcorepyc-2.18.9 → leechcorepyc-2.19.2}/leechcorepyc_barrequest.c +0 -0
  65. {leechcorepyc-2.18.9 → leechcorepyc-2.19.2}/ms-compress/Makefile +0 -0
  66. {leechcorepyc-2.18.9 → leechcorepyc-2.19.2}/ms-compress/include/lznt1.h +0 -0
  67. {leechcorepyc-2.18.9 → leechcorepyc-2.19.2}/ms-compress/include/mscomp/Array.h +0 -0
  68. {leechcorepyc-2.18.9 → leechcorepyc-2.19.2}/ms-compress/include/mscomp/Bitstream.h +0 -0
  69. {leechcorepyc-2.18.9 → leechcorepyc-2.19.2}/ms-compress/include/mscomp/CircularBuffer.h +0 -0
  70. {leechcorepyc-2.18.9 → leechcorepyc-2.19.2}/ms-compress/include/mscomp/HuffmanDecoder.h +0 -0
  71. {leechcorepyc-2.18.9 → leechcorepyc-2.19.2}/ms-compress/include/mscomp/HuffmanEncoder.h +0 -0
  72. {leechcorepyc-2.18.9 → leechcorepyc-2.19.2}/ms-compress/include/mscomp/LZNT1Dictionary.h +0 -0
  73. {leechcorepyc-2.18.9 → leechcorepyc-2.19.2}/ms-compress/include/mscomp/LZNT1Dictionary_SA.h +0 -0
  74. {leechcorepyc-2.18.9 → leechcorepyc-2.19.2}/ms-compress/include/mscomp/XpressDictionary.h +0 -0
  75. {leechcorepyc-2.18.9 → leechcorepyc-2.19.2}/ms-compress/include/mscomp/config.h +0 -0
  76. {leechcorepyc-2.18.9 → leechcorepyc-2.19.2}/ms-compress/include/mscomp/general.h +0 -0
  77. {leechcorepyc-2.18.9 → leechcorepyc-2.19.2}/ms-compress/include/mscomp/internal.h +0 -0
  78. {leechcorepyc-2.18.9 → leechcorepyc-2.19.2}/ms-compress/include/mscomp/sorting.h +0 -0
  79. {leechcorepyc-2.18.9 → leechcorepyc-2.19.2}/ms-compress/include/mscomp.h +0 -0
  80. {leechcorepyc-2.18.9 → leechcorepyc-2.19.2}/ms-compress/include/xpress.h +0 -0
  81. {leechcorepyc-2.18.9 → leechcorepyc-2.19.2}/ms-compress/include/xpress_huff.h +0 -0
  82. {leechcorepyc-2.18.9 → leechcorepyc-2.19.2}/ms-compress/src/lznt1_compress.cpp +0 -0
  83. {leechcorepyc-2.18.9 → leechcorepyc-2.19.2}/ms-compress/src/lznt1_decompress.cpp +0 -0
  84. {leechcorepyc-2.18.9 → leechcorepyc-2.19.2}/ms-compress/src/mscomp.cpp +0 -0
  85. {leechcorepyc-2.18.9 → leechcorepyc-2.19.2}/ms-compress/src/xpress_compress.cpp +0 -0
  86. {leechcorepyc-2.18.9 → leechcorepyc-2.19.2}/ms-compress/src/xpress_decompress.cpp +0 -0
  87. {leechcorepyc-2.18.9 → leechcorepyc-2.19.2}/ms-compress/src/xpress_huff_compress.cpp +0 -0
  88. {leechcorepyc-2.18.9 → leechcorepyc-2.19.2}/ms-compress/src/xpress_huff_decompress.cpp +0 -0
  89. {leechcorepyc-2.18.9 → leechcorepyc-2.19.2}/oscompatibility.c +0 -0
  90. {leechcorepyc-2.18.9 → leechcorepyc-2.19.2}/oscompatibility.h +0 -0
  91. {leechcorepyc-2.18.9 → leechcorepyc-2.19.2}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 1.2
2
2
  Name: leechcorepyc
3
- Version: 2.18.9
3
+ Version: 2.19.2
4
4
  Summary: LeechCore for Python
5
5
  Home-page: https://github.com/ufrisk/LeechCore
6
6
  Author: Ulf Frisk
@@ -14,7 +14,7 @@
14
14
  // (c) Ulf Frisk, 2020-2024
15
15
  // Author: Ulf Frisk, pcileech@frizk.net
16
16
  //
17
- // Header Version: 2.18.4
17
+ // Header Version: 2.19.0
18
18
  //
19
19
 
20
20
  #ifndef __LEECHCORE_H__
@@ -73,7 +73,9 @@ typedef struct tdDEV_CFG_PHY {
73
73
  } rd;
74
74
  } DEV_CFG_PHY, *PDEV_CFG_PHY;
75
75
 
76
- #define DEVICE_PERFORMANCE_VERSION 1
76
+ #define DEVICE_PERFORMANCE_FLAG_FASTWRITE 0x1
77
+
78
+ #define DEVICE_PERFORMANCE_VERSION 2
77
79
  typedef struct tdDEVICE_PERFORMANCE {
78
80
  DWORD VERSION;
79
81
  LPSTR SZ_DEVICE_NAME;
@@ -90,6 +92,7 @@ typedef struct tdDEVICE_PERFORMANCE {
90
92
  DWORD ASYNC_MAX_READSIZE;
91
93
  DWORD ASYNC_DELAY_1;
92
94
  DWORD ASYNC_DELAY_2;
95
+ DWORD FLAGS;
93
96
  } DEVICE_PERFORMANCE, *PDEVICE_PERFORMANCE;
94
97
 
95
98
  typedef union tdFPGA_HANDLESOCKET {
@@ -125,32 +128,32 @@ typedef union tdFPGA_HANDLESOCKET {
125
128
  #define DEVICE_ID_MAX 0x18
126
129
 
127
130
  const DEVICE_PERFORMANCE PERFORMANCE_PROFILES[DEVICE_ID_MAX + 1] = {
128
- { .VERSION = DEVICE_PERFORMANCE_VERSION, .SZ_DEVICE_NAME = "SP605 / FT601", .PROBE_MAXPAGES = 0x400, .RX_FLUSH_LIMIT = 0x8000, .MAX_SIZE_RX = 0x1f000, .MAX_SIZE_TX = 0x2000, .DELAY_PROBE_READ = 500, .DELAY_PROBE_WRITE = 0, .DELAY_WRITE = 175, .DELAY_READ = 400, .RETRY_ON_ERROR = 0, .F_TINY = 0, .ASYNC_MAX_READSIZE = 0x10000, .ASYNC_DELAY_1 = 5, .ASYNC_DELAY_2 = 5 },
131
+ { .VERSION = DEVICE_PERFORMANCE_VERSION, .SZ_DEVICE_NAME = "SP605 / FT601", .PROBE_MAXPAGES = 0x400, .RX_FLUSH_LIMIT = 0x8000, .MAX_SIZE_RX = 0x1f000, .MAX_SIZE_TX = 0x2000, .DELAY_PROBE_READ = 500, .DELAY_PROBE_WRITE = 0, .DELAY_WRITE = 175, .DELAY_READ = 400, .RETRY_ON_ERROR = 0, .F_TINY = 0, .ASYNC_MAX_READSIZE = 0x10000, .ASYNC_DELAY_1 = 5, .ASYNC_DELAY_2 = 5, .FLAGS = 0 },
129
132
  // The PCIeScreamer R1 have a problem with the PCIe link stability which results on lost or delayed TLPS - workarounds are in place to retry after a delay.
130
- { .VERSION = DEVICE_PERFORMANCE_VERSION, .SZ_DEVICE_NAME = "PCIeScreamer R1", .PROBE_MAXPAGES = 0x400, .RX_FLUSH_LIMIT = 0, .MAX_SIZE_RX = 0x1c000, .MAX_SIZE_TX = 0x3f0, .DELAY_PROBE_READ = 1000, .DELAY_PROBE_WRITE = 150, .DELAY_WRITE = 0, .DELAY_READ = 500, .RETRY_ON_ERROR = 1, .F_TINY = 0, .ASYNC_MAX_READSIZE = 0x10000, .ASYNC_DELAY_1 = 5, .ASYNC_DELAY_2 = 5 },
131
- { .VERSION = DEVICE_PERFORMANCE_VERSION, .SZ_DEVICE_NAME = "AC701 / FT601", .PROBE_MAXPAGES = 0x400, .RX_FLUSH_LIMIT = 0, .MAX_SIZE_RX = 0x1c000, .MAX_SIZE_TX = 0x3f0, .DELAY_PROBE_READ = 500, .DELAY_PROBE_WRITE = 0, .DELAY_WRITE = 0, .DELAY_READ = 300, .RETRY_ON_ERROR = 1, .F_TINY = 0, .ASYNC_MAX_READSIZE = 0x10000, .ASYNC_DELAY_1 = 5, .ASYNC_DELAY_2 = 5 },
132
- { .VERSION = DEVICE_PERFORMANCE_VERSION, .SZ_DEVICE_NAME = "PCIeScreamer R2", .PROBE_MAXPAGES = 0x400, .RX_FLUSH_LIMIT = 0, .MAX_SIZE_RX = 0x1c000, .MAX_SIZE_TX = 0x3f0, .DELAY_PROBE_READ = 750, .DELAY_PROBE_WRITE = 150, .DELAY_WRITE = 0, .DELAY_READ = 400, .RETRY_ON_ERROR = 1, .F_TINY = 0, .ASYNC_MAX_READSIZE = 0x10000, .ASYNC_DELAY_1 = 5, .ASYNC_DELAY_2 = 5 },
133
- { .VERSION = DEVICE_PERFORMANCE_VERSION, .SZ_DEVICE_NAME = "ScreamerM2", .PROBE_MAXPAGES = 0x400, .RX_FLUSH_LIMIT = 0, .MAX_SIZE_RX = 0x1c000, .MAX_SIZE_TX = 0x3f0, .DELAY_PROBE_READ = 500, .DELAY_PROBE_WRITE = 150, .DELAY_WRITE = 25, .DELAY_READ = 300, .RETRY_ON_ERROR = 1, .F_TINY = 0, .ASYNC_MAX_READSIZE = 0x10000, .ASYNC_DELAY_1 = 5, .ASYNC_DELAY_2 = 5 },
134
- { .VERSION = DEVICE_PERFORMANCE_VERSION, .SZ_DEVICE_NAME = "NeTV2 RawUDP", .PROBE_MAXPAGES = 0x400, .RX_FLUSH_LIMIT = 0, .MAX_SIZE_RX = 0x1c000, .MAX_SIZE_TX = 0x400, .DELAY_PROBE_READ = 0, .DELAY_PROBE_WRITE = 0, .DELAY_WRITE = 0, .DELAY_READ = 0, .RETRY_ON_ERROR = 0, .F_TINY = 0, .ASYNC_MAX_READSIZE = 0x10000, .ASYNC_DELAY_1 = 5, .ASYNC_DELAY_2 = 5 },
135
- { .VERSION = DEVICE_PERFORMANCE_VERSION, .SZ_DEVICE_NAME = "Unsupported", .PROBE_MAXPAGES = 0x400, .RX_FLUSH_LIMIT = 0, .MAX_SIZE_RX = 0x14000, .MAX_SIZE_TX = 0x3f0, .DELAY_PROBE_READ = 500, .DELAY_PROBE_WRITE = 150, .DELAY_WRITE = 35, .DELAY_READ = 350, .RETRY_ON_ERROR = 1, .F_TINY = 0, .ASYNC_MAX_READSIZE = 0x10000, .ASYNC_DELAY_1 = 5, .ASYNC_DELAY_2 = 5 },
136
- { .VERSION = DEVICE_PERFORMANCE_VERSION, .SZ_DEVICE_NAME = "Unsupported", .PROBE_MAXPAGES = 0x400, .RX_FLUSH_LIMIT = 0, .MAX_SIZE_RX = 0x14000, .MAX_SIZE_TX = 0x3f0, .DELAY_PROBE_READ = 500, .DELAY_PROBE_WRITE = 150, .DELAY_WRITE = 35, .DELAY_READ = 350, .RETRY_ON_ERROR = 1, .F_TINY = 0, .ASYNC_MAX_READSIZE = 0x10000, .ASYNC_DELAY_1 = 5, .ASYNC_DELAY_2 = 5 },
137
- { .VERSION = DEVICE_PERFORMANCE_VERSION, .SZ_DEVICE_NAME = "FT2232H #1", .PROBE_MAXPAGES = 0x400, .RX_FLUSH_LIMIT = 0, .MAX_SIZE_RX = 0x30000, .MAX_SIZE_TX = 0x8000, .DELAY_PROBE_READ = 1000, .DELAY_PROBE_WRITE = 150, .DELAY_WRITE = 0, .DELAY_READ = 0, .RETRY_ON_ERROR = 1, .F_TINY = 0, .ASYNC_MAX_READSIZE = 0x10000, .ASYNC_DELAY_1 = 5, .ASYNC_DELAY_2 = 5 },
138
- { .VERSION = DEVICE_PERFORMANCE_VERSION, .SZ_DEVICE_NAME = "Enigma X1", .PROBE_MAXPAGES = 0x400, .RX_FLUSH_LIMIT = 0, .MAX_SIZE_RX = 0x1c000, .MAX_SIZE_TX = 0x13f0, .DELAY_PROBE_READ = 500, .DELAY_PROBE_WRITE = 150, .DELAY_WRITE = 10, .DELAY_READ = 250, .RETRY_ON_ERROR = 1, .F_TINY = 0, .ASYNC_MAX_READSIZE = 0x10000, .ASYNC_DELAY_1 = 5, .ASYNC_DELAY_2 = 5 },
139
- { .VERSION = DEVICE_PERFORMANCE_VERSION, .SZ_DEVICE_NAME = "Enigma X1 (FutureUse)", .PROBE_MAXPAGES = 0x400, .RX_FLUSH_LIMIT = 0, .MAX_SIZE_RX = 0x30000, .MAX_SIZE_TX = 0x13f0, .DELAY_PROBE_READ = 500, .DELAY_PROBE_WRITE = 150, .DELAY_WRITE = 10, .DELAY_READ = 250, .RETRY_ON_ERROR = 1, .F_TINY = 0, .ASYNC_MAX_READSIZE = 0x10000, .ASYNC_DELAY_1 = 5, .ASYNC_DELAY_2 = 5 },
140
- { .VERSION = DEVICE_PERFORMANCE_VERSION, .SZ_DEVICE_NAME = "ScreamerM2x4", .PROBE_MAXPAGES = 0x400, .RX_FLUSH_LIMIT = 0, .MAX_SIZE_RX = 0x14000, .MAX_SIZE_TX = 0x3f0, .DELAY_PROBE_READ = 500, .DELAY_PROBE_WRITE = 150, .DELAY_WRITE = 25, .DELAY_READ = 300, .RETRY_ON_ERROR = 1, .F_TINY = 0, .ASYNC_MAX_READSIZE = 0x10000, .ASYNC_DELAY_1 = 5, .ASYNC_DELAY_2 = 5 },
141
- { .VERSION = DEVICE_PERFORMANCE_VERSION, .SZ_DEVICE_NAME = "PCIeSquirrel", .PROBE_MAXPAGES = 0x400, .RX_FLUSH_LIMIT = 0, .MAX_SIZE_RX = 0x1c000, .MAX_SIZE_TX = 0x3f0, .DELAY_PROBE_READ = 500, .DELAY_PROBE_WRITE = 150, .DELAY_WRITE = 25, .DELAY_READ = 300, .RETRY_ON_ERROR = 1, .F_TINY = 0, .ASYNC_MAX_READSIZE = 0x10000, .ASYNC_DELAY_1 = 5, .ASYNC_DELAY_2 = 5 },
142
- { .VERSION = DEVICE_PERFORMANCE_VERSION, .SZ_DEVICE_NAME = "Device #13N", .PROBE_MAXPAGES = 0x400, .RX_FLUSH_LIMIT = 0, .MAX_SIZE_RX = 0x14000, .MAX_SIZE_TX = 0x3f0, .DELAY_PROBE_READ = 500, .DELAY_PROBE_WRITE = 150, .DELAY_WRITE = 35, .DELAY_READ = 350, .RETRY_ON_ERROR = 1, .F_TINY = 0, .ASYNC_MAX_READSIZE = 0x10000, .ASYNC_DELAY_1 = 5, .ASYNC_DELAY_2 = 5 },
143
- { .VERSION = DEVICE_PERFORMANCE_VERSION, .SZ_DEVICE_NAME = "Device #14T", .PROBE_MAXPAGES = 0x400, .RX_FLUSH_LIMIT = 0, .MAX_SIZE_RX = 0x14000, .MAX_SIZE_TX = 0x3f0, .DELAY_PROBE_READ = 500, .DELAY_PROBE_WRITE = 150, .DELAY_WRITE = 35, .DELAY_READ = 350, .RETRY_ON_ERROR = 1, .F_TINY = 1, .ASYNC_MAX_READSIZE = 0x10000, .ASYNC_DELAY_1 = 5, .ASYNC_DELAY_2 = 5 },
144
- { .VERSION = DEVICE_PERFORMANCE_VERSION, .SZ_DEVICE_NAME = "Device #15N", .PROBE_MAXPAGES = 0x400, .RX_FLUSH_LIMIT = 0, .MAX_SIZE_RX = 0x30000, .MAX_SIZE_TX = 0x13f0, .DELAY_PROBE_READ = 500, .DELAY_PROBE_WRITE = 150, .DELAY_WRITE = 15, .DELAY_READ = 300, .RETRY_ON_ERROR = 1, .F_TINY = 0, .ASYNC_MAX_READSIZE = 0x10000, .ASYNC_DELAY_1 = 5, .ASYNC_DELAY_2 = 5 },
145
- { .VERSION = DEVICE_PERFORMANCE_VERSION, .SZ_DEVICE_NAME = "Device #16T", .PROBE_MAXPAGES = 0x400, .RX_FLUSH_LIMIT = 0, .MAX_SIZE_RX = 0x30000, .MAX_SIZE_TX = 0x13f0, .DELAY_PROBE_READ = 500, .DELAY_PROBE_WRITE = 150, .DELAY_WRITE = 15, .DELAY_READ = 300, .RETRY_ON_ERROR = 1, .F_TINY = 1, .ASYNC_MAX_READSIZE = 0x10000, .ASYNC_DELAY_1 = 5, .ASYNC_DELAY_2 = 5 },
146
- { .VERSION = DEVICE_PERFORMANCE_VERSION, .SZ_DEVICE_NAME = "DRIVER_SUPPLIED", .PROBE_MAXPAGES = 0, .RX_FLUSH_LIMIT = 0, .MAX_SIZE_RX = 0, .MAX_SIZE_TX = 0, .DELAY_PROBE_READ = 0, .DELAY_PROBE_WRITE = 0, .DELAY_WRITE = 0 , .DELAY_READ = 0, .RETRY_ON_ERROR = 0, .F_TINY = 0, .ASYNC_MAX_READSIZE = 0, .ASYNC_DELAY_1 = 0, .ASYNC_DELAY_2 = 0 },
147
- { .VERSION = DEVICE_PERFORMANCE_VERSION, .SZ_DEVICE_NAME = "DRIVER_SUPPLIED", .PROBE_MAXPAGES = 0, .RX_FLUSH_LIMIT = 0, .MAX_SIZE_RX = 0, .MAX_SIZE_TX = 0, .DELAY_PROBE_READ = 0, .DELAY_PROBE_WRITE = 0, .DELAY_WRITE = 0 , .DELAY_READ = 0, .RETRY_ON_ERROR = 0, .F_TINY = 0, .ASYNC_MAX_READSIZE = 0, .ASYNC_DELAY_1 = 0, .ASYNC_DELAY_2 = 0 },
148
- { .VERSION = DEVICE_PERFORMANCE_VERSION, .SZ_DEVICE_NAME = "DRIVER_SUPPLIED", .PROBE_MAXPAGES = 0, .RX_FLUSH_LIMIT = 0, .MAX_SIZE_RX = 0, .MAX_SIZE_TX = 0, .DELAY_PROBE_READ = 0, .DELAY_PROBE_WRITE = 0, .DELAY_WRITE = 0 , .DELAY_READ = 0, .RETRY_ON_ERROR = 0, .F_TINY = 0, .ASYNC_MAX_READSIZE = 0, .ASYNC_DELAY_1 = 0, .ASYNC_DELAY_2 = 0 },
149
- { .VERSION = DEVICE_PERFORMANCE_VERSION, .SZ_DEVICE_NAME = "DRIVER_SUPPLIED", .PROBE_MAXPAGES = 0, .RX_FLUSH_LIMIT = 0, .MAX_SIZE_RX = 0, .MAX_SIZE_TX = 0, .DELAY_PROBE_READ = 0, .DELAY_PROBE_WRITE = 0, .DELAY_WRITE = 0 , .DELAY_READ = 0, .RETRY_ON_ERROR = 0, .F_TINY = 0, .ASYNC_MAX_READSIZE = 0, .ASYNC_DELAY_1 = 0, .ASYNC_DELAY_2 = 0 },
150
- { .VERSION = DEVICE_PERFORMANCE_VERSION, .SZ_DEVICE_NAME = "DRIVER_SUPPLIED", .PROBE_MAXPAGES = 0, .RX_FLUSH_LIMIT = 0, .MAX_SIZE_RX = 0, .MAX_SIZE_TX = 0, .DELAY_PROBE_READ = 0, .DELAY_PROBE_WRITE = 0, .DELAY_WRITE = 0 , .DELAY_READ = 0, .RETRY_ON_ERROR = 0, .F_TINY = 0, .ASYNC_MAX_READSIZE = 0, .ASYNC_DELAY_1 = 0, .ASYNC_DELAY_2 = 0 },
151
- { .VERSION = DEVICE_PERFORMANCE_VERSION, .SZ_DEVICE_NAME = "DRIVER_SUPPLIED", .PROBE_MAXPAGES = 0, .RX_FLUSH_LIMIT = 0, .MAX_SIZE_RX = 0, .MAX_SIZE_TX = 0, .DELAY_PROBE_READ = 0, .DELAY_PROBE_WRITE = 0, .DELAY_WRITE = 0 , .DELAY_READ = 0, .RETRY_ON_ERROR = 0, .F_TINY = 0, .ASYNC_MAX_READSIZE = 0, .ASYNC_DELAY_1 = 0, .ASYNC_DELAY_2 = 0 },
152
- { .VERSION = DEVICE_PERFORMANCE_VERSION, .SZ_DEVICE_NAME = "DRIVER_SUPPLIED", .PROBE_MAXPAGES = 0, .RX_FLUSH_LIMIT = 0, .MAX_SIZE_RX = 0, .MAX_SIZE_TX = 0, .DELAY_PROBE_READ = 0, .DELAY_PROBE_WRITE = 0, .DELAY_WRITE = 0 , .DELAY_READ = 0, .RETRY_ON_ERROR = 0, .F_TINY = 0, .ASYNC_MAX_READSIZE = 0, .ASYNC_DELAY_1 = 0, .ASYNC_DELAY_2 = 0 },
153
- { .VERSION = DEVICE_PERFORMANCE_VERSION, .SZ_DEVICE_NAME = "DRIVER_SUPPLIED", .PROBE_MAXPAGES = 0, .RX_FLUSH_LIMIT = 0, .MAX_SIZE_RX = 0, .MAX_SIZE_TX = 0, .DELAY_PROBE_READ = 0, .DELAY_PROBE_WRITE = 0, .DELAY_WRITE = 0 , .DELAY_READ = 0, .RETRY_ON_ERROR = 0, .F_TINY = 0, .ASYNC_MAX_READSIZE = 0, .ASYNC_DELAY_1 = 0, .ASYNC_DELAY_2 = 0 },
133
+ { .VERSION = DEVICE_PERFORMANCE_VERSION, .SZ_DEVICE_NAME = "PCIeScreamer R1", .PROBE_MAXPAGES = 0x400, .RX_FLUSH_LIMIT = 0, .MAX_SIZE_RX = 0x1c000, .MAX_SIZE_TX = 0x3f0, .DELAY_PROBE_READ = 1000, .DELAY_PROBE_WRITE = 150, .DELAY_WRITE = 0, .DELAY_READ = 500, .RETRY_ON_ERROR = 1, .F_TINY = 0, .ASYNC_MAX_READSIZE = 0x10000, .ASYNC_DELAY_1 = 5, .ASYNC_DELAY_2 = 5, .FLAGS = 0 },
134
+ { .VERSION = DEVICE_PERFORMANCE_VERSION, .SZ_DEVICE_NAME = "AC701 / FT601", .PROBE_MAXPAGES = 0x400, .RX_FLUSH_LIMIT = 0, .MAX_SIZE_RX = 0x1c000, .MAX_SIZE_TX = 0x3f0, .DELAY_PROBE_READ = 500, .DELAY_PROBE_WRITE = 0, .DELAY_WRITE = 0, .DELAY_READ = 300, .RETRY_ON_ERROR = 1, .F_TINY = 0, .ASYNC_MAX_READSIZE = 0x10000, .ASYNC_DELAY_1 = 5, .ASYNC_DELAY_2 = 5, .FLAGS = 0 },
135
+ { .VERSION = DEVICE_PERFORMANCE_VERSION, .SZ_DEVICE_NAME = "PCIeScreamer R2", .PROBE_MAXPAGES = 0x400, .RX_FLUSH_LIMIT = 0, .MAX_SIZE_RX = 0x1c000, .MAX_SIZE_TX = 0x3f0, .DELAY_PROBE_READ = 750, .DELAY_PROBE_WRITE = 150, .DELAY_WRITE = 0, .DELAY_READ = 400, .RETRY_ON_ERROR = 1, .F_TINY = 0, .ASYNC_MAX_READSIZE = 0x10000, .ASYNC_DELAY_1 = 5, .ASYNC_DELAY_2 = 5, .FLAGS = 0 },
136
+ { .VERSION = DEVICE_PERFORMANCE_VERSION, .SZ_DEVICE_NAME = "ScreamerM2", .PROBE_MAXPAGES = 0x400, .RX_FLUSH_LIMIT = 0, .MAX_SIZE_RX = 0x1c000, .MAX_SIZE_TX = 0x3f0, .DELAY_PROBE_READ = 500, .DELAY_PROBE_WRITE = 150, .DELAY_WRITE = 25, .DELAY_READ = 300, .RETRY_ON_ERROR = 1, .F_TINY = 0, .ASYNC_MAX_READSIZE = 0x10000, .ASYNC_DELAY_1 = 5, .ASYNC_DELAY_2 = 5, .FLAGS = 0 },
137
+ { .VERSION = DEVICE_PERFORMANCE_VERSION, .SZ_DEVICE_NAME = "NeTV2 RawUDP", .PROBE_MAXPAGES = 0x400, .RX_FLUSH_LIMIT = 0, .MAX_SIZE_RX = 0x1c000, .MAX_SIZE_TX = 0x400, .DELAY_PROBE_READ = 0, .DELAY_PROBE_WRITE = 0, .DELAY_WRITE = 0, .DELAY_READ = 0, .RETRY_ON_ERROR = 0, .F_TINY = 0, .ASYNC_MAX_READSIZE = 0x10000, .ASYNC_DELAY_1 = 5, .ASYNC_DELAY_2 = 5, .FLAGS = 0 },
138
+ { .VERSION = DEVICE_PERFORMANCE_VERSION, .SZ_DEVICE_NAME = "Unsupported", .PROBE_MAXPAGES = 0x400, .RX_FLUSH_LIMIT = 0, .MAX_SIZE_RX = 0x14000, .MAX_SIZE_TX = 0x3f0, .DELAY_PROBE_READ = 500, .DELAY_PROBE_WRITE = 150, .DELAY_WRITE = 35, .DELAY_READ = 350, .RETRY_ON_ERROR = 1, .F_TINY = 0, .ASYNC_MAX_READSIZE = 0x10000, .ASYNC_DELAY_1 = 5, .ASYNC_DELAY_2 = 5, .FLAGS = 0 },
139
+ { .VERSION = DEVICE_PERFORMANCE_VERSION, .SZ_DEVICE_NAME = "Unsupported", .PROBE_MAXPAGES = 0x400, .RX_FLUSH_LIMIT = 0, .MAX_SIZE_RX = 0x14000, .MAX_SIZE_TX = 0x3f0, .DELAY_PROBE_READ = 500, .DELAY_PROBE_WRITE = 150, .DELAY_WRITE = 35, .DELAY_READ = 350, .RETRY_ON_ERROR = 1, .F_TINY = 0, .ASYNC_MAX_READSIZE = 0x10000, .ASYNC_DELAY_1 = 5, .ASYNC_DELAY_2 = 5, .FLAGS = 0 },
140
+ { .VERSION = DEVICE_PERFORMANCE_VERSION, .SZ_DEVICE_NAME = "FT2232H #1", .PROBE_MAXPAGES = 0x400, .RX_FLUSH_LIMIT = 0, .MAX_SIZE_RX = 0x30000, .MAX_SIZE_TX = 0x8000, .DELAY_PROBE_READ = 1000, .DELAY_PROBE_WRITE = 150, .DELAY_WRITE = 0, .DELAY_READ = 0, .RETRY_ON_ERROR = 1, .F_TINY = 0, .ASYNC_MAX_READSIZE = 0x10000, .ASYNC_DELAY_1 = 5, .ASYNC_DELAY_2 = 5, .FLAGS = 0 },
141
+ { .VERSION = DEVICE_PERFORMANCE_VERSION, .SZ_DEVICE_NAME = "Enigma X1", .PROBE_MAXPAGES = 0x400, .RX_FLUSH_LIMIT = 0, .MAX_SIZE_RX = 0x1c000, .MAX_SIZE_TX = 0x3f0, .DELAY_PROBE_READ = 500, .DELAY_PROBE_WRITE = 150, .DELAY_WRITE = 25, .DELAY_READ = 300, .RETRY_ON_ERROR = 1, .F_TINY = 0, .ASYNC_MAX_READSIZE = 0x10000, .ASYNC_DELAY_1 = 5, .ASYNC_DELAY_2 = 5, .FLAGS = 0 },
142
+ { .VERSION = DEVICE_PERFORMANCE_VERSION, .SZ_DEVICE_NAME = "Enigma X1 (FutureUse)", .PROBE_MAXPAGES = 0x400, .RX_FLUSH_LIMIT = 0, .MAX_SIZE_RX = 0x30000, .MAX_SIZE_TX = 0x13f0, .DELAY_PROBE_READ = 500, .DELAY_PROBE_WRITE = 150, .DELAY_WRITE = 10, .DELAY_READ = 250, .RETRY_ON_ERROR = 1, .F_TINY = 0, .ASYNC_MAX_READSIZE = 0x10000, .ASYNC_DELAY_1 = 5, .ASYNC_DELAY_2 = 5, .FLAGS = 0 },
143
+ { .VERSION = DEVICE_PERFORMANCE_VERSION, .SZ_DEVICE_NAME = "ScreamerM2x4", .PROBE_MAXPAGES = 0x400, .RX_FLUSH_LIMIT = 0, .MAX_SIZE_RX = 0x14000, .MAX_SIZE_TX = 0x3f0, .DELAY_PROBE_READ = 500, .DELAY_PROBE_WRITE = 150, .DELAY_WRITE = 25, .DELAY_READ = 300, .RETRY_ON_ERROR = 1, .F_TINY = 0, .ASYNC_MAX_READSIZE = 0x10000, .ASYNC_DELAY_1 = 5, .ASYNC_DELAY_2 = 5, .FLAGS = 0 },
144
+ { .VERSION = DEVICE_PERFORMANCE_VERSION, .SZ_DEVICE_NAME = "PCIeSquirrel", .PROBE_MAXPAGES = 0x400, .RX_FLUSH_LIMIT = 0, .MAX_SIZE_RX = 0x1c000, .MAX_SIZE_TX = 0x3f0, .DELAY_PROBE_READ = 500, .DELAY_PROBE_WRITE = 150, .DELAY_WRITE = 25, .DELAY_READ = 300, .RETRY_ON_ERROR = 1, .F_TINY = 0, .ASYNC_MAX_READSIZE = 0x10000, .ASYNC_DELAY_1 = 5, .ASYNC_DELAY_2 = 5, .FLAGS = 0 },
145
+ { .VERSION = DEVICE_PERFORMANCE_VERSION, .SZ_DEVICE_NAME = "Device #13N", .PROBE_MAXPAGES = 0x400, .RX_FLUSH_LIMIT = 0, .MAX_SIZE_RX = 0x14000, .MAX_SIZE_TX = 0x3f0, .DELAY_PROBE_READ = 500, .DELAY_PROBE_WRITE = 150, .DELAY_WRITE = 35, .DELAY_READ = 350, .RETRY_ON_ERROR = 1, .F_TINY = 0, .ASYNC_MAX_READSIZE = 0x10000, .ASYNC_DELAY_1 = 5, .ASYNC_DELAY_2 = 5, .FLAGS = 0 },
146
+ { .VERSION = DEVICE_PERFORMANCE_VERSION, .SZ_DEVICE_NAME = "Device #14T", .PROBE_MAXPAGES = 0x400, .RX_FLUSH_LIMIT = 0, .MAX_SIZE_RX = 0x14000, .MAX_SIZE_TX = 0x3f0, .DELAY_PROBE_READ = 500, .DELAY_PROBE_WRITE = 150, .DELAY_WRITE = 35, .DELAY_READ = 350, .RETRY_ON_ERROR = 1, .F_TINY = 1, .ASYNC_MAX_READSIZE = 0x10000, .ASYNC_DELAY_1 = 5, .ASYNC_DELAY_2 = 5, .FLAGS = 0 },
147
+ { .VERSION = DEVICE_PERFORMANCE_VERSION, .SZ_DEVICE_NAME = "Device #15N", .PROBE_MAXPAGES = 0x400, .RX_FLUSH_LIMIT = 0, .MAX_SIZE_RX = 0x30000, .MAX_SIZE_TX = 0x13f0, .DELAY_PROBE_READ = 500, .DELAY_PROBE_WRITE = 150, .DELAY_WRITE = 15, .DELAY_READ = 300, .RETRY_ON_ERROR = 1, .F_TINY = 0, .ASYNC_MAX_READSIZE = 0x10000, .ASYNC_DELAY_1 = 5, .ASYNC_DELAY_2 = 5, .FLAGS = 0 },
148
+ { .VERSION = DEVICE_PERFORMANCE_VERSION, .SZ_DEVICE_NAME = "Device #16T", .PROBE_MAXPAGES = 0x400, .RX_FLUSH_LIMIT = 0, .MAX_SIZE_RX = 0x30000, .MAX_SIZE_TX = 0x13f0, .DELAY_PROBE_READ = 500, .DELAY_PROBE_WRITE = 150, .DELAY_WRITE = 15, .DELAY_READ = 300, .RETRY_ON_ERROR = 1, .F_TINY = 1, .ASYNC_MAX_READSIZE = 0x10000, .ASYNC_DELAY_1 = 5, .ASYNC_DELAY_2 = 5, .FLAGS = 0 },
149
+ { .VERSION = DEVICE_PERFORMANCE_VERSION, .SZ_DEVICE_NAME = "DRIVER_SUPPLIED", .PROBE_MAXPAGES = 0, .RX_FLUSH_LIMIT = 0, .MAX_SIZE_RX = 0, .MAX_SIZE_TX = 0, .DELAY_PROBE_READ = 0, .DELAY_PROBE_WRITE = 0, .DELAY_WRITE = 0 , .DELAY_READ = 0, .RETRY_ON_ERROR = 0, .F_TINY = 0, .ASYNC_MAX_READSIZE = 0, .ASYNC_DELAY_1 = 0, .ASYNC_DELAY_2 = 0, .FLAGS = 0 },
150
+ { .VERSION = DEVICE_PERFORMANCE_VERSION, .SZ_DEVICE_NAME = "DRIVER_SUPPLIED", .PROBE_MAXPAGES = 0, .RX_FLUSH_LIMIT = 0, .MAX_SIZE_RX = 0, .MAX_SIZE_TX = 0, .DELAY_PROBE_READ = 0, .DELAY_PROBE_WRITE = 0, .DELAY_WRITE = 0 , .DELAY_READ = 0, .RETRY_ON_ERROR = 0, .F_TINY = 0, .ASYNC_MAX_READSIZE = 0, .ASYNC_DELAY_1 = 0, .ASYNC_DELAY_2 = 0, .FLAGS = 0 },
151
+ { .VERSION = DEVICE_PERFORMANCE_VERSION, .SZ_DEVICE_NAME = "DRIVER_SUPPLIED", .PROBE_MAXPAGES = 0, .RX_FLUSH_LIMIT = 0, .MAX_SIZE_RX = 0, .MAX_SIZE_TX = 0, .DELAY_PROBE_READ = 0, .DELAY_PROBE_WRITE = 0, .DELAY_WRITE = 0 , .DELAY_READ = 0, .RETRY_ON_ERROR = 0, .F_TINY = 0, .ASYNC_MAX_READSIZE = 0, .ASYNC_DELAY_1 = 0, .ASYNC_DELAY_2 = 0, .FLAGS = 0 },
152
+ { .VERSION = DEVICE_PERFORMANCE_VERSION, .SZ_DEVICE_NAME = "DRIVER_SUPPLIED", .PROBE_MAXPAGES = 0, .RX_FLUSH_LIMIT = 0, .MAX_SIZE_RX = 0, .MAX_SIZE_TX = 0, .DELAY_PROBE_READ = 0, .DELAY_PROBE_WRITE = 0, .DELAY_WRITE = 0 , .DELAY_READ = 0, .RETRY_ON_ERROR = 0, .F_TINY = 0, .ASYNC_MAX_READSIZE = 0, .ASYNC_DELAY_1 = 0, .ASYNC_DELAY_2 = 0, .FLAGS = 0 },
153
+ { .VERSION = DEVICE_PERFORMANCE_VERSION, .SZ_DEVICE_NAME = "DRIVER_SUPPLIED", .PROBE_MAXPAGES = 0, .RX_FLUSH_LIMIT = 0, .MAX_SIZE_RX = 0, .MAX_SIZE_TX = 0, .DELAY_PROBE_READ = 0, .DELAY_PROBE_WRITE = 0, .DELAY_WRITE = 0 , .DELAY_READ = 0, .RETRY_ON_ERROR = 0, .F_TINY = 0, .ASYNC_MAX_READSIZE = 0, .ASYNC_DELAY_1 = 0, .ASYNC_DELAY_2 = 0, .FLAGS = 0 },
154
+ { .VERSION = DEVICE_PERFORMANCE_VERSION, .SZ_DEVICE_NAME = "DRIVER_SUPPLIED", .PROBE_MAXPAGES = 0, .RX_FLUSH_LIMIT = 0, .MAX_SIZE_RX = 0, .MAX_SIZE_TX = 0, .DELAY_PROBE_READ = 0, .DELAY_PROBE_WRITE = 0, .DELAY_WRITE = 0 , .DELAY_READ = 0, .RETRY_ON_ERROR = 0, .F_TINY = 0, .ASYNC_MAX_READSIZE = 0, .ASYNC_DELAY_1 = 0, .ASYNC_DELAY_2 = 0, .FLAGS = 0 },
155
+ { .VERSION = DEVICE_PERFORMANCE_VERSION, .SZ_DEVICE_NAME = "DRIVER_SUPPLIED", .PROBE_MAXPAGES = 0, .RX_FLUSH_LIMIT = 0, .MAX_SIZE_RX = 0, .MAX_SIZE_TX = 0, .DELAY_PROBE_READ = 0, .DELAY_PROBE_WRITE = 0, .DELAY_WRITE = 0 , .DELAY_READ = 0, .RETRY_ON_ERROR = 0, .F_TINY = 0, .ASYNC_MAX_READSIZE = 0, .ASYNC_DELAY_1 = 0, .ASYNC_DELAY_2 = 0, .FLAGS = 0 },
156
+ { .VERSION = DEVICE_PERFORMANCE_VERSION, .SZ_DEVICE_NAME = "DRIVER_SUPPLIED", .PROBE_MAXPAGES = 0, .RX_FLUSH_LIMIT = 0, .MAX_SIZE_RX = 0, .MAX_SIZE_TX = 0, .DELAY_PROBE_READ = 0, .DELAY_PROBE_WRITE = 0, .DELAY_WRITE = 0 , .DELAY_READ = 0, .RETRY_ON_ERROR = 0, .F_TINY = 0, .ASYNC_MAX_READSIZE = 0, .ASYNC_DELAY_1 = 0, .ASYNC_DELAY_2 = 0, .FLAGS = 0 },
154
157
  };
155
158
 
156
159
  /*
@@ -235,6 +238,12 @@ typedef struct tdDEVICE_CONTEXT_FPGA {
235
238
  DWORD cb;
236
239
  DWORD cbMax;
237
240
  } txbuf;
241
+ struct {
242
+ PBYTE pb;
243
+ DWORD cb;
244
+ DWORD cbMax;
245
+ SRWLOCK LockSRW;
246
+ } txbuf_fastwrite;
238
247
  struct {
239
248
  HMODULE hModule;
240
249
  BOOL fInitialized;
@@ -1157,6 +1166,7 @@ VOID DeviceFPGA_Close(_Inout_ PLC_CONTEXT ctxLC)
1157
1166
  Ob_DECREF(ctx->async2.pmQueue);
1158
1167
  LocalFree(ctx->rxbuf.pb);
1159
1168
  LocalFree(ctx->txbuf.pb);
1169
+ LocalFree(ctx->txbuf_fastwrite.pb);
1160
1170
  LocalFree(ctx);
1161
1171
  ctxLC->hDevice = 0;
1162
1172
  }
@@ -1840,9 +1850,15 @@ VOID DeviceFPGA_GetDeviceID_FpgaVersion(_In_ PDEVICE_CONTEXT_FPGA ctx)
1840
1850
  VOID DeviceFPGA_SetPerformanceProfile(_Inout_ PDEVICE_CONTEXT_FPGA ctx)
1841
1851
  {
1842
1852
  if((ctx->wFpgaID >= DEVICE_ID_DRIVER_SUPPLIED_0) && (ctx->wFpgaID <= DEVICE_ID_DRIVER_SUPPLIED_7)) {
1843
- if(ctx->dev.pfnLcSetPerformanceProfile && (0 == ctx->dev.pfnLcSetPerformanceProfile(&ctx->perf, DEVICE_PERFORMANCE_VERSION, ctx->wFpgaID))) {
1853
+ if(!ctx->dev.pfnLcSetPerformanceProfile) {
1854
+ printf("DEVICE: FPGA: ERROR! Unable to locate performance profile export.\n");
1844
1855
  return;
1845
1856
  }
1857
+ if((0 != ctx->dev.pfnLcSetPerformanceProfile(&ctx->perf, DEVICE_PERFORMANCE_VERSION, ctx->wFpgaID))) {
1858
+ printf("DEVICE: FPGA: ERROR! Unable to load performance profile - ensure leechcore.dll/so and leechcore_driver.dll/so are compatible!\n");
1859
+ return;
1860
+ }
1861
+ return; // driver-supplied performance profile loaded successfully!
1846
1862
  }
1847
1863
  memcpy(&ctx->perf, &PERFORMANCE_PROFILES[(ctx->wFpgaID <= DEVICE_ID_MAX) ? ctx->wFpgaID : 0], sizeof(DEVICE_PERFORMANCE));
1848
1864
  }
@@ -2128,6 +2144,59 @@ BOOL DeviceFPGA_TxTlp(_In_ PLC_CONTEXT ctxLC, _In_ PDEVICE_CONTEXT_FPGA ctx, _In
2128
2144
  return TRUE;
2129
2145
  }
2130
2146
 
2147
+ /*
2148
+ * Fast transmit of packets, this is meant to transmit packets which does not
2149
+ * require any reply and only if the underlying device supports async write ops.
2150
+ * I.e. the flag DEVICE_PERFORMANCE_FLAG_FASTWRITE must be set.
2151
+ */
2152
+ _Success_(return)
2153
+ BOOL DeviceFPGA_TxTlp_FastWrite_NoLock(_In_ PLC_CONTEXT ctxLC, _In_ PDEVICE_CONTEXT_FPGA ctx, _In_reads_(cbTlp) PBYTE pbTlp, _In_ DWORD cbTlp, _In_ BOOL fRdKeepalive, _In_ BOOL fFlush)
2154
+ {
2155
+ DWORD status;
2156
+ PBYTE pbTx;
2157
+ QWORD i;
2158
+ DWORD cbTx, cbTxed = 0;
2159
+ if(cbTlp & 0x3) { return FALSE; }
2160
+ if(cbTlp > 4 * 4 + 128) { return FALSE; }
2161
+ if(cbTlp && (ctx->txbuf_fastwrite.cb + (cbTlp << 1) + (fFlush ? 8 : 0) >= ctx->perf.MAX_SIZE_TX)) {
2162
+ if(!DeviceFPGA_TxTlp_FastWrite_NoLock(ctxLC, ctx, NULL, 0, FALSE, TRUE)) { return FALSE; }
2163
+ }
2164
+ if(ctxLC->fPrintf[LC_PRINTF_VVV] && cbTlp) {
2165
+ TLP_Print(ctxLC, pbTlp, cbTlp, TRUE);
2166
+ }
2167
+ // prepare transmit buffer
2168
+ AcquireSRWLockExclusive(&ctx->txbuf_fastwrite.LockSRW); // DeviceFPGA_TxTlp_FastWrite_NoLock is called outside the main lock, implement its own locking to keep buffer consistent.
2169
+ pbTx = ctx->txbuf_fastwrite.pb + ctx->txbuf_fastwrite.cb;
2170
+ cbTx = 2 * cbTlp;
2171
+ for(i = 0; i < cbTlp; i += 4) {
2172
+ *(PDWORD)(pbTx + (i << 1)) = *(PDWORD)(pbTlp + i);
2173
+ *(PDWORD)(pbTx + ((i << 1) + 4)) = 0x77000000; // TX TLP
2174
+ }
2175
+ if(cbTlp) {
2176
+ *(PDWORD)(pbTx + ((i << 1) - 4)) = 0x77040000; // TX TLP VALID LAST
2177
+ }
2178
+ if(fRdKeepalive) {
2179
+ cbTx += 8;
2180
+ *(PDWORD)(pbTx + (i << 1)) = 0xffeeddcc;
2181
+ *(PDWORD)(pbTx + ((i << 1) + 4)) = 0x77020000; // LOOPBACK TX
2182
+ }
2183
+ ctx->txbuf_fastwrite.cb += cbTx;
2184
+ // transmit
2185
+ if((ctx->txbuf_fastwrite.cb >= ctx->perf.MAX_SIZE_TX) || (fFlush && ctx->txbuf_fastwrite.cb)) {
2186
+ status = ctx->dev.pfnFT_WritePipe(ctx->dev.hFTDI, 0x02, ctx->txbuf_fastwrite.pb, ctx->txbuf_fastwrite.cb, &cbTxed, NULL);
2187
+ if(status == 0x20) {
2188
+ DeviceFPGA_ReInitializeFTDI(ctx); // try recovery if possible.
2189
+ status = ctx->dev.pfnFT_WritePipe(ctx->dev.hFTDI, 0x02, ctx->txbuf_fastwrite.pb, ctx->txbuf_fastwrite.cb, &cbTxed, NULL);
2190
+ }
2191
+ ctx->txbuf_fastwrite.cb = 0;
2192
+ BusySleep(ctx->perf.DELAY_WRITE);
2193
+ ReleaseSRWLockExclusive(&ctx->txbuf_fastwrite.LockSRW);
2194
+ return (0 == status);
2195
+ }
2196
+ ReleaseSRWLockExclusive(&ctx->txbuf_fastwrite.LockSRW);
2197
+ return TRUE;
2198
+ }
2199
+
2131
2200
  /*
2132
2201
  * Prepare a single TLP for the user-set custom callback function and dispatch.
2133
2202
  */
@@ -2151,6 +2220,22 @@ VOID DeviceFPGA_RxTlp_UserCallback(_In_ PLC_CONTEXT ctxLC, _In_ PDEVICE_CONTEXT_
2151
2220
  if(szTlpText) { LocalFree(szTlpText); }
2152
2221
  }
2153
2222
 
2223
+ /*
2224
+ * Queue a received TLP for user callback by the user-callback thread.
2225
+ */
2226
+ VOID DeviceFPGA_RxTlp_QueueUserCallback(_In_ PDEVICE_CONTEXT_FPGA ctx, _In_ SIZE_T cbTlp, _In_ PBYTE pbTlp)
2227
+ {
2228
+ DWORD hdrDwBuf;
2229
+ PTLP_HDR hdr = (PTLP_HDR)&hdrDwBuf;
2230
+ if(ctx->tlp_callback.fNoCpl && (cbTlp >= 4)) {
2231
+ hdrDwBuf = _byteswap_ulong(*(PDWORD)pbTlp);
2232
+ if((hdr->TypeFmt == TLP_Cpl) || (hdr->TypeFmt == TLP_CplD) || (hdr->TypeFmt == TLP_CplLk) || (hdr->TypeFmt == TLP_CplDLk)) {
2233
+ return;
2234
+ }
2235
+ }
2236
+ ObByteQueue_Push(ctx->tlp_callback.pBqRx, 0, cbTlp, pbTlp);
2237
+ }
2238
+
2154
2239
  VOID DeviceFPGA_Synch_RxTlpSynchronous(_In_ PLC_CONTEXT ctxLC, _In_ PDEVICE_CONTEXT_FPGA ctx, _In_opt_ DWORD dwBytesToRead)
2155
2240
  {
2156
2241
  DWORD status;
@@ -2203,7 +2288,9 @@ VOID DeviceFPGA_Synch_RxTlpSynchronous(_In_ PLC_CONTEXT ctxLC, _In_ PDEVICE_CONT
2203
2288
  if(ctxLC->fPrintf[LC_PRINTF_VVV]) {
2204
2289
  TLP_Print(ctxLC, pbTlp, cdwTlp << 2, FALSE);
2205
2290
  }
2206
- ObByteQueue_Push(ctx->tlp_callback.pBqRx, 0, (SIZE_T)cdwTlp << 2, pbTlp);
2291
+ if(ctx->tlp_callback.pBqRx) {
2292
+ DeviceFPGA_RxTlp_QueueUserCallback(ctx, (SIZE_T)cdwTlp << 2, pbTlp);
2293
+ }
2207
2294
  if(ctx->hRxTlpCallbackFn) {
2208
2295
  ctx->hRxTlpCallbackFn(ctx->pMRdBufferX, pbTlp, cdwTlp << 2);
2209
2296
  }
@@ -2510,7 +2597,7 @@ DWORD DeviceFPGA_Async2_Read_RxTlpSingle(_In_ PLC_CONTEXT ctxLC, _In_ PDEVICE_CO
2510
2597
  TLP_Print(ctxLC, pbTlp, cdwTlp << 2, FALSE);
2511
2598
  }
2512
2599
  if(ctx->tlp_callback.pBqRx) {
2513
- ObByteQueue_Push(ctx->tlp_callback.pBqRx, 0, (SIZE_T)cdwTlp << 2, pbTlp);
2600
+ DeviceFPGA_RxTlp_QueueUserCallback(ctx, (SIZE_T)cdwTlp << 2, pbTlp);
2514
2601
  }
2515
2602
  DeviceFPGA_Async2_Read_RxTlpSingle_MRdCpl(ctxLC, ctx, pbTlp, cdwTlp << 2);
2516
2603
  pdwData[iStartWord] = pdwData[iStartWord] | (0xffffffff >> (28 - (j << 2)));
@@ -2959,7 +3046,7 @@ DWORD DeviceFPGA_SynchOldAsync_Tlp(_In_ PLC_CONTEXT ctxLC, _In_ PDEVICE_CONTEXT_
2959
3046
  TLP_Print(ctxLC, pbTlp, cdwTlp << 2, FALSE);
2960
3047
  }
2961
3048
  if(ctx->tlp_callback.pBqRx) {
2962
- ObByteQueue_Push(ctx->tlp_callback.pBqRx, 0, (SIZE_T)cdwTlp << 2, pbTlp);
3049
+ DeviceFPGA_RxTlp_QueueUserCallback(ctx, (SIZE_T)cdwTlp << 2, pbTlp);
2963
3050
  }
2964
3051
  if(ctx->hRxTlpCallbackFn) {
2965
3052
  ctx->hRxTlpCallbackFn(ctx->pMRdBufferX, pbTlp, cdwTlp << 2);
@@ -3061,14 +3148,15 @@ DWORD DeviceFPGA_Tlp_Callback_ThreadProc(_In_ PLC_CONTEXT ctxLC)
3061
3148
  {
3062
3149
  PDEVICE_CONTEXT_FPGA ctx = (PDEVICE_CONTEXT_FPGA)ctxLC->hDevice;
3063
3150
  BOOL fActiveRun;
3064
- DWORD dwInactiveCount = 0;
3065
3151
  BYTE pbTlp[TLP_RX_MAX_SIZE];
3066
3152
  SIZE_T cbTlp;
3153
+ QWORD tcInactivity = GetTickCount64();
3154
+ POB_BYTEQUEUE pObBqRx_Terminate = NULL, pObBqTx_Terminate = NULL;
3067
3155
  if(ctx->tlp_callback.fThread) { return 1; }
3068
3156
  ctx->tlp_callback.fThread = TRUE;
3069
3157
  InterlockedIncrement(&ctxLC->dwHandleCount); // increment device handle count
3070
- if(!(ctx->tlp_callback.pBqRx = ObByteQueue_New(NULL, 0x00100000))) { goto fail; }
3071
- if(!(ctx->tlp_callback.pBqTx = ObByteQueue_New(NULL, 0x00100000))) { goto fail; }
3158
+ if(!(ctx->tlp_callback.pBqRx = ObByteQueue_New(NULL, 0x01000000))) { goto fail; } // 16MB
3159
+ if(!(ctx->tlp_callback.pBqTx = ObByteQueue_New(NULL, 0x00100000))) { goto fail; } // 1MB
3072
3160
  while(TRUE) {
3073
3161
  fActiveRun = FALSE;
3074
3162
  // Exit criteria?:
@@ -3077,24 +3165,40 @@ DWORD DeviceFPGA_Tlp_Callback_ThreadProc(_In_ PLC_CONTEXT ctxLC)
3077
3165
  }
3078
3166
  // TRANSMIT / RECEIVE TLPs:
3079
3167
  // (only if there are no already queued received TLPs to process):
3080
- if((0 == ObByteQueue_Size(ctx->tlp_callback.pBqRx)) && TryEnterCriticalSection(&ctx->Lock)) {
3168
+ if(0 == ObByteQueue_Size(ctx->tlp_callback.pBqRx)) {
3169
+ // Write TLPs (if any):
3081
3170
  if(ObByteQueue_Size(ctx->tlp_callback.pBqTx)) {
3082
- fActiveRun = TRUE;
3083
- while(ObByteQueue_Pop(ctx->tlp_callback.pBqTx, NULL, sizeof(pbTlp), pbTlp, &cbTlp)) {
3084
- DeviceFPGA_TxTlp(ctxLC, ctx, pbTlp, (DWORD)cbTlp, FALSE, FALSE);
3171
+ if(ctx->perf.FLAGS & DEVICE_PERFORMANCE_FLAG_FASTWRITE) {
3172
+ // fast "async" write:
3173
+ fActiveRun = TRUE;
3174
+ while(ObByteQueue_Pop(ctx->tlp_callback.pBqTx, NULL, sizeof(pbTlp), pbTlp, &cbTlp)) {
3175
+ DeviceFPGA_TxTlp_FastWrite_NoLock(ctxLC, ctx, pbTlp, (DWORD)cbTlp, FALSE, FALSE);
3176
+ }
3177
+ DeviceFPGA_TxTlp_FastWrite_NoLock(ctxLC, ctx, NULL, 0, FALSE, TRUE);
3178
+ }
3179
+ else if(TryEnterCriticalSection(&ctx->Lock)) {
3180
+ // "sync" write (when fast write is not supported by the device):
3181
+ fActiveRun = TRUE;
3182
+ while(ObByteQueue_Pop(ctx->tlp_callback.pBqTx, NULL, sizeof(pbTlp), pbTlp, &cbTlp)) {
3183
+ DeviceFPGA_TxTlp(ctxLC, ctx, pbTlp, (DWORD)cbTlp, FALSE, FALSE);
3184
+ }
3185
+ DeviceFPGA_TxTlp(ctxLC, ctx, NULL, 0, TRUE, TRUE);
3186
+ LeaveCriticalSection(&ctx->Lock);
3085
3187
  }
3086
- DeviceFPGA_TxTlp(ctxLC, ctx, NULL, 0, TRUE, TRUE);
3087
3188
  }
3088
- if(ctx->async2.fEnabled) {
3089
- if(ctx->async2.fOldAsync) {
3090
- DeviceFPGA_SynchOldAsync_RxTlpAsynchronous(ctxLC, ctx, ctx->perf.MAX_SIZE_RX);
3189
+ // Read TLPs (if no thread is already processing them):
3190
+ if(TryEnterCriticalSection(&ctx->Lock)) {
3191
+ if(ctx->async2.fEnabled) {
3192
+ if(ctx->async2.fOldAsync) {
3193
+ DeviceFPGA_SynchOldAsync_RxTlpAsynchronous(ctxLC, ctx, ctx->perf.MAX_SIZE_RX);
3194
+ } else {
3195
+ DeviceFPGA_Async2_ReadOnlyFast_DoWork(ctxLC, ctx);
3196
+ }
3091
3197
  } else {
3092
- DeviceFPGA_Async2_ReadOnlyFast_DoWork(ctxLC, ctx);
3198
+ DeviceFPGA_Synch_RxTlpSynchronous(ctxLC, ctx, 0x00100000);
3093
3199
  }
3094
- } else {
3095
- DeviceFPGA_Synch_RxTlpSynchronous(ctxLC, ctx, 0x00100000);
3200
+ LeaveCriticalSection(&ctx->Lock);
3096
3201
  }
3097
- LeaveCriticalSection(&ctx->Lock);
3098
3202
  }
3099
3203
  // PROCESS RECEIVED TLPs:
3100
3204
  while(ObByteQueue_Pop(ctx->tlp_callback.pBqRx, NULL, sizeof(pbTlp), pbTlp, &cbTlp)) {
@@ -3112,20 +3216,21 @@ DWORD DeviceFPGA_Tlp_Callback_ThreadProc(_In_ PLC_CONTEXT ctxLC)
3112
3216
  }
3113
3217
  // SLEEP (if inactive):
3114
3218
  if(fActiveRun) {
3115
- dwInactiveCount = 0;
3116
- } else if(dwInactiveCount < 1000) {
3117
- dwInactiveCount++;
3118
- Sleep(1);
3119
- } else if(dwInactiveCount < 2000) {
3120
- dwInactiveCount++;
3121
- Sleep(5);
3219
+ tcInactivity = GetTickCount64();
3220
+ } else if((GetTickCount64() - tcInactivity) < 1000) { // 1s inactivity
3221
+ BusySleep(5); // 5uS "sleep"
3222
+ } else if((GetTickCount64() - tcInactivity) < 15000) { // 15s inactivity
3223
+ BusySleep(50); // 50uS "sleep"
3122
3224
  } else {
3123
- Sleep(25);
3225
+ Sleep(16); // 16ms sleep
3124
3226
  }
3125
3227
  }
3126
3228
  fail:
3127
- Ob_DECREF_NULL(&ctx->tlp_callback.pBqRx);
3128
- Ob_DECREF_NULL(&ctx->tlp_callback.pBqTx);
3229
+ pObBqRx_Terminate = ctx->tlp_callback.pBqRx; ctx->tlp_callback.pBqRx = NULL;
3230
+ pObBqTx_Terminate = ctx->tlp_callback.pBqTx; ctx->tlp_callback.pBqTx = NULL;
3231
+ Sleep(16);
3232
+ Ob_DECREF(pObBqRx_Terminate);
3233
+ Ob_DECREF(pObBqTx_Terminate);
3129
3234
  ctx->tlp_callback.fThread = FALSE;
3130
3235
  LcClose(ctxLC); // decrement handle count (and close if required)
3131
3236
  return 1;
@@ -3272,7 +3377,11 @@ BOOL DeviceFPGA_WriteMEM_TXP(_In_ PLC_CONTEXT ctxLC, _Inout_ PDEVICE_CONTEXT_FPG
3272
3377
  memcpy(pbTlp + 16, pb, cb);
3273
3378
  cbTlp = (16 + cb + 3) & ~0x3;
3274
3379
  }
3275
- return DeviceFPGA_TxTlp(ctxLC, ctx, pbTlp, cbTlp, FALSE, FALSE);
3380
+ if(ctx->perf.FLAGS & DEVICE_PERFORMANCE_FLAG_FASTWRITE) {
3381
+ return DeviceFPGA_TxTlp_FastWrite_NoLock(ctxLC, ctx, pbTlp, cbTlp, FALSE, FALSE);
3382
+ } else {
3383
+ return DeviceFPGA_TxTlp(ctxLC, ctx, pbTlp, cbTlp, FALSE, FALSE);
3384
+ }
3276
3385
  }
3277
3386
 
3278
3387
  VOID DeviceFPGA_WriteScatter(_In_ PLC_CONTEXT ctxLC, _In_ DWORD cpMEMs, _Inout_ PPMEM_SCATTER ppMEMs)
@@ -3314,13 +3423,20 @@ VOID DeviceFPGA_WriteScatter(_In_ PLC_CONTEXT ctxLC, _In_ DWORD cpMEMs, _Inout_
3314
3423
  }
3315
3424
  pMEM->f = TRUE;
3316
3425
  }
3317
- DeviceFPGA_TxTlp(ctxLC, ctx, NULL, 0, FALSE, TRUE) && result; // Flush and Return.
3426
+ // Flush & return
3427
+ if(ctx->perf.FLAGS & DEVICE_PERFORMANCE_FLAG_FASTWRITE) {
3428
+ DeviceFPGA_TxTlp_FastWrite_NoLock(ctxLC, ctx, NULL, 0, FALSE, TRUE);
3429
+ } else {
3430
+ DeviceFPGA_TxTlp(ctxLC, ctx, NULL, 0, FALSE, TRUE);
3431
+ }
3318
3432
  }
3319
3433
 
3320
3434
  VOID DeviceFPGA_WriteScatter_DoLock(_In_ PLC_CONTEXT ctxLC, _In_ DWORD cpMEMs, _Inout_ PPMEM_SCATTER ppMEMs)
3321
3435
  {
3322
3436
  PDEVICE_CONTEXT_FPGA ctx = (PDEVICE_CONTEXT_FPGA)ctxLC->hDevice;
3323
- if(ctx->async2.fEnabled) {
3437
+ if(ctx->perf.FLAGS & DEVICE_PERFORMANCE_FLAG_FASTWRITE) {
3438
+ DeviceFPGA_WriteScatter(ctxLC, cpMEMs, ppMEMs);
3439
+ } else if(ctx->async2.fEnabled) {
3324
3440
  DeviceFPGA_Async2_WriteScatter(ctxLC, cpMEMs, ppMEMs);
3325
3441
  } else {
3326
3442
  EnterCriticalSection(&ctx->Lock);
@@ -3509,21 +3625,35 @@ BOOL DeviceFPGA_Command_DoLock(_In_ PLC_CONTEXT ctxLC, _In_ QWORD fOption, _In_
3509
3625
  if(ctx->tlp_callback.pBqRx) {
3510
3626
  switch(qwOptionHi) {
3511
3627
  case LC_CMD_FPGA_TLP_WRITE_SINGLE:
3512
- // queue single TLP for transmission in other thread:
3628
+ // queue single TLP for transmission in other thread (or perform a direct fast-write if possible):
3513
3629
  if((cbDataIn >= 12) && !(cbDataIn % 4) && pbDataIn) {
3514
- ObByteQueue_Push(ctx->tlp_callback.pBqTx, 0, cbDataIn, pbDataIn);
3630
+ if(ctx->perf.FLAGS & DEVICE_PERFORMANCE_FLAG_FASTWRITE) {
3631
+ DeviceFPGA_TxTlp_FastWrite_NoLock(ctxLC, ctx, pbDataIn, cbDataIn, FALSE, TRUE);
3632
+ } else {
3633
+ ObByteQueue_Push(ctx->tlp_callback.pBqTx, 0, cbDataIn, pbDataIn);
3634
+ }
3515
3635
  if(ppbDataOut) { *ppbDataOut = NULL; }
3516
3636
  if(pcbDataOut) { *pcbDataOut = 0; }
3517
3637
  return TRUE;
3518
3638
  }
3519
3639
  break;
3520
3640
  case LC_CMD_FPGA_TLP_WRITE_MULTIPLE:
3521
- // queue multiple TLPs for transmission in other thread:
3641
+ // queue multiple TLPs for transmission in other thread (or perform a fast-write if possible):
3522
3642
  if(pbDataIn && !(cbDataIn % sizeof(LC_TLP))) {
3523
- for(i = 0, c = cbDataIn / sizeof(LC_TLP); i < c; i++) {
3524
- pTLP = ((PLC_TLP)pbDataIn) + i;
3525
- if((pTLP->cb >= 12) && !(pTLP->cb % 4)) {
3526
- ObByteQueue_Push(ctx->tlp_callback.pBqTx, 0, pTLP->cb, pTLP->pb);
3643
+ if(ctx->perf.FLAGS & DEVICE_PERFORMANCE_FLAG_FASTWRITE) {
3644
+ for(i = 0, c = cbDataIn / sizeof(LC_TLP); i < c; i++) {
3645
+ pTLP = ((PLC_TLP)pbDataIn) + i;
3646
+ if((pTLP->cb >= 12) && !(pTLP->cb % 4)) {
3647
+ DeviceFPGA_TxTlp_FastWrite_NoLock(ctxLC, ctx, pTLP->pb, pTLP->cb, FALSE, FALSE);
3648
+ }
3649
+ }
3650
+ DeviceFPGA_TxTlp_FastWrite_NoLock(ctxLC, ctx, NULL, 0, FALSE, FALSE);
3651
+ } else {
3652
+ for(i = 0, c = cbDataIn / sizeof(LC_TLP); i < c; i++) {
3653
+ pTLP = ((PLC_TLP)pbDataIn) + i;
3654
+ if((pTLP->cb >= 12) && !(pTLP->cb % 4)) {
3655
+ ObByteQueue_Push(ctx->tlp_callback.pBqTx, 0, pTLP->cb, pTLP->pb);
3656
+ }
3527
3657
  }
3528
3658
  }
3529
3659
  if(ppbDataOut) { *ppbDataOut = NULL; }
@@ -3747,6 +3877,9 @@ BOOL DeviceFPGA_Open(_Inout_ PLC_CONTEXT ctxLC, _Out_opt_ PPLC_CONFIG_ERRORINFO
3747
3877
  ctx->txbuf.cbMax = ctx->perf.MAX_SIZE_TX + 0x10000;
3748
3878
  ctx->txbuf.pb = LocalAlloc(0, ctx->txbuf.cbMax);
3749
3879
  if(!ctx->txbuf.pb) { goto fail; }
3880
+ ctx->txbuf_fastwrite.cbMax = ctx->perf.MAX_SIZE_TX + 0x10000;
3881
+ ctx->txbuf_fastwrite.pb = LocalAlloc(0, ctx->txbuf.cbMax);
3882
+ if(!ctx->txbuf_fastwrite.pb) { goto fail; }
3750
3883
  // set callback functions and fix up config
3751
3884
  ctxLC->fMultiThread = TRUE;
3752
3885
  ctxLC->Config.fVolatile = TRUE;
@@ -32,6 +32,7 @@ typedef struct tdHIBR_OFFSET {
32
32
  } HIBR_OFFSET, *PHIBR_OFFSET;
33
33
 
34
34
  const HIBR_OFFSET HIBR_OFFSET_PROFILES[] = {
35
+ {.LengthSelf = 0x4d8, .f32 = FALSE, .PageSize = 0x18, .SystemTime = 0x20, .NumPagesForLoader = 0x58, .FirstBootRestorePage = 0x68, .FirstKernelRestorePage = 0x70, .KernelPagesProcessed = 0x230, .HighestPhysicalPage = 0x498}, // 64-bit build 26100
35
36
  {.LengthSelf = 0x448, .f32 = FALSE, .PageSize = 0x18, .SystemTime = 0x20, .NumPagesForLoader = 0x58, .FirstBootRestorePage = 0x68, .FirstKernelRestorePage = 0x70, .KernelPagesProcessed = 0x230, .HighestPhysicalPage = 0x400}, // 64-bit build 22621
36
37
  {.LengthSelf = 0x448, .f32 = FALSE, .PageSize = 0x18, .SystemTime = 0x20, .NumPagesForLoader = 0x58, .FirstBootRestorePage = 0x68, .FirstKernelRestorePage = 0x70, .KernelPagesProcessed = 0x230, .HighestPhysicalPage = 0x400}, // 64-bit build 22000
37
38
  {.LengthSelf = 0x448, .f32 = FALSE, .PageSize = 0x18, .SystemTime = 0x20, .NumPagesForLoader = 0x58, .FirstBootRestorePage = 0x68, .FirstKernelRestorePage = 0x70, .KernelPagesProcessed = 0x230, .HighestPhysicalPage = 0x400}, // 64-bit build 20348
@@ -14,7 +14,7 @@
14
14
  // (c) Ulf Frisk, 2020-2024
15
15
  // Author: Ulf Frisk, pcileech@frizk.net
16
16
  //
17
- // Header Version: 2.18.4
17
+ // Header Version: 2.19.0
18
18
  //
19
19
 
20
20
  #ifndef __LEECHCORE_H__