Skip to content

Commit

Permalink
Merge pull request #351 from opcm/push-2021-12-01
Browse files Browse the repository at this point in the history
Push 2021 12 01
  • Loading branch information
opcm authored Dec 1, 2021
2 parents 603e150 + ff22f9a commit 0ec44fb
Show file tree
Hide file tree
Showing 28 changed files with 745 additions and 136 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/ci-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: tests

on:
push:
branches: [ '**' ]
pull_request:
branches: [ '**' ]

jobs:
build:

runs-on: ci-test
if: ${{ github.repository != 'opcm/pcm' }}

steps:
- uses: actions/checkout@v2
- name: make
run: |
g++ --version
git clone https://github.com/simdjson/simdjson.git
make -j
sh test.sh
6 changes: 4 additions & 2 deletions PCM-Lib_Win/pcm-lib.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,8 @@
<ClCompile Include="..\winpmem\winpmem.cpp" />
<ClCompile Include="..\msr.cpp" />
<ClCompile Include="..\pci.cpp" />
<ClCompile Include="..\bw.cpp" /> <ClCompile Include="..\mmio.cpp" />
<ClCompile Include="..\bw.cpp" />
<ClCompile Include="..\mmio.cpp" />
<ClCompile Include="..\utils.cpp" />
<ClCompile Include="..\debug.cpp" />
<ClCompile Include="..\threadpool.cpp" />
Expand All @@ -206,7 +207,8 @@
<ClInclude Include="pcm-lib.h" />
<ClInclude Include="..\msr.h" />
<ClInclude Include="..\pci.h" />
<ClInclude Include="..\bw.h" /> <ClInclude Include="..\mmio.h" />
<ClInclude Include="..\bw.h" />
<ClInclude Include="..\mmio.h" />
<ClInclude Include="..\debug.h" />
<ClInclude Include="..\threadpool.h" />
<ClInclude Include="targetver.h" />
Expand Down
2 changes: 1 addition & 1 deletion PCM-Raw_Win/pcm-raw-win.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -193,4 +193,4 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
</Project>
9 changes: 3 additions & 6 deletions PCM-Service_Win/AssemblyInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ using namespace System::Security::Permissions;
[assembly:AssemblyTitleAttribute("PCMService")];
[assembly:AssemblyDescriptionAttribute("")];
[assembly:AssemblyConfigurationAttribute("")];
[assembly:AssemblyCompanyAttribute("Intel GmbH")];
[assembly:AssemblyCompanyAttribute("Intel Corp")];
[assembly:AssemblyProductAttribute("PCMService")];
[assembly:AssemblyCopyrightAttribute("Copyright (c) Intel GmbH 2010")];
[assembly:AssemblyCopyrightAttribute("Copyright (c) Intel Corp 2010-2021")];
[assembly:AssemblyTrademarkAttribute("")];
[assembly:AssemblyCultureAttribute("")];

Expand All @@ -50,7 +50,4 @@ using namespace System::Security::Permissions;

[assembly:ComVisible(false)];

[assembly:CLSCompliantAttribute(true)];

[assembly:SecurityPermission(SecurityAction::RequestMinimum, UnmanagedCode = true)];

[assembly:CLSCompliantAttribute(true)];
42 changes: 42 additions & 0 deletions PCM-Service_Win/PCMService.h

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions PCM_Win/pcm.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,8 @@
<ClCompile Include="..\winpmem\winpmem.cpp" />
<ClCompile Include="..\msr.cpp" />
<ClCompile Include="..\pci.cpp" />
<ClCompile Include="..\bw.cpp" /> <ClCompile Include="..\mmio.cpp" />
<ClCompile Include="..\bw.cpp" />
<ClCompile Include="..\mmio.cpp" />
<ClCompile Include="pcm.cpp" />
<ClCompile Include="..\debug.cpp" />
<ClCompile Include="..\threadpool.cpp" />
Expand All @@ -172,7 +173,8 @@
<ClInclude Include="..\topology.h" />
<ClInclude Include="..\msr.h" />
<ClInclude Include="..\pci.h" />
<ClInclude Include="..\bw.h" /> <ClInclude Include="..\mmio.h" />
<ClInclude Include="..\bw.h" />
<ClInclude Include="..\mmio.h" />
<ClInclude Include="stdafx.h" />
<ClInclude Include="..\types.h" />
<ClInclude Include="windriver.h" />
Expand Down
8 changes: 8 additions & 0 deletions PMURegisterDeclarations/GenuineIntel-6-55-4.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,14 @@
"Threshold": {"Config": 0, "Position": 24, "Width": 8, "DefaultValue": 0}
}
},
"irp" : {
"programmable" : {
"EventCode": {"Config": 0, "Position": 0, "Width": 8},
"UMask": {"Config": 0, "Position": 8, "Width": 8},
"EdgeDetect": {"Config": 0, "Position": 18, "Width": 1, "DefaultValue": 0},
"Threshold": {"Config": 0, "Position": 24, "Width": 8, "DefaultValue": 0}
}
},
"iio" : {
"programmable" : {
"EventCode": {"Config": 0, "Position": 0, "Width": 8},
Expand Down
8 changes: 8 additions & 0 deletions PMURegisterDeclarations/GenuineIntel-6-55-7.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,14 @@
"Threshold": {"Config": 0, "Position": 24, "Width": 8, "DefaultValue": 0}
}
},
"irp" : {
"programmable" : {
"EventCode": {"Config": 0, "Position": 0, "Width": 8},
"UMask": {"Config": 0, "Position": 8, "Width": 8},
"EdgeDetect": {"Config": 0, "Position": 18, "Width": 1, "DefaultValue": 0},
"Threshold": {"Config": 0, "Position": 24, "Width": 8, "DefaultValue": 0}
}
},
"iio" : {
"programmable" : {
"EventCode": {"Config": 0, "Position": 0, "Width": 8},
Expand Down
8 changes: 8 additions & 0 deletions PMURegisterDeclarations/GenuineIntel-6-6A-6.json
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,14 @@
"Threshold": {"Config": 0, "Position": 24, "Width": 8, "DefaultValue": 0}
}
},
"irp" : {
"programmable" : {
"EventCode": {"Config": 0, "Position": 0, "Width": 8},
"UMask": {"Config": 0, "Position": 8, "Width": 8},
"EdgeDetect": {"Config": 0, "Position": 18, "Width": 1, "DefaultValue": 0},
"Threshold": {"Config": 0, "Position": 24, "Width": 8, "DefaultValue": 0}
}
},
"pcu" : {
"programmable" : {
"EventCode": {"Config": 0, "Position": 0, "Width": 8},
Expand Down
8 changes: 4 additions & 4 deletions build_solution.bat
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@

REM change path to your VCVARS.BAT
CALL "c:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\x86_amd64\vcvarsx86_amd64.bat"
SET "PATH=C:\Program Files (x86)\MSBuild\14.0\Bin\amd64;%PATH%"
REM CALL "c:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Auxiliary\Build\vcvarsamd64_x86.bat"
REM SET "PATH=C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\15.0\Bin\amd64;%PATH%"
REM CALL "c:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\x86_amd64\vcvarsx86_amd64.bat"
REM SET "PATH=C:\Program Files (x86)\MSBuild\14.0\Bin\amd64;%PATH%"
CALL "c:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Auxiliary\Build\vcvarsamd64_x86.bat"
SET "PATH=C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\15.0\Bin\amd64;%PATH%"

msbuild pcm-all.sln /p:Configuration=Release;Platform=x64 /t:Clean,Build /m

Expand Down
16 changes: 14 additions & 2 deletions bw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,9 @@ namespace pcm {
return result;
}

#define PCM_CLIENT_IMC_DRAM_IO_REQESTS (0x5048)
#define PCM_CLIENT_IMC_DRAM_GT_REQUESTS (0x5040)
#define PCM_CLIENT_IMC_DRAM_IA_REQUESTS (0x5044)
#define PCM_CLIENT_IMC_DRAM_IO_REQUESTS (0x5048)
#define PCM_CLIENT_IMC_DRAM_DATA_READS (0x5050)
#define PCM_CLIENT_IMC_DRAM_DATA_WRITES (0x5054)
#define PCM_CLIENT_IMC_MMAP_SIZE (0x6000)
Expand All @@ -95,9 +97,19 @@ uint64 ClientBW::getImcWrites()
return mmioRange->read32(PCM_CLIENT_IMC_DRAM_DATA_WRITES - PCM_CLIENT_IMC_EVENT_BASE);
}

uint64 ClientBW::getGtRequests()
{
return mmioRange->read32(PCM_CLIENT_IMC_DRAM_GT_REQUESTS - PCM_CLIENT_IMC_EVENT_BASE);
}

uint64 ClientBW::getIaRequests()
{
return mmioRange->read32(PCM_CLIENT_IMC_DRAM_IA_REQUESTS - PCM_CLIENT_IMC_EVENT_BASE);
}

uint64 ClientBW::getIoRequests()
{
return mmioRange->read32(PCM_CLIENT_IMC_DRAM_IO_REQESTS - PCM_CLIENT_IMC_EVENT_BASE);
return mmioRange->read32(PCM_CLIENT_IMC_DRAM_IO_REQUESTS - PCM_CLIENT_IMC_EVENT_BASE);
}

#define PCM_SERVER_IMC_DRAM_DATA_READS (0x2290)
Expand Down
4 changes: 4 additions & 0 deletions bw.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ namespace pcm {
public:
virtual uint64 getImcReads() { return 0; }
virtual uint64 getImcWrites() { return 0; }
virtual uint64 getGtRequests() { return 0; }
virtual uint64 getIaRequests() { return 0; }
virtual uint64 getIoRequests() { return 0; }
virtual uint64 getPMMReads() { return 0; }
virtual uint64 getPMMWrites() { return 0; }
Expand All @@ -57,6 +59,8 @@ namespace pcm {

uint64 getImcReads() override;
uint64 getImcWrites() override;
uint64 getGtRequests() override;
uint64 getIaRequests() override;
uint64 getIoRequests() override;
};

Expand Down
Loading

0 comments on commit 0ec44fb

Please sign in to comment.