diff --git a/includes/leechcore.h b/includes/leechcore.h index 48243e9..fb71549 100644 --- a/includes/leechcore.h +++ b/includes/leechcore.h @@ -14,7 +14,7 @@ // (c) Ulf Frisk, 2020-2023 // Author: Ulf Frisk, pcileech@frizk.net // -// Header Version: 2.16 +// Header Version: 2.16.1 // #ifndef __LEECHCORE_H__ @@ -437,12 +437,11 @@ BOOL LcCommand( #define LC_CMD_FPGA_TLP_CONTEXT_RD 0x2000011b00000000 // R - get TLP user-defined context to be passed to callback function. [not remote]. #define LC_CMD_FPGA_TLP_FUNCTION_CALLBACK 0x2000011500000000 // W - set/unset TLP callback function (pbDataIn == PLC_TLP_CALLBACK). [not remote]. #define LC_CMD_FPGA_TLP_FUNCTION_CALLBACK_RD 0x2000011c00000000 // R - get TLP callback function. [not remote]. -#define LC_CMD_FPGA_BAR_CONTEXT 0x2000011800000000 // W - set/unset BAR user-defined context to be passed to callback function. (pbDataIn == LPVOID user context). [not remote]. -#define LC_CMD_FPGA_BAR_CONTEXT_RD 0x2000011d00000000 // R - get BAR user-defined context to be passed to callback function. [not remote]. -#define LC_CMD_FPGA_BAR_FUNCTION_CALLBACK 0x2000011900000000 // W - set/unset BAR callback function (pbDataIn == PLC_BAR_CALLBACK). [not remote]. -#define LC_CMD_FPGA_BAR_FUNCTION_CALLBACK_RD 0x2000011e00000000 // R - get BAR callback function. [not remote]. -#define LC_CMD_FPGA_BAR_INFO 0x0000011a00000000 // R - get BAR info (pbDataOut == LC_BAR_INFO[6]). - +#define LC_CMD_FPGA_BAR_CONTEXT 0x2000012000000000 // W - set/unset BAR user-defined context to be passed to callback function. (pbDataIn == LPVOID user context). [not remote]. +#define LC_CMD_FPGA_BAR_CONTEXT_RD 0x2000012100000000 // R - get BAR user-defined context to be passed to callback function. [not remote]. +#define LC_CMD_FPGA_BAR_FUNCTION_CALLBACK 0x2000012200000000 // W - set/unset BAR callback function (pbDataIn == PLC_BAR_CALLBACK). [not remote]. +#define LC_CMD_FPGA_BAR_FUNCTION_CALLBACK_RD 0x2000012300000000 // R - get BAR callback function. [not remote]. +#define LC_CMD_FPGA_BAR_INFO 0x0000012400000000 // R - get BAR info (pbDataOut == LC_BAR_INFO[6]). #define LC_CMD_FILE_DUMPHEADER_GET 0x0000020100000000 // R @@ -572,8 +571,10 @@ typedef VOID(*PLC_TLP_FUNCTION_CALLBACK)( typedef struct tdLC_BAR { BOOL fValid; + BOOL fIO; BOOL f64Bit; BOOL fPrefetchable; + DWORD _Filler[3]; DWORD iBar; QWORD pa; QWORD cb; diff --git a/m_vmemd/version.h b/m_vmemd/version.h index 8a48294..1cc9d6e 100644 --- a/m_vmemd/version.h +++ b/m_vmemd/version.h @@ -3,8 +3,8 @@ #define VERSION_MAJOR 5 #define VERSION_MINOR 8 -#define VERSION_REVISION 0 -#define VERSION_BUILD 119 +#define VERSION_REVISION 1 +#define VERSION_BUILD 120 #define VER_FILE_DESCRIPTION_STR "MemProcFS : Plugin vmemd" #define VER_FILE_VERSION VERSION_MAJOR, VERSION_MINOR, VERSION_REVISION, VERSION_BUILD diff --git a/memprocfs/version.h b/memprocfs/version.h index deb95ec..167feb1 100644 --- a/memprocfs/version.h +++ b/memprocfs/version.h @@ -3,8 +3,8 @@ #define VERSION_MAJOR 5 #define VERSION_MINOR 8 -#define VERSION_REVISION 0 -#define VERSION_BUILD 119 +#define VERSION_REVISION 1 +#define VERSION_BUILD 120 #define VER_FILE_DESCRIPTION_STR "MemProcFS" #define VER_FILE_VERSION VERSION_MAJOR, VERSION_MINOR, VERSION_REVISION, VERSION_BUILD diff --git a/vmm/version.h b/vmm/version.h index 9f0e1a7..2a892c2 100644 --- a/vmm/version.h +++ b/vmm/version.h @@ -3,8 +3,8 @@ #define VERSION_MAJOR 5 #define VERSION_MINOR 8 -#define VERSION_REVISION 0 -#define VERSION_BUILD 119 +#define VERSION_REVISION 1 +#define VERSION_BUILD 120 #define VER_FILE_DESCRIPTION_STR "MemProcFS : Core" #define VER_FILE_VERSION VERSION_MAJOR, VERSION_MINOR, VERSION_REVISION, VERSION_BUILD diff --git a/vmmjava/leechcore/ILeechCore.java b/vmmjava/leechcore/ILeechCore.java index 36b473c..59a8c79 100644 --- a/vmmjava/leechcore/ILeechCore.java +++ b/vmmjava/leechcore/ILeechCore.java @@ -210,11 +210,11 @@ public interface ILeechCore public static final long LC_CMD_FPGA_TLP_CONTEXT_RD = 0x2000011b00000000L; // R - get TLP user-defined context to be passed to callback function. [not remote]. public static final long LC_CMD_FPGA_TLP_FUNCTION_CALLBACK = 0x2000011500000000L; // W - set/unset TLP callback function (pbDataIn == PLC_TLP_CALLBACK). [not remote]. public static final long LC_CMD_FPGA_TLP_FUNCTION_CALLBACK_RD = 0x2000011c00000000L; // R - get TLP callback function. [not remote]. - public static final long LC_CMD_FPGA_BAR_CONTEXT = 0x2000011800000000L; // W - set/unset BAR user-defined context to be passed to callback function. (pbDataIn == LPVOID user context). [not remote]. - public static final long LC_CMD_FPGA_BAR_CONTEXT_RD = 0x2000011d00000000L; // R - get BAR user-defined context to be passed to callback function. [not remote]. - public static final long LC_CMD_FPGA_BAR_FUNCTION_CALLBACK = 0x2000011900000000L; // W - set/unset BAR callback function (pbDataIn == PLC_BAR_CALLBACK). [not remote]. - public static final long LC_CMD_FPGA_BAR_FUNCTION_CALLBACK_RD = 0x2000011e00000000L; // R - get BAR callback function. [not remote]. - public static final long LC_CMD_FPGA_BAR_INFO = 0x0000011a00000000L; // R - get BAR info (pbDataOut == LC_BAR_INFO[6]). + public static final long LC_CMD_FPGA_BAR_CONTEXT = 0x2000012000000000L; // W - set/unset BAR user-defined context to be passed to callback function. (pbDataIn == LPVOID user context). [not remote]. + public static final long LC_CMD_FPGA_BAR_CONTEXT_RD = 0x2000012100000000L; // R - get BAR user-defined context to be passed to callback function. [not remote]. + public static final long LC_CMD_FPGA_BAR_FUNCTION_CALLBACK = 0x2000012200000000L; // W - set/unset BAR callback function (pbDataIn == PLC_BAR_CALLBACK). [not remote]. + public static final long LC_CMD_FPGA_BAR_FUNCTION_CALLBACK_RD = 0x2000012300000000L; // R - get BAR callback function. [not remote]. + public static final long LC_CMD_FPGA_BAR_INFO = 0x0000012400000000L; // R - get BAR info (pbDataOut == LC_BAR_INFO[6]). public static final long LC_CMD_FILE_DUMPHEADER_GET = 0x0000020100000000L; // R diff --git a/vmmjava/leechcore/entry/LeechCoreBar.java b/vmmjava/leechcore/entry/LeechCoreBar.java index 9d02e7d..9d170f9 100644 --- a/vmmjava/leechcore/entry/LeechCoreBar.java +++ b/vmmjava/leechcore/entry/LeechCoreBar.java @@ -8,8 +8,9 @@ import java.io.Serializable; */ public class LeechCoreBar implements Serializable { - private static final long serialVersionUID = -8552459732654567238L; + private static final long serialVersionUID = -8552459732654567239L; public boolean fValid; + public boolean fIO; public boolean f64Bit; public boolean fPrefetchable; public int iBar; diff --git a/vmmjava/vmm/internal/LeechCoreImpl.java b/vmmjava/vmm/internal/LeechCoreImpl.java index d6781fb..bd5b060 100644 --- a/vmmjava/vmm/internal/LeechCoreImpl.java +++ b/vmmjava/vmm/internal/LeechCoreImpl.java @@ -355,6 +355,7 @@ public class LeechCoreImpl implements ILeechCore LeechCoreNative.LC_BAR nbar = new LeechCoreNative.LC_BAR(n.pBar); LeechCoreBar bar = new LeechCoreBar(); bar.fValid = nbar.fValid; + bar.fIO = nbar.fIO; bar.f64Bit = nbar.f64Bit; bar.fPrefetchable = nbar.fPrefetchable; bar.iBar = nbar.iBar; diff --git a/vmmjava/vmm/internal/LeechCoreNative.java b/vmmjava/vmm/internal/LeechCoreNative.java index a409534..107ef8a 100644 --- a/vmmjava/vmm/internal/LeechCoreNative.java +++ b/vmmjava/vmm/internal/LeechCoreNative.java @@ -47,11 +47,15 @@ interface LeechCoreNative extends Library { void invoke(int ctxNative, int cbTlp, Pointer pbTlp, int cbInfo, String szInfo); } - @Structure.FieldOrder({"fValid", "f64Bit", "fPrefetchable", "iBar", "pa", "cb"}) + @Structure.FieldOrder({"fValid", "fIO", "f64Bit", "fPrefetchable", "iBar", "_Filler0", "_Filler1", "_Filler2", "pa", "cb"}) class LC_BAR extends Structure { public boolean fValid; + public boolean fIO; public boolean f64Bit; public boolean fPrefetchable; + public int _Filler0; + public int _Filler1; + public int _Filler2; public int iBar; public long pa; public long cb; diff --git a/vmmpyc/version.h b/vmmpyc/version.h index 280d7c9..8b233a4 100644 --- a/vmmpyc/version.h +++ b/vmmpyc/version.h @@ -3,8 +3,8 @@ #define VERSION_MAJOR 5 #define VERSION_MINOR 8 -#define VERSION_REVISION 0 -#define VERSION_BUILD 119 +#define VERSION_REVISION 1 +#define VERSION_BUILD 120 #define VER_FILE_DESCRIPTION_STR "MemProcFS : Python API" #define VER_FILE_VERSION VERSION_MAJOR, VERSION_MINOR, VERSION_REVISION, VERSION_BUILD diff --git a/vmmrust/leechcore_example/Cargo.toml b/vmmrust/leechcore_example/Cargo.toml index 74bad80..e944b98 100644 --- a/vmmrust/leechcore_example/Cargo.toml +++ b/vmmrust/leechcore_example/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "leechcore_example" -version = "5.8.0" +version = "5.8.1" edition = "2021" publish = false diff --git a/vmmrust/m_example_plugin/Cargo.toml b/vmmrust/m_example_plugin/Cargo.toml index 60fa417..c69ce2a 100644 --- a/vmmrust/m_example_plugin/Cargo.toml +++ b/vmmrust/m_example_plugin/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "m_example_plugin" -version = "5.8.0" +version = "5.8.1" edition = "2021" publish = false diff --git a/vmmrust/memprocfs/Cargo.toml b/vmmrust/memprocfs/Cargo.toml index daedb35..17ff101 100644 --- a/vmmrust/memprocfs/Cargo.toml +++ b/vmmrust/memprocfs/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "memprocfs" -version = "5.8.0" +version = "5.8.1" edition = "2021" description = "MemProcFS - Physical Memory Analysis Framework" homepage = "https://github.com/ufrisk/MemProcFS" diff --git a/vmmrust/memprocfs/src/lib_memprocfs.rs b/vmmrust/memprocfs/src/lib_memprocfs.rs index 6f1f626..a4d483c 100644 --- a/vmmrust/memprocfs/src/lib_memprocfs.rs +++ b/vmmrust/memprocfs/src/lib_memprocfs.rs @@ -3684,6 +3684,8 @@ pub struct LeechCore { pub struct LcBar { /// BAR is valid. pub is_valid : bool, + /// BAR is I/O. + pub is_io : bool, /// BAR is 64-bit. pub is_64bit : bool, /// BAR is prefetchable. @@ -3757,7 +3759,6 @@ pub struct LcBarContext<'a, T> { } /// PCIe BAR wrapper context - returned to the caller of the BAR enable function. -/// The BAR callback is shut down / closed when this struct is dropped. pub struct LcBarContextWrap<'a, T> { /// Access to the underlying context. pub ctx : &'a LcBarContext::<'a, T>, @@ -3795,7 +3796,6 @@ pub struct LcTlpContext<'a, T> { } /// PCIe TLP wrapper context - returned to the caller of the TLP enable function. -/// The TLP callback is shut down / closed when this struct is dropped. pub struct LcTlpContextWrap<'a, T> { /// Access to the underlying context. pub ctx : &'a LcTlpContext::<'a, T>, @@ -4032,15 +4032,15 @@ impl LeechCore { /// LeechCore command: FPGA get TLP callback function [not remote] [R]. pub const LC_CMD_FPGA_TLP_FUNCTION_CALLBACK_RD : u64 = 0x2000011c00000000; /// LeechCore command: FPGA set/unset BAR user-defined context to be passed to callback function. [not remote] [W]. - pub const LC_CMD_FPGA_BAR_CONTEXT : u64 = 0x2000011800000000; + pub const LC_CMD_FPGA_BAR_CONTEXT : u64 = 0x2000012000000000; /// LeechCore command: FPGA get BAR user-defined context to be passed to callback function [not remote] [R]. - pub const LC_CMD_FPGA_BAR_CONTEXT_RD : u64 = 0x2000011d00000000; + pub const LC_CMD_FPGA_BAR_CONTEXT_RD : u64 = 0x2000012100000000; /// LeechCore command: FPGA set/unset BAR callback function [not remote] [W]. - pub const LC_CMD_FPGA_BAR_FUNCTION_CALLBACK : u64 = 0x2000011900000000; + pub const LC_CMD_FPGA_BAR_FUNCTION_CALLBACK : u64 = 0x2000012200000000; /// LeechCore command: FPGA get BAR callback function [not remote] [R]. - pub const LC_CMD_FPGA_BAR_FUNCTION_CALLBACK_RD : u64 = 0x2000011e00000000; + pub const LC_CMD_FPGA_BAR_FUNCTION_CALLBACK_RD : u64 = 0x2000012300000000; /// LeechCore command: FPGA BAR info. (pbDataOut == LC_BAR_INFO[6]) [R]. - pub const LC_CMD_FPGA_BAR_INFO : u64 = 0x0000011a00000000; + pub const LC_CMD_FPGA_BAR_INFO : u64 = 0x0000012400000000; /// LeechCore command: Get the dump file header [R]. pub const LC_CMD_FILE_DUMPHEADER_GET : u64 = 0x0000020100000000; /// LeechCore command: Get statistics [R]. @@ -8396,6 +8396,7 @@ impl LeechCore { result[i] = LcBar { bar_index : ne.iBar, is_valid : ne.fValid != 0, + is_io : ne.fIO != 0, is_64bit : ne.f64Bit != 0, is_prefetchable : ne.fPrefetchable != 0, pa : ne.pa, @@ -8495,6 +8496,7 @@ impl LeechCore { let bar = LcBar { bar_index : ne.iBar, is_valid : ne.fValid != 0, + is_io : ne.fIO != 0, is_64bit : ne.f64Bit != 0, is_prefetchable : ne.fPrefetchable != 0, pa : ne.pa, @@ -8565,8 +8567,10 @@ struct CLC_CONFIG { #[allow(non_snake_case, non_camel_case_types)] struct CLC_BAR { fValid : u32, + fIO : u32, f64Bit : u32, fPrefetchable : u32, + _Filler : [u32; 3], iBar : u32, pa : u64, cb : u64, diff --git a/vmmrust/memprocfs_example/Cargo.toml b/vmmrust/memprocfs_example/Cargo.toml index 4aca281..c934815 100644 --- a/vmmrust/memprocfs_example/Cargo.toml +++ b/vmmrust/memprocfs_example/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "memprocfs_example" -version = "5.8.0" +version = "5.8.1" edition = "2021" publish = false