├── aaluser ├── NEWS ├── README ├── utils │ ├── scripts │ │ ├── getcpupwr │ │ └── getfpgapwr │ ├── internal │ │ └── qpiregs │ │ │ ├── ReadMe.txt │ │ │ └── Makefile │ ├── aalscan │ │ └── aalscan.vcxproj.filters │ ├── data_model │ │ └── data_model.vcxproj.filters │ ├── substitute │ │ └── substitute.vcxproj.filters │ └── fpgadiag │ │ ├── fpgasane_nlb400_0.sh │ │ └── fpgasane_nlb400_7.sh ├── doc │ └── intel_rgb_62.png ├── ase │ ├── README │ ├── scripts │ │ └── ase_functions.py │ ├── LICENSE.txt │ └── distclean.sh ├── build-aux │ └── .build-aux_KEEP_THIS_FILE ├── win │ ├── WinBuild.bat │ ├── aalsdk_win7_debug_x64.bat │ ├── aalsdk_win8_debug_x64.bat │ ├── aalsdk_win7_debug_win32.bat │ ├── aalsdk_win7_release_x64.bat │ ├── aalsdk_win8.1_debug_x64.bat │ ├── aalsdk_win8_debug_win32.bat │ ├── aalsdk_win8_release_x64.bat │ ├── aalsdk_win7_release_win32.bat │ ├── aalsdk_win8.1_debug_win32.bat │ ├── aalsdk_win8.1_release_x64.bat │ ├── aalsdk_win8_release_win32.bat │ ├── aalsdk_win8.1_release_win32.bat │ └── aalsdk_build.bat ├── AUTHORS ├── ChangeLog ├── aas │ ├── OSAL │ │ ├── dbg_oslthread_2.cpp │ │ ├── dbg_oslthread_1.cpp │ │ └── dbg_threadgroup.h │ ├── AASResourceManager │ │ └── libAASResMgr.vcxproj.filters │ └── RRMBrokerService │ │ └── librrmbroker.vcxproj.filters ├── clp │ └── libaalclp.vcxproj.filters └── COPYING ├── aalkernel ├── NEWS ├── README ├── build │ ├── maintainer-check │ ├── 40-aalsdk.rules.in │ └── aalsdk.conf.in ├── ntsd.ini ├── build-aux │ └── .build-aux_KEEP_THIS_FILE ├── include │ └── aalsdk │ │ └── .aalsdk_KEEP_THIS_FILE ├── ChangeLog ├── AUTHORS ├── AAL_Driver_Package.filters ├── aalkernel Package │ └── aalkernel Package.vcxproj.filters ├── aalbus_windows │ ├── resource.h │ └── aalbus.mof └── aalkernel.vcxproj.filters ├── swval ├── sdk │ ├── NEWS │ ├── aas │ ├── ase │ ├── clp │ ├── AUTHORS │ ├── COPYING │ ├── INSTALL │ ├── README │ ├── include │ ├── utils │ ├── ChangeLog │ ├── m4 │ │ ├── aalsdk.m4 │ │ └── cxx.m4 │ ├── gdb │ │ ├── pretty-printers │ │ │ ├── libstdc++-v3 │ │ │ │ └── python │ │ │ │ │ └── libstdcxx │ │ │ │ │ ├── __init__.py │ │ │ │ │ └── v6 │ │ │ │ │ └── __init__.py │ │ │ └── fetch │ │ └── breakpoints │ ├── tests │ │ ├── harnessed │ │ │ ├── gtest │ │ │ │ ├── gtest-1.6.0.tar.gz │ │ │ │ ├── gtest-1.7.0.tar.gz │ │ │ │ ├── gtest.at │ │ │ │ ├── swtest │ │ │ │ │ ├── swtest.at │ │ │ │ │ └── gtAASResMgr.cpp │ │ │ │ ├── nlb0test │ │ │ │ │ ├── nlb0test.at │ │ │ │ │ └── Makefile.am │ │ │ │ ├── gtcommon │ │ │ │ │ ├── gtCommon_Config.cpp │ │ │ │ │ ├── gtCommon_Console.h │ │ │ │ │ ├── Makefile.am │ │ │ │ │ ├── gtCommon_ModuleStub.h │ │ │ │ │ ├── gtCommon_Status.h │ │ │ │ │ └── gtCommon_ClassOverrides.h │ │ │ │ └── Makefile.am │ │ │ ├── harnessed.at │ │ │ └── Makefile.am │ │ ├── standalone │ │ │ ├── Makefile.am │ │ │ ├── standalone.at │ │ │ ├── OSAL_TestSem │ │ │ │ ├── OSAL_TestSem.at │ │ │ │ └── Makefile.am │ │ │ ├── OSAL_TestThreadGroup │ │ │ │ ├── OSAL_TestThreadGroup.at │ │ │ │ └── Makefile.am │ │ │ └── isolated │ │ │ │ ├── Makefile.am │ │ │ │ ├── aal0017.h │ │ │ │ ├── aal0014.h │ │ │ │ ├── main.cpp │ │ │ │ └── aal0017.cpp │ │ ├── run │ │ │ ├── OSAL_TestSem.in │ │ │ ├── nlb0test.in │ │ │ ├── OSAL_TestThreadGroup.in │ │ │ └── swtest.in │ │ ├── package.m4 │ │ ├── testsuite.at │ │ ├── atlocal.in │ │ ├── swvalmod │ │ │ ├── swvalmod.h │ │ │ ├── Makefile.am │ │ │ └── swvalmod.c │ │ └── local.at │ ├── build-aux │ │ └── .build-aux_KEEP_THIS_FILE │ └── scripts │ │ ├── gdb-swtest │ │ ├── gdb-OSAL_TestSem │ │ ├── gdb-OSAL_TestThreadGroup │ │ ├── run-standalone │ │ ├── run-everything │ │ ├── run-swtest │ │ ├── valgrind-swtest │ │ ├── lcov-standalone │ │ ├── valgrind-standalone │ │ ├── lcov-swtest │ │ ├── lcov-everything │ │ └── valgrind-everything ├── krnl │ ├── NEWS │ ├── kOSAL │ ├── AUTHORS │ ├── COPYING │ ├── INSTALL │ ├── README │ ├── aalbus │ ├── include │ ├── ChangeLog │ ├── build │ │ ├── rmdrv.in │ │ ├── insdrv.in │ │ ├── aalsdk.conf.in │ │ └── 40-aalsdk.rules.in │ ├── cci_PCIe_driver │ ├── m4 │ │ ├── aalkernel.m4 │ │ └── verify.m4 │ ├── aalresourcemgr_client │ ├── aalresourcemgr_server │ ├── README.GPLV2-LICENSE.TXT │ ├── scripts │ │ ├── reset-kernel-gcov-counters │ │ ├── test-case │ │ └── lcov-bat │ ├── build-aux │ │ └── .build-aux_KEEP_THIS_FILE │ └── aalkte │ │ ├── Kbuild.in │ │ ├── Makefile.am │ │ └── aalkte-thr.c ├── gtest │ ├── tar.exe │ ├── gzip.exe │ ├── cygwin1.dll │ ├── cygiconv-2.dll │ ├── cygintl-8.dll │ ├── gtest-1.6.0.tar.gz │ ├── gtest-1.7.0.tar.gz │ ├── clean_gtest.bat │ └── unzip_gtest.bat └── win │ ├── libgtest.vcxproj.filters │ ├── run-swtest.bat │ ├── libAASResMgr.vcxproj.filters │ ├── nlb0test.vcxproj.filters │ ├── libswvalmod.vcxproj.filters │ ├── libswvalsvcmod.vcxproj.filters │ ├── libHWALIAFU.vcxproj.filters │ ├── librrmbroker.vcxproj.filters │ └── aalsdk_build.bat ├── valapps ├── appbase │ ├── appbuffer.cpp │ ├── appbuffer.h │ ├── appbuffer.h.in │ ├── appconstants.cpp │ ├── appconstants.h │ ├── appconstants.h.in │ └── CMakeLists.txt ├── valapp │ ├── afu_test.cpp │ ├── ali_client.cpp │ ├── client_factory.cpp │ ├── stap_tests.h │ ├── testit.py │ ├── afu_reset.h │ ├── dma_buffer.h │ ├── Loggable.h │ ├── utils.cpp │ ├── perf_counters_tests.h │ ├── process.h │ ├── mmio_mapping.h │ ├── reconfigure_test.h │ ├── tests.json │ ├── c_service_manager.h │ ├── testit.cpp │ ├── client_factory.h │ ├── test_context.cpp │ ├── mmio.py │ ├── ali_client.h │ ├── mmio_buffer.h │ ├── CMakeLists.txt │ ├── main.cpp │ ├── afu_reset.cpp │ ├── dma_buffer.cpp │ └── afu_register.h ├── AFU_Reset │ ├── expected.txt │ ├── runtest.sh │ ├── __init__.py │ ├── CMakeLists.txt │ ├── Makefile │ ├── SW_RESET_01 │ └── runtest.cmake ├── MMIO_Mapping │ ├── RTL_valid_DFH │ │ └── afu_dfh.mem │ ├── Makefile │ └── SW_MMIO_MAPPING ├── env.sh.in ├── ld_library_path ├── Error │ ├── main.cpp │ └── Makefile ├── Power_Thermal │ ├── main.cpp │ └── Makefile ├── build.json.in ├── cmdq │ ├── nlb.json │ └── CMakeLists.txt ├── Read_Perf_Counters │ ├── breakpoints │ ├── run-gdb │ ├── __init__.py │ ├── Makefile │ └── SW_PERC_01 ├── DMA_Buffer_5 │ ├── __init__.py │ ├── Makefile │ └── SW_BUF_05 ├── Platform_Power │ └── ReadMe ├── Signal_Tap │ ├── __init__.py │ ├── SigTap_README.txt │ ├── Makefile │ └── SW_STAP_01 ├── Partial_Reconfig │ ├── PR_TwoApp │ │ └── ali_nlb │ ├── SW_PR_TWO_APP │ ├── PR_SingleApp │ │ └── Makefile │ └── SW_PR_SINGLE_APP ├── UMsg_Allocation │ ├── UMsg_README.txt │ └── Makefile ├── DMA_Buffer │ ├── runtest.sh │ ├── runtest_request_write.cmake │ ├── CMakeLists.txt │ ├── Makefile │ ├── __init__.py │ └── SW_BUF_02 ├── CPackConfig.cmake.in ├── unpackers.py ├── env.sh ├── packages.json ├── RAS │ └── Makefile ├── PartialReconf_Power │ └── Makefile ├── Makefile ├── vallib │ └── Makefile ├── tests.json ├── gtest │ ├── gtReset.cpp │ └── CMakeLists.txt └── tests.md ├── aalsamples ├── doc │ ├── intel_rgb_62.png │ └── output │ │ └── OUTPUT.dox ├── Hello_AAL │ └── SW │ │ └── helloaal.vcxproj.filters ├── Hello_ALI_NLB │ └── SW │ │ └── hello_ali_nlb.vcxproj.filters ├── ALI_Configure_AFU │ └── SW │ │ └── ali_config_afu.vcxproj.filters ├── ALI_Multi_AFU_with_PerfMon │ └── SW │ │ └── ali_perf_nlb.vcxproj.filters ├── Hello_AAL_Service │ └── SW │ │ └── hello_aal_service.vcxproj.filters └── Scripts │ └── get_temperature.sh ├── aalutils ├── cpuset │ ├── xfrtasks.sh │ ├── xfrtasks2.sh │ ├── CpuSet4.conf │ ├── all_pids_parent_mask.sh │ └── SetCores.sh ├── Scripts │ ├── ReadMe │ ├── LicenseUpdate.sh │ └── stripGPL.pl └── ReadMe ├── aalsdk.vcxproj.filters ├── Readme.MultiPackage.txt ├── .gitignore └── prep-build.bat /aaluser/NEWS: -------------------------------------------------------------------------------- 1 | AALSDK NEWS 2 | -------------------------------------------------------------------------------- /aalkernel/NEWS: -------------------------------------------------------------------------------- 1 | AALSDK NEWS 2 | -------------------------------------------------------------------------------- /aaluser/README: -------------------------------------------------------------------------------- 1 | AALSDK README 2 | -------------------------------------------------------------------------------- /swval/sdk/NEWS: -------------------------------------------------------------------------------- 1 | ../../aaluser/NEWS -------------------------------------------------------------------------------- /swval/sdk/aas: -------------------------------------------------------------------------------- 1 | ../../aaluser/aas -------------------------------------------------------------------------------- /swval/sdk/ase: -------------------------------------------------------------------------------- 1 | ../../aaluser/ase -------------------------------------------------------------------------------- /swval/sdk/clp: -------------------------------------------------------------------------------- 1 | ../../aaluser/clp -------------------------------------------------------------------------------- /aalkernel/README: -------------------------------------------------------------------------------- 1 | AALSDK README 2 | -------------------------------------------------------------------------------- /swval/krnl/NEWS: -------------------------------------------------------------------------------- 1 | ../../aalkernel/NEWS -------------------------------------------------------------------------------- /swval/krnl/kOSAL: -------------------------------------------------------------------------------- 1 | ../../aalkernel/kOSAL -------------------------------------------------------------------------------- /swval/sdk/AUTHORS: -------------------------------------------------------------------------------- 1 | ../../aaluser/AUTHORS -------------------------------------------------------------------------------- /swval/sdk/COPYING: -------------------------------------------------------------------------------- 1 | ../../aaluser/COPYING -------------------------------------------------------------------------------- /swval/sdk/INSTALL: -------------------------------------------------------------------------------- 1 | ../../aaluser/INSTALL -------------------------------------------------------------------------------- /swval/sdk/README: -------------------------------------------------------------------------------- 1 | ../../aaluser/README -------------------------------------------------------------------------------- /swval/sdk/include: -------------------------------------------------------------------------------- 1 | ../../aaluser/include -------------------------------------------------------------------------------- /swval/sdk/utils: -------------------------------------------------------------------------------- 1 | ../../aaluser/utils -------------------------------------------------------------------------------- /aaluser/utils/scripts/getcpupwr: -------------------------------------------------------------------------------- 1 | setcpupwr -------------------------------------------------------------------------------- /aaluser/utils/scripts/getfpgapwr: -------------------------------------------------------------------------------- 1 | setfpgapwr -------------------------------------------------------------------------------- /swval/krnl/AUTHORS: -------------------------------------------------------------------------------- 1 | ../../aalkernel/AUTHORS -------------------------------------------------------------------------------- /swval/krnl/COPYING: -------------------------------------------------------------------------------- 1 | ../../aalkernel/COPYING -------------------------------------------------------------------------------- /swval/krnl/INSTALL: -------------------------------------------------------------------------------- 1 | ../../aalkernel/INSTALL -------------------------------------------------------------------------------- /swval/krnl/README: -------------------------------------------------------------------------------- 1 | ../../aalkernel/README -------------------------------------------------------------------------------- /swval/krnl/aalbus: -------------------------------------------------------------------------------- 1 | ../../aalkernel/aalbus -------------------------------------------------------------------------------- /swval/krnl/include: -------------------------------------------------------------------------------- 1 | ../../aalkernel/include -------------------------------------------------------------------------------- /swval/sdk/ChangeLog: -------------------------------------------------------------------------------- 1 | ../../aaluser/ChangeLog -------------------------------------------------------------------------------- /swval/krnl/ChangeLog: -------------------------------------------------------------------------------- 1 | ../../aalkernel/ChangeLog -------------------------------------------------------------------------------- /swval/sdk/m4/aalsdk.m4: -------------------------------------------------------------------------------- 1 | ../../../aaluser/m4/aalsdk.m4 -------------------------------------------------------------------------------- /swval/krnl/build/rmdrv.in: -------------------------------------------------------------------------------- 1 | ../../../aalkernel/build/rmdrv.in -------------------------------------------------------------------------------- /swval/krnl/cci_PCIe_driver: -------------------------------------------------------------------------------- 1 | ../../aalkernel/cci_PCIe_driver -------------------------------------------------------------------------------- /valapps/appbase/appbuffer.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | -------------------------------------------------------------------------------- /swval/krnl/build/insdrv.in: -------------------------------------------------------------------------------- 1 | ../../../aalkernel/build/insdrv.in -------------------------------------------------------------------------------- /swval/krnl/m4/aalkernel.m4: -------------------------------------------------------------------------------- 1 | ../../../aalkernel/m4/aalkernel.m4 -------------------------------------------------------------------------------- /valapps/valapp/afu_test.cpp: -------------------------------------------------------------------------------- 1 | #include "afu_test.h" 2 | 3 | 4 | -------------------------------------------------------------------------------- /aalkernel/build/maintainer-check: -------------------------------------------------------------------------------- 1 | ../../aaluser/build/maintainer-check -------------------------------------------------------------------------------- /swval/krnl/aalresourcemgr_client: -------------------------------------------------------------------------------- 1 | ../../aalkernel/aalresourcemgr_client -------------------------------------------------------------------------------- /swval/krnl/aalresourcemgr_server: -------------------------------------------------------------------------------- 1 | ../../aalkernel/aalresourcemgr_server -------------------------------------------------------------------------------- /swval/krnl/build/aalsdk.conf.in: -------------------------------------------------------------------------------- 1 | ../../../aalkernel/build/aalsdk.conf.in -------------------------------------------------------------------------------- /valapps/valapp/ali_client.cpp: -------------------------------------------------------------------------------- 1 | #include "ali_client.h" 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /swval/krnl/README.GPLV2-LICENSE.TXT: -------------------------------------------------------------------------------- 1 | ../../aalkernel/README.GPLV2-LICENSE.TXT -------------------------------------------------------------------------------- /swval/krnl/build/40-aalsdk.rules.in: -------------------------------------------------------------------------------- 1 | ../../../aalkernel/build/40-aalsdk.rules.in -------------------------------------------------------------------------------- /swval/sdk/gdb/pretty-printers/libstdc++-v3/python/libstdcxx/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /swval/gtest/tar.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel/AALSDK/master/swval/gtest/tar.exe -------------------------------------------------------------------------------- /swval/sdk/tests/harnessed/gtest/gtest-1.6.0.tar.gz: -------------------------------------------------------------------------------- 1 | ../../../../gtest/gtest-1.6.0.tar.gz -------------------------------------------------------------------------------- /swval/sdk/tests/harnessed/gtest/gtest-1.7.0.tar.gz: -------------------------------------------------------------------------------- 1 | ../../../../gtest/gtest-1.7.0.tar.gz -------------------------------------------------------------------------------- /swval/gtest/gzip.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel/AALSDK/master/swval/gtest/gzip.exe -------------------------------------------------------------------------------- /swval/gtest/cygwin1.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel/AALSDK/master/swval/gtest/cygwin1.dll -------------------------------------------------------------------------------- /swval/gtest/cygiconv-2.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel/AALSDK/master/swval/gtest/cygiconv-2.dll -------------------------------------------------------------------------------- /swval/gtest/cygintl-8.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel/AALSDK/master/swval/gtest/cygintl-8.dll -------------------------------------------------------------------------------- /swval/krnl/scripts/reset-kernel-gcov-counters: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | echo 1 >'/sys/kernel/debug/gcov/reset' 3 | -------------------------------------------------------------------------------- /aaluser/doc/intel_rgb_62.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel/AALSDK/master/aaluser/doc/intel_rgb_62.png -------------------------------------------------------------------------------- /valapps/AFU_Reset/expected.txt: -------------------------------------------------------------------------------- 1 | get_port_feature() 2 | port_afu_quiesce_and_halt() 3 | port_afu_Enable() 4 | -------------------------------------------------------------------------------- /aalkernel/ntsd.ini: -------------------------------------------------------------------------------- 1 | .echo Loading AALSDK kd script... 2 | .allow_bp_ba_convert 1 3 | ed Kd_DEFAULT_MASK 0x8 4 | -------------------------------------------------------------------------------- /aalsamples/doc/intel_rgb_62.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel/AALSDK/master/aalsamples/doc/intel_rgb_62.png -------------------------------------------------------------------------------- /swval/gtest/gtest-1.6.0.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel/AALSDK/master/swval/gtest/gtest-1.6.0.tar.gz -------------------------------------------------------------------------------- /swval/gtest/gtest-1.7.0.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel/AALSDK/master/swval/gtest/gtest-1.7.0.tar.gz -------------------------------------------------------------------------------- /aaluser/ase/README: -------------------------------------------------------------------------------- 1 | For documentation on ASE, see 'ASE_UserGuide.pdf' located at: 2 | /Documentation/ 3 | 4 | -------------------------------------------------------------------------------- /aaluser/build-aux/.build-aux_KEEP_THIS_FILE: -------------------------------------------------------------------------------- 1 | Keep this file to appease source control systems that don't track empty directories. 2 | -------------------------------------------------------------------------------- /aalkernel/build-aux/.build-aux_KEEP_THIS_FILE: -------------------------------------------------------------------------------- 1 | Keep this file to appease source control systems that don't track empty directories. 2 | -------------------------------------------------------------------------------- /aalkernel/include/aalsdk/.aalsdk_KEEP_THIS_FILE: -------------------------------------------------------------------------------- 1 | Keep this file to appease source control systems that don't track empty directories. 2 | -------------------------------------------------------------------------------- /swval/krnl/build-aux/.build-aux_KEEP_THIS_FILE: -------------------------------------------------------------------------------- 1 | Keep this file to appease source control systems that don't track empty directories. 2 | -------------------------------------------------------------------------------- /swval/krnl/scripts/test-case: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | $1/insdrv cci 6 | sleep 3 7 | $1/rmdrv 8 | 9 | exit 0 10 | -------------------------------------------------------------------------------- /swval/sdk/build-aux/.build-aux_KEEP_THIS_FILE: -------------------------------------------------------------------------------- 1 | Keep this file to appease source control systems that don't track empty directories. 2 | -------------------------------------------------------------------------------- /aaluser/win/WinBuild.bat: -------------------------------------------------------------------------------- 1 | call "%VCINSTALLDIR%\vcvarsall.bat" x86 2 | msbuild.exe .\WINAALSDK.sln /p:Configuration="Win8.1 Debug" /p:Platform=x64 3 | -------------------------------------------------------------------------------- /swval/sdk/tests/harnessed/harnessed.at: -------------------------------------------------------------------------------- 1 | # Harnessed tests. -*- Autotest -*- 2 | 3 | # Google Tests 4 | m4_include([harnessed/gtest/gtest.at]) 5 | 6 | -------------------------------------------------------------------------------- /aalkernel/ChangeLog: -------------------------------------------------------------------------------- 1 | 2014-10-08 Tim Whisonant 2 | 3 | * all: Initial Autotools build for external distribution (4.1.0). 4 | 5 | -------------------------------------------------------------------------------- /valapps/MMIO_Mapping/RTL_valid_DFH/afu_dfh.mem: -------------------------------------------------------------------------------- 1 | 1000010000000000 // AFU DFH 2 | 3B561FBB2ADE456D // AFU_ID_L 3 | 949C47DEDA1AEEB8 // AFU_ID_H 4 | 5 | -------------------------------------------------------------------------------- /aalutils/cpuset/xfrtasks.sh: -------------------------------------------------------------------------------- 1 | for var in `cat /sys/fs/cgroup/cpuset/tasks` 2 | do 3 | sudo /bin/echo $var > /sys/fs/cgroup/cpuset/CpuSubset1/tasks 4 | done 5 | -------------------------------------------------------------------------------- /swval/sdk/tests/standalone/Makefile.am: -------------------------------------------------------------------------------- 1 | # INTEL CONFIDENTIAL - For Intel Internal Use Only 2 | SUBDIRS=\ 3 | OSAL_TestSem \ 4 | OSAL_TestThreadGroup \ 5 | isolated 6 | -------------------------------------------------------------------------------- /valapps/env.sh.in: -------------------------------------------------------------------------------- 1 | export LD_LIBRARY_PATH=@CMAKE_INSTALL_PREFIX@/lib:@CMAKE_INSTALL_PREFIX@/tests:$LD_LIBRARY_PATH 2 | export PATH=@CMAKE_INSTALL_PREFIX@/bin:$PATH 3 | 4 | -------------------------------------------------------------------------------- /swval/sdk/tests/harnessed/Makefile.am: -------------------------------------------------------------------------------- 1 | # INTEL CONFIDENTIAL - For Intel Internal Use Only 2 | SUBDIRS=\ 3 | gtest \ 4 | gtest/gtcommon \ 5 | gtest/swtest \ 6 | gtest/nlb0test 7 | -------------------------------------------------------------------------------- /aalutils/cpuset/xfrtasks2.sh: -------------------------------------------------------------------------------- 1 | ps -A -o pid > pid_lx 2 | for var in `cat pid_lx` 3 | do 4 | sudo /bin/echo $var > /sys/fs/cgroup/cpuset/CpuSubset1/tasks 5 | done 6 | rm pid_lx 7 | -------------------------------------------------------------------------------- /aalkernel/AUTHORS: -------------------------------------------------------------------------------- 1 | joe.grecco@intel.com 2 | henry.mitchel@intel.com 3 | aaron.j.grier@intel.com 4 | tim.whisonant@intel.com 5 | sadruta.chandrashekar@intel.com 6 | amr.elshennawy@intel.com 7 | -------------------------------------------------------------------------------- /aaluser/AUTHORS: -------------------------------------------------------------------------------- 1 | joe.grecco@intel.com 2 | henry.mitchel@intel.com 3 | aaron.j.grier@intel.com 4 | tim.whisonant@intel.com 5 | sadruta.chandrashekar@intel.com 6 | amr.elshennawy@intel.com 7 | -------------------------------------------------------------------------------- /aalutils/Scripts/ReadMe: -------------------------------------------------------------------------------- 1 | Removed newpcimem.c PCI_CONF.c pci.tar.gz to aalinternalonly/aalutils/Scripts 2 | in order to prevent any possible GPL contamination. 3 | 4 | Henry Mitchel 2015.12.23 5 | 6 | -------------------------------------------------------------------------------- /aaluser/win/aalsdk_win7_debug_x64.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | set errorlevel= 3 | call aalsdk_build.bat "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC" x64 "Win7 Debug" x64 %1 4 | exit /b %errorlevel% 5 | -------------------------------------------------------------------------------- /aaluser/win/aalsdk_win8_debug_x64.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | set errorlevel= 3 | call aalsdk_build.bat "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC" x64 "Win8 Debug" x64 %1 4 | exit /b %errorlevel% 5 | -------------------------------------------------------------------------------- /aaluser/ChangeLog: -------------------------------------------------------------------------------- 1 | 2014-11-14 Tim Whisonant 2 | 3 | * User Mode SDK: split out into separate project. (4.2.0). 4 | * all: Initial Autotools build for external distribution (3.1.0). 5 | -------------------------------------------------------------------------------- /aaluser/win/aalsdk_win7_debug_win32.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | set errorlevel= 3 | call aalsdk_build.bat "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC" x86 "Win7 Debug" Win32 %1 4 | exit /b %errorlevel% 5 | -------------------------------------------------------------------------------- /aaluser/win/aalsdk_win7_release_x64.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | set errorlevel= 3 | call aalsdk_build.bat "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC" x64 "Win7 Release" x64 %1 4 | exit /b %errorlevel% 5 | -------------------------------------------------------------------------------- /aaluser/win/aalsdk_win8.1_debug_x64.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | set errorlevel= 3 | call aalsdk_build.bat "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC" x64 "Win8.1 Debug" x64 %1 4 | exit /b %errorlevel% 5 | -------------------------------------------------------------------------------- /aaluser/win/aalsdk_win8_debug_win32.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | set errorlevel= 3 | call aalsdk_build.bat "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC" x86 "Win8 Debug" Win32 %1 4 | exit /b %errorlevel% 5 | -------------------------------------------------------------------------------- /aaluser/win/aalsdk_win8_release_x64.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | set errorlevel= 3 | call aalsdk_build.bat "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC" x64 "Win8 Release" x64 %1 4 | exit /b %errorlevel% 5 | -------------------------------------------------------------------------------- /aaluser/win/aalsdk_win7_release_win32.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | set errorlevel= 3 | call aalsdk_build.bat "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC" x86 "Win7 Release" Win32 %1 4 | exit /b %errorlevel% 5 | -------------------------------------------------------------------------------- /aaluser/win/aalsdk_win8.1_debug_win32.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | set errorlevel= 3 | call aalsdk_build.bat "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC" x86 "Win8.1 Debug" Win32 %1 4 | exit /b %errorlevel% 5 | -------------------------------------------------------------------------------- /aaluser/win/aalsdk_win8.1_release_x64.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | set errorlevel= 3 | call aalsdk_build.bat "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC" x64 "Win8.1 Release" x64 %1 4 | exit /b %errorlevel% 5 | -------------------------------------------------------------------------------- /aaluser/win/aalsdk_win8_release_win32.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | set errorlevel= 3 | call aalsdk_build.bat "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC" x86 "Win8 Release" Win32 %1 4 | exit /b %errorlevel% 5 | -------------------------------------------------------------------------------- /aalkernel/build/40-aalsdk.rules.in: -------------------------------------------------------------------------------- 1 | ACTION=="remove", GOTO="aalsdk_end" 2 | 3 | KERNEL=="aalrms*", MODE="0666" 4 | KERNEL=="aalresmgr*", MODE="0666" 5 | KERNEL=="uidrv*", MODE="0666" 6 | 7 | LABEL="aalsdk_end" 8 | -------------------------------------------------------------------------------- /aaluser/win/aalsdk_win8.1_release_win32.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | set errorlevel= 3 | call aalsdk_build.bat "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC" x86 "Win8.1 Release" Win32 %1 4 | exit /b %errorlevel% 5 | -------------------------------------------------------------------------------- /valapps/ld_library_path: -------------------------------------------------------------------------------- 1 | # INTEL CONFIDENTIAL - For Intel Internal Use Only 2 | 3 | export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$PWD/vallib" 4 | if [ $# -gt 0 ]; then 5 | for d in $@ ; do 6 | export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$d" 7 | done 8 | fi 9 | -------------------------------------------------------------------------------- /aalutils/cpuset/CpuSet4.conf: -------------------------------------------------------------------------------- 1 | description "Mount CpuSet" 2 | start on filesystem 3 | task 4 | script 5 | mkdir /sys/fs/cgroup/cpuset 6 | mount -t cgroup -o rw,relatime,cpuset cpuset /sys/fs/cgroup/cpuset 7 | mkdir /sys/fs/cgroup/cpuset/CpuSubset1 8 | end script 9 | -------------------------------------------------------------------------------- /valapps/Error/main.cpp: -------------------------------------------------------------------------------- 1 | // INTEL CONFIDENTIAL - For Intel Internal Use Only 2 | 3 | // valapps/Error/main.cpp 4 | 5 | #include 6 | #include 7 | 8 | 9 | int main(int argc, char *argv[]) 10 | { 11 | 12 | return 0; 13 | } 14 | 15 | -------------------------------------------------------------------------------- /swval/win/libgtest.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /swval/sdk/tests/standalone/standalone.at: -------------------------------------------------------------------------------- 1 | # Standalone (no test harness) tests. -*- Autotest -*- 2 | 3 | # OSAL_TestSem 4 | m4_include([standalone/OSAL_TestSem/OSAL_TestSem.at]) 5 | 6 | # OSAL_TestThreadGroup 7 | m4_include([standalone/OSAL_TestThreadGroup/OSAL_TestThreadGroup.at]) 8 | 9 | -------------------------------------------------------------------------------- /valapps/Power_Thermal/main.cpp: -------------------------------------------------------------------------------- 1 | // INTEL CONFIDENTIAL - For Intel Internal Use Only 2 | 3 | // valapps/Power_Thermal/main.cpp 4 | 5 | #include 6 | #include 7 | 8 | 9 | int main(int argc, char *argv[]) 10 | { 11 | 12 | return 0; 13 | } 14 | 15 | -------------------------------------------------------------------------------- /valapps/build.json.in: -------------------------------------------------------------------------------- 1 | { 2 | "name" : "@CMAKE_PROJECT_NAME@", 3 | "version" : "@VALAPPS_VERSION_MAJOR@.@VALAPPS_VERSION_MINOR@.@VALAPPS_VERSION_PATCH@", 4 | "branch" : "@GIT_BRANCH@", 5 | "commit" : "@GIT_COMMIT@", 6 | "hostname" : "@HOSTNAME@" 7 | } 8 | 9 | 10 | -------------------------------------------------------------------------------- /swval/sdk/tests/standalone/OSAL_TestSem/OSAL_TestSem.at: -------------------------------------------------------------------------------- 1 | # OSAL_TestSem -*- Autotest -*- 2 | 3 | AT_BANNER([[OSAL_TestSem]]) 4 | 5 | AT_SETUP([Sem checkout]) 6 | AT_SKIP_IF([test "x${at_arg_standalone}" != "x:"]) 7 | AT_CHECK([OSAL_TestSem], [0], [ignore], [ignore]) 8 | AT_CLEANUP 9 | 10 | -------------------------------------------------------------------------------- /swval/sdk/tests/harnessed/gtest/gtest.at: -------------------------------------------------------------------------------- 1 | # Google Tests. -*- Autotest -*- 2 | 3 | # Google Tests for "Software" Services and Support. 4 | m4_include([harnessed/gtest/swtest/swtest.at]) 5 | 6 | # Google Tests requiring an NLB Lpbk1 bit stream. 7 | m4_include([harnessed/gtest/nlb0test/nlb0test.at]) 8 | 9 | -------------------------------------------------------------------------------- /valapps/cmdq/nlb.json: -------------------------------------------------------------------------------- 1 | { 2 | "continuous" : true, 3 | "timeout" : 10.0, // seconds 4 | "channels": 5 | { 6 | // read is either vl0, vh0, vh1, or va 7 | "read" : "vl0", 8 | // read is either vl0, vh0, vh1, or va 9 | "write" : "vl0" 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /swval/sdk/tests/run/OSAL_TestSem.in: -------------------------------------------------------------------------------- 1 | #!@SHELL@ 2 | # @configure_input@ -*- shell-script -*- 3 | # Do what it takes to run OSAL_TestSem as created by 'make check'. 4 | # INTEL CONFIDENTIAL - For Intel Internal Use Only 5 | exec '@abs_top_builddir@/tests/standalone/OSAL_TestSem/OSAL_TestSem' ${1+"$@"} 6 | -------------------------------------------------------------------------------- /swval/sdk/tests/run/nlb0test.in: -------------------------------------------------------------------------------- 1 | #!@SHELL@ 2 | # @configure_input@ -*- shell-script -*- 3 | # Do what it takes to run the nlb0test binary as created by 'make check'. 4 | # INTEL CONFIDENTIAL - For Intel Internal Use Only 5 | exec '@abs_top_builddir@/tests/harnessed/gtest/nlb0test/nlb0test' ${1+"$@"} 6 | -------------------------------------------------------------------------------- /swval/sdk/scripts/gdb-swtest: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # INTEL CONFIDENTIAL - For Intel Internal Use Only 3 | 4 | shopt -o -s nounset 5 | 6 | declare -r SCRIPT_NAME='gdb-swtest' 7 | 8 | . ./gdb-common 9 | 10 | run_gdbtui "${VPATH}/tests/harnessed/gtest/swtest/.libs/swtest" ${1+"$@"} --no-timeout 11 | 12 | exit $? 13 | -------------------------------------------------------------------------------- /swval/sdk/m4/cxx.m4: -------------------------------------------------------------------------------- 1 | dnl INTEL CONFIDENTIAL - For Intel Internal Use Only 2 | 3 | dnl # AALSDK_PROG_CXXFILT 4 | dnl # --- 5 | AC_DEFUN([AALSDK_PROG_CXXFILT], [ 6 | AC_ARG_VAR([CXXFILT], [demangle C++ and Java symbols]) 7 | AS_IF([test "x${CXXFILT}" = x], [AC_PATH_PROG([CXXFILT], [c++filt])]) 8 | ]) 9 | 10 | -------------------------------------------------------------------------------- /swval/sdk/gdb/breakpoints: -------------------------------------------------------------------------------- 1 | # INTEL CONFIDENTIAL - For Intel Internal Use Only 2 | 3 | #break dlopen 4 | #break pthread_create 5 | #break __cxa_pure_virtual 6 | 7 | break main 8 | commands 9 | silent 10 | breakpoint_mutex_lock 11 | thread name main 12 | breakpoint_mutex_unlock 13 | #continue 14 | end 15 | 16 | -------------------------------------------------------------------------------- /swval/sdk/scripts/gdb-OSAL_TestSem: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # INTEL CONFIDENTIAL - For Intel Internal Use Only 3 | 4 | shopt -o -s nounset 5 | 6 | declare -r SCRIPT_NAME='gdb-OSAL_TestSem' 7 | 8 | . ./gdb-common 9 | 10 | run_gdbtui "${VPATH}/tests/standalone/OSAL_TestSem/.libs/OSAL_TestSem" ${1+"$@"} 11 | 12 | exit $? 13 | -------------------------------------------------------------------------------- /valapps/valapp/client_factory.cpp: -------------------------------------------------------------------------------- 1 | #include "client_factory.h" 2 | 3 | 4 | client_factory* client_factory::instance_ = 0; 5 | 6 | client_factory* 7 | client_factory::instance() 8 | { 9 | if (instance_ == 0) 10 | { 11 | instance_ = new client_factory(); 12 | } 13 | return instance_; 14 | } 15 | 16 | -------------------------------------------------------------------------------- /valapps/Read_Perf_Counters/breakpoints: -------------------------------------------------------------------------------- 1 | # INTEL CONFIDENTIAL - For Intel Internal Use Only 2 | 3 | #break dlopen 4 | #break pthread_create 5 | #break __cxa_pure_virtual 6 | 7 | break main 8 | commands 9 | silent 10 | breakpoint_mutex_lock 11 | thread name main 12 | breakpoint_mutex_unlock 13 | #continue 14 | end 15 | 16 | -------------------------------------------------------------------------------- /swval/sdk/tests/run/OSAL_TestThreadGroup.in: -------------------------------------------------------------------------------- 1 | #!@SHELL@ 2 | # @configure_input@ -*- shell-script -*- 3 | # Do what it takes to run OSAL_TestThreadGroup as created by 'make check'. 4 | # INTEL CONFIDENTIAL - For Intel Internal Use Only 5 | exec '@abs_top_builddir@/tests/standalone/OSAL_TestThreadGroup/OSAL_TestThreadGroup' ${1+"$@"} 6 | -------------------------------------------------------------------------------- /swval/sdk/tests/standalone/OSAL_TestThreadGroup/OSAL_TestThreadGroup.at: -------------------------------------------------------------------------------- 1 | # OSAL_TestThreadGroup -*- Autotest -*- 2 | 3 | AT_BANNER([[OSAL_TestThreadGroup]]) 4 | 5 | AT_SETUP([Thread Group checkout]) 6 | AT_SKIP_IF([test "x${at_arg_standalone}" != "x:"]) 7 | AT_CHECK([OSAL_TestThreadGroup], [0], [ignore], [ignore]) 8 | AT_CLEANUP 9 | 10 | -------------------------------------------------------------------------------- /swval/sdk/tests/harnessed/gtest/swtest/swtest.at: -------------------------------------------------------------------------------- 1 | # Software-only Google Tests -*- Autotest -*- 2 | 3 | AT_BANNER([[gtest - Software-only Tests]]) 4 | 5 | AT_SETUP([SWTest]) 6 | AT_SKIP_IF([test "x${WITH_GTEST}" != xyes || test "x${at_arg_swtest}" != "x:"]) 7 | AT_CHECK([swtest ${GTEST_OPTS}], [0], [ignore], [ignore]) 8 | AT_CLEANUP 9 | 10 | -------------------------------------------------------------------------------- /swval/gtest/clean_gtest.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | set GTEST=gtest-1.7.0 4 | 5 | if not exist "temp-%GTEST%.tar" goto check_gtest 6 | echo Removing temp-%GTEST%.tar 7 | del /Q "temp-%GTEST%.tar" 8 | 9 | :check_gtest 10 | if not exist "%GTEST%" goto success 11 | echo Removing %GTEST% 12 | rd /Q /S "%GTEST%" 13 | 14 | :success 15 | exit /b 0 16 | 17 | -------------------------------------------------------------------------------- /swval/sdk/scripts/gdb-OSAL_TestThreadGroup: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # INTEL CONFIDENTIAL - For Intel Internal Use Only 3 | 4 | shopt -o -s nounset 5 | 6 | declare -r SCRIPT_NAME='gdb-OSAL_TestThreadGroup' 7 | 8 | . ./gdb-common 9 | 10 | run_gdbtui "${VPATH}/tests/standalone/OSAL_TestThreadGroup/.libs/OSAL_TestThreadGroup" ${1+"$@"} 11 | 12 | exit $? 13 | -------------------------------------------------------------------------------- /swval/sdk/tests/harnessed/gtest/nlb0test/nlb0test.at: -------------------------------------------------------------------------------- 1 | # NLB Lpbk1 Google Tests -*- Autotest -*- 2 | 3 | AT_BANNER([[gtest - NLB Lpbk1 mode0 Tests]]) 4 | 5 | AT_SETUP([NLB0Test]) 6 | AT_SKIP_IF([test "x${WITH_GTEST}" != xyes || test "x${at_arg_nlb0test}" != "x:"]) 7 | AT_CHECK([nlb0test ${GTEST_OPTS}], [0], [ignore], [ignore]) 8 | AT_CLEANUP 9 | 10 | -------------------------------------------------------------------------------- /swval/sdk/tests/standalone/OSAL_TestSem/Makefile.am: -------------------------------------------------------------------------------- 1 | # INTEL CONFIDENTIAL - For Intel Internal Use Only 2 | check_PROGRAMS=OSAL_TestSem 3 | 4 | OSAL_TestSem_SOURCES=\ 5 | OSAL_TestSem.cpp 6 | 7 | OSAL_TestSem_CPPFLAGS=\ 8 | -I$(top_srcdir)/include \ 9 | -I$(top_builddir)/include 10 | 11 | OSAL_TestSem_LDADD=\ 12 | $(top_builddir)/aas/OSAL/libOSAL.la 13 | -------------------------------------------------------------------------------- /swval/sdk/tests/run/swtest.in: -------------------------------------------------------------------------------- 1 | #!@SHELL@ 2 | # @configure_input@ -*- shell-script -*- 3 | # Do what it takes to run the swtest binary as created by 'make check'. 4 | # INTEL CONFIDENTIAL - For Intel Internal Use Only 5 | LD_LIBRARY_PATH='@abs_top_builddir@/tests/swvalmod/.libs' \ 6 | exec '@abs_top_builddir@/tests/harnessed/gtest/swtest/swtest' ${1+"$@"} 7 | -------------------------------------------------------------------------------- /aalsamples/doc/output/OUTPUT.dox: -------------------------------------------------------------------------------- 1 | ///@addtogroup HelloAALout 2 | ///@{ 3 | //!
 4 | ///HelloAAL OUTPUT
 5 | //! 
 6 | ///@}
 7 | /// @addtogroup HelloSPLLBout
 8 | /// @{
 9 | //! 
10 | ///HelloSPLLB OUTPUT
11 | //! 
12 | ///@}
13 | /// @addtogroup HelloCCINLBout
14 | /// @{
15 | //! 
16 | ///HelloCCINLB OUTPUT
17 | //! 
18 | ///@}
19 | 
20 | 


--------------------------------------------------------------------------------
/valapps/cmdq/CMakeLists.txt:
--------------------------------------------------------------------------------
 1 | set(CMAKE_CXX_FLAGS --std=c++11)
 2 | 
 3 | 
 4 | include_directories(${CMAKE_SOURCE_DIR}/valapp
 5 |                     ${AALSDK}/include)
 6 | 
 7 | link_directories(${AALSDK}/lib)
 8 | 
 9 | add_executable(cmdq main.cpp)
10 | target_link_libraries(cmdq wafu wutils)
11 | 
12 | install(TARGETS cmdq 
13 |         RUNTIME DESTINATION bin)
14 | 


--------------------------------------------------------------------------------
/swval/sdk/tests/package.m4:
--------------------------------------------------------------------------------
1 | # Signature of the current package.
2 | m4_define([AT_PACKAGE_NAME],      [swval-sdk])
3 | m4_define([AT_PACKAGE_TARNAME],   [swval-sdk])
4 | m4_define([AT_PACKAGE_VERSION],   [1.1.1])
5 | m4_define([AT_PACKAGE_STRING],    [swval-sdk 1.1.1])
6 | m4_define([AT_PACKAGE_BUGREPORT], [tim.whisonant@intel.com])
7 | m4_define([AT_PACKAGE_URL],       [])
8 | 


--------------------------------------------------------------------------------
/valapps/valapp/stap_tests.h:
--------------------------------------------------------------------------------
 1 | #pragma once
 2 | #include "afu_test.h"
 3 | 
 4 | class stap_tests : public afu_test
 5 | {
 6 |     public:
 7 | 
 8 |         virtual void register_tests();
 9 |         virtual void setup();
10 |         virtual void teardown();
11 |         //virtual void run();
12 | 
13 |     private:
14 |         void stap01(const arguments& args);
15 | };
16 | 


--------------------------------------------------------------------------------
/valapps/valapp/testit.py:
--------------------------------------------------------------------------------
 1 | import ctypes
 2 | 
 3 | def testit():
 4 |     sm = ctypes.CDLL("cva.so")
 5 |     sm.service_manager_create_services("services.json")
 6 |     svc = sm.service_manager_get_client("PR")
 7 |     #sm.reconfigure_service_reconfigure(svc, "/home/rrojo/mode0.rbf")
 8 |     #sm.service_manager_shutdown()
 9 | 
10 | if __name__ == "__main__":
11 |     testit()
12 | 
13 | 


--------------------------------------------------------------------------------
/aalutils/cpuset/all_pids_parent_mask.sh:
--------------------------------------------------------------------------------
 1 | rm pid_list
 2 | ps -A -o pid > pid_list
 3 | count=0
 4 | for var in `cat pid_list`
 5 | do
 6 |    if [ "$var" == "PID" ]
 7 |    then
 8 |      continue
 9 |    fi
10 |    count=`expr $count + 1`
11 |    echo "Pid: $var Total Pids: $count"
12 |    cat /proc/$var/status | grep PPid:
13 |    cat /proc/$var/status | grep Cpus_allowed_list:
14 | done
15 | 
16 | 


--------------------------------------------------------------------------------
/valapps/valapp/afu_reset.h:
--------------------------------------------------------------------------------
 1 | #pragma once
 2 | #include "afu_test.h"
 3 | #include "afu_client.h"
 4 | 
 5 | class afu_reset : public afu_test
 6 | {
 7 |     public:
 8 | 
 9 |         virtual void register_tests();
10 |         virtual void setup();
11 |         virtual void teardown();
12 | 
13 |     private:
14 |         void reset(const arguments& args);
15 |         afu_client::ptr_t afu_;
16 | };
17 | 


--------------------------------------------------------------------------------
/aalkernel/AAL_Driver_Package.filters:
--------------------------------------------------------------------------------
1 | 
2 | 
3 |   
4 |     
5 |       {8E41214B-6785-4CFE-B992-037D68949A14}
6 |       inf;inv;inx;mof;mc;
7 |     
8 |   
9 | 


--------------------------------------------------------------------------------
/swval/sdk/tests/standalone/OSAL_TestThreadGroup/Makefile.am:
--------------------------------------------------------------------------------
 1 | # INTEL CONFIDENTIAL - For Intel Internal Use Only
 2 | check_PROGRAMS=OSAL_TestThreadGroup
 3 | 
 4 | OSAL_TestThreadGroup_SOURCES=\
 5 | OSAL_TestThreadGroup.cpp
 6 | 
 7 | OSAL_TestThreadGroup_CPPFLAGS=\
 8 | -I$(top_srcdir)/include \
 9 | -I$(top_builddir)/include
10 | 
11 | OSAL_TestThreadGroup_LDADD=\
12 | $(top_builddir)/aas/OSAL/libOSAL.la 
13 | 


--------------------------------------------------------------------------------
/valapps/valapp/dma_buffer.h:
--------------------------------------------------------------------------------
 1 | #pragma once
 2 | #include "afu_test.h"
 3 | #include "afu_client.h"
 4 | 
 5 | class dma_buffer : public afu_test
 6 | {
 7 |     public:
 8 | 
 9 |         virtual void register_tests();
10 |         virtual void setup();
11 |         virtual void teardown();
12 | 
13 |     private:
14 |         void allocate_hold(const arguments &args);
15 |         afu_client::ptr_t afu_;
16 | };
17 | 


--------------------------------------------------------------------------------
/valapps/Read_Perf_Counters/run-gdb:
--------------------------------------------------------------------------------
 1 | #!/bin/bash
 2 | 
 3 | LD_LIBRARY_PATH="/home/tswhison/aalsdk/aalsdk/aaluser/mybuild/myinst/usr/local/lib:/home/tswhison/aalsdk/aalsdk/valapps/vallib" \
 4 |       /usr/bin/gdbtui \
 5 |       -quiet \
 6 |       -tty=${TTY:-'/dev/null'} \
 7 |       -d "/home/tswhison/aalsdk/aalsdk/valapps" \
 8 |       -x "${PWD}/gdbinit" \
 9 |       --args "./Read_Perf_Counters" ${1+"$@"}
10 | 
11 | 


--------------------------------------------------------------------------------
/swval/sdk/tests/standalone/isolated/Makefile.am:
--------------------------------------------------------------------------------
 1 | # INTEL CONFIDENTIAL - For Intel Internal Use Only
 2 | check_PROGRAMS=isolated
 3 | 
 4 | isolated_SOURCES=\
 5 | main.cpp \
 6 | isolated.h \
 7 | aal0014.h \
 8 | aal0014.cpp \
 9 | aal0017.h \
10 | aal0017.cpp
11 | 
12 | isolated_CPPFLAGS=\
13 | -I$(top_srcdir)/include \
14 | -I$(top_builddir)/include
15 | 
16 | isolated_LDADD=\
17 | $(top_builddir)/aas/OSAL/libOSAL.la 
18 | 


--------------------------------------------------------------------------------
/valapps/DMA_Buffer_5/__init__.py:
--------------------------------------------------------------------------------
 1 | from valapps import params
 2 | import itertools
 3 | import os
 4 | 
 5 | NumSocket = os.getenv('NumSocket')
 6 | 
 7 | def test_SW_BUF_05(self):
 8 |     '''
 9 |     SW-BUF-05
10 |     Verify that the IOVA operation retunrs that correct value for known buffers.    
11 |     '''
12 |     command = "./SW_BUF_05 " + NumSocket    
13 |     print command
14 |     self.exe(command)
15 | 
16 | 
17 | 


--------------------------------------------------------------------------------
/aalkernel/aalkernel Package/aalkernel Package.vcxproj.filters:
--------------------------------------------------------------------------------
1 | 
2 | 
3 |   
4 |     
5 |       {8E41214B-6785-4CFE-B992-037D68949A14}
6 |       inf;inv;inx;mof;mc;
7 |     
8 |   
9 | 


--------------------------------------------------------------------------------
/swval/krnl/aalkte/Kbuild.in:
--------------------------------------------------------------------------------
 1 | # INTEL CONFIDENTIAL - For Intel Internal Use Only
 2 | EXTRA_CFLAGS=\
 3 | -D__KERNEL__=1 \
 4 | -DENABLE_DEBUG=@ENABLE_DEBUG@ \
 5 | -DENABLE_ASSERT=@ENABLE_ASSERT@ \
 6 | -DDRV_NAME=\"@AALKTE_DRV_NAME@\" \
 7 | -DDRV_VERSION=\"@AALKTE_VERSION@\" \
 8 | -I$(M) \
 9 | -I$(aalkernelinc)
10 | 
11 | obj-m                 :=@AALKTE_DRV_NAME@.o
12 | @AALKTE_DRV_NAME@-objs:=aalkte-main.o aalkte-control.o aalkte-status.o aalkte-thr.o
13 | 


--------------------------------------------------------------------------------
/valapps/AFU_Reset/runtest.sh:
--------------------------------------------------------------------------------
 1 | #!/bin/bash -e
 2 | 
 3 | dmesg | tail -n 1000 | dd of=initial.txt
 4 | ./AFU_Reset
 5 | if [ $? -eq 0 ]
 6 |    then echo "Code run ok."
 7 | fi
 8 | 
 9 | 
10 | dmesg | tail -n 1000 | dd of=final.txt
11 | 
12 | diff -a --suppress-common-lines final.txt initial.txt | grep "<" | dd of=differences.txt
13 | grep -Fxq differences.txt expected.txt
14 | if [ $? -eq 1 ]
15 |    then echo "Test passed."
16 | fi
17 | 
18 | exit 0
19 | 
20 | 


--------------------------------------------------------------------------------
/valapps/valapp/Loggable.h:
--------------------------------------------------------------------------------
 1 | #pragma once
 2 | #include 
 3 | 
 4 | class Loggable
 5 | {
 6 |     public:
 7 |         Loggable(std::ostream& stream = std::cout) : log_(stream) {}
 8 |     protected:
 9 |         std::ostream & Log()
10 |         {
11 |             return log_;
12 |         }
13 | 
14 |        std::ostream & Log() const
15 |        {
16 |            return log_;
17 |        }
18 | 
19 |     private:
20 |         std::ostream &log_;
21 | };
22 | 


--------------------------------------------------------------------------------
/aalkernel/aalbus_windows/resource.h:
--------------------------------------------------------------------------------
 1 | //{{NO_DEPENDENCIES}}
 2 | // Microsoft Visual C++ generated include file.
 3 | // Used by aalbus1.rc
 4 | 
 5 | // Next default values for new objects
 6 | // 
 7 | #ifdef APSTUDIO_INVOKED
 8 | #ifndef APSTUDIO_READONLY_SYMBOLS
 9 | #define _APS_NEXT_RESOURCE_VALUE        101
10 | #define _APS_NEXT_COMMAND_VALUE         40001
11 | #define _APS_NEXT_CONTROL_VALUE         1001
12 | #define _APS_NEXT_SYMED_VALUE           101
13 | #endif
14 | #endif
15 | 


--------------------------------------------------------------------------------
/valapps/Platform_Power/ReadMe:
--------------------------------------------------------------------------------
 1 | Test scirpt usage:
 2 | 
 3 | verify_fpga_function    
 4 | 
 5 | Note: 
 6 | 1. build driver in release package first
 7 | 2. copy Hello_ALI_NLB, aliconfafu, and fpgadiag to same folder as this script. 
 8 |    configure $LD_LIBARY_PATH and $PATH for running Hello_ALI_NLB app
 9 | 3. For bypass credential input during driver installation, can run this script as root
10 | 
11 | 
12 | 


--------------------------------------------------------------------------------
/aalkernel/build/aalsdk.conf.in:
--------------------------------------------------------------------------------
1 | install aal /sbin/modprobe --ignore-install @AALBUS_DRV_NAME@ && /sbin/modprobe --ignore-install @AALRMS_DRV_NAME@ && /sbin/modprobe --ignore-install @AALRMC_DRV_NAME@ && /sbin/modprobe --ignore-install @CCIPCIEDRV_DRV_NAME@
2 | remove  aal /sbin/modprobe -r --ignore-remove @CCIPCIEDRV_DRV_NAME@ && /sbin/modprobe -r --ignore-remove @AALRMC_DRV_NAME@ && /sbin/modprobe -r --ignore-remove @AALRMS_DRV_NAME@ && /sbin/modprobe -r --ignore-remove @AALBUS_DRV_NAME@
3 | 
4 | 


--------------------------------------------------------------------------------
/swval/sdk/tests/harnessed/gtest/gtcommon/gtCommon_Config.cpp:
--------------------------------------------------------------------------------
 1 | // INTEL CONFIDENTIAL - For Intel Internal Use Only
 2 | #ifdef HAVE_CONFIG_H
 3 | # include 
 4 | #endif // HAVE_CONFIG_H
 5 | #include "gtCommon.h"
 6 | 
 7 | GlobalTestConfig GlobalTestConfig::sm_Instance;
 8 | GlobalTestConfig & GlobalTestConfig::GetInstance()
 9 | {
10 |    return GlobalTestConfig::sm_Instance;
11 | }
12 | 
13 | GlobalTestConfig::GlobalTestConfig() {}
14 | GlobalTestConfig::~GlobalTestConfig() {}
15 | 
16 | 


--------------------------------------------------------------------------------
/aaluser/ase/scripts/ase_functions.py:
--------------------------------------------------------------------------------
 1 | from __future__ import print_function
 2 | import os, re, sys
 3 | 
 4 | ################## FONT COLORS ##################
 5 | # Begin Red color
 6 | def begin_red_fontcolor():
 7 |     print("\033[1;31m")
 8 | 
 9 | # End Red color
10 | def end_red_fontcolor():
11 |     print("\033[1;m")
12 | 
13 | # Begin Green color
14 | def begin_green_fontcolor():
15 |     print("\033[32;1m")
16 | 
17 | # End green color
18 | def end_green_fontcolor():
19 |     print("\033[0m")
20 | 
21 | 
22 | 


--------------------------------------------------------------------------------
/swval/sdk/tests/harnessed/gtest/Makefile.am:
--------------------------------------------------------------------------------
 1 | # INTEL CONFIDENTIAL - For Intel Internal Use Only
 2 | 
 3 | if AAL_COND_GTEST
 4 | 
 5 | check_LTLIBRARIES=\
 6 | libgtest.la
 7 | 
 8 | nodist_libgtest_la_SOURCES=gtest-all.cc
 9 | gtest-all.cc:
10 | 	@ln -s $(GTEST_SRCDIR)/gtest-all.cc $@
11 | 
12 | libgtest_la_CPPFLAGS=$(GTEST_CPPFLAGS)
13 | libgtest_la_CFLAGS=$(GTEST_CFLAGS)
14 | libgtest_la_CXXFLAGS=$(GTEST_CXXFLAGS)
15 | libgtest_la_LDFLAGS=$(GTEST_LDFLAGS)
16 | 
17 | CLEANFILES=gtest-all.cc
18 | 
19 | endif
20 | 
21 | 


--------------------------------------------------------------------------------
/valapps/AFU_Reset/__init__.py:
--------------------------------------------------------------------------------
 1 | from os import environ
 2 | import os
 3 | 
 4 | NumSocket = os.getenv('NumSocket')
 5 | 
 6 | def test_SW_RESET_01(self):
 7 |     '''
 8 |     SW-RESET-01
 9 |     This is a simple reset test. This test runs the AFU_Reset app which will set the appropriate CSR to trigger a reset.
10 |     It will then use dmesg to look for indications that the AFU has indeed restarted
11 |     '''
12 |     command = "./SW_RESET_01 " + NumSocket
13 |       
14 |     print command
15 | 
16 |     self.exe(command)
17 | 
18 | 
19 | 


--------------------------------------------------------------------------------
/valapps/AFU_Reset/CMakeLists.txt:
--------------------------------------------------------------------------------
 1 | cmake_minimum_required(VERSION 2.8.4)
 2 | project(AFU_Reset)
 3 | 
 4 | set(CMAKE_CXX_STANDARD 11)
 5 | set(CMAKE_CXX_STANDARD_REQUIRED ON)
 6 | 
 7 | set(SOURCE_FILES main.cpp AFU_Reset.h)
 8 | add_executable(AFU_Reset ${SOURCE_FILES})
 9 | target_link_libraries(AFU_Reset)
10 | 
11 | include(CTest)
12 | enable_testing()
13 | 
14 | add_test(NAME AFU_Reset_test
15 |   COMMAND ${CMAKE_COMMAND}
16 |   -DTEST_PROG=$
17 |   -DSOURCEDIR=${PROJECT_SOURCE_DIR}
18 |   -P ${PROJECT_SOURCE_DIR}/runtest.cmake)
19 | 


--------------------------------------------------------------------------------
/swval/sdk/gdb/pretty-printers/fetch:
--------------------------------------------------------------------------------
 1 | #! /bin/sh
 2 | # INTEL CONFIDENTIAL - For Intel Internal Use Only
 3 | set -e
 4 | mkdir -p ./libstdc++-v3/python/libstdcxx/v6
 5 | cd ./libstdc++-v3/python/libstdcxx
 6 | wget http://gcc.gnu.org/svn/gcc/trunk/libstdc++-v3/python/libstdcxx/__init__.py
 7 | cd v6
 8 | wget http://gcc.gnu.org/svn/gcc/trunk/libstdc++-v3/python/libstdcxx/v6/__init__.py
 9 | wget http://gcc.gnu.org/svn/gcc/trunk/libstdc++-v3/python/libstdcxx/v6/printers.py
10 | wget http://gcc.gnu.org/svn/gcc/trunk/libstdc++-v3/python/libstdcxx/v6/xmethods.py
11 | 


--------------------------------------------------------------------------------
/swval/sdk/tests/testsuite.at:
--------------------------------------------------------------------------------
 1 | # Process this file with autom4te to create testsuite. -*- Autotest -*-
 2 | 
 3 | # Test suite for @PACKAGE@.
 4 | # INTEL CONFIDENTIAL - For Intel Internal Use Only
 5 | 
 6 | # Standalone (no test harness) tests
 7 | m4_include([standalone/standalone.at])
 8 | 
 9 | # Harnessed test cases
10 | m4_include([harnessed/harnessed.at])
11 | 
12 | # coverage analysis
13 | #m4_include([coverage/coverage.at])
14 | 
15 | # profiling
16 | #m4_include([profile/profile.at])
17 | 
18 | # memory error detection
19 | # m4_include([memory/memory.at])
20 | 


--------------------------------------------------------------------------------
/aaluser/utils/internal/qpiregs/ReadMe.txt:
--------------------------------------------------------------------------------
 1 | qpiregs is a simple utility that reads & prints a small set of QPI registers.
 2 | 
 3 | The application is linked with libpci, a part of the pciutils-devel package.
 4 | Be sure that the pciutils-devel package (and GNU make, gcc/g++) is installed on the system prior to building the application.
 5 | 
 6 | To install pciutils-devel on openSUSE:
 7 | $ sudo zypper in pciutils-devel
 8 | 
 9 | To build qpiregs:
10 | $ cd AALSDK/utils/internal/qpiregs # this directory
11 | $ make
12 | 
13 | To run qpiregs:
14 | $ ./qpiregs
15 | 
16 | 


--------------------------------------------------------------------------------
/swval/sdk/tests/harnessed/gtest/swtest/gtAASResMgr.cpp:
--------------------------------------------------------------------------------
 1 | // INTEL CONFIDENTIAL - For Intel Internal Use Only
 2 | #ifdef HAVE_CONFIG_H
 3 | # include 
 4 | #endif // HAVE_CONFIG_H
 5 | #include "gtCommon.h"
 6 | 
 7 | #include 
 8 | 
 9 | TEST(AASResMgr, coverage_placeholder)
10 | {
11 |    // This test ensures that some .gcda file is generated in aas/AASResourceManager/.libs
12 |    // to appease the coverage analysis scripts. When proper ULT's are added, this
13 |    // test can be replaced.
14 | 
15 |    InstRecMap m;
16 | }
17 | 
18 | 


--------------------------------------------------------------------------------
/valapps/Signal_Tap/__init__.py:
--------------------------------------------------------------------------------
 1 | from valapps import disabled
 2 | import os
 3 | 
 4 | NumSocket = os.getenv('NumSocket')
 5 | 
 6 | def test_SW_STAP_01(self):
 7 |   '''
 8 |   Obtain the signal tap resource of a port and verify the signature CSR build into the Signal
 9 |   Tap hardware.  This proves access to the HW and mapping to user space of the correct location
10 |   '''
11 |   command = "./SW_STAP_01 " + NumSocket
12 |       
13 |   print command
14 | 
15 |   self.exe(command)
16 | 
17 | @disabled
18 | def test_SW_STAP_02(self):
19 |     self.exe("../../aalsamples/MMLink/SW/mmlink")
20 | 


--------------------------------------------------------------------------------
/aaluser/utils/aalscan/aalscan.vcxproj.filters:
--------------------------------------------------------------------------------
 1 | 
 2 | 
 3 |   
 4 |     
 5 |       {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
 6 |       cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx
 7 |     
 8 |   
 9 |   
10 |     
11 |       Source Files
12 |     
13 |   
14 | 


--------------------------------------------------------------------------------
/valapps/Partial_Reconfig/PR_TwoApp/ali_nlb:
--------------------------------------------------------------------------------
 1 | #!/bin/bash
 2 | 
 3 | ## ************************************************
 4 | ##  Set AAL lib path
 5 | ## ************************************************
 6 | #export LD_LIBRARY_PATH=$PWD
 7 | 
 8 | 
 9 | ## ************************************************
10 | ##  run PR app with bitstream
11 | ## ************************************************
12 | 
13 | echo $1 $2 $3 $4
14 | 
15 | echo  "\\n./Hello_ALI_NLB/SW/helloALInlb   \\n"
16 | nlb_app/ALInlb $1 --bus=$2 --device=$3 --function=$4
17 | 
18 | echo  "\\n **** DONE**** \\n"
19 | 
20 | sleep 10
21 | 
22 | 
23 | 


--------------------------------------------------------------------------------
/aaluser/utils/data_model/data_model.vcxproj.filters:
--------------------------------------------------------------------------------
 1 | 
 2 | 
 3 |   
 4 |     
 5 |       {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
 6 |       cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx
 7 |     
 8 |   
 9 |   
10 |     
11 |       Source Files
12 |     
13 |   
14 | 
15 | 


--------------------------------------------------------------------------------
/valapps/valapp/utils.cpp:
--------------------------------------------------------------------------------
 1 | #include "utils.h"
 2 | #include 
 3 | #ifdef __linux
 4 | #include 
 5 | #endif
 6 | 
 7 | namespace utils
 8 | {
 9 | 
10 |     std::string get_typename(const std::type_info& tinfo)
11 |     {
12 | #ifdef __linux
13 |         int status;
14 |         std::string demangled_name = abi::__cxa_demangle(tinfo.name(), 0, 0, &status);
15 |         return demangled_name;
16 | #endif
17 |         return tinfo.name();
18 |     }
19 | 
20 |     bool path_exists(const std::string &path)
21 |     {
22 |         struct stat buffer;
23 |         return 0 == stat(path.c_str(), &buffer);
24 |     }
25 | }
26 | 


--------------------------------------------------------------------------------
/aalutils/Scripts/LicenseUpdate.sh:
--------------------------------------------------------------------------------
1 | # execute from aalkernel directory
2 | 
3 | # Find the file, then feed it to the perl script. First part is a good check. Uncomment the second part to do damage.
4 | find . -type f -exec grep -IHl 'Copyright' '{}' \; | xargs perl -pi.orig -e 's/Copyright[()Cc <]+([\d]{4,4}).* (Intel|INTEL)/Copyright(c) \1-2016, Intel/'
5 | 
6 | # for VHDL files from Arthur -- should not be needed in the future
7 | #find . -type f -exec grep -IHl 'Copyright' '{}' \; | xargs perl -pi.orig -e 's/Copyright[()Cc <]+(Intel|INTEL) +([\d]{4,4})[-, ]*([\d]{4,4}[-, ]*)*\./Copyright (c) \2-2010 Intel Corporation All Rights Reserved/'
8 | 
9 | 


--------------------------------------------------------------------------------
/valapps/UMsg_Allocation/UMsg_README.txt:
--------------------------------------------------------------------------------
 1 | To Test the UMsgs, 
 2 | 
 3 | Load the latest mode7 bitstream. Please note that the beta release bitstream won't work because the AFU ID has changed since then. 
 4 | 
 5 | Go to aalsdk/valapps/UMsg_Allocation.
 6 | Run $./UMsg_Allocation
 7 | This tests SW-UMSG-03, 04, 05, 06 & 07
 8 | 
 9 | To test SW-UMSG-01, go to /bin
10 | Run $./fpgasane_nlb400_mode7.sh
11 | 
12 | To test SW-UMSG-02, load a known BAD mode7 bitstream. It is available in atp-lab:~XFER/sadrutac/Bad_mode7_bitstreams/bdx-p_nlb400_24eb_seed3.rbf
13 | Go to /bin
14 | Run $./fpgasane_nlb400_mode7.sh 
15 | 


--------------------------------------------------------------------------------
/aaluser/aas/OSAL/dbg_oslthread_2.cpp:
--------------------------------------------------------------------------------
 1 | // INTEL CONFIDENTIAL - For Intel Internal Use Only
 2 | 
 3 | // dbg_oslthread_2.cpp
 4 | 
 5 | #ifdef DBG_OSLTHREAD
 6 | 
 7 | # if   defined( __AAL_WINDOWS__ )
 8 | 
 9 |    //std::cout << "thr: OSLThread::StartThread() del " << ::AAL::GetThreadID() << std::endl << std::flush;
10 |    ::AAL::Testing::DbgOSLThreadDelThr(::AAL::GetThreadID());
11 | 
12 | # elif defined( __AAL_LINUX__ )
13 | 
14 |    pthread_cleanup_pop(0);
15 |    {
16 |       AutoLock(&::AAL::Testing::gOSLThreadCountLock);
17 |       --::AAL::Testing::gOSLThreadCount;
18 |    }
19 | 
20 | # endif // OS
21 | 
22 | #endif // DBG_OSLTHREAD
23 | 
24 | 


--------------------------------------------------------------------------------
/swval/win/run-swtest.bat:
--------------------------------------------------------------------------------
 1 | @echo off
 2 | 
 3 | set errorlevel=
 4 | 
 5 | if not exist "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC" goto vc12
 6 | call aalsdk_build.bat "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC" x64 "Debug" x64
 7 | if '%errorlevel%' == '0' goto runtests
 8 | goto err
 9 | 
10 | :vc12
11 | call aalsdk_build.bat "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC" x64 "Debug" x64
12 | if '%errorlevel%' == '0' goto runtests
13 | goto err
14 | 
15 | 
16 | :runtests
17 | cd winbuild\Debug\x64\bin
18 | .\swtest.exe --gtest_print_time=0 --gtest_shuffle %*
19 | 
20 | :err
21 | exit /b %errorlevel%
22 | 


--------------------------------------------------------------------------------
/swval/sdk/scripts/run-standalone:
--------------------------------------------------------------------------------
 1 | #!/bin/bash
 2 | # INTEL CONFIDENTIAL - For Intel Internal Use Only
 3 | 
 4 | shopt -o -s nounset
 5 | 
 6 | declare -r SCRIPT_NAME='run-standalone'
 7 | 
 8 | . ./run-common
 9 | 
10 | declare ARGS=''
11 | 
12 | declare WANTLOGFILE=false
13 | declare WANTDISTCC=false
14 | while [ $# -gt 0 ]; do
15 |    case $1 in
16 |       --log)
17 |          WANTLOGFILE=true
18 |       ;;
19 |       --distcc)
20 |          WANTDISTCC=true
21 |       ;;
22 |       *)
23 |          ARGS="${ARGS} $1"
24 |       ;;
25 |    esac
26 |    shift
27 | done
28 | 
29 | setup ${WANTLOGFILE} ${WANTDISTCC}
30 | run_standalone ${ARGS}
31 | show_test_result $?
32 | exit $?
33 | 


--------------------------------------------------------------------------------
/swval/win/libAASResMgr.vcxproj.filters:
--------------------------------------------------------------------------------
 1 | 
 2 | 
 3 |   
 4 |     
 5 |     
 6 |     
 7 |   
 8 |   
 9 |     
10 |       {6758d9b9-f6c8-426a-9b7b-76dfc46baeae}
11 |     
12 |   
13 | 


--------------------------------------------------------------------------------
/valapps/DMA_Buffer/runtest.sh:
--------------------------------------------------------------------------------
 1 | #!/bin/bash -e
 2 | 
 3 | echo "***DMA_Buffer 1MB test"
 4 | ./DMA_Buffer -s 1 -d 2
 5 | if [ $? -eq 0 ]
 6 |    then echo "Passed."
 7 | fi
 8 | 
 9 | echo "***DMA_Buffer 2MB test"
10 | ./DMA_Buffer -s 2 -d 2
11 | if [ $? -eq 0 ]
12 |    then echo "Passed."
13 | fi
14 | 
15 | echo "***DMA_Buffer 3MB test"
16 | ./DMA_Buffer -s 3 -d 2
17 | if [ $? -eq 0 ]
18 |    then echo "Passed."
19 | fi
20 | 
21 | echo "***DMA_Buffer 4MB test"
22 | ./DMA_Buffer -s 4 -d 2
23 | if [ $? -eq 0 ]
24 |    then echo "Passed."
25 | fi
26 | 
27 | echo "***DMA_Buffer 5MB test"
28 | ./DMA_Buffer -s 5 -d 2
29 | if [ $? -eq 0 ]
30 |    then echo "Passed."
31 | fi
32 | 
33 | exit 0
34 | 
35 | 


--------------------------------------------------------------------------------
/aaluser/aas/OSAL/dbg_oslthread_1.cpp:
--------------------------------------------------------------------------------
 1 | // INTEL CONFIDENTIAL - For Intel Internal Use Only
 2 | 
 3 | // dbg_oslthread_1.cpp
 4 | 
 5 | #ifdef DBG_OSLTHREAD
 6 | 
 7 | # if   defined( __AAL_WINDOWS__ )
 8 | 
 9 |    //std::cout << "thr: OSLThread::StartThread() new " << ::AAL::GetThreadID() << std::endl << std::flush;
10 |    ::AAL::Testing::DbgOSLThreadNewThr(::AAL::GetThreadID());
11 | 
12 | # elif defined( __AAL_LINUX__ )
13 | 
14 |    {
15 |       AutoLock(&::AAL::Testing::gOSLThreadCountLock);
16 |       ++::AAL::Testing::gOSLThreadCount;
17 |    }
18 |    pthread_cleanup_push(::AAL::Testing::pthread_OSLThreadCount_cleanup, pThread);
19 | 
20 | # endif // OS
21 | 
22 | #endif // DBG_OSLTHREAD
23 | 
24 | 


--------------------------------------------------------------------------------
/valapps/valapp/perf_counters_tests.h:
--------------------------------------------------------------------------------
 1 | #pragma once
 2 | #include "afu_test.h"
 3 | #include "afu_client.h"
 4 | #include 
 5 | 
 6 | class perf_counters_tests : public afu_test
 7 | {
 8 |     public:
 9 | 
10 |         virtual void register_tests();
11 |         virtual void setup();
12 |         virtual void teardown();
13 | 
14 |     private:
15 |         void perfc01(const arguments& args);
16 |         void perfc02(const arguments& args);
17 |         void perfc03(const arguments& args);
18 |         
19 |         bool validate(const AAL::NamedValueSet &lhs, const AAL::NamedValueSet &rhs);
20 | 
21 |         afu_client::ptr_t nlb0_;
22 |         afu_client::ptr_t fme_;
23 | };
24 | 


--------------------------------------------------------------------------------
/swval/sdk/scripts/run-everything:
--------------------------------------------------------------------------------
 1 | #!/bin/bash
 2 | # INTEL CONFIDENTIAL - For Intel Internal Use Only
 3 | 
 4 | shopt -o -s nounset
 5 | 
 6 | declare -r SCRIPT_NAME='run-everything'
 7 | 
 8 | . ./run-common
 9 | 
10 | declare ARGS="--gtest_print_time=0 --gtest_shuffle --gtest_random_seed=${RANDOM}"
11 | 
12 | declare WANTLOGFILE=false
13 | declare WANTDISTCC=false
14 | while [ $# -gt 0 ]; do
15 |    case $1 in
16 |       --log)
17 |          WANTLOGFILE=true
18 |       ;;
19 |       --distcc)
20 |          WANTDISTCC=true
21 |       ;;
22 |       *)
23 |          ARGS="${ARGS} $1"
24 |       ;;
25 |    esac
26 |    shift
27 | done
28 | 
29 | setup ${WANTLOGFILE} ${WANTDISTCC}
30 | run_everything ${ARGS}
31 | exit $?
32 | 


--------------------------------------------------------------------------------
/aalkernel/aalbus_windows/aalbus.mof:
--------------------------------------------------------------------------------
 1 | #PRAGMA AUTORECOVER
 2 | 
 3 | [Dynamic, Provider("WMIProv"),
 4 |  WMI,
 5 |  Description("AAL Bus driver information"),
 6 |  guid("{0A78829F-0294-4723-822D-CA26B2BF7085}"),
 7 |  locale("MS\\0x409")]
 8 | class AALBusInformation
 9 | {
10 |     [key, read]
11 |      string InstanceName;
12 |     [read] boolean Active;
13 | 
14 |     [WmiDataId(1),
15 |      read,
16 |      Description("Number of errors that occurred on this device")]
17 |     uint32   ErrorCount;
18 | 
19 |     [WmiDataId(2),
20 |      read,
21 |      write,
22 |      Description("The DebugPrintLevel property indicates the debug output level of toaster bus device.")]
23 |     uint32 DebugPrintLevel;
24 | 
25 | };
26 | 
27 | 


--------------------------------------------------------------------------------
/swval/sdk/scripts/run-swtest:
--------------------------------------------------------------------------------
 1 | #!/bin/bash
 2 | # INTEL CONFIDENTIAL - For Intel Internal Use Only
 3 | 
 4 | shopt -o -s nounset
 5 | 
 6 | declare -r SCRIPT_NAME='run-swtest'
 7 | 
 8 | . ./run-common
 9 | 
10 | declare ARGS="--gtest_print_time=0 --gtest_shuffle --gtest_random_seed=${RANDOM}"
11 | 
12 | declare WANTLOGFILE=false
13 | declare WANTDISTCC=false
14 | while [ $# -gt 0 ]; do
15 |    case $1 in
16 |       --log)
17 |          WANTLOGFILE=true
18 |       ;;
19 |       --distcc)
20 |          WANTDISTCC=true
21 |       ;;
22 |       *)
23 |          ARGS="${ARGS} $1"
24 |       ;;
25 |    esac
26 |    shift
27 | done
28 | 
29 | setup ${WANTLOGFILE} ${WANTDISTCC}
30 | run_swtest ${ARGS}
31 | show_test_result $?
32 | exit $?
33 | 


--------------------------------------------------------------------------------
/swval/sdk/scripts/valgrind-swtest:
--------------------------------------------------------------------------------
 1 | #!/bin/bash
 2 | # INTEL CONFIDENTIAL - For Intel Internal Use Only
 3 | 
 4 | shopt -o -s nounset
 5 | 
 6 | declare -r SCRIPT_NAME='valgrind-swtest'
 7 | 
 8 | . ./valgrind-common
 9 | 
10 | declare ARGS='--gtest_print_time=0'
11 | 
12 | declare WANTDISTCC=false
13 | while [ $# -gt 0 ]; do
14 |    case $1 in
15 |       --clean)
16 |          clean_valgrind_all "tests/harnessed/gtest/swtest/.libs/swtest"
17 |          exit 0
18 |       ;;
19 |       --distcc)
20 |          WANTDISTCC=true
21 |       ;;
22 |       *)
23 |          ARGS="${ARGS} $1"
24 |       ;;
25 |    esac
26 |    shift
27 | done
28 | 
29 | run_valgrind_all ${WANTDISTCC} "tests/harnessed/gtest/swtest/.libs/swtest" ${ARGS}
30 | exit $?
31 | 


--------------------------------------------------------------------------------
/valapps/valapp/process.h:
--------------------------------------------------------------------------------
 1 | #pragma once
 2 | #include 
 3 | #include 
 4 | #include 
 5 | #include 
 6 | 
 7 | namespace utils
 8 | {
 9 |     class process
10 |     {
11 |         public:
12 |             ~process();
13 |             typedef std::shared_ptr ptr_t;
14 |             static process start(const std::string &file,
15 |                                  const std::vector &args);
16 | 
17 |             
18 |             int wait(int timeout_msec = -1);
19 |             void terminate(int signal);
20 |             void terminate();
21 |         private:
22 |             process(int pid);
23 |             int pid_;
24 | 
25 |     };
26 |   
27 | 
28 | } // end namespace utils
29 | 


--------------------------------------------------------------------------------
/aaluser/utils/substitute/substitute.vcxproj.filters:
--------------------------------------------------------------------------------
 1 | 
 2 | 
 3 |   
 4 |     
 5 |       {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
 6 |       cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx
 7 |     
 8 |   
 9 |   
10 |     
11 |       Source Files
12 |     
13 |   
14 |   
15 |     
16 |       Source Files
17 |     
18 |   
19 | 


--------------------------------------------------------------------------------
/valapps/valapp/mmio_mapping.h:
--------------------------------------------------------------------------------
 1 | #pragma once
 2 | #include "afu_test.h"
 3 | #include "afu_client.h"
 4 | 
 5 | class mmio_mapping : public afu_test
 6 | {
 7 |     public:
 8 | 
 9 |         virtual void register_tests();
10 |         virtual void setup();
11 |         virtual void teardown();
12 | 
13 |     private:
14 |         void mmio_write_onecl(const arguments& args);
15 |         void mmio_whole_region(const arguments& args);
16 |         void mmio_bounds_check(const arguments& args);
17 |         void mmio_length(const arguments& args);
18 |         void dfh_feature(const arguments& args);
19 |         void corrupt_dfh(const arguments& args);
20 |         void mmio_stress(const arguments& args);
21 | 
22 |         afu_client::ptr_t nlb0_;
23 | 
24 | };
25 | 


--------------------------------------------------------------------------------
/swval/sdk/tests/atlocal.in:
--------------------------------------------------------------------------------
 1 | # @configure_input@              -*- shell-script -*-
 2 | # Configurable variable values for @PACKAGE@ test suite.
 3 | # INTEL CONFIDENTIAL - For Intel Internal Use Only
 4 | 
 5 | # Create any variables to capture the required configure substitutions here.
 6 | 
 7 | # (The following are specific to @PACKAGE@.)
 8 | # Whether this is a debug build, ./configure --enable-aal-dbg
 9 | ENABLE_DEBUG=@AALSDK_ENABLE_DBG@
10 | 
11 | # Whether runtime assertions are enabled, ./configure --enable-aal-assert
12 | ENABLE_ASSERT=@AALSDK_ENABLE_ASSERT@
13 | 
14 | # Whether a local gtest tarball was found.
15 | WITH_GTEST=@WITH_GTEST@
16 | 
17 | # Whether a valgrind analysis has been requested, ./configure --with-valgrind
18 | WITH_VALGRIND=@WITH_VALGRIND@
19 | 
20 | 


--------------------------------------------------------------------------------
/swval/sdk/tests/harnessed/gtest/nlb0test/Makefile.am:
--------------------------------------------------------------------------------
 1 | # INTEL CONFIDENTIAL - For Intel Internal Use Only
 2 | 
 3 | if AAL_COND_GTEST
 4 | 
 5 | check_PROGRAMS=\
 6 | nlb0test
 7 | 
 8 | nlb0test_SOURCES=\
 9 | main.cpp
10 | 
11 | nlb0test_CPPFLAGS=\
12 | -I$(top_srcdir)/include \
13 | -I$(top_srcdir)/tests/harnessed/gtest/gtcommon \
14 | -I$(top_srcdir)/tests/swvalmod \
15 | -I$(top_builddir)/include $(GTEST_CPPFLAGS)
16 | 
17 | nlb0test_LDADD=\
18 | $(top_builddir)/tests/harnessed/gtest/libgtest.la \
19 | $(top_builddir)/tests/harnessed/gtest/gtcommon/libgtcommon.la \
20 | $(top_builddir)/aas/OSAL/libOSAL.la \
21 | $(top_builddir)/aas/AASLib/libAAS.la \
22 | $(top_builddir)/aas/AALRuntime/libaalrt.la
23 | 
24 | else
25 | 
26 | EXTRA_DIST=\
27 | main.cpp
28 | 
29 | endif
30 | 
31 | 


--------------------------------------------------------------------------------
/aaluser/aas/AASResourceManager/libAASResMgr.vcxproj.filters:
--------------------------------------------------------------------------------
 1 | 
 2 | 
 3 |   
 4 |     
 5 |       Source Files
 6 |     
 7 |     
 8 |       Source Files
 9 |     
10 |     
11 |       Source Files
12 |     
13 |   
14 |   
15 |     
16 |       {6758d9b9-f6c8-426a-9b7b-76dfc46baeae}
17 |     
18 |   
19 | 


--------------------------------------------------------------------------------
/valapps/CPackConfig.cmake.in:
--------------------------------------------------------------------------------
 1 | SET(CPACK_PACKAGE_NAME "valapps")
 2 | SET(CPACK_PACKAGE_VERSION_MAJOR 0)
 3 | SET(CPACK_PACKAGE_VERSION_MINOR 0)
 4 | SET(CPACK_PACKAGE_VERSION_PATCH 1)
 5 | SET(CPACK_PACKAGE_DESCRIPTION "Valapps with required dependencies. Built from @GIT_BRANCH@:@GIT_COMMIT@")
 6 | SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Valapps with required dependencies")
 7 | SET(CPACK_SYSTEM_NAME "Linux")
 8 | SET(CPACK_PACKAGE_VENDOR "Intel")
 9 | SET(CPACK_CMAKE_GENERATOR "Unix Makefiles")
10 | SET(CPACK_GENERATOR "TGZ;TZ;")
11 | SET(CMAKE_INSTALL_CMAKE_PROJECTS "@CMAKE_BINARY_DIR@;valapps;ALL;/")
12 | SET(CPACK_INSTALLED_DIRECTORIES "@CMAKE_INSTALL_PREFIX@;.")
13 | SET(CPACK_PACKAGE_FILE_NAME "valapps")
14 | SET(CPACK_PACKAGE_CONTACT "rodrigo.rojo@intel.com")
15 | SET(CPACK_PACKAGE_INSTALL_DIRECTORY "valapps")
16 | 
17 | 


--------------------------------------------------------------------------------
/aalutils/Scripts/stripGPL.pl:
--------------------------------------------------------------------------------
 1 | # execute from aalkernel directory
 2 | 
 3 | # Find the file, then feed it to the perl script. First part is a good check. Uncomment the second part to do damage.
 4 | # find . -type f | xargs perl -0777 -pi.orig -e 's/\/\/ +This +file +is +provided +under +a +dual.*BSD LICENSE//s'
 5 | find . -type f | xargs perl -0777 -pi -e 's/\/\/ +This +file +is +provided +under +a +dual.*BSD LICENSE//s'
 6 | find . -type f | xargs perl -0777 -pi -e 's/## +This +file +is +provided +under +a +dual.*BSD LICENSE//s'
 7 | 
 8 | 
 9 | #perl -0777 -pi.orig -e 's/\/\/ +This +file +is +provided +under +a +dual.*BSD LICENSE//s' aalbus-device.c
10 | 
11 | #find . -type f -exec grep -IHl 'Copyright' '{}' \; | xargs perl -pi.orig -e 's/Copyright[()Cc <]+([\d]{4,4}).* (Intel|INTEL)/Copyright(c) \1-2016, Intel/'
12 | 
13 | 


--------------------------------------------------------------------------------
/swval/win/nlb0test.vcxproj.filters:
--------------------------------------------------------------------------------
 1 | 
 2 | 
 3 |   
 4 |     
 5 |       {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
 6 |       cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx
 7 |     
 8 |     
 9 |       {93995380-89BD-4b04-88EB-625FBE52EBFB}
10 |       h;hh;hpp;hxx;hm;inl;inc;xsd
11 |     
12 |   
13 |   
14 |     
15 |       Source Files
16 |     
17 |   
18 | 
19 | 


--------------------------------------------------------------------------------
/swval/win/libswvalmod.vcxproj.filters:
--------------------------------------------------------------------------------
 1 | 
 2 | 
 3 |   
 4 |     
 5 |       {4de5d01c-58c2-4750-937d-141390b74284}
 6 |     
 7 |     
 8 |       {924025c1-e5a7-4f37-9887-cd3dc920bf6f}
 9 |     
10 |   
11 |   
12 |     
13 |       Header Files
14 |     
15 |   
16 |   
17 |     
18 |       Source Files
19 |     
20 |   
21 | 


--------------------------------------------------------------------------------
/valapps/appbase/appbuffer.h:
--------------------------------------------------------------------------------
 1 | #ifndef APPBUFFER_H
 2 | #define APPBUFFER_H
 3 | 
 4 | #include 
 5 | #include 
 6 | #include 
 7 | #include 
 8 | #include 
 9 | #include 
10 | 
11 | #include 
12 | #include 
13 | #include 
14 | 
15 | using namespace std;
16 | using namespace AAL;
17 | 
18 | class appbuffer {
19 | public:
20 | 
21 |     appbuffer(const string& bufferName,
22 |               const btWSSize bufferSize);
23 | 
24 |     ~appbuffer();
25 | 
26 | private:
27 |     string bufferName;
28 |     btWSSize bufferSize;
29 |     btVirtAddr bufferVirtAddress;
30 |     btPhysAddr bufferPhysAddress;
31 | 
32 |     IALIBuffer *m_pALIBufferService; // Pointer to Buffer Service
33 | 
34 | };
35 | 
36 | #endif
37 | 


--------------------------------------------------------------------------------
/valapps/appbase/appbuffer.h.in:
--------------------------------------------------------------------------------
 1 | #ifndef APPBUFFER_H
 2 | #define APPBUFFER_H
 3 | 
 4 | #include 
 5 | #include 
 6 | #include 
 7 | #include 
 8 | #include 
 9 | #include 
10 | 
11 | #include 
12 | #include 
13 | #include 
14 | 
15 | using namespace std;
16 | using namespace AAL;
17 | 
18 | class appbuffer {
19 | public:
20 | 
21 |     appbuffer(const string& bufferName,
22 |               const btWSSize bufferSize);
23 | 
24 |     ~appbuffer();
25 | 
26 | private:
27 |     string bufferName;
28 |     btWSSize bufferSize;
29 |     btVirtAddr bufferVirtAddress;
30 |     btPhysAddr bufferPhysAddress;
31 | 
32 |     IALIBuffer *m_pALIBufferService; // Pointer to Buffer Service
33 | 
34 | };
35 | 
36 | #endif
37 | 


--------------------------------------------------------------------------------
/valapps/unpackers.py:
--------------------------------------------------------------------------------
 1 | import os
 2 | import tarfile
 3 | import tempfile
 4 | 
 5 | 
 6 | class tarunpack(object):
 7 |     def unpack(self, filename, destination):
 8 |         base, ext = os.path.splitext(os.path.basename(filename))
 9 |         if ext == '.gz' or ext == 'tar.gz' or ext == 'tgz':
10 |             mode = 'r:gz'
11 |         elif ext == '.bzip2':
12 |             mode = 'r:bz2'
13 |         tf = tarfile.open(filename, mode)
14 |         rootdir = os.path.commonprefix(tf.getnames())
15 |         unpackdir = destination if '' != rootdir else os.path.join(destination, base)
16 |         tf.extractall(path=unpackdir)
17 |         unpackdir = os.path.join(unpackdir, rootdir) if rootdir != '' else unpackdir
18 |         return unpackdir
19 | 
20 | UNPACKERS = { "tar": tarunpack}
21 | 
22 | def get(name):
23 |     return UNPACKERS.get(name)()
24 | 


--------------------------------------------------------------------------------
/swval/win/libswvalsvcmod.vcxproj.filters:
--------------------------------------------------------------------------------
 1 | 
 2 | 
 3 |   
 4 |     
 5 |       {7796b618-7496-444f-9bf9-6ef38b0ac8c3}
 6 |     
 7 |     
 8 |       {f3bb4261-af25-4a79-886f-8d242aab0a2f}
 9 |     
10 |   
11 |   
12 |     
13 |       Source Files
14 |     
15 |   
16 |   
17 |     
18 |       Header Files
19 |     
20 |   
21 | 


--------------------------------------------------------------------------------
/valapps/DMA_Buffer/runtest_request_write.cmake:
--------------------------------------------------------------------------------
 1 | execute_process(COMMAND lsmod
 2 |   COMMAND grep cci
 3 |   RESULT_VARIABLE HAD_ERROR
 4 |   OUTPUT_VARIABLE OUT)
 5 | 
 6 | if(${OUT} STREQUAL "")
 7 |   message(FATAL_ERROR "CCI driver is not loaded")
 8 | endif()
 9 | 
10 | # we are piping stdout into log file so only stderr should appear
11 | execute_process(COMMAND ${CMAKE_BINARY_DIR}/../bin/DMA_Buffer -s ${I}
12 |   OUTPUT_FILE of=DMA_Buffer_${I}.log
13 |   ERROR_VARIABLE OUTERROR)
14 | 
15 | if(${OUTERROR} MATCHES ".*Error.*")
16 |   message(FATAL_ERROR "Error raised during execution")
17 | endif()
18 | 
19 | # Check that log file does not contain error
20 | execute_process(COMMAND cat DMA_Buffer_${I}.log
21 |   COMMAND grep Error
22 |   OUTPUT_VARIABLE HAD_ERROR)
23 | 
24 | if(HAD_ERROR)
25 |   message(FATAL_ERROR "Error raised during runtime")
26 | endif()
27 | 


--------------------------------------------------------------------------------
/valapps/Signal_Tap/SigTap_README.txt:
--------------------------------------------------------------------------------
 1 | To Test MMLink, 
 2 | 
 3 | Load the platform with a RemoteSTP enabled mode0 bitstream.
 4 | 
 5 | To test SW-STAP-01, 
 6 | Go to valapps/Signal_Tap
 7 | Run $./Signal_Tap.
 8 | 
 9 | To test SW-STAP-02, 
10 | Go to aalsamples/MMLink/SW
11 | Run $./mmlink
12 | 
13 | In your windows terminal, run the system console. Please see attached "BKMs STP.pdf" file for steps to setup system-console on a windows host.
14 | $ system-console --rc_script=mmlink_profiled_setup.tcl remote_debug.sof  3333
15 | 
16 | Start the Quartus Signal tap and follow the steps in the PDF document until it is ready to acquire.
17 | 
18 | In your linux host machine, open another terminal and go to /bin
19 | Run $./fpgasane_nlb400_mode0.sh 
20 | 
21 | Verify that the signals were captured on the windows host machine.
22 |  


--------------------------------------------------------------------------------
/swval/krnl/scripts/lcov-bat:
--------------------------------------------------------------------------------
 1 | #!/bin/bash
 2 | # INTEL CONFIDENTIAL - For Intel Internal Use Only
 3 | 
 4 | shopt -o -s nounset
 5 | 
 6 | declare -r SCRIPT_NAME='lcov-bat'
 7 | 
 8 | . ./lcov-common
 9 | 
10 | declare -r D='bat'
11 | 
12 | declare    ARGS=''
13 | declare    WANTDISTCC=false
14 | 
15 | while [ $# -gt 0 ]; do
16 |    case $1 in
17 | #      --gtest_*)
18 | #         ARGS="${ARGS} --gtest-opt=$1"
19 | #      ;;
20 |       --distcc)
21 |          WANTDISTCC=true
22 |       ;;
23 |       *)
24 |          ARGS="${ARGS} $1"
25 |       ;;
26 |    esac
27 |    shift
28 | done
29 | 
30 | setup "$D" ${WANTDISTCC}
31 | 
32 | # WHAT_TO_MEASURE="${PWD}/../tests/testsuite -v -C ${VPATH}/tests --bat --gtest-opt=--vpath=${VPATH} --gtest-opt=--gtest_print_time=0 ${AUTO_COLOR} ${ARGS}"
33 | 
34 | WHAT_TO_MEASURE="${SUDO} ./test-case ${VPATH}"
35 | 
36 | run_lcov "$D"
37 | exit $?
38 | 


--------------------------------------------------------------------------------
/swval/sdk/scripts/lcov-standalone:
--------------------------------------------------------------------------------
 1 | #!/bin/bash
 2 | # INTEL CONFIDENTIAL - For Intel Internal Use Only
 3 | 
 4 | shopt -o -s nounset
 5 | 
 6 | declare -r SCRIPT_NAME='lcov-standalone'
 7 | 
 8 | . ./lcov-common
 9 | 
10 | declare -r D='standalone'
11 | 
12 | declare    ARGS=''
13 | declare    WANTDISTCC=false
14 | 
15 | while [ $# -gt 0 ]; do
16 |    case $1 in
17 |       --distcc)
18 |          WANTDISTCC=true
19 |       ;;
20 |       *)
21 |          ARGS="${ARGS} $1"
22 |       ;;
23 |    esac
24 |    shift
25 | done
26 | 
27 | setup "$D" ${WANTDISTCC}
28 | 
29 | WHAT_TO_MEASURE="${PWD}/../tests/testsuite -v -C ${VPATH}/tests --standalone"
30 | 
31 | GCDA_DIRS=(\
32 | "--directory ${VPATH}/aas/OSAL/.libs" \
33 | "--directory ${VPATH}/tests/standalone/OSAL_TestSem" \
34 | "--directory ${VPATH}/tests/standalone/OSAL_TestThreadGroup"\
35 | )
36 | 
37 | run_lcov "$D"
38 | exit $?
39 | 


--------------------------------------------------------------------------------
/aalsdk.vcxproj.filters:
--------------------------------------------------------------------------------
 1 | 
 2 | 
 3 |   
 4 |     
 5 |       {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
 6 |       cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx
 7 |     
 8 |     
 9 |       {93995380-89BD-4b04-88EB-625FBE52EBFB}
10 |       h;hh;hpp;hxx;hm;inl;inc;xsd
11 |     
12 |     
13 |       {67DA6AB6-F800-4c08-8B7A-83BB121AAD01}
14 |       rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms
15 |     
16 |   
17 | 


--------------------------------------------------------------------------------
/valapps/valapp/reconfigure_test.h:
--------------------------------------------------------------------------------
 1 | #pragma once
 2 | #include "afu_test.h"
 3 | 
 4 | class reconfigure_test : public afu_test
 5 | {
 6 |     public:
 7 | 
 8 |         virtual void register_tests();
 9 |         virtual void setup();
10 |         virtual void teardown();
11 | 
12 |     private:
13 |         void sw_pr_01a(const arguments& args);
14 |         void sw_pr_02(const arguments& args);
15 |         void sw_pr_03(const arguments& args);
16 |         void sw_pr_04a(const arguments& args);
17 |         void sw_pr_05a(const arguments& args);
18 |         void sw_pr_06a(const arguments& args);
19 |         void sw_pr_07a(const arguments& args);
20 |         void sw_pr_08(const arguments& args);
21 |         void sw_pr_09(const arguments& args);
22 |         void sw_pr_10(const arguments& args);
23 |         void sw_pr_11(const arguments& args);
24 |         void sw_pr_12(const arguments& args);
25 | 
26 | };
27 | 


--------------------------------------------------------------------------------
/swval/sdk/scripts/valgrind-standalone:
--------------------------------------------------------------------------------
 1 | #!/bin/bash
 2 | # INTEL CONFIDENTIAL - For Intel Internal Use Only
 3 | 
 4 | shopt -o -s nounset
 5 | 
 6 | declare -r SCRIPT_NAME='valgrind-standalone'
 7 | 
 8 | . ./valgrind-common
 9 | 
10 | declare ARGS=''
11 | 
12 | declare WANTDISTCC=false
13 | while [ $# -gt 0 ]; do
14 |    case $1 in
15 |       --clean)
16 |          clean_valgrind_all "tests/standalone/OSAL_TestSem/.libs/OSAL_TestSem"
17 |          clean_valgrind_all "tests/standalone/OSAL_TestThreadGroup/.libs/OSAL_TestThreadGroup"
18 |          exit 0
19 |       ;;
20 |       --distcc)
21 |          WANTDISTCC=true
22 |       ;;
23 |       *)
24 |          ARGS="${ARGS} $1"
25 |       ;;
26 |    esac
27 |    shift
28 | done
29 | 
30 | run_valgrind_all ${WANTDISTCC} "tests/standalone/OSAL_TestSem/.libs/OSAL_TestSem" ${ARGS}
31 | run_valgrind_all ${WANTDISTCC} "tests/standalone/OSAL_TestThreadGroup/.libs/OSAL_TestThreadGroup" ${ARGS}
32 | exit $?
33 | 


--------------------------------------------------------------------------------
/valapps/appbase/appconstants.cpp:
--------------------------------------------------------------------------------
 1 | #include 
 2 | 
 3 | const btWSSize    LPBK1_DSM_SIZE           = appCL(1);
 4 | const btWSSize    LPBK1_BUFFER_SIZE        = appMB(4);
 5 | 
 6 | // MMIO address space - global
 7 | const btCSROffset PORT_CAPABILITY = 0x0030;
 8 | const btCSROffset PORT_CONTROL    = 0x0038;
 9 | const btCSROffset PORT_STATUS     = 0x0040;
10 | 
11 | // MMIO address space - AFU specific
12 | const btCSROffset CSR_CTL                  = 0x0138;
13 | const btCSROffset CSR_SRC_ADDR             = 0x0120;
14 | const btCSROffset CSR_DST_ADDR             = 0x0128;
15 | const btCSROffset CSR_CFG                  = 0x0140;
16 | const btCSROffset CSR_NUM_LINES            = 0x0130;
17 | const btCSROffset CSR_AFU_DSM_BASEL        = 0x0110;
18 | const btCSROffset CSR_AFU_DSM_BASEH        = 0x0114;
19 | const btCSROffset DSM_STATUS_TEST_COMPLETE = 0x040;
20 | 
21 | // Port status register
22 | const btPhysAddr  NLB_TEST_MODE_PCIE0      = 0x2000;
23 | 


--------------------------------------------------------------------------------
/valapps/DMA_Buffer/CMakeLists.txt:
--------------------------------------------------------------------------------
 1 | cmake_minimum_required(VERSION 2.8.4)
 2 | project(DMA_Buffer)
 3 | 
 4 | set(CMAKE_CXX_STANDARD 11)
 5 | set(CMAKE_CXX_STANDARD_REQUIRED ON)
 6 | 
 7 | set(SOURCE_FILES main.cpp)
 8 | add_executable(DMA_Buffer ${SOURCE_FILES})
 9 | target_link_libraries(DMA_Buffer appbase)
10 | 
11 | include(CTest)
12 | enable_testing()
13 | 
14 | # Request and write test
15 | foreach(i RANGE 1 5)
16 |   add_test(NAME "DMA_Buffer_request_write_test_${i}MB"
17 |     COMMAND ${CMAKE_COMMAND}
18 |     -DTEST_PROG=$
19 |     -DSOURCEDIR=${PROJECT_SOURCE_DIR}
20 |     -DI=${i}
21 |     -P ${PROJECT_SOURCE_DIR}/runtest_request_write.cmake)
22 | endforeach()
23 | 
24 | # Request and release test
25 | # foreach(i RANGE 1 4)
26 | #   add_test(NAME "DMA_Buffer_request_release_test_${i}MB"
27 | #     COMMAND ${CMAKE_COMMAND}
28 | #     -DTEST_PROG=$
29 | #     -DSOURCEDIR=${PROJECT_SOURCE_DIR}
30 | #     -DI=${i}
31 | #     -P ${PROJECT_SOURCE_DIR}/runtest_request_release.cmake)
32 | # endforeach()
33 | 


--------------------------------------------------------------------------------
/aaluser/clp/libaalclp.vcxproj.filters:
--------------------------------------------------------------------------------
 1 | 
 2 | 
 3 |   
 4 |     
 5 |       {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
 6 |       cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx
 7 |     
 8 |     
 9 |       {93995380-89BD-4b04-88EB-625FBE52EBFB}
10 |       h;hh;hpp;hxx;hm;inl;inc;xsd
11 |     
12 |     
13 |       {67DA6AB6-F800-4c08-8B7A-83BB121AAD01}
14 |       rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms
15 |     
16 |   
17 |   
18 |     
19 |       Source Files
20 |     
21 |   
22 | 


--------------------------------------------------------------------------------
/swval/sdk/tests/swvalmod/swvalmod.h:
--------------------------------------------------------------------------------
 1 | // INTEL CONFIDENTIAL - For Intel Internal Use Only
 2 | #ifndef __SWVALMOD_H__
 3 | #define __SWVALMOD_H__
 4 | #include 
 5 | 
 6 | #if defined( __AAL_USER__ ) && defined( __AAL_WINDOWS__ )
 7 | # ifdef SWVALMOD_EXPORTS
 8 | #    define SWVALMOD_API __declspec(dllexport)
 9 | # else
10 | #    define SWVALMOD_API __declspec(dllimport)
11 | # endif // SWVALMOD_EXPORTS
12 | #else
13 | # define __declspec(x)
14 | # define SWVALMOD_API __declspec(0)
15 | #endif // Windows / User Mode
16 | 
17 | AAL_DECLARE_MOD(libswvalmod, SWVALMOD_API)
18 | 
19 | // Define some custom commands for the module.
20 | #define SWVALMOD_CMD_SAY_HELLO  (AAL_SVC_USER_CMD_BASE + 0)
21 | 
22 | #define SWVALMOD_CMD_MALLOC_OBJ (AAL_SVC_USER_CMD_BASE + 1)
23 | typedef struct _swvalmod_obj
24 | {
25 |    int         intfield;
26 |    char        msg[32];
27 |    const char *something_in_the_mod;
28 | } swvalmod_obj;
29 | 
30 | #define SWVALMOD_CMD_FREE       (AAL_SVC_USER_CMD_BASE + 2)
31 | 
32 | #endif // __SWVALMOD_H__
33 | 
34 | 


--------------------------------------------------------------------------------
/aalsamples/Hello_AAL/SW/helloaal.vcxproj.filters:
--------------------------------------------------------------------------------
 1 | 
 2 | 
 3 |   
 4 |     
 5 |       {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
 6 |       cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx
 7 |     
 8 |     
 9 |       {93995380-89BD-4b04-88EB-625FBE52EBFB}
10 |       h;hh;hpp;hxx;hm;inl;inc;xsd
11 |     
12 |     
13 |       {67DA6AB6-F800-4c08-8B7A-83BB121AAD01}
14 |       rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms
15 |     
16 |   
17 |   
18 |     
19 |       Source Files
20 |     
21 |   
22 | 


--------------------------------------------------------------------------------
/valapps/valapp/tests.json:
--------------------------------------------------------------------------------
 1 | {
 2 |     "suites" : [
 3 |                 {
 4 |                     "libname" : "./libafu_tests.so",
 5 |                     "class" : "afu_reset",
 6 |                     "tests" : [
 7 |                                 { 
 8 |                                   "test" : "SW-RESET-01",
 9 |                                   "args" : [],
10 |                                   "disabled" : true
11 |                                 }
12 |                     ]
13 |                 },
14 |                 {
15 |                     "libname" : "./libafu_tests.so",
16 |                     "class" : "dma_buffer",
17 |                     "tests" : [
18 |                                 { 
19 |                                   "test" : "SW-BUF-01",
20 |                                   "test_id" : "id",
21 |                                   "args" : ["--size=1",  "--duration=2"],
22 |                                   "disabled" : false
23 |                                 }
24 |                     ]
25 |                 }
26 | 
27 |     ]
28 | }
29 | 


--------------------------------------------------------------------------------
/aalsamples/Hello_ALI_NLB/SW/hello_ali_nlb.vcxproj.filters:
--------------------------------------------------------------------------------
 1 | 
 2 | 
 3 |   
 4 |     
 5 |       {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
 6 |       cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx
 7 |     
 8 |     
 9 |       {93995380-89BD-4b04-88EB-625FBE52EBFB}
10 |       h;hh;hpp;hxx;hm;inl;inc;xsd
11 |     
12 |     
13 |       {67DA6AB6-F800-4c08-8B7A-83BB121AAD01}
14 |       rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms
15 |     
16 |   
17 |   
18 |     
19 |       Source Files
20 |     
21 |   
22 | 


--------------------------------------------------------------------------------
/aalsamples/ALI_Configure_AFU/SW/ali_config_afu.vcxproj.filters:
--------------------------------------------------------------------------------
 1 | 
 2 | 
 3 |   
 4 |     
 5 |       {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
 6 |       cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx
 7 |     
 8 |     
 9 |       {93995380-89BD-4b04-88EB-625FBE52EBFB}
10 |       h;hh;hpp;hxx;hm;inl;inc;xsd
11 |     
12 |     
13 |       {67DA6AB6-F800-4c08-8B7A-83BB121AAD01}
14 |       rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms
15 |     
16 |   
17 |   
18 |     
19 |       Source Files
20 |     
21 |   
22 | 


--------------------------------------------------------------------------------
/valapps/Read_Perf_Counters/__init__.py:
--------------------------------------------------------------------------------
 1 | from os import environ
 2 | import os
 3 | 
 4 | _env = {"LD_LIBRARY_PATH":":".join(["../vallib", environ.get("LD_LIBRARY_PATH", "")])}
 5 | NumSocket = os.getenv('NumSocket')
 6 | 
 7 | 
 8 | def test_SW_PERFC_01(self):
 9 |     '''
10 |     SW-PERFC-01
11 |     Sanity check of Performance Counter acquisition when idle 
12 |     '''
13 |     command = "./SW_PERC_01 " + NumSocket + " 1 "
14 |       
15 |     print command
16 | 
17 |     self.exe(command, env=_env)
18 | 
19 | def test_SW_PERFC_02(self):
20 |     '''
21 |     SW-PERFC-01
22 |     Sanity check of Performance Counter acquisition when idle 
23 |     '''
24 |     command = "./SW_PERC_01 " + NumSocket + " 2 "
25 |       
26 |     print command
27 | 
28 |     self.exe(command, env=_env)
29 |  
30 | 
31 | def test_SW_PERFC_03(self):
32 |     '''
33 |     SW-PERFC-01
34 |     Sanity check of Performance Counter acquisition when idle 
35 |     '''
36 |     command = "./SW_PERC_01 " + NumSocket + " 3 "
37 |       
38 |     print command
39 | 
40 |     self.exe(command, env=_env)
41 | 
42 | 
43 | 


--------------------------------------------------------------------------------
/valapps/env.sh:
--------------------------------------------------------------------------------
 1 | #!/bin/bash +x
 2 | # Please note:  This is inactive template code that can and should only be run manually, after an 
 3 | # appropriate change to the path varialbes.
 4 | 
 5 | export LD_LIBRARY_PATH="/home/lab/workspace/rpan1/lib/lib"
 6 | export PATH="/home/lab/workspace/rpan1/lib/bin:$PATH"
 7 | 
 8 | export ToolPATH="/home/lab/workspace/rpan1/lib/bin"
 9 | export NumSocket=1 
10 | 
11 | # Changing this value from 2 to 1 to reflect the reality that we are only testing on single socket 
12 | # systems right now.  And, to avoid potential for doubt when using the script without a clear 
13 | # understanding of the implications during the migration process.  This will prevent an accidental 
14 | # set to 2 sockets that might get picked up during a sanity check, running old code.
15 | 
16 | export SystemConfig="native"
17 | export SampleAppPATH="/home/lab/workspace/rpan1/release/6.2.1-RC0/Samples/"
18 | export RTL="/home/lab/workspace/rpan1/rtl_rp/skx_pr_afu.rbf"
19 | export RTLNLB0="/home/lab/workspace/rpan1/rtl_release/101516_skxp_622_pr_2_b447_sd00_skxnlb400m0.rbf"
20 | 


--------------------------------------------------------------------------------
/aalsamples/ALI_Multi_AFU_with_PerfMon/SW/ali_perf_nlb.vcxproj.filters:
--------------------------------------------------------------------------------
 1 | 
 2 | 
 3 |   
 4 |     
 5 |       {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
 6 |       cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx
 7 |     
 8 |     
 9 |       {93995380-89BD-4b04-88EB-625FBE52EBFB}
10 |       h;hh;hpp;hxx;hm;inl;inc;xsd
11 |     
12 |     
13 |       {67DA6AB6-F800-4c08-8B7A-83BB121AAD01}
14 |       rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms
15 |     
16 |   
17 |   
18 |     
19 |       Source Files
20 |     
21 |   
22 | 


--------------------------------------------------------------------------------
/swval/sdk/tests/standalone/isolated/aal0017.h:
--------------------------------------------------------------------------------
 1 | // INTEL CONFIDENTIAL - For Intel Internal Use Only
 2 | #ifndef __AAL0017_H__
 3 | #define __AAL0017_H__
 4 | #include "isolated.h"
 5 | 
 6 | void aal0017();
 7 | 
 8 | class aal0017Fixture : public TestFixture
 9 | {
10 | public:
11 |    aal0017Fixture() {}
12 |    virtual ~aal0017Fixture() {}
13 | 
14 |    virtual void SetUp()
15 |    {
16 |       unsigned i;
17 |       for ( i = 0 ; i < sizeof(m_pThrs) / sizeof(m_pThrs[0]) ; ++i ) {
18 |          m_pThrs[i] = NULL;
19 |          m_TIDs[i]  = 0;
20 |       }
21 | 
22 |       for ( i = 0 ; i < sizeof(m_Scratch) / sizeof(m_Scratch[0]) ; ++i ) {
23 |          m_Scratch[i] = 0;
24 |       }
25 |    }
26 | 
27 |    virtual void Run();
28 | 
29 |    virtual void TearDown()
30 |    {
31 |       YIELD_WHILE(CurrentThreads() > 0);
32 |       m_Semaphore.Destroy();
33 |    }
34 | 
35 |    OSLThread  *m_pThrs[3];
36 |    btTID       m_TIDs[3];
37 |    btUIntPtr   m_Scratch[10];
38 |    CSemaphore  m_Semaphore;
39 | 
40 |    static void Thr0(OSLThread * , void * );
41 | };
42 | 
43 | #endif // __AAL0017_H__
44 | 
45 | 


--------------------------------------------------------------------------------
/swval/sdk/scripts/lcov-swtest:
--------------------------------------------------------------------------------
 1 | #!/bin/bash
 2 | # INTEL CONFIDENTIAL - For Intel Internal Use Only
 3 | 
 4 | shopt -o -s nounset
 5 | 
 6 | declare -r SCRIPT_NAME='lcov-swtest'
 7 | 
 8 | . ./lcov-common
 9 | 
10 | declare -r D='swtest'
11 | 
12 | declare    ARGS='--gtest_print_time=0'
13 | declare    WANTDISTCC=false
14 | 
15 | while [ $# -gt 0 ]; do
16 |    case $1 in
17 |       --distcc)
18 |          WANTDISTCC=true
19 |       ;;
20 |       *)
21 |          ARGS="${ARGS} $1"
22 |       ;;
23 |    esac
24 |    shift
25 | done
26 | 
27 | setup "$D" ${WANTDISTCC}
28 | 
29 | WHAT_TO_MEASURE="${VPATH}/tests/swtest --vpath=${VPATH} ${ARGS}"
30 | 
31 | GCDA_DIRS=(\
32 | "--directory ${VPATH}/aas/OSAL/.libs" \
33 | "--directory ${VPATH}/aas/AASLib/.libs" \
34 | "--directory ${VPATH}/aas/AALRuntime/.libs" \
35 | "--directory ${VPATH}/aas/AIAService/.libs" \
36 | "--directory ${VPATH}/aas/RRMBrokerService/.libs" \
37 | "--directory ${VPATH}/aas/AASResourceManager/.libs" \
38 | "--directory ${VPATH}/utils/ALIAFU/ALI/.libs" \
39 | "--directory ${VPATH}/tests/harnessed/gtest"\
40 | )
41 | 
42 | run_lcov "$D"
43 | exit $?
44 | 


--------------------------------------------------------------------------------
/valapps/appbase/appconstants.h:
--------------------------------------------------------------------------------
 1 | #ifndef APPCONSTANTS_H
 2 | #define APPCONSTANTS_H
 3 | 
 4 | // the configured options and settings for APPCONSTANTS
 5 | #define APPCONSTANTS_VERSION_MAJOR @APPCONSTANTS_VERSION_MAJOR@
 6 | #define APPCONSTANTS_VERSION_MINOR @APPCONSTANTS_VERSION_MINOR@
 7 | 
 8 | #include 
 9 | 
10 | using namespace AAL;
11 | 
12 | extern const btCSROffset PORT_CAPABILITY;
13 | extern const btCSROffset PORT_CONTROL;
14 | extern const btCSROffset PORT_STATUS;
15 | extern const btWSSize    LPBK1_DSM_SIZE;
16 | extern const btWSSize    LPBK1_BUFFER_SIZE;
17 | extern const btCSROffset CSR_SRC_ADDR;
18 | extern const btCSROffset CSR_DST_ADDR;
19 | extern const btCSROffset CSR_CTL;
20 | extern const btCSROffset CSR_CFG;
21 | extern const btCSROffset CSR_NUM_LINES;
22 | extern const btCSROffset CSR_AFU_DSM_BASEL;
23 | extern const btCSROffset CSR_AFU_DSM_BASEH;
24 | extern const btCSROffset DSM_STATUS_TEST_COMPLETE;
25 | extern const btPhysAddr  NLB_TEST_MODE_PCIE0;
26 | 
27 | static inline btWSSize appCL(btWSSize x) { return (x) * 64; }
28 | static inline btWSSize appMB(btWSSize x) { return (x) * 1024 * 1024; }
29 | 
30 | #endif
31 | 


--------------------------------------------------------------------------------
/swval/sdk/tests/swvalmod/Makefile.am:
--------------------------------------------------------------------------------
 1 | # INTEL CONFIDENTIAL - For Intel Internal Use Only
 2 | lib_LTLIBRARIES=\
 3 | libswvalmod.la \
 4 | libswvalsvcmod.la
 5 | 
 6 | 
 7 | libswvalmod_la_SOURCES=\
 8 | swvalmod.h \
 9 | swvalmod.c
10 | 
11 | libswvalmod_la_CPPFLAGS=\
12 | -I$(top_srcdir)/include \
13 | -I$(top_builddir)/include
14 | 
15 | libswvalmod_la_LDFLAGS=\
16 | -module \
17 | -version-info $(SWVALMOD_VERSION_CURRENT):$(SWVALMOD_VERSION_REVISION):$(SWVALMOD_VERSION_AGE)
18 | 
19 | libswvalmod_la_LIBADD=\
20 | $(top_builddir)/aas/OSAL/libOSAL.la \
21 | $(top_builddir)/aas/AASLib/libAAS.la \
22 | $(top_builddir)/aas/AALRuntime/libaalrt.la
23 | 
24 | 
25 | libswvalsvcmod_la_SOURCES=\
26 | swvalsvcmod.h \
27 | swvalsvcmod.cpp
28 | 
29 | libswvalsvcmod_la_CPPFLAGS=\
30 | -I$(top_srcdir)/include \
31 | -I$(top_builddir)/include
32 | 
33 | libswvalsvcmod_la_LDFLAGS=\
34 | -module \
35 | -version-info $(SWVALSVCMOD_VERSION_CURRENT):$(SWVALSVCMOD_VERSION_REVISION):$(SWVALSVCMOD_VERSION_AGE)
36 | 
37 | libswvalsvcmod_la_LIBADD=\
38 | $(top_builddir)/aas/OSAL/libOSAL.la \
39 | $(top_builddir)/aas/AASLib/libAAS.la \
40 | $(top_builddir)/aas/AALRuntime/libaalrt.la
41 | 
42 | 


--------------------------------------------------------------------------------
/valapps/appbase/appconstants.h.in:
--------------------------------------------------------------------------------
 1 | #ifndef APPCONSTANTS_H
 2 | #define APPCONSTANTS_H
 3 | 
 4 | // the configured options and settings for APPCONSTANTS
 5 | #define APPCONSTANTS_VERSION_MAJOR @APPCONSTANTS_VERSION_MAJOR@
 6 | #define APPCONSTANTS_VERSION_MINOR @APPCONSTANTS_VERSION_MINOR@
 7 | 
 8 | #include 
 9 | 
10 | using namespace AAL;
11 | 
12 | extern const btCSROffset PORT_CAPABILITY;
13 | extern const btCSROffset PORT_CONTROL;
14 | extern const btCSROffset PORT_STATUS;
15 | extern const btWSSize    LPBK1_DSM_SIZE;
16 | extern const btWSSize    LPBK1_BUFFER_SIZE;
17 | extern const btCSROffset CSR_SRC_ADDR;
18 | extern const btCSROffset CSR_DST_ADDR;
19 | extern const btCSROffset CSR_CTL;
20 | extern const btCSROffset CSR_CFG;
21 | extern const btCSROffset CSR_NUM_LINES;
22 | extern const btCSROffset CSR_AFU_DSM_BASEL;
23 | extern const btCSROffset CSR_AFU_DSM_BASEH;
24 | extern const btCSROffset DSM_STATUS_TEST_COMPLETE;
25 | extern const btPhysAddr  NLB_TEST_MODE_PCIE0;
26 | 
27 | static inline btWSSize appCL(btWSSize x) { return (x) * 64; }
28 | static inline btWSSize appMB(btWSSize x) { return (x) * 1024 * 1024; }
29 | 
30 | #endif
31 | 


--------------------------------------------------------------------------------
/valapps/packages.json:
--------------------------------------------------------------------------------
 1 | [
 2 |     {
 3 |         "name": "cmake",
 4 |         "version" : "3.7.0",
 5 |         "type" : "executable",
 6 |         "install" : ".develop",
 7 |         "url" : "https://cmake.org/files/v3.7/cmake-3.7.0-rc2.tar.gz",
 8 |         "fetcher" :
 9 |         {
10 |             "name": "urlfetcher",
11 |             "file" : "cmake-3.7.0-rc2.tar.gz"
12 |         },
13 |         "unpacker" : "tar",
14 |         "installer" :
15 |         {
16 |             "name": "make_installer"
17 |         }
18 |     },
19 |     {
20 |         "name": "gtest",
21 |         "version": "1.8.0",
22 |         "type": "library",
23 |         "url": "https://af01p-ir.devtools.intel.com/artifactory/fpga-solutions-local/google/gtest/src/gtest-1.8.0.tar.gz",
24 |         "fetcher" :
25 |         {
26 |             "name": "artifactory",
27 |             "file": "gtest-1.8.0.tar.gz",
28 |             "auth": ["sys_aalsdk", "AP96kSXktYLFnTfZyem1YZVaNUb"]
29 |         },
30 |         "unpacker" : "tar",
31 |         "installer" :
32 |         {
33 |             "name": "cmake_installer",
34 |             "cmake_args": "-DBUILD_SHARED_LIBS=ON"
35 |         }
36 |     }
37 | ]
38 | 


--------------------------------------------------------------------------------
/swval/sdk/tests/harnessed/gtest/gtcommon/gtCommon_Console.h:
--------------------------------------------------------------------------------
 1 | // INTEL CONFIDENTIAL - For Intel Internal Use Only
 2 | #ifndef __GTCOMMON_CONSOLE_H__
 3 | #define __GTCOMMON_CONSOLE_H__
 4 | 
 5 | // Linux/Windows abstraction for changing the text foreground color of either stdout or
 6 | // stderr to red, green, blue, or resetting it to the default foreground color.
 7 | class GTCOMMON_API ConsoleColorizer
 8 | {
 9 | public:
10 |    enum Stream
11 |    {
12 |       STD_COUT = 1,
13 |       STD_CERR
14 |    };
15 | 
16 |    static ConsoleColorizer & GetInstance();
17 | 
18 |    bool HasColors(Stream );
19 | 
20 |    void   Red(Stream );
21 |    void Green(Stream );
22 |    void  Blue(Stream );
23 |    void Reset(Stream );
24 | 
25 | protected:
26 |    ConsoleColorizer();
27 | 
28 |    static ConsoleColorizer sm_Instance;
29 | 
30 | #if   defined( __AAL_LINUX__ )
31 |    static const char sm_Red[];
32 |    static const char sm_Green[];
33 |    static const char sm_Blue[];
34 |    static const char sm_Reset[];
35 | #elif defined( __AAL_WINDOWS__ )
36 |    WORD m_OldStdoutAttrs;
37 |    WORD m_OldStderrAttrs;
38 | #endif // OS
39 | };
40 | 
41 | #endif // __GTCOMMON_CONSOLE_H__
42 | 
43 | 


--------------------------------------------------------------------------------
/swval/sdk/tests/local.at:
--------------------------------------------------------------------------------
 1 | # Process this -*- Autotest -*- file with autom4te.
 2 | 
 3 | # Macros for the @PACKAGE@ test suite.
 4 | # INTEL CONFIDENTIAL - For Intel Internal Use Only
 5 | 
 6 | m4_version_prereq([2.58])
 7 | 
 8 | AT_INIT
 9 | AT_COPYRIGHT([INTEL CONFIDENTIAL - For Intel Internal Use Only])
10 | 
11 | dnl AT_ARG_OPTION(OPTIONS, HELP-TEXT, [ACTION-IF-GIVEN], [ACTION-IF-NOT-GIVEN])
12 | dnl AT_ARG_OPTION_ARG(OPTIONS, HELP-TEXT, [ACTION-IF-GIVEN], [ACTION-IF-NOT-GIVEN])
13 | 
14 | AT_ARG_OPTION([standalone],
15 |               [AS_HELP_STRING([--standalone], [Run standalone tests @<:@default=no@:>@])])
16 | 
17 | AT_ARG_OPTION([swtest],
18 |               [AS_HELP_STRING([--swtest], [Run software-only test suite @<:@default=no@:>@])])
19 | 
20 | AT_ARG_OPTION([nlb0test],
21 |               [AS_HELP_STRING([--nlb0test], [Run test suite requiring NLB Lpbk1 @<:@default=no@:>@])])
22 | 
23 | 
24 | GTEST_OPTS=
25 | AT_ARG_OPTION_ARG([gtest-opt],
26 |                   [AS_HELP_STRING([--gtest-opt], [Pass the given argument when invoking gtest])],
27 |                   [GTEST_OPTS="${GTEST_OPTS} ${at_arg_gtest_opt}"])
28 | 
29 | AT_COLOR_TESTS
30 | 
31 | dnl AT_TESTED([myapp]) dnl list of executables
32 | 
33 | 


--------------------------------------------------------------------------------
/swval/krnl/m4/verify.m4:
--------------------------------------------------------------------------------
 1 | dnl INTEL CONFIDENTIAL - For Intel Internal Use Only
 2 | 
 3 | dnl # VERIFY_OPTIONS
 4 | dnl # ---
 5 | AC_DEFUN([VERIFY_OPTIONS], [
 6 |    _conf_CPPFLAGS=" ${DEBUG_CPPFLAGS} ${ASSERT_CPPFLAGS}"
 7 |    _conf_CFLAGS="${CFLAGS}"
 8 |    _conf_CXXFLAGS="${CXXFLAGS}"
 9 |    _conf_LDFLAGS="${LDFLAGS}"
10 |    _conf_LIBS="${LIBS}"
11 | 
12 | 
13 | 
14 |    AC_SUBST([_conf_CPPFLAGS], ["${_conf_CPPFLAGS}"])
15 |    AC_SUBST([_conf_CFLAGS],   ["${_conf_CFLAGS}"])
16 |    AC_SUBST([_conf_CXXFLAGS], ["${_conf_CXXFLAGS}"])
17 |    AC_SUBST([_conf_LDFLAGS],  ["${_conf_LDFLAGS}"])
18 |    AC_SUBST([_conf_LIBS],     ["${_conf_LIBS}"])
19 | 
20 |    AC_CONFIG_COMMANDS_PRE([CPPFLAGS="${_conf_CPPFLAGS}"])
21 |    AC_CONFIG_COMMANDS_PRE([CFLAGS="${_conf_CFLAGS}"])
22 |    AC_CONFIG_COMMANDS_PRE([CXXFLAGS="${_conf_CXXFLAGS}"])
23 |    AC_CONFIG_COMMANDS_PRE([LDFLAGS="${_conf_LDFLAGS}"])
24 |    AC_CONFIG_COMMANDS_PRE([LIBS="${_conf_LIBS}"])
25 | ])
26 | 
27 | dnl # SHOW_OPTIONS
28 | dnl # ---
29 | AC_DEFUN([SHOW_OPTIONS], [
30 | 
31 | AM_COND_IF([COND_WITH_GCOV], [
32 | echo \
33 | "
34 | code is being instrumented for gcov/lcov analysis."
35 | ])
36 | 
37 | echo \
38 | "
39 | ${CC} ${CFLAGS}
40 | "
41 | ])
42 | 
43 | 


--------------------------------------------------------------------------------
/Readme.MultiPackage.txt:
--------------------------------------------------------------------------------
 1 | ******************************************************************************
 2 | ******************************************************************************
 3 | ***                      Accelerator Abstraction Layer                     ***
 4 | ***                          Software Developer Kit                        ***
 5 | ******************************************************************************
 6 | ******************************************************************************
 7 | 
 8 | Two files are provided to make a complete AALSDK distribution,
 9 | reflecting the different licenses of the various parts.
10 | 
11 |   *.BSD-License.tar.gz
12 |   *.Dual-BSD-GPLv2-License.tar.gz
13 | 
14 | They are distributed separately only to demonstrate that the sets of
15 | files are governed by distinct and separate licenses.
16 | 
17 | Once you have all files, unpack them in the same directory. Once unpacked,
18 | there will be a single directory that contains all of the files
19 | that are needed.
20 | 
21 | If you redistribute the files, you do not need to keep them separated
22 | as they were provided to you.
23 | 
24 | Documentation is provided in a separate tar file.
25 | 


--------------------------------------------------------------------------------
/swval/sdk/scripts/lcov-everything:
--------------------------------------------------------------------------------
 1 | #!/bin/bash
 2 | # INTEL CONFIDENTIAL - For Intel Internal Use Only
 3 | 
 4 | shopt -o -s nounset
 5 | 
 6 | declare -r SCRIPT_NAME='lcov-everything'
 7 | 
 8 | . ./lcov-common
 9 | 
10 | declare -r D='everything'
11 | declare    WANTDISTCC=false
12 | 
13 | while [ $# -gt 0 ]; do
14 |    case $1 in
15 |       --distcc)
16 |          WANTDISTCC=true
17 |       ;;
18 |    esac
19 |    shift
20 | done
21 | 
22 | setup "$D" ${WANTDISTCC}
23 | 
24 | WHAT_TO_MEASURE="${PWD}/../tests/testsuite -v -C ${VPATH}/tests --swtest --gtest-opt=--vpath=${VPATH} --gtest-opt=--gtest_print_time=0 --standalone"
25 | 
26 | GCDA_DIRS=(\
27 | "--directory ${VPATH}/aas/OSAL/.libs" \
28 | "--directory ${VPATH}/aas/AASLib/.libs" \
29 | "--directory ${VPATH}/aas/AALRuntime/.libs" \
30 | "--directory ${VPATH}/aas/AIAService/.libs" \
31 | "--directory ${VPATH}/aas/RRMBrokerService/.libs" \
32 | "--directory ${VPATH}/aas/AASResourceManager/.libs" \
33 | "--directory ${VPATH}/utils/ALIAFU/ALI/.libs" \
34 | "--directory ${VPATH}/tests/harnessed/gtest" \
35 | "--directory ${VPATH}/tests/standalone/OSAL_TestSem" \
36 | "--directory ${VPATH}/tests/standalone/OSAL_TestThreadGroup"\
37 | )
38 | 
39 | run_lcov "$D"
40 | exit $?
41 | 


--------------------------------------------------------------------------------
/valapps/valapp/c_service_manager.h:
--------------------------------------------------------------------------------
 1 | 
 2 | extern "C" {
 3 |     typedef struct 
 4 |     {
 5 |         unsigned char* virtual_addr;
 6 |         unsigned long physical_addr;
 7 |         unsigned long size;
 8 |     } mmio_buffer_t;
 9 | 
10 |     void service_manager_shutdown();
11 |     
12 |     void service_manager_start();
13 |     
14 |     void service_manager_define_services(char* config_file);
15 | 
16 |     void service_manager_create_services(char* config_file);
17 |     
18 |     void service_manager_create_service(char* service_name);
19 | 
20 |     void* service_manager_get_client(char* name);
21 | 
22 |     void service_release(char* service_name);
23 | 
24 |     unsigned int reconfigure(char* filename);
25 | 
26 |     mmio_buffer_t buffer_allocate(char* service, long size);
27 | 
28 |     void buffer_release(char* service, unsigned char* buffer);
29 | 
30 |     unsigned int mmio_read32(char* service, unsigned int address);
31 |     
32 |     long long mmio_read64(char* service, unsigned int address);
33 | 
34 |     void mmio_write32(char* service, unsigned int address, int value);
35 |     
36 |     void mmio_write64(char* service, unsigned int address, long value);
37 | 
38 |     void afu_reset(char* service);
39 | 
40 | 
41 | 
42 | }
43 | 


--------------------------------------------------------------------------------
/swval/sdk/tests/standalone/isolated/aal0014.h:
--------------------------------------------------------------------------------
 1 | // INTEL CONFIDENTIAL - For Intel Internal Use Only
 2 | #ifndef __AAL0014_H__
 3 | #define __AAL0014_H__
 4 | #include "isolated.h"
 5 | 
 6 | void aal0014();
 7 | 
 8 | class aal0014Fixture : public TestFixture
 9 | {
10 | public:
11 |    aal0014Fixture() {}
12 |    virtual ~aal0014Fixture() {}
13 | 
14 |    virtual void SetUp()
15 |    {
16 |       unsigned i;
17 |       for ( i = 0 ; i < sizeof(m_pThrs) / sizeof(m_pThrs[0]) ; ++i ) {
18 |          m_pThrs[i] = NULL;
19 |          m_TIDs[i]  = 0;
20 |       }
21 | 
22 |       for ( i = 0 ; i < sizeof(m_Scratch) / sizeof(m_Scratch[0]) ; ++i ) {
23 |          m_Scratch[i] = 0;
24 |       }
25 |    }
26 | 
27 |    virtual void Run();
28 | 
29 |    virtual void TearDown()
30 |    {
31 |       YIELD_WHILE(CurrentThreads() > 0);
32 |       m_Semaphore.Destroy();
33 |    }
34 | 
35 |    OSLThread          *m_pThrs[3];
36 |    btTID               m_TIDs[3];
37 |    volatile btUIntPtr  m_Scratch[10];
38 |    CSemaphore          m_Semaphore;
39 | 
40 |    static void Thr0(OSLThread * , void * );
41 |    static void Thr1(OSLThread * , void * );
42 | 
43 |    static void EmptySIGUSR1Handler(int , siginfo_t * , void * );
44 | };
45 | 
46 | #endif // __AAL0014_H__
47 | 
48 | 


--------------------------------------------------------------------------------
/swval/gtest/unzip_gtest.bat:
--------------------------------------------------------------------------------
 1 | @echo off
 2 | 
 3 | set GTEST=gtest-1.7.0
 4 | set  GZIP=gzip.exe
 5 | set   TAR=tar.exe
 6 | 
 7 | 
 8 | set errorlevel=0
 9 | if exist %GTEST% goto success
10 | 
11 | 
12 | if not exist "%GTEST%.tar.gz" goto gtest_zip_error
13 | 
14 | copy "%GTEST%.tar.gz" "temp-%GTEST%.tar.gz"
15 | 
16 | set errorlevel=
17 | .\%GZIP% -d "temp-%GTEST%.tar.gz"
18 | rem if %errorlevel% neq 0 goto gzip_error
19 | 
20 | if not exist "temp-%GTEST%.tar" goto gtest_tar_error
21 | 
22 | set errorlevel=
23 | .\%TAR% -x -f "temp-%GTEST%.tar"
24 | rem if %errorlevel% neq 0 goto tar_error
25 | 
26 | if not exist "%GTEST%" goto gtest_error
27 | 
28 | del "temp-%GTEST%.tar" 
29 | echo %GTEST% decompressed.
30 | 
31 | :success
32 | exit /b %errorlevel%
33 | 
34 | 
35 | :gtest_zip_error
36 | echo %GTEST%.tar.gz not found.
37 | set errorlevel=2
38 | goto error
39 | 
40 | :gzip_error
41 | echo %GZIP% failed.
42 | set errorlevel=3
43 | goto error
44 | 
45 | :gtest_tar_error
46 | echo temp-%GTEST%.tar not found.
47 | set errorlevel=4
48 | goto error
49 | 
50 | :tar_error
51 | echo %TAR% failed.
52 | set errorlevel=5
53 | goto error
54 | 
55 | :gtest_error
56 | echo %GTEST% not found.
57 | set errorlevel=6
58 | goto error
59 | 
60 | :error
61 | exit /b %errorlevel%
62 | 


--------------------------------------------------------------------------------
/valapps/Error/Makefile:
--------------------------------------------------------------------------------
 1 | # INTEL CONFIDENTIAL - For Intel Internal Use Only
 2 | 
 3 | # valapps/Error/Makefile
 4 | 
 5 | CPPFLAGS ?=
 6 | CXX      ?= g++
 7 | LDFLAGS  ?=
 8 | 
 9 | ifneq (,$(ndebug))
10 | else
11 | CPPFLAGS += -DENABLE_DEBUG=1
12 | endif
13 | ifneq (,$(nassert))
14 | else
15 | CPPFLAGS += -DENABLE_ASSERT=1
16 | endif
17 | 
18 | ifeq (,$(DESTDIR))
19 | ifneq (,$(prefix))
20 | CPPFLAGS += -I$(prefix)/include
21 | LDFLAGS  += -L$(prefix)/lib -Wl,-rpath-link -Wl,$(prefix)/lib -Wl,-rpath -Wl,$(prefix)/lib \
22 |             -L$(prefix)/lib64 -Wl,-rpath-link -Wl,$(prefix)/lib64 -Wl,-rpath -Wl,$(prefix)/lib64
23 | endif
24 | else
25 | ifeq (,$(prefix))
26 | prefix = /usr/local
27 | endif
28 | CPPFLAGS += -I$(DESTDIR)$(prefix)/include
29 | LDFLAGS  += -L$(DESTDIR)$(prefix)/lib -Wl,-rpath-link -Wl,$(prefix)/lib -Wl,-rpath -Wl,$(DESTDIR)$(prefix)/lib \
30 |             -L$(DESTDIR)$(prefix)/lib64 -Wl,-rpath-link -Wl,$(prefix)/lib64 -Wl,-rpath -Wl,$(DESTDIR)$(prefix)/lib64
31 | endif
32 | 
33 | all: Error
34 | 
35 | Error: main.o
36 | 	$(CXX) -g -O2 -o Error main.o $(LDFLAGS) -lOSAL -lAAS -laalrt
37 | 
38 | main.o: main.cpp Makefile
39 | 	$(CXX) $(CPPFLAGS) -D__AAL_USER__=1 -g -O2 -c -o main.o main.cpp
40 | 
41 | clean:
42 | 	$(RM) Error main.o
43 | 
44 | .PHONY:all clean
45 | 


--------------------------------------------------------------------------------
/aaluser/aas/RRMBrokerService/librrmbroker.vcxproj.filters:
--------------------------------------------------------------------------------
 1 | 
 2 | 
 3 |   
 4 |     
 5 |       {1f753930-d6c2-4ffd-bcc0-dd7e320aab8c}
 6 |     
 7 |     
 8 |       {26e3ebf7-d37e-4a7d-b52b-976cb533f2a8}
 9 |     
10 |   
11 |   
12 |     
13 |       Source FIles
14 |     
15 |     
16 |       Source FIles
17 |     
18 |     
19 |       Source FIles
20 |     
21 |   
22 |   
23 |     
24 |       Header Files
25 |     
26 |     
27 |       Header Files
28 |     
29 |     
30 |       Header Files
31 |     
32 |   
33 | 


--------------------------------------------------------------------------------
/valapps/valapp/testit.cpp:
--------------------------------------------------------------------------------
 1 | #include "arguments.h"
 2 | #include 
 3 | #include 
 4 | #include "utils.h"
 5 | #include "process.h"
 6 | 
 7 | int main(int argc, char* argv[])
 8 | {
 9 |     for (int i = 0; i < argc; ++i)
10 |     {
11 |         std::cout << argv[i] << std::endl;
12 |     }
13 |     auto p = utils::process::start("fpgadiag", { "--mode=lpbk1" });
14 |     auto code = p.wait();
15 |     std::cout << "exit code: " << code << std::endl;
16 |     return 0;
17 |     auto split = utils::split("/abc/def/xyz", ":");
18 |     for (auto s : split)
19 |     {
20 |         std::cout << s << std::endl;
21 |     }
22 |     return 0;
23 |     arguments argparse;
24 |     argparse("argument1", 'a', true)
25 |             ("argument2", 'b', true)
26 |             ("argument3", 'c', false).end();
27 | 
28 |     argparse.parse(argc, argv);
29 | 
30 |     std::cout << "argument1: " << argparse.get_string("argument1") << std::endl;
31 |     std::cout << "argument2: " << argparse.get_string("argument2") << std::endl;
32 |     std::cout << "argument3: " << argparse.have("argument3") << std::endl;
33 |     std::cout << "leftover: ";
34 |     for (auto l : argparse.leftover())
35 |     {
36 |         std::cout << l << ", ";
37 |     }
38 |     std::cout << std::endl;
39 | 
40 | }
41 | 
42 | 
43 | 


--------------------------------------------------------------------------------
/swval/sdk/tests/standalone/isolated/main.cpp:
--------------------------------------------------------------------------------
 1 | // INTEL CONFIDENTIAL - For Intel Internal Use Only
 2 | #ifdef HAVE_CONFIG_H
 3 | # include 
 4 | #endif // HAVE_CONFIG_H
 5 | #include "isolated.h"
 6 | 
 7 | void SelfTest()
 8 | {
 9 |    //ASSERT_TRUE(false);
10 |    EXPECT_TRUE(false);
11 |    //ASSERT_FALSE(true);
12 |    EXPECT_FALSE(true);
13 | 
14 |    //ASSERT_NULL((void *)1);
15 |    EXPECT_NULL((void *)1);
16 |    //ASSERT_NONNULL((void *)0);
17 |    EXPECT_NONNULL((void *)0);
18 | 
19 |    //ASSERT_EQ(0, 1);
20 |    EXPECT_EQ(0, 1);
21 |    //ASSERT_NE(2, 2);
22 |    EXPECT_NE(2, 2);
23 | }
24 | 
25 | void AssertFailed()
26 | {
27 |    exit(99);
28 | }
29 | 
30 | static int gErrors = 0;
31 | void ExpectFailed()
32 | {
33 |    ++gErrors;
34 | }
35 | 
36 | void Execute(ITestFixture *f)
37 | {
38 |    f->SetUp();
39 |    f->Run();
40 |    f->TearDown();
41 | }
42 | 
43 | #include "aal0014.h"
44 | #include "aal0017.h"
45 | 
46 | 
47 | int main(int argc, char* argv[])
48 | {
49 |    //SelfTest();
50 | 
51 |    int i;
52 |    for ( i = 1 ; i < argc ; ++i ) {
53 |       if ( 0 == std::string(argv[i]).compare("14") ) {
54 |          aal0014();
55 |       } else if ( 0 == std::string(argv[i]).compare("17") ) {
56 |          aal0017();
57 |       }
58 |    }
59 | 
60 |    return gErrors;
61 | }
62 | 
63 | 
64 | 


--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
 1 | # files for git to ignore.  this file is under revision control, and is
 2 | # shared by all AAL developers, so please tread lightly.
 3 | 
 4 | # Autotools intermediate files
 5 | Makefile.in
 6 | aclocal.m4
 7 | ar-lib
 8 | autom4te.cache
 9 | compile
10 | config.guess
11 | config.h.in
12 | config.h.in~
13 | config.sub
14 | configure
15 | depcomp
16 | install-sh
17 | libtool.m4
18 | ltmain.sh
19 | ltoptions.m4
20 | ltsugar.m4
21 | ltversion.m4
22 | lt~obsolete.m4
23 | missing
24 | test-driver
25 | ylwrap
26 | testsuite
27 | 
28 | # klocwork cache directories
29 | .kwlp/
30 | .kwps/
31 | 
32 | # vim swap files
33 | *.swo
34 | *.swp
35 | 
36 | # eclipse cdt project files
37 | .autotools
38 | .cproject
39 | .project
40 | .settings
41 | 
42 | # microsoft visual studio
43 | .vs/
44 | *.sdf
45 | 
46 | # google test
47 | gtest-1.6.0/
48 | gtest-1.7.0/
49 | 
50 | # symlinks we must ignore
51 | kernel
52 | 
53 | *.o
54 | *.so
55 | *.0
56 | */nlb_test
57 | */spl_shm
58 | */umsg_test
59 | *.log
60 | work/
61 | synopsys_sim.setup
62 | *.tcl
63 | *.mk
64 | *.list
65 | *.pyc
66 | .vlogansetup.args
67 | AN.DB/
68 | DVEfiles/
69 | csrc/
70 | transcript
71 | vc_hdrs.h
72 | 
73 | # Mac cruft
74 | .DS_Store
75 | 
76 | cscope.in.out
77 | cscope.out
78 | cscope.po.out
79 | *.tags
80 | *.tags_sorted_by_file
81 | valapps/*.xml
82 | 


--------------------------------------------------------------------------------
/valapps/Power_Thermal/Makefile:
--------------------------------------------------------------------------------
 1 | # INTEL CONFIDENTIAL - For Intel Internal Use Only
 2 | 
 3 | # valapps/Power_Thermal/Makefile
 4 | 
 5 | CPPFLAGS ?=
 6 | CXX      ?= g++
 7 | LDFLAGS  ?=
 8 | 
 9 | ifneq (,$(ndebug))
10 | else
11 | CPPFLAGS += -DENABLE_DEBUG=1
12 | endif
13 | ifneq (,$(nassert))
14 | else
15 | CPPFLAGS += -DENABLE_ASSERT=1
16 | endif
17 | 
18 | ifeq (,$(DESTDIR))
19 | ifneq (,$(prefix))
20 | CPPFLAGS += -I$(prefix)/include
21 | LDFLAGS  += -L$(prefix)/lib -Wl,-rpath-link -Wl,$(prefix)/lib -Wl,-rpath -Wl,$(prefix)/lib \
22 |             -L$(prefix)/lib64 -Wl,-rpath-link -Wl,$(prefix)/lib64 -Wl,-rpath -Wl,$(prefix)/lib64
23 | endif
24 | else
25 | ifeq (,$(prefix))
26 | prefix = /usr/local
27 | endif
28 | CPPFLAGS += -I$(DESTDIR)$(prefix)/include
29 | LDFLAGS  += -L$(DESTDIR)$(prefix)/lib -Wl,-rpath-link -Wl,$(prefix)/lib -Wl,-rpath -Wl,$(DESTDIR)$(prefix)/lib \
30 |             -L$(DESTDIR)$(prefix)/lib64 -Wl,-rpath-link -Wl,$(prefix)/lib64 -Wl,-rpath -Wl,$(DESTDIR)$(prefix)/lib64
31 | endif
32 | 
33 | all: Power_Thermal
34 | 
35 | Power_Thermal: main.o
36 | 	$(CXX) -g -O2 -o Power_Thermal main.o $(LDFLAGS) -lOSAL -lAAS -laalrt
37 | 
38 | main.o: main.cpp Makefile
39 | 	$(CXX) $(CPPFLAGS) -D__AAL_USER__=1 -g -O2 -c -o main.o main.cpp
40 | 
41 | clean:
42 | 	$(RM) Power_Thermal main.o
43 | 
44 | .PHONY:all clean
45 | 


--------------------------------------------------------------------------------
/valapps/valapp/client_factory.h:
--------------------------------------------------------------------------------
 1 | #pragma once
 2 | #include 
 3 | #include 
 4 | #include "utils.h"
 5 | 
 6 | class service_client;
 7 | 
 8 | 
 9 | class client_factory
10 | {
11 |     public:
12 |     typedef service_client* (*client_maker_t)();
13 |         
14 |     static client_factory* instance();
15 |     
16 |     template
17 |     static bool register_client()
18 |     {
19 |         auto typestr = utils::get_typename();
20 |         client_factory::instance()->register_client(typestr, 
21 |                 []()
22 |                 { 
23 |                     return dynamic_cast(new T());
24 |                 });
25 |         return true;
26 |     }
27 | 
28 |     inline void register_client(const std::string &client_type, client_maker_t maker)
29 |     {
30 |         client_makers_[client_type] = maker;
31 |     }
32 | 
33 |     inline service_client* make(const std::string& client_type)
34 |     {
35 |         auto iter = client_makers_.find(client_type);
36 |         if (iter != client_makers_.end())
37 |         {
38 |             return iter->second();
39 |         }
40 |         return 0;
41 |     }
42 | 
43 |     private:
44 |     static client_factory* instance_;
45 |     std::map client_makers_;
46 | 
47 | 
48 | 
49 | 
50 | 
51 | };
52 | 


--------------------------------------------------------------------------------
/swval/win/libHWALIAFU.vcxproj.filters:
--------------------------------------------------------------------------------
 1 | 
 2 | 
 3 |   
 4 |     
 5 |       {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
 6 |       cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx
 7 |     
 8 |     
 9 |       {93995380-89BD-4b04-88EB-625FBE52EBFB}
10 |       h;hh;hpp;hxx;hm;inl;inc;xsd
11 |     
12 |   
13 |   
14 |     
15 |       Source Files
16 |     
17 |     
18 |       Source Files
19 |     
20 |   
21 |   
22 |     
23 |       Header Files
24 |     
25 |     
26 |       Header Files
27 |     
28 |   
29 | 


--------------------------------------------------------------------------------
/swval/sdk/gdb/pretty-printers/libstdc++-v3/python/libstdcxx/v6/__init__.py:
--------------------------------------------------------------------------------
 1 | # Copyright (C) 2014 Free Software Foundation, Inc.
 2 | 
 3 | # This program is free software; you can redistribute it and/or modify
 4 | # it under the terms of the GNU General Public License as published by
 5 | # the Free Software Foundation; either version 3 of the License, or
 6 | # (at your option) any later version.
 7 | #
 8 | # This program is distributed in the hope that it will be useful,
 9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11 | # GNU General Public License for more details.
12 | #
13 | # You should have received a copy of the GNU General Public License
14 | # along with this program.  If not, see .
15 | 
16 | import gdb
17 | 
18 | # Load the pretty-printers.
19 | from printers import register_libstdcxx_printers
20 | register_libstdcxx_printers(gdb.current_objfile())
21 | 
22 | # Load the xmethods if GDB supports them.
23 | def gdb_has_xmethods():
24 |     try:
25 |         import gdb.xmethod
26 |         return True
27 |     except ImportError:
28 |         return False
29 | 
30 | if gdb_has_xmethods():
31 |     from xmethods import register_libstdcxx_xmethods
32 |     register_libstdcxx_xmethods(gdb.current_objfile())
33 | 


--------------------------------------------------------------------------------
/valapps/UMsg_Allocation/Makefile:
--------------------------------------------------------------------------------
 1 | # INTEL CONFIDENTIAL - For Intel Internal Use Only
 2 | 
 3 | # valapps/UMsg_Allocation/Makefile
 4 | 
 5 | CPPFLAGS ?=
 6 | CXX      ?= g++
 7 | LDFLAGS  ?=
 8 | 
 9 | ifneq (,$(ndebug))
10 | else
11 | CPPFLAGS += -DENABLE_DEBUG=1
12 | endif
13 | ifneq (,$(nassert))
14 | else
15 | CPPFLAGS += -DENABLE_ASSERT=1
16 | endif
17 | 
18 | ifeq (,$(DESTDIR))
19 | ifneq (,$(prefix))
20 | CPPFLAGS += -I$(prefix)/include
21 | LDFLAGS  += -L$(prefix)/lib -Wl,-rpath-link -Wl,$(prefix)/lib -Wl,-rpath -Wl,$(prefix)/lib \
22 |             -L$(prefix)/lib64 -Wl,-rpath-link -Wl,$(prefix)/lib64 -Wl,-rpath -Wl,$(prefix)/lib64
23 | endif
24 | else
25 | ifeq (,$(prefix))
26 | prefix = /usr/local
27 | endif
28 | CPPFLAGS += -I$(DESTDIR)$(prefix)/include
29 | LDFLAGS  += -L$(DESTDIR)$(prefix)/lib -Wl,-rpath-link -Wl,$(prefix)/lib -Wl,-rpath -Wl,$(DESTDIR)$(prefix)/lib \
30 |             -L$(DESTDIR)$(prefix)/lib64 -Wl,-rpath-link -Wl,$(prefix)/lib64 -Wl,-rpath -Wl,$(DESTDIR)$(prefix)/lib64
31 | endif
32 | 
33 | all: UMsg_Allocation
34 | 
35 | UMsg_Allocation: main.o
36 | 	$(CXX) -g -O2 -o UMsg_Allocation main.o $(LDFLAGS) -lOSAL -lAAS -laalrt
37 | 
38 | main.o: main.cpp Makefile
39 | 	$(CXX) $(CPPFLAGS) -D__AAL_USER__=1 -g -O2 -c -o main.o main.cpp
40 | 
41 | clean:
42 | 	$(RM) UMsg_Allocation main.o
43 | 
44 | .PHONY:all clean
45 | 


--------------------------------------------------------------------------------
/valapps/RAS/Makefile:
--------------------------------------------------------------------------------
 1 | # INTEL CONFIDENTIAL - For Intel Internal Use Only
 2 | 
 3 | # valapps/RAS/Makefile
 4 | 
 5 | CPPFLAGS ?=
 6 | CXX      ?= g++
 7 | LDFLAGS  ?= -L../vallib -L../valapp
 8 | 
 9 | ifneq (,$(ndebug))
10 | else
11 | CPPFLAGS += -DENABLE_DEBUG=1
12 | endif
13 | ifneq (,$(nassert))
14 | else
15 | CPPFLAGS += -DENABLE_ASSERT=1
16 | endif
17 | 
18 | ifeq (,$(DESTDIR))
19 | ifneq (,$(prefix))
20 | CPPFLAGS += -I$(prefix)/include
21 | LDFLAGS  += -L$(prefix)/lib -Wl,-rpath-link -Wl,$(prefix)/lib -Wl,-rpath -Wl,$(prefix)/lib \
22 |             -L$(prefix)/lib64 -Wl,-rpath-link -Wl,$(prefix)/lib64 -Wl,-rpath -Wl,$(prefix)/lib64
23 | endif
24 | else
25 | ifeq (,$(prefix))
26 | prefix = /usr/local
27 | endif
28 | CPPFLAGS += -I$(DESTDIR)$(prefix)/include
29 | LDFLAGS  += -L$(DESTDIR)$(prefix)/lib -Wl,-rpath-link -Wl,$(prefix)/lib -Wl,-rpath -Wl,$(DESTDIR)$(prefix)/lib \
30 |             -L$(DESTDIR)$(prefix)/lib64 -Wl,-rpath-link -Wl,$(prefix)/lib64 -Wl,-rpath -Wl,$(DESTDIR)$(prefix)/lib64
31 | endif
32 | 
33 | all: RAS
34 | 
35 | RAS: main.o
36 | 	$(CXX) -g -O2 -o RAS main.o $(LDFLAGS) -lOSAL -lAAS -laalrt -lvallib -lvalutils
37 | 
38 | main.o: main.cpp ../vallib/vallib.h Makefile
39 | 	$(CXX) $(CPPFLAGS) -D__AAL_USER__=1 -I../vallib -I../valapp -g -O2 -c -o main.o main.cpp
40 | 
41 | clean:
42 | 	$(RM) RAS main.o
43 | 
44 | .PHONY:all clean
45 | 


--------------------------------------------------------------------------------
/aalsamples/Hello_AAL_Service/SW/hello_aal_service.vcxproj.filters:
--------------------------------------------------------------------------------
 1 | 
 2 | 
 3 |   
 4 |     
 5 |       {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
 6 |       cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx
 7 |     
 8 |     
 9 |       {93995380-89BD-4b04-88EB-625FBE52EBFB}
10 |       h;hh;hpp;hxx;hm;inl;inc;xsd
11 |     
12 |     
13 |       {67DA6AB6-F800-4c08-8B7A-83BB121AAD01}
14 |       rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms
15 |     
16 |   
17 |   
18 |     
19 |       Source Files
20 |     
21 |   
22 |   
23 |     
24 |       Header Files
25 |     
26 |     
27 |       Header Files
28 |     
29 |   
30 | 


--------------------------------------------------------------------------------
/valapps/Signal_Tap/Makefile:
--------------------------------------------------------------------------------
 1 | # INTEL CONFIDENTIAL - For Intel Internal Use Only
 2 | 
 3 | # valapps/Signal_Tap/Makefile
 4 | 
 5 | CPPFLAGS ?= -I../valapp
 6 | CXX      ?= g++
 7 | LDFLAGS  ?= -L../valapp
 8 | 
 9 | ifneq (,$(ndebug))
10 | else
11 | CPPFLAGS += -DENABLE_DEBUG=1
12 | endif
13 | ifneq (,$(nassert))
14 | else
15 | CPPFLAGS += -DENABLE_ASSERT=1
16 | endif
17 | 
18 | ifeq (,$(DESTDIR))
19 | ifneq (,$(prefix))
20 | CPPFLAGS += -I$(prefix)/include
21 | LDFLAGS  += -L$(prefix)/lib -Wl,-rpath-link -Wl,$(prefix)/lib -Wl,-rpath -Wl,$(prefix)/lib \
22 |             -L$(prefix)/lib64 -Wl,-rpath-link -Wl,$(prefix)/lib64 -Wl,-rpath -Wl,$(prefix)/lib64
23 | endif
24 | else
25 | ifeq (,$(prefix))
26 | prefix = /usr/local
27 | endif
28 | CPPFLAGS += -I$(DESTDIR)$(prefix)/include
29 | LDFLAGS  += -L$(DESTDIR)$(prefix)/lib -Wl,-rpath-link -Wl,$(prefix)/lib -Wl,-rpath -Wl,$(DESTDIR)$(prefix)/lib \
30 |             -L$(DESTDIR)$(prefix)/lib64 -Wl,-rpath-link -Wl,$(prefix)/lib64 -Wl,-rpath -Wl,$(DESTDIR)$(prefix)/lib64
31 | endif
32 | 
33 | all: Signal_Tap
34 | 
35 | Signal_Tap: main.o
36 | 	$(CXX) -g -O2 -o Signal_Tap main.o ../valapp/libvalutils.la $(LDFLAGS) -lOSAL -lAAS -laalrt 
37 | 
38 | main.o: main.cpp Makefile
39 | 	$(CXX) $(CPPFLAGS) -D__AAL_USER__=1 -g -O2 -c -o main.o main.cpp
40 | 
41 | clean:
42 | 	$(RM) Signal_Tap main.o
43 | 
44 | .PHONY:all clean
45 | 


--------------------------------------------------------------------------------
/valapps/AFU_Reset/Makefile:
--------------------------------------------------------------------------------
 1 | # INTEL CONFIDENTIAL - For Intel Internal Use Only
 2 | 
 3 | # valapps/AFU_Reset/Makefile
 4 | 
 5 | CPPFLAGS ?= -I../valapp
 6 | CXX      ?= g++
 7 | LDFLAGS  ?= -L../valapp
 8 | 
 9 | ifneq (,$(ndebug))
10 | else
11 | CPPFLAGS += -DENABLE_DEBUG=1
12 | endif
13 | ifneq (,$(nassert))
14 | else
15 | CPPFLAGS += -DENABLE_ASSERT=1
16 | endif
17 | 
18 | ifeq (,$(DESTDIR))
19 | ifneq (,$(prefix))
20 | CPPFLAGS += -I$(prefix)/include
21 | LDFLAGS  += -L$(prefix)/lib -Wl,-rpath-link -Wl,$(prefix)/lib -Wl,-rpath -Wl,$(prefix)/lib \
22 |             -L$(prefix)/lib64 -Wl,-rpath-link -Wl,$(prefix)/lib64 -Wl,-rpath -Wl,$(prefix)/lib64
23 | endif
24 | else
25 | ifeq (,$(prefix))
26 | prefix = /usr/local
27 | endif
28 | CPPFLAGS += -I$(DESTDIR)$(prefix)/include
29 | LDFLAGS  += -L$(DESTDIR)$(prefix)/lib -Wl,-rpath-link -Wl,$(prefix)/lib -Wl,-rpath -Wl,$(DESTDIR)$(prefix)/lib \
30 |             -L$(DESTDIR)$(prefix)/lib64 -Wl,-rpath-link -Wl,$(prefix)/lib64 -Wl,-rpath -Wl,$(DESTDIR)$(prefix)/lib64
31 | endif
32 | 
33 | all: AFU_Reset
34 | 
35 | AFU_Reset: main.o
36 | 	$(CXX) -g -O2 -o AFU_Reset main.o ../valapp/libvalutils.la $(LDFLAGS) -lOSAL -lAAS -laalrt 
37 | 
38 | main.o: AFU_Reset.h main.cpp Makefile
39 | 	$(CXX) $(CPPFLAGS) -D__AAL_USER__=1 -g -O2 -c -o main.o main.cpp
40 | 
41 | clean:
42 | 	$(RM) AFU_Reset main.o
43 | 
44 | .PHONY:all clean
45 | 


--------------------------------------------------------------------------------
/aalutils/cpuset/SetCores.sh:
--------------------------------------------------------------------------------
 1 | PackagePwrLimit1=$(rdmsr -c0 -p 0 0x610)
 2 | echo "Raw Power Package Limits Msr: " $PackagePwrLimit1
 3 | Mask=0x0000000000007FFF
 4 | echo "Masking with: " $Mask
 5 | Limit1Val=$(( PackagePwrLimit1 & Mask ))
 6 | echo "Power Limit 1  " $Limit1Val
 7 | PackagePwrUnit=$(rdmsr -c0 -p 0 0x606)
 8 | echo $PackagePwrUnit
 9 | UnitVal=$(( PackagePwrUnit & 0x000000000000000F ))
10 | echo "Exponent for units: " $UnitVal
11 | UnitVal=$(echo "2^$UnitVal" | bc )
12 | echo "Divsor of Raw Limit1: " $UnitVal
13 | TotalWatts=$(echo "$Limit1Val / $UnitVal" | bc )
14 | echo "Total Watts Allowed in Package" $TotalWatts
15 | FpgaWatts=$1
16 | echo "Fpga Watts needed: " $FpgaWatts
17 | AvailWatts=$(echo "$TotalWatts - $FpgaWatts" | bc)
18 | echo "Watts available for Cores: " $AvailWatts
19 | MaxCoresAllowed=$(echo "$AvailWatts / 5" | bc)
20 | echo "Cores allowed at 5 watts per core: " $MaxCoresAllowed
21 | MaxCpus=$(echo "$MaxCoresAllowed * 2" | bc)
22 | echo "Threads allowed: " $MaxCpus
23 | MaxNumberForTaskSet=$(echo "$MaxCpus - 1" | bc)
24 | echo "Max number in mask input to taskset: " $MaxNumberForTaskSet
25 | TaskMaskStart="0-"
26 | TaskSetMask=$TaskMaskStart$MaxNumberForTaskSet
27 | echo "Taskset cpu mask: " $TaskSetMask
28 | ps -A -o pid > pid_lx1
29 | for var in `cat pid_lx1`
30 | do
31 |   sudo taskset -pc $TaskSetMask $var
32 | done
33 | rm pid_lx1
34 | 


--------------------------------------------------------------------------------
/swval/sdk/tests/harnessed/gtest/gtcommon/Makefile.am:
--------------------------------------------------------------------------------
 1 | # INTEL CONFIDENTIAL - For Intel Internal Use Only
 2 | 
 3 | if AAL_COND_GTEST
 4 | 
 5 | check_LTLIBRARIES=\
 6 | libgtcommon.la
 7 | 
 8 | libgtcommon_la_SOURCES=\
 9 | gtCommon.h \
10 | gtCommon_ClassOverrides.h \
11 | gtCommon_Config.h \
12 | gtCommon_Console.h \
13 | gtCommon_CSurrogateAdapter.h \
14 | gtCommon_DoWorker.h \
15 | gtCommon_GTest.h \
16 | gtCommon_Mocks.h \
17 | gtCommon_ModuleStub.h \
18 | gtCommon_RNG.h \
19 | gtCommon_RTAdapter.h \
20 | gtCommon_RTClientAdapter.h \
21 | gtCommon_ServiceListener.h \
22 | gtCommon_SMocks.h \
23 | gtCommon_Stream.h \
24 | gtCommon_Signals.h \
25 | gtCommon_Status.h \
26 | gtCommon.cpp \
27 | gtCommon_Config.cpp \
28 | gtCommon_DoWorker.cpp \
29 | gtCommon_ModuleStub.tpp \
30 | gtCommon_RNG.cpp \
31 | gtCommon_RTAdapter.cpp \
32 | gtCommon_RTClientAdapter.cpp \
33 | gtCommon_SMocks.cpp \
34 | gtCommon_Stream.cpp \
35 | gtCommon_Console.cpp \
36 | gtCommon_Status.cpp \
37 | gtCommon_Signals.cpp \
38 | gtCommon_GTest.cpp \
39 | gtCommon_Mocks.cpp 
40 | 
41 | libgtcommon_la_CPPFLAGS=\
42 | -I$(top_srcdir)/include \
43 | -I$(top_srcdir)/tests/swvalmod \
44 | -I$(top_builddir)/include $(GTEST_CPPFLAGS)
45 | 
46 | libgtcommon_la_LDFLAGS=\
47 | -avoid-version
48 | 
49 | libgtcommon_la_LIBADD=\
50 | $(top_builddir)/tests/harnessed/gtest/libgtest.la
51 | 
52 | endif
53 | 
54 | 


--------------------------------------------------------------------------------
/valapps/PartialReconf_Power/Makefile:
--------------------------------------------------------------------------------
 1 | # INTEL CONFIDENTIAL - For Intel Internal Use Only
 2 | 
 3 | # valapps/PartialReconf_Power/Makefile
 4 | 
 5 | CPPFLAGS ?=
 6 | CXX      ?= g++
 7 | LDFLAGS  ?=
 8 | 
 9 | ifneq (,$(ndebug))
10 | else
11 | CPPFLAGS += -DENABLE_DEBUG=1
12 | endif
13 | ifneq (,$(nassert))
14 | else
15 | CPPFLAGS += -DENABLE_ASSERT=1
16 | endif
17 | 
18 | ifeq (,$(DESTDIR))
19 | ifneq (,$(prefix))
20 | CPPFLAGS += -I$(prefix)/include
21 | LDFLAGS  += -L$(prefix)/lib -Wl,-rpath-link -Wl,$(prefix)/lib -Wl,-rpath -Wl,$(prefix)/lib \
22 |             -L$(prefix)/lib64 -Wl,-rpath-link -Wl,$(prefix)/lib64 -Wl,-rpath -Wl,$(prefix)/lib64
23 | endif
24 | else
25 | ifeq (,$(prefix))
26 | prefix = /usr/local
27 | endif
28 | CPPFLAGS += -I$(DESTDIR)$(prefix)/include
29 | LDFLAGS  += -L$(DESTDIR)$(prefix)/lib -Wl,-rpath-link -Wl,$(prefix)/lib -Wl,-rpath -Wl,$(DESTDIR)$(prefix)/lib \
30 |             -L$(DESTDIR)$(prefix)/lib64 -Wl,-rpath-link -Wl,$(prefix)/lib64 -Wl,-rpath -Wl,$(DESTDIR)$(prefix)/lib64
31 | endif
32 | 
33 | all: PartialReconf_Power
34 | 
35 | PartialReconf_Power: main.o
36 | 	$(CXX) -g -O2 -o PartialReconf_Power main.o $(LDFLAGS) -lOSAL -lAAS -laalrt -laalclp
37 | 
38 | main.o: main.cpp Makefile
39 | 	$(CXX) $(CPPFLAGS) -D__AAL_USER__=1 -g -O2 -c -o main.o main.cpp
40 | 
41 | clean:
42 | 	$(RM) PartialReconf_Power main.o
43 | 
44 | .PHONY:all clean
45 | 


--------------------------------------------------------------------------------
/prep-build.bat:
--------------------------------------------------------------------------------
 1 | @echo off
 2 | 
 3 | rem Make sure we're in the right dir.
 4 | if not exist "aaluser" goto missing_aaluser
 5 | if not exist "aalkernel" goto missing_aalkernel
 6 | if not exist "common_hdrs" goto missing_common_hdrs
 7 | 
 8 | rem Create the symlinks to common_hdrs if they don't exist.
 9 | if exist "aaluser\include\aalsdk\kernel" goto aalkernel_symlink
10 | cd "aaluser\include\aalsdk"
11 | 
12 | set errorlevel=
13 | mklink /d kernel "..\..\..\common_hdrs"
14 | if not "%errorlevel%" == "0" goto mklink_failed
15 | 
16 | cd "..\..\.."
17 | 
18 | :aalkernel_symlink
19 | if exist "aalkernel\include\aalsdk\kernel" goto done
20 | cd "aalkernel\include\aalsdk"
21 | 
22 | set errorlevel=
23 | mklink /d kernel "..\..\..\common_hdrs"
24 | if not "%errorlevel%" == "0" goto mklink_failed
25 | 
26 | cd "..\..\.."
27 | 
28 | :done
29 | exit /b 0
30 | 
31 | 
32 | :missing_aaluser
33 | set errorlevel=2
34 | echo aaluser not found.
35 | goto :err
36 | 
37 | :missing_aalkernel
38 | set errorlevel=3
39 | echo aalkernel not found.
40 | goto :err
41 | 
42 | :missing_common_hdrs
43 | set errorlevel=4
44 | echo common_hdrs not found.
45 | goto :err
46 | 
47 | :mklink_failed
48 | cd "..\..\.."
49 | echo mklink failed. You need to run prep-build.bat as Administrator.
50 | goto :err
51 | 
52 | 
53 | :err
54 | exit /b %errorlevel%
55 | 


--------------------------------------------------------------------------------
/valapps/Makefile:
--------------------------------------------------------------------------------
 1 | # INTEL CONFIDENTIAL - For Intel Internal Use Only
 2 | 
 3 | 
 4 | ## These subdirectories must be built first
 5 | SUBDIRS1=\
 6 | valapp   \
 7 | appbase/ \
 8 | vallib/  
 9 | 
10 | ## Automagically include ALL sub-directories that have a Makefile (Thanks TBD!)
11 | SUBDIRS2 := $(shell find . -name Makefile|sed 's^./^^;s/Makefile//')
12 | 
13 | ## Removed SUBDIRS2 go below. Notice the final comma.
14 | ## Need to remove those in SUBDIRS1
15 | ## If you add a directory that you do not want built, add it here.
16 | SUBDIRS2 :=$(filter-out \
17 | ${SUBDIRS1} \
18 | , $(SUBDIRS2))
19 | 
20 | MFLAGS  =
21 | ifneq (,$(ndebug))
22 | MFLAGS += ndebug=$(ndebug)
23 | endif
24 | ifneq (,$(nassert))
25 | MFLAGS += nassert=$(nassert)
26 | endif
27 | 
28 | ifeq (,$(DESTDIR))
29 | ifneq (,$(prefix))
30 | MFLAGS += prefix=$(prefix)
31 | endif
32 | else
33 | ifeq (,$(prefix))
34 | prefix  = /usr/local
35 | else
36 | MFLAGS += prefix=$(prefix)
37 | endif
38 | MFLAGS += DESTDIR=$(DESTDIR)
39 | endif
40 | 
41 | all clean:
42 | #	@echo  ${SUBDIRS1} ${SUBDIRS2}
43 | 	@for d in ${SUBDIRS1} ${SUBDIRS2} ; do (cd "$$d" && $(MAKE) $(MFLAGS) $@) || exit 1 ; done
44 | 
45 | .PHONY: all clean
46 | 
47 | #doc docs: docclean
48 | #	doc/output/./test.sh
49 | #	doxygen doc/Doxyfile
50 | #docclean docsclean:
51 | #	@$(RM) -rf doc/doxygen
52 | #
53 | #.PHONY:doc docs docclean docsclean
54 | 


--------------------------------------------------------------------------------
/aalkernel/aalkernel.vcxproj.filters:
--------------------------------------------------------------------------------
 1 | 
 2 | 
 3 |   
 4 |     
 5 |       {e5426951-3ba3-4e05-9960-17a56459a428}
 6 |     
 7 |     
 8 |       {54377133-4133-412f-880b-4d4fea86be07}
 9 |     
10 |     
11 |       {2d96039b-287b-4034-be2e-bb6c8d3d7cfb}
12 |     
13 |     
14 |       {93995380-89BD-4b04-88EB-625FBE52EBFB}
15 |       h;hpp;hxx;hm;inl;inc;xsd
16 |     
17 |     
18 |       {67DA6AB6-F800-4c08-8B7A-83BB121AAD01}
19 |       rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms
20 |     
21 |   
22 |   
23 |     
24 |       cci_PCIe_driver\Source Files
25 |     
26 |   
27 | 


--------------------------------------------------------------------------------
/valapps/AFU_Reset/SW_RESET_01:
--------------------------------------------------------------------------------
 1 | #!/bin/bash +x
 2 | 
 3 | usage() {
 4 |    echo "./SW_RESET_01 "
 5 | }
 6 | 
 7 | NumSocket=$1
 8 | echo $SystemConfig $NumSocket
 9 | 
10 | GetDeviceInformation(){
11 |    CMDRST="$(/usr/sbin/lspci | grep bcc0)"
12 |    DEVINFO1="${CMDRST[0]}"
13 |    DEVINFO2="${CMDRST[1]}"
14 | 
15 |    echo  $DEVINFO1
16 |    Bus1="${DEVINFO1:0:2}"
17 |    Dev1="${DEVINFO1:3:2}"
18 |    Func1="${DEVINFO1:6:1}"
19 |    Bus2="${DEVINFO1:67:2}"
20 |    Dev2="${DEVINFO1:3:2}"
21 |    Func2="${DEVINFO1:6:1}"
22 | }
23 | 
24 | GetDeviceInformation
25 | bus1="0x"$Bus1
26 | bus2="0x"$Bus2
27 | 
28 | if [[ $NumSocket -eq 1 ]]; then
29 |    ./AFU_Reset 
30 | 
31 |    if [[ $? -eq 0 ]]; then 
32 |       echo "Test PASS on 1 socket system !!!"
33 |       exit 0
34 |    else 
35 |       echo "Test FAILED on 1 socket system !!!"
36 |       exit 1
37 |    fi
38 | fi
39 | 
40 | if [[ $NumSocket -eq 2 ]]; then
41 |    echo ./AFU_Reset --bus=$bus1
42 |    ./AFU_Reset --bus=$bus1 
43 | 
44 |    result1=$?
45 |    
46 |    echo ./AFU_Reset --bus=$bus2
47 |    ./AFU_Reset --bus=$bus2
48 |       
49 |    result2=$?  
50 |   
51 |    if [[ $result1 -eq 0 && $result2 -eq 0 ]] ; then 
52 |       echo "Test PASS on 2 sockets system !!!"
53 |       exit 0
54 |    else 
55 |       echo "Test FAILED on 2 sockets system !!!"
56 |       exit 1
57 |    fi
58 | fi
59 | 
60 | 
61 | 


--------------------------------------------------------------------------------
/valapps/DMA_Buffer/Makefile:
--------------------------------------------------------------------------------
 1 | # INTEL CONFIDENTIAL - For Intel Internal Use Only
 2 | 
 3 | # valapps/DMA_Buffer/Makefile
 4 | 
 5 | CPPFLAGS ?=-I../appbase -I../valapp
 6 | CXX      ?= g++
 7 | LDFLAGS  ?=-L../appbase -L../valapp
 8 | 
 9 | ifneq (,$(ndebug))
10 | else
11 | CPPFLAGS += -DENABLE_DEBUG=1
12 | endif
13 | ifneq (,$(nassert))
14 | else
15 | CPPFLAGS += -DENABLE_ASSERT=1
16 | endif
17 | 
18 | ifeq (,$(DESTDIR))
19 | ifneq (,$(prefix))
20 | CPPFLAGS += -I$(prefix)/include
21 | LDFLAGS  += -L$(prefix)/lib -Wl,-rpath-link -Wl,$(prefix)/lib -Wl,-rpath -Wl,$(prefix)/lib \
22 |             -L$(prefix)/lib64 -Wl,-rpath-link -Wl,$(prefix)/lib64 -Wl,-rpath -Wl,$(prefix)/lib64
23 | endif
24 | else
25 | ifeq (,$(prefix))
26 | prefix = /usr/local
27 | endif
28 | CPPFLAGS += -I$(DESTDIR)$(prefix)/include
29 | LDFLAGS  += -L$(DESTDIR)$(prefix)/lib -Wl,-rpath-link -Wl,$(prefix)/lib -Wl,-rpath -Wl,$(DESTDIR)$(prefix)/lib \
30 |             -L$(DESTDIR)$(prefix)/lib64 -Wl,-rpath-link -Wl,$(prefix)/lib64 -Wl,-rpath -Wl,$(DESTDIR)$(prefix)/lib64
31 | endif
32 | 
33 | all: DMA_Buffer
34 | 
35 | DMA_Buffer: main.o
36 | 	$(CXX) -g -O2 -o DMA_Buffer main.o ../valapp/libvalutils.la $(LDFLAGS) -lappbase -lOSAL -lAAS -laalrt
37 | main.o: main.cpp Makefile
38 | 	$(CXX) $(CPPFLAGS) -D__AAL_USER__=1 -g -O2 -c -o main.o main.cpp
39 | 
40 | clean:
41 | 	$(RM) DMA_Buffer main.o
42 | 
43 | .PHONY:all clean
44 | 


--------------------------------------------------------------------------------
/valapps/MMIO_Mapping/Makefile:
--------------------------------------------------------------------------------
 1 | # INTEL CONFIDENTIAL - For Intel Internal Use Only
 2 | 
 3 | # valapps/MMIO_Mapping/Makefile
 4 | 
 5 | CPPFLAGS ?= -I../valapp
 6 | CXX      ?= g++
 7 | LDFLAGS  ?= -L../valapp
 8 | 
 9 | ifneq (,$(ndebug))
10 | else
11 | CPPFLAGS += -DENABLE_DEBUG=1
12 | endif
13 | ifneq (,$(nassert))
14 | else
15 | CPPFLAGS += -DENABLE_ASSERT=1
16 | endif
17 | 
18 | ifeq (,$(DESTDIR))
19 | ifneq (,$(prefix))
20 | CPPFLAGS += -I$(prefix)/include
21 | LDFLAGS  += -L$(prefix)/lib -Wl,-rpath-link -Wl,$(prefix)/lib -Wl,-rpath -Wl,$(prefix)/lib \
22 |             -L$(prefix)/lib64 -Wl,-rpath-link -Wl,$(prefix)/lib64 -Wl,-rpath -Wl,$(prefix)/lib64
23 | endif
24 | else
25 | ifeq (,$(prefix))
26 | prefix = /usr/local
27 | endif
28 | CPPFLAGS += -I$(DESTDIR)$(prefix)/include
29 | LDFLAGS  += -L$(DESTDIR)$(prefix)/lib -Wl,-rpath-link -Wl,$(prefix)/lib -Wl,-rpath -Wl,$(DESTDIR)$(prefix)/lib \
30 |             -L$(DESTDIR)$(prefix)/lib64 -Wl,-rpath-link -Wl,$(prefix)/lib64 -Wl,-rpath -Wl,$(DESTDIR)$(prefix)/lib64
31 | endif
32 | 
33 | all: MMIO_Mapping
34 | 
35 | MMIO_Mapping: main.o
36 | 	$(CXX) -g -O2 -o MMIO_Mapping main.o ../valapp/libvalutils.la $(LDFLAGS) -lOSAL -lAAS -laalrt
37 | 
38 | main.o: MMIOmapping.h main.cpp Makefile
39 | 	$(CXX) $(CPPFLAGS) -D__AAL_USER__=1 -g -O2 -c -o main.o main.cpp
40 | 
41 | clean:
42 | 	$(RM) MMIO_Mapping main.o
43 | 
44 | .PHONY:all clean
45 | 


--------------------------------------------------------------------------------
/valapps/Signal_Tap/SW_STAP_01:
--------------------------------------------------------------------------------
 1 | #!/bin/bash +x
 2 | 
 3 | usage() {
 4 |    echo "./SW_STAP_01 "
 5 | }
 6 | 
 7 | NumSocket=$1
 8 | echo $SystemConfig $NumSocket
 9 | 
10 | GetDeviceInformation(){
11 |    CMDRST="$(/usr/sbin/lspci | grep bcc0)"
12 |    DEVINFO1="${CMDRST[0]}"
13 |    DEVINFO2="${CMDRST[1]}"
14 | 
15 |    echo  $DEVINFO1
16 |    Bus1="${DEVINFO1:0:2}"
17 |    Dev1="${DEVINFO1:3:2}"
18 |    Func1="${DEVINFO1:6:1}"
19 |    Bus2="${DEVINFO1:67:2}"
20 |    Dev2="${DEVINFO1:3:2}"
21 |    Func2="${DEVINFO1:6:1}"
22 | }
23 | 
24 | GetDeviceInformation
25 | bus1="0x"$Bus1
26 | bus2="0x"$Bus2
27 | 
28 | if [[ $NumSocket -eq 1 ]]; then
29 |    ./Signal_Tap 
30 | 
31 |    if [[ $? -eq 0 ]]; then 
32 |       echo "Test PASS on 1 socket system !!!"
33 |       exit 0
34 |    else 
35 |       echo "Test FAILED on 1 socket system !!!"
36 |       exit 1
37 |    fi
38 | fi
39 | 
40 | if [[ $NumSocket -eq 2 ]]; then
41 |    echo ./Signal_Tap --bus=$bus1
42 |    ./Signal_Tap --bus=$bus1 
43 | 
44 |    result1=$?
45 |    
46 |    echo ./Signal_Tap --bus=$bus2
47 |    ./Signal_Tap --bus=$bus2
48 |       
49 |    result2=$?  
50 |   
51 |    if [[ $result1 -eq 0 && $result2 -eq 0 ]] ; then 
52 |       echo "Test PASS on 2 sockets system !!!"
53 |       exit 0
54 |    else 
55 |       echo "Test FAILED on 2 sockets system !!!"
56 |       exit 1
57 |    fi
58 | fi
59 | 
60 | 
61 | 


--------------------------------------------------------------------------------
/valapps/vallib/Makefile:
--------------------------------------------------------------------------------
 1 | # INTEL CONFIDENTIAL - For Intel Internal Use Only
 2 | 
 3 | # valapps/vallib/Makefile
 4 | 
 5 | CPPFLAGS ?= -I../valapp
 6 | CXX      ?= g++ -std=c++11
 7 | LDFLAGS  ?= -L../valapp
 8 | 
 9 | ifneq (,$(ndebug))
10 | else
11 | CPPFLAGS += -DENABLE_DEBUG=1
12 | endif
13 | ifneq (,$(nassert))
14 | else
15 | CPPFLAGS += -DENABLE_ASSERT=1
16 | endif
17 | 
18 | ifeq (,$(DESTDIR))
19 | ifneq (,$(prefix))
20 | CPPFLAGS += -I$(prefix)/include
21 | LDFLAGS  += -L$(prefix)/lib -L$(prefix)/lib64
22 | endif
23 | else
24 | ifeq (,$(prefix))
25 | prefix = /usr/local
26 | endif
27 | CPPFLAGS += -I$(DESTDIR)$(prefix)/include
28 | LDFLAGS  += -L$(DESTDIR)$(prefix)/lib -L$(DESTDIR)$(prefix)/lib64
29 | endif
30 | 
31 | all: libvallib.so libvallib.so.0
32 | 
33 | libvallib.so: libvallib.so.0.0.0
34 | 	ln -sf libvallib.so.0.0.0 libvallib.so
35 | 
36 | libvallib.so.0: libvallib.so.0.0.0
37 | 	ln -sf libvallib.so.0.0.0 libvallib.so.0
38 | 
39 | libvallib.so.0.0.0: libvallib.o
40 | 	$(CXX) -fPIC -shared -Wl,-soname -Wl,libvallib.so.0 libvallib.o ../valapp/libvalutils.la $(LDFLAGS) -lOSAL -lAAS -laalrt -o libvallib.so.0.0.0
41 | 
42 | libvallib.o: vallib.cpp vallib.h Makefile
43 | 	$(CXX) $(CPPFLAGS) -D__AAL_USER__=1 -fPIC -DPIC -g -O2 -c -o libvallib.o vallib.cpp
44 | 
45 | clean:
46 | 	$(RM) libvallib.so libvallib.so.0 libvallib.so.0.0.0 libvallib.o
47 | 
48 | .PHONY: all clean
49 | 


--------------------------------------------------------------------------------
/swval/sdk/scripts/valgrind-everything:
--------------------------------------------------------------------------------
 1 | #!/bin/bash
 2 | # INTEL CONFIDENTIAL - For Intel Internal Use Only
 3 | 
 4 | shopt -o -s nounset
 5 | 
 6 | declare -r SCRIPT_NAME='valgrind-everything'
 7 | 
 8 | . ./valgrind-common
 9 | 
10 | declare ARGS=''
11 | declare WANTDISTCC=false
12 | 
13 | while [ $# -gt 0 ]; do
14 |    case $1 in
15 |       --clean)
16 |          clean_valgrind_all "tests/harnessed/gtest/swtest/.libs/swtest"
17 | #         clean_valgrind_all "tests/harnessed/gtest/.libs/nightly"
18 | #         clean_valgrind_all "tests/harnessed/gtest/.libs/weekly"
19 |          clean_valgrind_all "tests/standalone/OSAL_TestSem/.libs/OSAL_TestSem"
20 |          clean_valgrind_all "tests/standalone/OSAL_TestThreadGroup/.libs/OSAL_TestThreadGroup"
21 |          exit 0
22 |       ;;
23 |       --distcc)
24 |          WANTDISTCC=true
25 |       ;;
26 |       *)
27 |          ARGS="${ARGS} $1"
28 |       ;;
29 |    esac
30 |    shift
31 | done
32 | 
33 | run_valgrind_all ${WANTDISTCC} "tests/harnessed/gtest/swtest/.libs/swtest" ${ARGS}
34 | #run_valgrind_all ${WANTDISTCC} "tests/harnessed/gtest/.libs/nightly" ${ARGS}
35 | #run_valgrind_all ${WANTDISTCC} "tests/harnessed/gtest/.libs/weekly" ${ARGS}
36 | run_valgrind_all ${WANTDISTCC} "tests/standalone/OSAL_TestSem/.libs/OSAL_TestSem"
37 | run_valgrind_all ${WANTDISTCC} "tests/standalone/OSAL_TestThreadGroup/.libs/OSAL_TestThreadGroup"
38 | exit $?
39 | 


--------------------------------------------------------------------------------
/valapps/DMA_Buffer_5/Makefile:
--------------------------------------------------------------------------------
 1 | # INTEL CONFIDENTIAL - For Intel Internal Use Only
 2 | 
 3 | # valapps/DMA_Buffer_5/Makefile
 4 | 
 5 | CPPFLAGS ?=-I../appbase -I../valapp
 6 | CXX      ?= g++
 7 | LDFLAGS  ?=-L../appbase -L../valapp
 8 | 
 9 | ifneq (,$(ndebug))
10 | else
11 | CPPFLAGS += -DENABLE_DEBUG=1
12 | endif
13 | ifneq (,$(nassert))
14 | else
15 | CPPFLAGS += -DENABLE_ASSERT=1
16 | endif
17 | 
18 | ifeq (,$(DESTDIR))
19 | ifneq (,$(prefix))
20 | CPPFLAGS += -I$(prefix)/include
21 | LDFLAGS  += -L$(prefix)/lib -Wl,-rpath-link -Wl,$(prefix)/lib -Wl,-rpath -Wl,$(prefix)/lib \
22 |             -L$(prefix)/lib64 -Wl,-rpath-link -Wl,$(prefix)/lib64 -Wl,-rpath -Wl,$(prefix)/lib64
23 | endif
24 | else
25 | ifeq (,$(prefix))
26 | prefix = /usr/local
27 | endif
28 | CPPFLAGS += -I$(DESTDIR)$(prefix)/include
29 | LDFLAGS  += -L$(DESTDIR)$(prefix)/lib -Wl,-rpath-link -Wl,$(prefix)/lib -Wl,-rpath -Wl,$(DESTDIR)$(prefix)/lib \
30 |             -L$(DESTDIR)$(prefix)/lib64 -Wl,-rpath-link -Wl,$(prefix)/lib64 -Wl,-rpath -Wl,$(DESTDIR)$(prefix)/lib64
31 | endif
32 | 
33 | all: DMA_Buffer_5
34 | 
35 | DMA_Buffer_5: main.o
36 | 	$(CXX) -g -O2 -o DMA_Buffer_5 main.o ../valapp/libvalutils.la $(LDFLAGS) -lappbase -lOSAL -lAAS -laalrt
37 | 
38 | main.o: DMABuffer5.h main.cpp Makefile
39 | 	$(CXX) $(CPPFLAGS) -D__AAL_USER__=1 -g -O2 -c -o main.o main.cpp
40 | 
41 | clean:
42 | 	$(RM) DMA_Buffer_5 main.o
43 | 
44 | .PHONY:all clean
45 | 


--------------------------------------------------------------------------------
/valapps/DMA_Buffer_5/SW_BUF_05:
--------------------------------------------------------------------------------
 1 | #!/bin/bash +x
 2 | 
 3 | usage() {
 4 |    echo "./SW_BUF_05 "
 5 | }
 6 | 
 7 | NumSocket=$1
 8 | echo $SystemConfig $NumSocket
 9 | 
10 | GetDeviceInformation(){
11 |    CMDRST="$(/usr/sbin/lspci | grep bcc0)"
12 |    DEVINFO1="${CMDRST[0]}"
13 |    DEVINFO2="${CMDRST[1]}"
14 | 
15 |    echo  $DEVINFO1
16 |    Bus1="${DEVINFO1:0:2}" #5e
17 |    Dev1="${DEVINFO1:3:2}" #00
18 |    Func1="${DEVINFO1:6:1}" #0
19 |    Bus2="${DEVINFO1:67:2}"
20 |    Dev2="${DEVINFO1:3:2}"
21 |    Func2="${DEVINFO1:6:1}"
22 | }
23 | 
24 | GetDeviceInformation
25 | bus1="0x"$Bus1 # becomes 0x5e
26 | bus2="0x"$Bus2
27 | 
28 | if [[ $NumSocket -eq 1 ]]; then
29 |    ./DMA_Buffer_5 --bus=$bus1
30 | 
31 |    if [[ $? -eq 0 ]]; then
32 |       echo "Test PASS on 1 socket system !!!"
33 |       exit 0
34 |    else
35 |       echo "Test FAILED on 1 socket system !!!"
36 |       exit 1
37 |    fi
38 | fi
39 | 
40 | if [[ $NumSocket -eq 2 ]]; then
41 |    echo ./DMA_Buffer_5 --bus=$bus1
42 |    ./DMA_Buffer_5 --bus=$bus1
43 | 
44 |    result1=$?
45 | 
46 |    echo ./DMA_Buffer_5 --bus=$bus2
47 |    ./DMA_Buffer_5 --bus=$bus2
48 | 
49 |    result2=$?
50 | 
51 |    if [[ $result1 -eq 0 && $result2 -eq 0 ]] ; then
52 |       echo "Test PASS on 2 sockets system !!!"
53 |       exit 0
54 |    else
55 |       echo "Test FAILED on 2 sockets system !!!"
56 |       exit 1
57 |    fi
58 | fi
59 | 
60 | 
61 | 


--------------------------------------------------------------------------------
/valapps/valapp/test_context.cpp:
--------------------------------------------------------------------------------
 1 | #include "test_context.h"
 2 | #include "afu_test.h"
 3 | #include "arguments.h"
 4 | #include "test_manager.h"
 5 | 
 6 | test_context::test_context()
 7 | {
 8 | 
 9 | }
10 | 
11 | test_context::~test_context()
12 | {
13 | 
14 | }
15 | 
16 | arguments& test_context::args()
17 | {
18 |     return test_manager::instance()->args();
19 | }
20 | 
21 | service_client::ptr_t test_context::get_service(const std::string &service_name)
22 | {
23 |     auto it = service_map_.find(service_name);
24 |     if (it == service_map_.end() || it->second->status() == service_client::status_t::released)
25 |     {
26 |         auto manager = service_manager::instance();
27 |         auto client = manager->get_service(service_name, true);
28 |         TEST_ERROR(!client, "Could not get service: ", service_name);
29 |         client->status();
30 |         service_map_[service_name] = client;
31 |         return client;
32 |     }
33 |     return service_map_[service_name];
34 | }
35 | 
36 | service_client::ptr_t test_context::create_service(const std::string &service_name, const service_manager::pci_info_t & pci)
37 | {
38 |     auto manager = service_manager::instance();
39 |     auto client = manager->create_service(service_name, pci);
40 |     TEST_ERROR(!client, "Could not get service: ", service_name);
41 |     client->status();
42 |     service_map_[service_name] = client;
43 |     return client;
44 | }
45 | 


--------------------------------------------------------------------------------
/valapps/Read_Perf_Counters/Makefile:
--------------------------------------------------------------------------------
 1 | # INTEL CONFIDENTIAL - For Intel Internal Use Only
 2 | 
 3 | # valapps/Read_Perf_Counters/Makefile
 4 | 
 5 | CPPFLAGS ?= -I../valapp
 6 | CXX      ?= g++
 7 | LDFLAGS  ?= -L../vallib -L../valapp
 8 | 
 9 | ifneq (,$(ndebug))
10 | else
11 | CPPFLAGS += -DENABLE_DEBUG=1
12 | endif
13 | ifneq (,$(nassert))
14 | else
15 | CPPFLAGS += -DENABLE_ASSERT=1
16 | endif
17 | 
18 | ifeq (,$(DESTDIR))
19 | ifneq (,$(prefix))
20 | CPPFLAGS += -I$(prefix)/include
21 | LDFLAGS  += -L$(prefix)/lib -Wl,-rpath-link -Wl,$(prefix)/lib -Wl,-rpath -Wl,$(prefix)/lib \
22 |             -L$(prefix)/lib64 -Wl,-rpath-link -Wl,$(prefix)/lib64 -Wl,-rpath -Wl,$(prefix)/lib64
23 | endif
24 | else
25 | ifeq (,$(prefix))
26 | prefix = /usr/local
27 | endif
28 | CPPFLAGS += -I$(DESTDIR)$(prefix)/include
29 | LDFLAGS  += -L$(DESTDIR)$(prefix)/lib -Wl,-rpath-link -Wl,$(prefix)/lib -Wl,-rpath -Wl,$(DESTDIR)$(prefix)/lib \
30 |             -L$(DESTDIR)$(prefix)/lib64 -Wl,-rpath-link -Wl,$(prefix)/lib64 -Wl,-rpath -Wl,$(DESTDIR)$(prefix)/lib64
31 | endif
32 | 
33 | all: Read_Perf_Counters
34 | 
35 | Read_Perf_Counters: main.o
36 | 	$(CXX) -g -O2 -o Read_Perf_Counter main.o $(LDFLAGS) -lOSAL -lAAS -laalrt -lvallib
37 | 
38 | main.o: main.cpp ../vallib/vallib.h Makefile
39 | 	$(CXX) $(CPPFLAGS) -D__AAL_USER__=1 -I../vallib -g -O2 -c -o main.o main.cpp
40 | 
41 | clean:
42 | 	$(RM) Read_Perf_Counter main.o
43 | 
44 | .PHONY:all clean
45 | 


--------------------------------------------------------------------------------
/swval/sdk/tests/swvalmod/swvalmod.c:
--------------------------------------------------------------------------------
 1 | // INTEL CONFIDENTIAL - For Intel Internal Use Only
 2 | #ifdef HAVE_CONFIG_H
 3 | # include 
 4 | #endif // HAVE_CONFIG_H
 5 | #include "swvalmod.h"
 6 | 
 7 | static const char *Something_in_the_mod = "This variable is in the mod.";
 8 | 
 9 | AAL_BEGIN_MOD(libswvalmod,
10 |               SWVALMOD_API,
11 |               SWVALMOD_VERSION,
12 |               SWVALMOD_VERSION_CURRENT,
13 |               SWVALMOD_VERSION_REVISION,
14 |               SWVALMOD_VERSION_AGE)
15 | 
16 |    AAL_BEGIN_MOD_CMD(SWVALMOD_CMD_SAY_HELLO)
17 |       strncpy((char *)arg, "hello", 5);
18 |    AAL_END_MOD_CMD()
19 | 
20 |    AAL_BEGIN_MOD_CMD(SWVALMOD_CMD_MALLOC_OBJ)
21 |       swvalmod_obj *p = (swvalmod_obj *) malloc(sizeof(swvalmod_obj));
22 | 
23 |       p->intfield = 3;
24 |       strncpy(p->msg, "Message from libswvalmod.", sizeof(p->msg));
25 |       p->something_in_the_mod = Something_in_the_mod;
26 | 
27 |       *(swvalmod_obj **)arg = p;
28 |    AAL_END_MOD_CMD()
29 | 
30 |    AAL_BEGIN_MOD_CMD(SWVALMOD_CMD_FREE)
31 |       swvalmod_obj *p = (swvalmod_obj *)arg;
32 | 
33 |       if ( 4 != p->intfield ) {
34 |          res = 1;
35 |       }
36 |       if ( 0 != strncmp(p->msg, "goodbye", 7) ) {
37 |          res = 2;
38 |       }
39 |       if ( 0 != strncmp(p->something_in_the_mod, "In the app.", 11) ) {
40 |          res = 3;
41 |       }
42 | 
43 |       free(arg);
44 |    AAL_END_MOD_CMD()
45 | 
46 | AAL_END_MOD()
47 | 


--------------------------------------------------------------------------------
/valapps/valapp/mmio.py:
--------------------------------------------------------------------------------
 1 | from aal import service_manager
 2 | from ctypes import c_char, c_uint32, c_uint64
 3 | import time
 4 | kb = 1024
 5 | mb = 1024*kb
 6 | 
 7 | def test_mmio_01(self=None):
 8 |     sm = service_manager()
 9 |     sm.create_service('NLB0')
10 |     afu = sm.get_service('NLB0')
11 |     dsm = afu.buffer_allocate(mb*4, 0)
12 |     inp = afu.buffer_allocate(mb*2, 0xAF)
13 |     out = afu.buffer_allocate(mb*2, 0xBE)
14 |     print inp[15]
15 |     inp[15] = c_uint64(0xA)
16 |     print inp[15]
17 |     afu.reset()
18 |     afu.register_write("CSR_AFU_DSM_BASEL", dsm.physical())
19 |     afu.register_write("CSR_CTL", 0x0)
20 |     afu.register_write("CSR_CTL", 0x1)
21 |     afu.register_write("CSR_SRC_ADDR", inp.physical(cache_aligned=True))
22 |     afu.register_write("CSR_DST_ADDR", out.physical(cache_aligned=True))
23 |     afu.register_write("CSR_NUM_LINES", inp.size/64)
24 |     afu.register_write("CSR_CFG", 0x200)
25 | 
26 |     afu.register_write("CSR_CTL", 0x3)
27 |     while 0 == dsm.from_type(c_uint32, 0x40).value & 0x1:
28 |         time.sleep(0.00001)
29 |     afu.register_write("CSR_CTL", 0x7)
30 | 
31 |     afu.buffer_release(dsm)
32 |     afu.buffer_release(inp)
33 |     afu.buffer_release(out)
34 | 
35 | def test_mmio_03(self):
36 |     self.exe('./valapp libafu_tests.so mmio_mapping SW-MMIO-03 --service-name NLB0')
37 | 
38 | 
39 | 
40 | 
41 | 
42 | 
43 |     
44 | 
45 | if __name__ == '__main__':
46 |     test_mmio_01()
47 | 
48 | 
49 | 


--------------------------------------------------------------------------------
/aalutils/ReadMe:
--------------------------------------------------------------------------------
 1 | pciutils is the 3.4.0 stable version of pciutils, ~2015.10.30, available from
 2 |    git://git.kernel.org/pub/scm/utils/pciutils/pciutils.git
 3 | 
 4 | NOTE: I had to make the following modifications:
 5 | 1) Add an additional 'ln -s' in the install-lib case in the Makefile
 6 | 
 7 | It contains README with various configuration options, but basically, in order
 8 | to use it, you want to use the following combination:
 9 | 
10 |    $ cd pciutils
11 |    $ make SHARED=yes
12 |    $ make PREFIX= SHARED=yes install-lib
13 | 
14 | It is not standard autoconf, but has some relationship with it.
15 | 
16 | Linkage is naturally C, not C++, so using need to surround the include
17 |    of pci.h in C++ code using it with extern "C" linkage definitions.
18 | 
19 | ----------------------------------------------------------------
20 | 
21 | fdebug is a user-mode debugging library that provides access to mmio spaces
22 | and huge tbl pages.
23 | 
24 | hugetlbfs:
25 | 	https://www.kernel.org/doc/Documentation/vm/hugetlbpage.txt
26 | 
27 | Using /proc
28 | 	$ 'cat /proc/meminfo' to see HugePages information
29 | 	$ 'cat /proc/sys/vm/nr_hugepages' to the number of huge pages
30 | 	$ 'sudo echo 5 > /proc/sys/vm/nr_hugepages' to allocate 5 huge pages
31 | 	NOTE: on openSUSE 13.1 I had to actually 'sudo su -' to gain sufficient
32 | 		permissions to do the 'echo 5 > nr_hugepages'
33 | 
34 | Using /sys/kenel/mm/hugepages/hugepages-${size}kB
35 | 	$ 'cat nr_hugepages'
36 | 


--------------------------------------------------------------------------------
/swval/win/librrmbroker.vcxproj.filters:
--------------------------------------------------------------------------------
 1 | 
 2 | 
 3 |   
 4 |     
 5 |       {1f753930-d6c2-4ffd-bcc0-dd7e320aab8c}
 6 |     
 7 |     
 8 |       {26e3ebf7-d37e-4a7d-b52b-976cb533f2a8}
 9 |     
10 |   
11 |   
12 |     
13 |       Source FIles
14 |     
15 |     
16 |       Source FIles
17 |     
18 |     
19 |       Source FIles
20 |     
21 |   
22 |   
23 |     
24 |       Header Files
25 |     
26 |     
27 |       Header Files
28 |     
29 |     
30 |       Header Files
31 |     
32 |   
33 | 


--------------------------------------------------------------------------------
/aaluser/utils/internal/qpiregs/Makefile:
--------------------------------------------------------------------------------
 1 | # Makefile for qpiregs
 2 | 
 3 | ifndef enable_assert
 4 | enable_assert:=n
 5 | endif
 6 | 
 7 | ifndef enable_debug
 8 | enable_debug:=y
 9 | endif
10 | 
11 | ifndef enable_ult
12 | enable_ult:=n
13 | endif
14 | 
15 | ifeq ($(enable_assert),y)
16 | ifdef CPPFLAGS
17 | ifeq ($(subst -DENABLE_ASSERT=,,$(CPPFLAGS)),$(CPPFLAGS))
18 | override CPPFLAGS:=$(strip $(CPPFLAGS) -DENABLE_ASSERT=1)
19 | endif
20 | else
21 | CPPFLAGS:=-DENABLE_ASSERT=1
22 | endif
23 | endif
24 | 
25 | ifeq ($(enable_debug),y)
26 | ifdef CPPFLAGS
27 | ifeq ($(subst -DENABLE_DEBUG=,,$(CPPFLAGS)),$(CPPFLAGS))
28 | override CPPFLAGS:=$(strip $(CPPFLAGS) -DENABLE_DEBUG=1)
29 | endif
30 | else
31 | CPPFLAGS:=-DENABLE_DEBUG=1
32 | endif
33 | endif
34 | 
35 | ifeq ($(enable_ult),y)
36 | ifdef CPPFLAGS
37 | ifeq ($(subst -DENABLE_ULT=,,$(CPPFLAGS)),$(CPPFLAGS))
38 | override CPPFLAGS:=$(strip $(CPPFLAGS) -DENABLE_ULT=1)
39 | endif
40 | else
41 | CPPFLAGS:=-DENABLE_ULT=1
42 | endif
43 | endif
44 | 
45 | #CPP:=cpp
46 | #override CPPFLAGS:=$(strip $(CPPFLAGS) -Ixyz)
47 | #AS:=as
48 | #ASFLAGS:=
49 | CC:=gcc
50 | CXX:=g++
51 | ifeq ($(enable_debug),y)
52 | override CFLAGS:=$(strip $(CFLAGS) -g)
53 | override CXXFLAGS:=$(strip $(CXXFLAGS) -g)
54 | else
55 | override CFLAGS:=$(strip $(CFLAGS) -O2)
56 | override CXXFLAGS:=$(strip $(CXXFLAGS) -O2)
57 | endif
58 | LDFLAGS:=-lpci
59 | 
60 | 
61 | .PHONY: all clean
62 | 
63 | all: qpiregs
64 | 
65 | qpiregs: qpiregs.cpp
66 | 
67 | clean:
68 | 	$(RM) qpiregs
69 | 
70 | 


--------------------------------------------------------------------------------
/aalsamples/Scripts/get_temperature.sh:
--------------------------------------------------------------------------------
 1 | #!/bin/bash
 2 | VENDOR=0x8086
 3 | DEVICE=0xbcbc
 4 | function conv() {
 5 |  res=$(printf "%d" "0x$1")
 6 | (( res > 2147483647 )) && (( res -= 4294967295 ))
 7 | echo $res 
 8 | }
 9 | 
10 | hex_DEFAULT_TEMPERATURE=`echo  "  $(setpci -d $VENDOR:$DEVICE 454.L) "`      >> /dev/null
11 | hex_TEMPERATURE_STATUS=`echo  "  $(setpci -d $VENDOR:$DEVICE 458.L) "`    >> /dev/null
12 | DEFAULT_TEMPERATURE=" $(conv $hex_DEFAULT_TEMPERATURE)"
13 | TEMPERATURE_STATUS="$(conv $hex_TEMPERATURE_STATUS)"
14 | if [ "$DEFAULT_TEMPERATURE" -gt "256" ];then
15 |         DEFAULT_TEMPERATURE=$(expr $DEFAULT_TEMPERATURE - 256)
16 |         echo "Temperature sensing enabled"
17 |         echo "Default temperature threshold of the machine "$DEFAULT_TEMPERATURE $'\xc2\xb0'C
18 |         echo "Current temperature of the machine" $TEMPERATURE_STATUS $'\xc2\xb0'C
19 |         else
20 |         echo "Temperature sensing not enabled"
21 |         echo "Default temperature threshold of the machine "$DEFAULT_TEMPERATURE $'\xc2\xb0'C
22 |         echo -e "To enable temperature sensing press yes/no ? "
23 |         read word
24 |         if [ $word = yes ];then
25 |                 DEFAULT_TEMPERATURE=$(expr $DEFAULT_TEMPERATURE + 256)
26 |                 hex_DEFAULT_TEMPERATURE=`printf '%x\n' $DEFAULT_TEMPERATURE`
27 |                 setpci -d $VENDOR:$DEVICE 454.L=$hex_DEFAULT_TEMPERATURE
28 |                 ./get_temp.sh
29 |                 else
30 |                 exit
31 |         fi
32 | fi
33 | 
34 | 


--------------------------------------------------------------------------------
/valapps/tests.json:
--------------------------------------------------------------------------------
 1 | {
 2 |     "collateral" :
 3 |     [
 4 |         {
 5 |             "name": "nlb",
 6 |             "version": "622",
 7 |             "type": "binary",
 8 |             "url": "https://af01p-ir.devtools.intel.com/artifactory/fpga-solutions-local/intel/fpt/gbs/nlb/nlb-622",
 9 |             "fetcher":
10 |             {
11 |                 "name": "artifactory",
12 |                 "auth": ["sys_aalsdk", "AP96kSXktYLFnTfZyem1YZVaNUb"],
13 |                 "base": "https://af01p-ir.devtools.intel.com/artifactory",
14 |                 "repo": "fpga-solutions-local",
15 |                 "files": [["*", "rbf"]]
16 |             }
17 |         }
18 |     ],
19 |     "tests" : 
20 |     [
21 |         {
22 |             "name": "gtreconfigure",
23 |             "args": {
24 |                 "bitstream1": "rbf/101516_skxp_622_pr_2_b447_sd00_skxnlb400m0.rbf",
25 |                 "bitstream2": "rbf/101516_skxp_622_pr_2_b447_sd00_skxnlb400m3.rbf"
26 |             },
27 |             "filter_" : "*01a",
28 |             "disabled" : false
29 |         },
30 |         {
31 |             "name": "gtmmio",
32 |             "filter": "*01",
33 |             "disabled": false
34 |         },
35 |         {
36 |             "name": "gtreset",
37 |             "disabled": false
38 |         },
39 |         {
40 |             "name": "gtperfc",
41 |             "disabled": false
42 |         },
43 |         {
44 |             "name": "gtdma_buffer",
45 |             "disabled": false
46 |         }
47 |     ]
48 | }
49 | 


--------------------------------------------------------------------------------
/valapps/Read_Perf_Counters/SW_PERC_01:
--------------------------------------------------------------------------------
 1 | #!/bin/bash +x
 2 | 
 3 | usage() {
 4 |    echo "./SW_BUF_01_04  "
 5 | }
 6 | 
 7 | echo $SystemConfig
 8 | NumSocket=$1
 9 | TestNum=$2
10 | 
11 | GetDeviceInformation(){
12 |    CMDRST="$(/usr/sbin/lspci | grep bcc0)"
13 |    DEVINFO1="${CMDRST[0]}"
14 |    DEVINFO2="${CMDRST[1]}"
15 | 
16 |    echo  $DEVINFO1
17 |    Bus1="${DEVINFO1:0:2}"
18 |    Dev1="${DEVINFO1:3:2}"
19 |    Func1="${DEVINFO1:6:1}"
20 |    Bus2="${DEVINFO1:67:2}"
21 |    Dev2="${DEVINFO1:3:2}"
22 |    Func2="${DEVINFO1:6:1}"
23 | }
24 | 
25 | GetDeviceInformation
26 | bus1="0x"$Bus1
27 | bus2="0x"$Bus2
28 | testNum=$2
29 | 
30 | if [[ $NumSocket -eq 1 ]]; then
31 |    ./Read_Perf_Counter --testNum=$TestNum
32 | 
33 |    if [[ $? -eq 0 ]]; then 
34 |       echo "Test PASS on 1 socket system !!!"
35 |       exit 0
36 |    else 
37 |       echo "Test FAILED on 1 socket system !!!"
38 |       exit 1
39 |    fi
40 | fi
41 | 
42 | if [[ $NumSocket -eq 2 ]]; then
43 |    echo ./Read_Perf_Counter -t $testNum -b $bus1
44 |    ./Read_Perf_Counter --testNum=$testNum --bus=$bus1 
45 | 
46 |    result1=$?
47 |    
48 |    echo ./Read_Perf_Counter -t $testNum -b $bus2
49 |    ./Read_Perf_Counter --testNum=$testNum --bus=$bus2
50 |       
51 |    result2=$?  
52 |   
53 |    if [[ $result1 -eq 0 && $result2 -eq 0 ]] ; then 
54 |       echo "Test PASS on 2 sockets system !!!"
55 |       exit 0
56 |    else 
57 |       echo "Test FAILED on 2 sockets system !!!"
58 |       exit 1
59 |    fi
60 | fi
61 | 
62 | 
63 | 


--------------------------------------------------------------------------------
/valapps/MMIO_Mapping/SW_MMIO_MAPPING:
--------------------------------------------------------------------------------
 1 | #!/bin/bash +x
 2 | 
 3 | usage() {
 4 |    echo "./SW_MMIO_MAPPING  "
 5 | }
 6 | 
 7 | NumSocket=$1
 8 | testNum=$2
 9 | echo $SystemConfig $NumSocket
10 | 
11 | GetDeviceInformation(){
12 |    CMDRST="$(/usr/sbin/lspci | grep bcc0)"
13 |    DEVINFO1="${CMDRST[0]}"
14 |    DEVINFO2="${CMDRST[1]}"
15 | 
16 |    echo  $DEVINFO1
17 |    Bus1="${DEVINFO1:0:2}"
18 |    Dev1="${DEVINFO1:3:2}"
19 |    Func1="${DEVINFO1:6:1}"
20 |    Bus2="${DEVINFO1:67:2}"
21 |    Dev2="${DEVINFO1:3:2}"
22 |    Func2="${DEVINFO1:6:1}"
23 | }
24 | 
25 | GetDeviceInformation
26 | bus1="0x"$Bus1
27 | bus2="0x"$Bus2
28 | 
29 | if [[ $NumSocket -eq 1 ]]; then
30 |    ./MMIO_Mapping --test=$testNum --platform=HW
31 | 
32 |    if [[ $? -eq 0 ]]; then 
33 |       echo "Test PASS on 1 socket system !!!"
34 |       exit 0
35 |    else 
36 |       echo "Test FAILED on 1 socket system !!!"
37 |       exit 1
38 |    fi
39 | fi
40 | 
41 | if [[ $NumSocket -eq 2 ]]; then
42 |    echo ./MMIO_Mapping --test=$testNum --bus=$bus1 --platform=HW
43 |    ./MMIO_Mapping --test=$testNum --bus=$bus1 --platform=HW
44 | 
45 |    result1=$?
46 |    
47 |    echo ./MMIO_Mapping --test=$testNum --bus=$bus2 --platform=HW
48 |    ./MMIO_Mapping --test=$testNum --bus=$bus2 --platform=HW
49 |       
50 |    result2=$?  
51 |   
52 |    if [[ $result1 -eq 0 && $result2 -eq 0 ]] ; then 
53 |       echo "Test PASS on 2 sockets system !!!"
54 |       exit 0
55 |    else 
56 |       echo "Test FAILED on 2 sockets system !!!"
57 |       exit 1
58 |    fi
59 | fi
60 | 
61 | 
62 | 


--------------------------------------------------------------------------------
/valapps/gtest/gtReset.cpp:
--------------------------------------------------------------------------------
 1 | #include "afu_test.h"
 2 | #include 
 3 | #include "gtest/gtest.h"
 4 | #include "reconfigure_client.h"
 5 | #include "process.h"
 6 | #include "nlb_client.h"
 7 | 
 8 | using namespace std;
 9 | using action = reconfigure_client::action_t;
10 | 
11 | class reset_f : public test_context, public ::testing::Test
12 | {
13 |     protected:
14 |         reset_f()
15 |         {
16 |         }
17 | 
18 |         virtual ~reset_f()
19 |         {
20 |         }
21 | 
22 |         virtual void SetUp()
23 |         {
24 |         }
25 |         
26 |         virtual void TearDown()
27 |         {
28 |         }
29 | 
30 |     private:
31 |         reconfigure_client::ptr_t pr_;
32 | };
33 | 
34 | TEST_F(reset_f, sw_reset_01)
35 | {
36 |     using csr_t = nlb_client::csr;
37 | 
38 |     auto nlb0 = get_service("NLB0");
39 |     auto afu_status = nlb0->status();
40 |     ASSERT_EQ(afu_status, service_client::status_t::allocated) << "NLB0 not allocated" << endl;
41 | 
42 |     nlb0->mmio_write64(static_cast(csr_t::scratchpad0), 0x01);
43 |     auto value = nlb0->mmio_read64(static_cast(nlb_client::csr::scratchpad0));
44 |     EXPECT_EQ(value, 0x01) << "Did not write to scratchpad0" << std::endl;
45 | 
46 |     auto result = nlb0->reset();
47 |     EXPECT_EQ(0, result) << "Reset result is not zero" << std::endl;
48 |     
49 |     value = 1;
50 |     value = nlb0->mmio_read64(static_cast(nlb_client::csr::scratchpad0));
51 |     ASSERT_EQ(value, 0x0) << "Scratchpad0 not reset to 0" << std::endl;
52 | }
53 | 


--------------------------------------------------------------------------------
/swval/krnl/aalkte/Makefile.am:
--------------------------------------------------------------------------------
 1 | # INTEL CONFIDENTIAL - For Intel Internal Use Only
 2 | MY_KBUILD_VERBOSE    = $(my__kbuild_verbose_$(V))
 3 | my__kbuild_verbose_  = $(AM_DEFAULT_VERBOSITY)
 4 | my__kbuild_verbose_0 = 0
 5 | my__kbuild_verbose_1 = 1
 6 | 
 7 | moduledir=@AAL_OS_MODULE_INSTALL_PATH@
 8 | 
 9 | module_DATA=\
10 | kbuild/@AALKTE_DRV_NAME@.ko
11 | 
12 | EXTRA_DIST=Kbuild.in
13 | 
14 | EXTRA_PROGRAMS=driver
15 | 
16 | driver_SOURCES=\
17 | aalkte-main.c \
18 | aalkte.h \
19 | aalkte-control.c \
20 | aalkte-status.c \
21 | aalkte-thr.c
22 | 
23 | kbuild/@AALKTE_DRV_NAME@.ko: kbuild/Module.symvers
24 | 
25 | kbuild/Module.symvers: $(driver_SOURCES) $(abs_top_builddir)/aalkte/kbuild/Makefile
26 | 	@$(MAKE) -C "@AAL_OS_KERNEL_BUILD_PATH@" KBUILD_VERBOSE=$(MY_KBUILD_VERBOSE) M="$(abs_top_builddir)/aalkte/kbuild" aalkernelinc="$(abs_top_srcdir)/include" modules && \
27 | if [ -f "$(abs_top_builddir)/aalkte/kbuild/@AALKTE_DRV_NAME@.o" ]; then touch "$(abs_top_builddir)/aalkte/kbuild/@AALKTE_DRV_NAME@.o" ; fi && \
28 | if [ -f "$(abs_top_builddir)/aalkte/kbuild/@AALKTE_DRV_NAME@.mod.o" ]; then touch "$(abs_top_builddir)/aalkte/kbuild/@AALKTE_DRV_NAME@.mod.o" ; fi && \
29 | if [ -f "$(abs_top_builddir)/aalkte/kbuild/Module.symvers" ]; then touch "$(abs_top_builddir)/aalkte/kbuild/Module.symvers" ; fi && \
30 | if [ -f "$(abs_top_builddir)/aalkte/kbuild/@AALKTE_DRV_NAME@.ko" ]; then touch "$(abs_top_builddir)/aalkte/kbuild/@AALKTE_DRV_NAME@.ko" ; fi
31 | 
32 | clean-local:
33 | 	@$(MAKE) -C "@AAL_OS_KERNEL_BUILD_PATH@" KBUILD_VERBOSE=$(MY_KBUILD_VERBOSE) M="$(abs_top_builddir)/aalkte/kbuild" clean
34 | 


--------------------------------------------------------------------------------
/valapps/gtest/CMakeLists.txt:
--------------------------------------------------------------------------------
 1 | 
 2 | set(CMAKE_CXX_FLAGS --std=c++11)
 3 | #set(GTEST_ROOT /usr/src/gtest)
 4 | find_package(Threads)
 5 | find_package(GTest REQUIRED)
 6 | include_directories(${GTEST_INCLUDE_DIRS}
 7 |                     ${AALSDK}/include
 8 |                     ${CMAKE_SOURCE_DIR}/valapp
 9 |                     )
10 | 
11 | link_directories(${AALSDK}/lib)
12 | 
13 | add_library(gtreconfigure SHARED gtPartialReconfig.cpp)
14 | target_link_libraries(gtreconfigure ${GTEST_LIBRARIES} wafu)
15 | 
16 | add_library(gtreset SHARED gtReset.cpp)
17 | target_link_libraries(gtreset ${GTEST_LIBRARIES} wafu)
18 | 
19 | add_library(gtmmio SHARED gtMmioMapping.cpp)
20 | target_link_libraries(gtmmio ${GTEST_LIBRARIES} wafu)
21 | 
22 | add_library(gtdma_buffer SHARED gtDmaBuffer.cpp)
23 | target_link_libraries(gtdma_buffer ${GTEST_LIBRARIES} wafu)
24 | 
25 | 
26 | add_library(gtperfc SHARED gtPerfCounters.cpp)
27 | target_link_libraries(gtperfc ${GTEST_LIBRARIES} wafu)
28 | 
29 | add_library(gtRAS SHARED gtRAS.cpp)
30 | target_link_libraries(gtRAS ${GTEST_LIBRARIES} wafu)
31 | 
32 | add_library(gtsocketid SHARED gtResourcebySocketID.cpp)
33 | target_link_libraries(gtsocketid ${GTEST_LIBRARIES} wafu)
34 | 
35 | add_executable(gtapp main.cpp)
36 | target_link_libraries(gtapp 
37 |     ${GTEST_BOTH_LIBRARIES} 
38 |     wafu 
39 |     wutils 
40 |     ${CMAKE_THREAD_LIBS_INIT}
41 |     )
42 | 
43 | 
44 | install(TARGETS gtapp gtreconfigure gtreset gtdma_buffer gtperfc gtmmio gtsocketid gtRAS
45 |         RUNTIME DESTINATION bin
46 |         LIBRARY DESTINATION tests
47 |         ARCHIVE DESTINATION lib)
48 | 


--------------------------------------------------------------------------------
/valapps/valapp/ali_client.h:
--------------------------------------------------------------------------------
 1 | #pragma once
 2 | #include "service_manager.h"
 3 | #include 
 4 | 
 5 | class ali_client
 6 | {
 7 |     public:
 8 |         ali_client()
 9 |         {
10 |             auto client1 = service_manager::instance()->get("ALI");
11 |             auto client2 = service_manager::instance()->get("PR");
12 |             mmio_ = client1->get_interface();
13 |             umsg_ = client1->get_interface();
14 |             buffer_ = client1->get_interface();
15 |             perf_ = client1->get_interface();
16 |             reset_ = client1->get_interface();
17 |             reconfigure_ = client2->get_interface();
18 |             signaltap_ = client1->get_interface();
19 |         }
20 |         virtual ~ali_client(){}
21 | 
22 |         AAL::IALIMMIO* mmio_if() { return mmio_; }
23 |         AAL::IALIUMsg* umsg_if() { return umsg_; }
24 |         AAL::IALIBuffer* buffer_if() { return buffer_; }
25 |         AAL::IALIPerf* perf_if() { return perf_; }
26 |         AAL::IALIReset* reset_if() { return reset_; }
27 |         AAL::IALIReconfigure* reconfigure_if() { return reconfigure_; }
28 |         AAL::IALISignalTap* signaltap_if() { return signaltap_; }
29 |     private:
30 |         AAL::IALIMMIO* mmio_;
31 |         AAL::IALIUMsg* umsg_;
32 |         AAL::IALIBuffer* buffer_;
33 |         AAL::IALIPerf* perf_;
34 |         AAL::IALIReset* reset_;
35 |         AAL::IALIReconfigure* reconfigure_;
36 |         AAL::IALISignalTap* signaltap_;
37 | };
38 | 


--------------------------------------------------------------------------------
/swval/krnl/aalkte/aalkte-thr.c:
--------------------------------------------------------------------------------
 1 | // INTEL CONFIDENTIAL - For Intel Internal Use Only
 2 | 
 3 | // aalkte-thr.c
 4 | //
 5 | // AAL Kernel Test Executor driver - kernel thread
 6 | 
 7 | #include "aalkte.h"
 8 | 
 9 | static int aalkte_thread(void *p)
10 | {
11 |    struct aalkte_data *data = (struct aalkte_data *)p;
12 | 
13 |    while ( !kthread_should_stop() ) {
14 | 
15 | 
16 |    }
17 |   
18 |    down(&data->sem);
19 |    data->thr = NULL;  // thread is exiting.
20 |    up(&data->sem);
21 | 
22 |    up(&data->thrsem); // wake any waiters.
23 | 
24 |    do_exit(0);
25 |    return 0;
26 | }
27 | 
28 | bool aalkte_thr_start(void)
29 | {
30 |    struct aalkte_data *data = aalkte_get_data();
31 |    bool                res  = false;
32 | 
33 |    down(&data->sem);
34 | 
35 |    if ( NULL != data->thr ) {
36 |       // A thread is already running.
37 |       up(&data->sem);
38 |       return false;
39 |    }
40 | 
41 |    sema_init(&data->thrsem, 0);
42 | 
43 |    data->thr = kthread_run(aalkte_thread, data, "%s%lu", DRV_NAME, data->thrnum++);
44 | 
45 |    res = (NULL != data->thr);
46 | 
47 |    up(&data->sem);
48 | 
49 |    return res;
50 | }
51 | 
52 | void aalkte_thr_stop(bool bWait)
53 | {
54 |    struct aalkte_data *data = aalkte_get_data();
55 | 
56 |    down(&data->sem);
57 | 
58 |    if ( NULL == data->thr ) {
59 |       // no active thread.
60 |       up(&data->sem);
61 |       return;
62 |    }
63 | 
64 |    kthread_stop(data->thr);
65 | 
66 |    up(&data->sem);
67 | 
68 |    if ( bWait ) {
69 |       down(&data->thrsem);
70 |       up(&data->thrsem); // don't block other waiters.
71 |    }
72 | }
73 | 
74 | 


--------------------------------------------------------------------------------
/valapps/Partial_Reconfig/SW_PR_TWO_APP:
--------------------------------------------------------------------------------
 1 | #!/bin/bash +x
 2 | 
 3 | usage() {
 4 |    echo "./SW_PR_TWO_APP   "
 5 | }
 6 | 
 7 | NumSocket=$1
 8 | bs1=$2
 9 | 
10 | echo $SystemConfig $NumSocket
11 | echo $2
12 | echo $3
13 | 
14 | GetDeviceInformation(){
15 |    CMDRST="$(/usr/sbin/lspci | grep bcc0)"
16 |    DEVINFO1="${CMDRST[0]}"
17 |    DEVINFO2="${CMDRST[1]}"
18 | 
19 |    echo  $DEVINFO1
20 |    Bus1="${DEVINFO1:0:2}"
21 |    Dev1="${DEVINFO1:3:2}"
22 |    Func1="${DEVINFO1:6:1}"
23 |    Bus2="${DEVINFO1:67:2}"
24 |    Dev2="${DEVINFO1:3:2}"
25 |    Func2="${DEVINFO1:6:1}"
26 | }
27 | 
28 | GetDeviceInformation
29 | bus1="0x"$Bus1
30 | bus2="0x"$Bus2
31 | func1="0x"$Func1
32 | func2="0x"$Func2
33 | dev1="0x"$Dev1
34 | dev2="0x"$Dev2
35 | 
36 | cd PR_TwoApp
37 | 
38 | if [[ $NumSocket -eq 1 ]]; then
39 |    ./pr_script $bs1 $bus1 $dev1 $func1 
40 | 
41 |    if [[ $? -eq 0 ]]; then 
42 |       echo "Test PASS on 1 socket system !!!"
43 |       exit 0
44 |    else 
45 |       echo "Test FAILED on 1 socket system !!!"
46 |       exit 1
47 |    fi
48 | fi
49 | 
50 | if [[ $NumSocket -eq 2 ]]; then
51 |    echo ./pr_script $bs1 $bus1 $dev1 $func1 
52 |    ./pr_script $bs1 $bus1 $dev1 $func1 
53 | 
54 |    result1=$?
55 |    
56 |    echo ./pr_script $bs1 $bus2 $dev2 $func2 
57 |    ./pr_script $bs1 $bus2 $dev2 $func2 
58 |       
59 |    result2=$?  
60 | 
61 |    if [[ $result1 -eq 0 && $result2 -eq 0 ]] ; then 
62 |       echo "Test PASS on 2 sockets system !!!"
63 |       exit 0
64 |    else 
65 |       echo "Test FAILED on 2 sockets system !!!"
66 |       exit 1
67 |    fi
68 | fi
69 | 
70 | 
71 | 


--------------------------------------------------------------------------------
/valapps/valapp/mmio_buffer.h:
--------------------------------------------------------------------------------
 1 | #pragma once
 2 | #include 
 3 | #include 
 4 | 
 5 | class mmio_buffer
 6 | {
 7 |     public:
 8 |         typedef std::shared_ptr ptr_t;
 9 | 
10 |         mmio_buffer(AAL::btVirtAddr virt, AAL::btPhysAddr phys, std::size_t size, AAL::IALIBuffer *buffer_if):
11 |             virtual_address_(virt),
12 |             physical_address_(phys),
13 |             size_(size),
14 |             buffer_if_(buffer_if){}
15 | 
16 |         ~mmio_buffer()
17 |         {
18 |             release();
19 |         }
20 | 
21 |         void release()
22 |         {
23 |             if (virtual_address_)
24 |             {
25 |                 buffer_if_->bufferFree(virtual_address_);
26 |                 virtual_address_ = 0x0;
27 |                 physical_address_ = 0x0;
28 |                 size_ = 0x0;
29 |             }
30 |         }
31 | 
32 |         AAL::btVirtAddr address() { return virtual_address_; }
33 |         AAL::btPhysAddr physical() { return physical_address_; }
34 |         std::size_t size() { return size_; }
35 | 
36 |         template
37 |         void write(const T& value, std::size_t offset = 0)
38 |         {
39 |             ::memcpy(virtual_address_ + offset, &value, sizeof(T));
40 |         }
41 | 
42 |         template
43 |         void read(std::size_t offset = 0)
44 |         {
45 |             return static_cast(virtual_address_ + offset);
46 |         }
47 | 
48 |     private:
49 |         AAL::btVirtAddr virtual_address_;
50 |         AAL::btPhysAddr physical_address_;
51 |         std::size_t size_;
52 |         AAL::IALIBuffer *buffer_if_;
53 | };
54 | 


--------------------------------------------------------------------------------
/swval/win/aalsdk_build.bat:
--------------------------------------------------------------------------------
 1 | @echo off
 2 | 
 3 | set VCINSTALLDIR=%1
 4 | set VCINSTALLDIR=%VCINSTALLDIR:"=%
 5 | 
 6 | set TOOLBITS=%2
 7 | 
 8 | set BUILDCONFIG=%3
 9 | set BUILDCONFIG=%BUILDCONFIG:"=%
10 | set BUILDCONFIG=%BUILDCONFIG:'=%
11 | set BUILDCONFIG=%BUILDCONFIG:^ = %
12 | 
13 | set BUILDPLAT=%4
14 | 
15 | set BUILDTARGET=%5
16 | 
17 | if "%VCINSTALLDIR%" == "" goto missing_vcinstall
18 | if "%TOOLBITS%"     == "" goto missing_toolbits
19 | if "%BUILDCONFIG%"  == "" goto missing_configuration
20 | if "%BUILDPLAT%"    == "" goto missing_platform
21 | 
22 | if not exist "%VCINSTALLDIR%\vcvarsall.bat" goto no_vcvarsall
23 | 
24 | 
25 | call "%VCINSTALLDIR%\vcvarsall.bat" %TOOLBITS%
26 | set errorlevel=
27 | msbuild.exe .\swval.sln /p:Configuration="%BUILDCONFIG%" /p:Platform=%BUILDPLAT% %BUILDTARGET%
28 | exit /b %errorlevel%
29 | 
30 | 
31 | :missing_vcinstall
32 | set errorlevel=2
33 | echo Give the full path to the VC installation as the first parameter.
34 | echo eg C:\PROGRA~2\MICROS~2.0\VC
35 | goto :err
36 | 
37 | :missing_toolbits
38 | set errorlevel=3
39 | echo Give x86 or x64 as the second parameter. (32- or 64-bit version of tools)
40 | goto :err
41 | 
42 | :missing_configuration
43 | set errorlevel=4
44 | echo Give the build Configuration as the third parameter.
45 | echo eg "Win8.1 Debug"
46 | goto :err
47 | 
48 | :missing_platform
49 | set errorlevel=5
50 | echo Give x64 or Win32 as the fourth parameter. (code generation target)
51 | goto :err
52 | 
53 | :no_vcvarsall
54 | set errorlevel=6
55 | echo vcvarsall.bat not found at "%VCINSTALLDIR%"
56 | goto :err
57 | 
58 | 
59 | :err
60 | exit /b %errorlevel%
61 | 
62 | 


--------------------------------------------------------------------------------
/aaluser/win/aalsdk_build.bat:
--------------------------------------------------------------------------------
 1 | @echo off
 2 | 
 3 | set VCINSTALLDIR=%1
 4 | set VCINSTALLDIR=%VCINSTALLDIR:"=%
 5 | 
 6 | set TOOLBITS=%2
 7 | 
 8 | set BUILDCONFIG=%3
 9 | set BUILDCONFIG=%BUILDCONFIG:"=%
10 | set BUILDCONFIG=%BUILDCONFIG:'=%
11 | set BUILDCONFIG=%BUILDCONFIG:^ = %
12 | 
13 | set BUILDPLAT=%4
14 | 
15 | set BUILDTARGET=%5
16 | 
17 | if "%VCINSTALLDIR%" == "" goto missing_vcinstall
18 | if "%TOOLBITS%"     == "" goto missing_toolbits
19 | if "%BUILDCONFIG%"  == "" goto missing_configuration
20 | if "%BUILDPLAT%"    == "" goto missing_platform
21 | 
22 | if not exist "%VCINSTALLDIR%\vcvarsall.bat" goto no_vcvarsall
23 | 
24 | 
25 | call "%VCINSTALLDIR%\vcvarsall.bat" %TOOLBITS%
26 | set errorlevel=
27 | msbuild.exe .\WINAALSDK.sln /p:Configuration="%BUILDCONFIG%" /p:Platform=%BUILDPLAT% %BUILDTARGET%
28 | exit /b %errorlevel%
29 | 
30 | 
31 | :missing_vcinstall
32 | set errorlevel=2
33 | echo Give the full path to the VC installation as the first parameter.
34 | echo eg C:\PROGRA~2\MICROS~2.0\VC
35 | goto :err
36 | 
37 | :missing_toolbits
38 | set errorlevel=3
39 | echo Give x86 or x64 as the second parameter. (32- or 64-bit version of tools)
40 | goto :err
41 | 
42 | :missing_configuration
43 | set errorlevel=4
44 | echo Give the build Configuration as the third parameter.
45 | echo eg "Win8.1 Debug"
46 | goto :err
47 | 
48 | :missing_platform
49 | set errorlevel=5
50 | echo Give x64 or Win32 as the fourth parameter. (code generation target)
51 | goto :err
52 | 
53 | :no_vcvarsall
54 | set errorlevel=6
55 | echo vcvarsall.bat not found at "%VCINSTALLDIR%"
56 | goto :err
57 | 
58 | 
59 | :err
60 | exit /b %errorlevel%
61 | 
62 | 


--------------------------------------------------------------------------------
/valapps/valapp/CMakeLists.txt:
--------------------------------------------------------------------------------
 1 | project(wafu)
 2 | 
 3 | set(CMAKE_CXX_FLAGS --std=c++11)
 4 | message("${AALSDK}")
 5 | include_directories(${CMAKE_CURRENT_SRC_DIR}
 6 |                     ${CMAKE_CURRENT_SRC_DIR}/json
 7 |                     ${AALSDK}/include
 8 |                     )
 9 | link_directories(${AALSDK}/lib)
10 | 
11 | add_library(jsoncpp SHARED jsoncpp.cpp)
12 | 
13 | set(utils_cpp arguments.cpp
14 |               utils.cpp
15 |               process.cpp
16 |               )
17 | 
18 | set(utils_h arguments.h
19 |             utils.h
20 |             process.h
21 |             )
22 | 
23 | add_library(wutils SHARED ${utils_cpp})
24 | 
25 | set(wafu_cpp afu_client.cpp
26 |              afu_test.cpp
27 |              client_factory.cpp
28 |              nlb_client.cpp
29 |              reconfigure_client.cpp
30 |              service_client.cpp
31 |              service_manager.cpp
32 |              test_context.cpp
33 |              test_manager.cpp
34 |              )
35 | 
36 | set(wafu_h afu_client.h
37 |            afu_test.h
38 |            nlb_client.h
39 |            reconfigure_client.h
40 |            service_client.h
41 |            service_manager.h
42 |            test_context.h
43 |            test_manager.h
44 |            )
45 | 
46 | add_library(wafu SHARED ${wafu_cpp})
47 | target_link_libraries(wafu jsoncpp wutils OSAL AAS aalrt dl)
48 | 
49 | add_library(aalcif SHARED c_service_manager.cpp)
50 | target_link_libraries(aalcif wafu wutils)
51 | 
52 | install(TARGETS wafu wutils jsoncpp aalcif
53 |         RUNTIME DESTINATION bin
54 |         LIBRARY DESTINATION lib
55 |         ARCHIVE DESTINATION lib)
56 | install(FILES aal.py 
57 |         DESTINATION lib
58 | )
59 | 
60 | 


--------------------------------------------------------------------------------
/aaluser/COPYING:
--------------------------------------------------------------------------------
 1 | // Copyright(c) 2003-2016, Intel Corporation
 2 | // 
 3 | // Redistribution  and  use  in source  and  binary  forms,  with  or  without
 4 | // modification, are permitted provided that the following conditions are met:
 5 | // 
 6 | // * Redistributions of  source code  must retain the  above copyright notice,
 7 | //   this list of conditions and the following disclaimer.
 8 | // * Redistributions in binary form must reproduce the above copyright notice,
 9 | //   this list of conditions and the following disclaimer in the documentation
10 | //   and/or other materials provided with the distribution.
11 | // * Neither the name  of Intel Corporation  nor the names of its contributors
12 | //   may be used to  endorse or promote  products derived  from this  software
13 | //   without specific prior written permission.
14 | // 
15 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
16 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,  BUT NOT LIMITED TO,  THE
17 | // IMPLIED WARRANTIES OF  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18 | // ARE DISCLAIMED.  IN NO EVENT  SHALL THE COPYRIGHT OWNER  OR CONTRIBUTORS BE
19 | // LIABLE  FOR  ANY  DIRECT,  INDIRECT,  INCIDENTAL,  SPECIAL,  EXEMPLARY,  OR
20 | // CONSEQUENTIAL  DAMAGES  (INCLUDING,  BUT  NOT LIMITED  TO,  PROCUREMENT  OF
21 | // SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE,  DATA, OR PROFITS;  OR BUSINESS
22 | // INTERRUPTION)  HOWEVER CAUSED  AND ON ANY THEORY  OF LIABILITY,  WHETHER IN
23 | // CONTRACT,  STRICT LIABILITY,  OR TORT  (INCLUDING NEGLIGENCE  OR OTHERWISE)
24 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,  EVEN IF ADVISED OF THE
25 | // POSSIBILITY OF SUCH DAMAGE.
26 |  
27 | 


--------------------------------------------------------------------------------
/valapps/valapp/main.cpp:
--------------------------------------------------------------------------------
 1 | #include "service_manager.h"
 2 | #include "test_manager.h"
 3 | #include "test_args.h"
 4 | //#include  
 5 | #include 
 6 | #include 
 7 | #include "afu_test.h"
 8 | #include "arguments.h"
 9 | 
10 | int main(int argc, char* argv[])
11 | {
12 |     int exit_code = 0;
13 |     arguments argparse;
14 |     argparse("services", 's', optional_argument, "service spec file")
15 |             ("testspec", 'x', optional_argument, "test spec file");
16 | 
17 |     argparse.parse(argc, argv);
18 | 
19 |     std::string services_file = argparse.get_string("services", "services.json");
20 | 
21 |     
22 |     service_manager::ptr_t manager = service_manager::instance();
23 |     manager->define_services(services_file);
24 |     
25 |     auto tm = test_manager::instance();
26 |     if (argparse.have("testspec"))
27 |     {
28 |         tm->run_tests(argparse.get_string("testspec"));
29 |     }
30 |     else
31 |     {
32 |         auto leftover = argparse.leftover();
33 |         if (leftover.size() >= 3)
34 |         {
35 |             tm->load_testlib(leftover[0]);
36 |             auto results = tm->run_test(leftover[1], leftover[2], leftover.size()-2, &leftover[2]); 
37 |             for (auto result : results)
38 |             {
39 |                 if (std::get<1>(result) != afu_test::status_pass)
40 |                 {
41 |                     exit_code = -1;
42 |                 }
43 |                 std::cerr << "Test: " << std::get<0>(result) << " " << std::get<1>(result) << " " << std::get<2>(result) << std::endl;
44 |             }
45 |         }
46 |     }
47 |     tm->shutdown();
48 |     manager->shutdown();
49 |     return exit_code;
50 | }
51 | 


--------------------------------------------------------------------------------
/swval/sdk/tests/harnessed/gtest/gtcommon/gtCommon_ModuleStub.h:
--------------------------------------------------------------------------------
 1 | // INTEL CONFIDENTIAL - For Intel Internal Use Only
 2 | #ifndef __GTCOMMON_MODULESTUB_H__
 3 | #define __GTCOMMON_MODULESTUB_H__
 4 | 
 5 | /// ===================================================================
 6 | /// @brief        The custom service factory template.
 7 | ///
 8 | /// @tparam       I     The service class / object type.
 9 | ///
10 | 
11 | template 
12 | class InModuleSvcsFact : public EmptyISvcsFact,
13 |                                       public IAcceptsBuilders
14 | {
15 | public:
16 |    IBase* CreateServiceObject( AALServiceModule* container,
17 |                                IRuntime* pRuntime );
18 | 
19 |    btBool InitializeService( IBase* newService,
20 |                              IBase* Client,
21 |                              TransactionID const& rtid,
22 |                              NamedValueSet const& optArgs );
23 | 
24 |    void DestroyServiceObject( IBase* pServiceBase );
25 |    virtual void acceptBuilder( CAASBuilder const* pSB );
26 | 
27 |    // static functions had previously been in an anonymous namespace
28 |    static AALServiceModule* GetServiceModule();
29 |    static InModuleSvcsFact* GetServiceFactory();
30 | 
31 |    InModuleSvcsFact() : m_pBuilder( NULL )
32 |    {
33 |    }
34 | 
35 |    virtual ~InModuleSvcsFact()
36 |    {
37 |    }
38 | 
39 | private:
40 |    CAASBuilder const* m_pBuilder;
41 |    // static objects for use in static class functions
42 |    static AALServiceModule* pModule;
43 |    static InModuleSvcsFact* pFactory;
44 | };
45 | 
46 | // include the template implementation code
47 | #include "gtCommon_ModuleStub.tpp"
48 | #endif   // __GTCOMMON_MODULESTUB_H__
49 | 


--------------------------------------------------------------------------------
/valapps/valapp/afu_reset.cpp:
--------------------------------------------------------------------------------
 1 | #include "afu_reset.h"
 2 | #include "test_manager.h"
 3 | #include "afu_client.h"
 4 | #include 
 5 | #include 
 6 | 
 7 | namespace
 8 | {
 9 |     bool r = test_manager::register_test();
10 | }
11 | 
12 | using namespace std;
13 | const unsigned int csr_scratchpad0 = 0x0100;
14 | const unsigned int csr_ctl = 0x0137;
15 | const unsigned int ctl_stop = 0x07;
16 | 
17 | void afu_reset::register_tests()
18 | {
19 |     register_test("SW-RESET-01", &afu_reset::reset);
20 | }
21 | 
22 | void afu_reset::setup()
23 | {
24 |     auto nlb0 = context()->get_service("NLB0");
25 |     TEST_ERROR(nlb0->status() != service_client::allocated, "Service not allocated");
26 | 
27 |     afu_ = dynamic_pointer_cast(nlb0);
28 |     TEST_ERROR(!afu_, "Could not cast service_client to afu_client");
29 |     afu_->reset();
30 |     auto value = afu_->mmio_read64(csr_scratchpad0);
31 |     TEST_ERROR(0x0 != value, "Initial reset of AFU did not clear out scratchpad register: ", value);
32 | }
33 | 
34 | void afu_reset::teardown()
35 | {
36 |     if (afu_)
37 |     {
38 |         afu_->mmio_write32(csr_ctl, ctl_stop);
39 |     }
40 | }
41 | 
42 | void afu_reset::reset(const arguments &args)
43 | {
44 |     Log() << "SW-RESET-01 test" << std::endl;
45 | 
46 |     afu_->mmio_write64(csr_scratchpad0, 0x01);
47 |     TEST_FAIL(0x01 != afu_->mmio_read64(csr_scratchpad0), "Did not write to scratchpad 0");
48 | 
49 |     auto result = afu_->reset();
50 |     TEST_FAIL(result != 0, "reset result is not zero 0: ", result);
51 |     auto value = afu_->mmio_read64(csr_scratchpad0);
52 |     TEST_FAIL(0x0 != value, "Scratchpad0 did not reset to 0. Value is: ", value);
53 | }
54 | 


--------------------------------------------------------------------------------
/swval/sdk/tests/standalone/isolated/aal0017.cpp:
--------------------------------------------------------------------------------
 1 | // INTEL CONFIDENTIAL - For Intel Internal Use Only
 2 | #ifdef HAVE_CONFIG_H
 3 | # include 
 4 | #endif // HAVE_CONFIG_H
 5 | #include "aal0017.h"
 6 | 
 7 | static void aal0017_testcase()
 8 | {
 9 |    aal0017Fixture f;
10 |    Execute(&f);
11 | }
12 | 
13 | void aal0017()
14 | {
15 |    int       i = 0;
16 |    const int N = 1000;
17 | 
18 |    while ( 1 ) {
19 |       aal0017_testcase();
20 | 
21 |       ++i;
22 |       if ( i == N ) {
23 |          std::cerr << "17 ";
24 |          i = 0;
25 |       }
26 |    }
27 | }
28 | 
29 | void aal0017Fixture::Thr0(OSLThread *pThread, void *pContext)
30 | {
31 |    aal0017Fixture *pTC = static_cast(pContext);
32 |    ASSERT_NONNULL(pTC);
33 | 
34 |    pTC->m_Scratch[0] = 1; // set the first scratch space to 1 to signify that we're running.
35 |    pTC->m_Semaphore.Wait();
36 | }
37 | 
38 | void aal0017Fixture::Run()
39 | {
40 |    // After calling OSLThread::Cancel() for a thread other than the current thread, the current
41 |    // thread should be able to immediately OSLThread::Join() the canceled thread.
42 | 
43 |    ASSERT_TRUE(m_Semaphore.Create(0, 1));
44 | 
45 |    m_pThrs[0] = new OSLThread(aal0017Fixture::Thr0,
46 |                               OSLThread::THREADPRIORITY_NORMAL,
47 |                               this,
48 |                               false);
49 | 
50 |    EXPECT_TRUE(m_pThrs[0]->IsOK());
51 | 
52 |    // wait for Thr0 to begin.
53 |    YIELD_WHILE(0 == m_Scratch[0]);
54 |    YIELD_X(5);
55 | 
56 |    // cancel the child thread.
57 |    m_pThrs[0]->Cancel();
58 | 
59 |    EXPECT_TRUE(m_Semaphore.Post(1));
60 | 
61 |    m_pThrs[0]->Join();
62 |    delete m_pThrs[0];
63 | }
64 | 
65 | 


--------------------------------------------------------------------------------
/swval/sdk/tests/harnessed/gtest/gtcommon/gtCommon_Status.h:
--------------------------------------------------------------------------------
 1 | // INTEL CONFIDENTIAL - For Intel Internal Use Only
 2 | #ifndef __GTCOMMON_STATUS_H__
 3 | #define __GTCOMMON_STATUS_H__
 4 | 
 5 | // Uses the ConsoleColorizer to report the end status of the entire Google Test application.
 6 | // Supported end states for the application process are:
 7 | //   * Pass - all Google Test cases reported a passing result.
 8 | //   * Fail - some Google Test assertion reported a failing result.
 9 | //   * SegFault - a segmentation fault signal was received, forcing a test result of Fail.
10 | //                The process exit status will be 97.
11 | //   * Terminated - the user forcibly terminated (Ctrl-C) the test process, forcing a test
12 | //                  result of Fail. The process exit status will be 98.
13 | //   * KeepaliveTimeout - the keep-alive timer expired. The process is assumed to be stuck in
14 | //                        infinite processing, so the test result is Fail. The process exit
15 | //                        status will be 99.
16 | class GTCOMMON_API TestStatus
17 | {
18 | public:
19 |    enum Status
20 |    {
21 |       STATUS_PASS,
22 |       STATUS_FAIL,
23 |       STATUS_SEGFAULT,
24 |       STATUS_TERMINATED,
25 |       STATUS_KEEPALIVE_TIMEOUT
26 |    };
27 | 
28 |    static void Report(Status st);
29 | 
30 |    static void HaltOnSegFault(bool );
31 |    static void HaltOnKeepaliveTimeout(bool );
32 | 
33 | protected:
34 |    static void OnPass();
35 |    static void OnFail();
36 |    static void OnSegFault();
37 |    static void OnTerminated();
38 |    static void OnKeepaliveTimeout();
39 | 
40 |    static bool sm_HaltOnSegFault;
41 |    static bool sm_HaltOnKeepaliveTimeout;
42 | };
43 | 
44 | #endif // __GTCOMMON_STATUS_H__
45 | 
46 | 


--------------------------------------------------------------------------------
/valapps/DMA_Buffer/__init__.py:
--------------------------------------------------------------------------------
 1 | from valapps import params
 2 | import itertools
 3 | import os
 4 | 
 5 | NumSocket = os.getenv('NumSocket')
 6 | 
 7 | def test_SW_BUF_01(self):
 8 |     '''
 9 |     SW-BUF-01-04
10 |     This test perform the functions of fpgdiag/NLB0 is running and passes, it demonstrates
11 |     that DMA buffer allocation and mapping is working correcly. It also test bufferGetIOVA 
12 |     basic operation by running any test that performs the functions of fpgadiag/NLB0 program,
13 |     as they all allocate buffers and pass the IOVA to the hardware, which uses the IOVA to 
14 |     access the buffer    
15 |     '''
16 |     #NumSocket = os.getenv('NumSocket')
17 |     command = "./SW_BUF_01_04 " + NumSocket    
18 |     print command
19 |     self.exe(command)
20 | 
21 | @params(range(1,6), 2) 
22 | def test_SW_BUF_02(self, size, duration):
23 |     '''
24 |     SW-BUF-02
25 |     This test allocates a given size (in MB) and holds it for a given duration (in seconds).
26 |     '''
27 |     #NumSocket = os.getenv('NumSocket')
28 | 
29 |     print("SW_BUF_02 socket:{} size:{}, duration: {}".format(NumSocket, size, duration))
30 |     command = "./SW_BUF_02 {} {} {}".format(NumSocket, size, duration)
31 | 
32 |     self.assertEqual(0, self.exit_code(command))
33 |     
34 | def test_SW_BUF_04(self):
35 |     '''
36 |     SW-BUF-01-04
37 |     This test bufferGetIOVA basic operation by running any test that performs the functions
38 |     of NLB0 programs, as they all allocated buffers and pass the IOVA to the hardware,
39 |     which uses the IOVA to access the buffer    
40 |     '''
41 |     NumSocket = os.getenv('NumSocket')
42 | 
43 |     command = "./SW_BUF_01_04 " + NumSocket    
44 |     print command
45 |     self.exe(command)
46 | 


--------------------------------------------------------------------------------
/aaluser/aas/OSAL/dbg_threadgroup.h:
--------------------------------------------------------------------------------
 1 | // INTEL CONFIDENTIAL - For Intel Internal Use Only
 2 | 
 3 | #ifdef DBG_THREADGROUP
 4 | 
 5 | BEGIN_NAMESPACE(AAL)
 6 |    BEGIN_NAMESPACE(Testing)
 7 | 
 8 | class OSAL_API IAfterThreadGroupAutoLock
 9 | {
10 | public:
11 |    virtual ~IAfterThreadGroupAutoLock() {}
12 | 
13 |    virtual void     OnAdd(AAL::IDispatchable * ) = 0; // [0] called when OSLThreadGroup::ThrGrpState::Add(IDispatchable * ) acquires AutoLock()
14 |    virtual void   OnStart()                      = 0; // [1] called when OSLThreadGroup::ThrGrpState::Start() acquires AutoLock()
15 |    virtual void    OnStop()                      = 0; // [2] called when OSLThreadGroup::ThrGrpState::Stop() acquires AutoLock()
16 |    virtual void   OnDrain()                      = 0; // [3] called when OSLThreadGroup::ThrGrpState::Drain() acquires AutoLock()
17 |    virtual void    OnJoin(AAL::btTime )          = 0; // [4] called when OSLThreadGroup::ThrGrpState::Join(btTime ) acquires AutoLock()
18 |    virtual void OnDestroy(AAL::btTime )          = 0; // [5] called when OSLThreadGroup::ThrGrpState::Destroy(btTime ) acquires AutoLock()
19 | };
20 | 
21 | class OSAL_API EmptyAfterThreadGroupAutoLock : public AAL::Testing::IAfterThreadGroupAutoLock
22 | {
23 | public:
24 |    EmptyAfterThreadGroupAutoLock()               {}
25 |    virtual void     OnAdd(AAL::IDispatchable * ) {}
26 |    virtual void   OnStart()                      {}
27 |    virtual void    OnStop()                      {}
28 |    virtual void   OnDrain()                      {}
29 |    virtual void    OnJoin(AAL::btTime )          {}
30 |    virtual void OnDestroy(AAL::btTime )          {}
31 | };
32 | 
33 |    END_NAMESPACE(Testing)
34 | END_NAMESPACE(AAL)
35 | 
36 | #endif // DBG_THREADGROUP
37 | 
38 | 


--------------------------------------------------------------------------------
/valapps/Partial_Reconfig/PR_SingleApp/Makefile:
--------------------------------------------------------------------------------
 1 | # INTEL CONFIDENTIAL - For Intel Internal Use Only
 2 | 
 3 | # valapps/Partial_Reconfig/Makefile
 4 | VALAPP   = ../../valapp
 5 | CPPFLAGS ?= --std=c++11 -I$(VALAPP)
 6 | CXX      ?= g++
 7 | LDFLAGS  ?= 
 8 | 
 9 | ifneq (,$(ndebug))
10 | else
11 | CPPFLAGS += -DENABLE_DEBUG=1
12 | endif
13 | ifneq (,$(nassert))
14 | else
15 | CPPFLAGS += -DENABLE_ASSERT=1
16 | endif
17 | 
18 | ifeq (,$(DESTDIR))
19 | ifneq (,$(prefix))
20 | CPPFLAGS += -I$(prefix)/include
21 | LDFLAGS  += -L$(prefix)/lib -Wl,-rpath-link -Wl,$(prefix)/lib -Wl,-rpath -Wl,$(prefix)/lib \
22 |             -L$(prefix)/lib64 -Wl,-rpath-link -Wl,$(prefix)/lib64 -Wl,-rpath -Wl,$(prefix)/lib64
23 | endif
24 | else
25 | ifeq (,$(prefix))
26 | prefix = /usr/local
27 | endif
28 | CPPFLAGS += -I$(DESTDIR)$(prefix)/include
29 | LDFLAGS  += -L$(DESTDIR)$(prefix)/lib -Wl,-rpath-link -Wl,$(prefix)/lib -Wl,-rpath -Wl,$(DESTDIR)$(prefix)/lib \
30 |             -L$(DESTDIR)$(prefix)/lib64 -Wl,-rpath-link -Wl,$(prefix)/lib64 -Wl,-rpath -Wl,$(DESTDIR)$(prefix)/lib64
31 | endif
32 | 
33 | 	
34 | all: Partial_Reconfig
35 | 
36 | Partial_Reconfig: main.o ALINLB.o ALIReconf.o
37 | 	$(CXX) -g -O2 -o Partial_Reconfig main.o ALINLB.o ALIReconf.o $(VALAPP)/libvalutils.la $(LDFLAGS) -lOSAL -lAAS -laalrt -laalclp
38 | 
39 | main.o: main.cpp Makefile
40 | 	$(CXX) $(CPPFLAGS) -D__AAL_USER__=1 -g -O2 -c -o main.o main.cpp
41 | 
42 | ALINLB.o: ALINLB.cpp ALINLB.h Makefile
43 | 	$(CXX) $(CPPFLAGS) -D__AAL_USER__=1 -g -O2 -c -o ALINLB.o ALINLB.cpp
44 | 	
45 | ALIReconf.o: ALIReconf.cpp ALIReconf.h Makefile
46 | 	$(CXX) $(CPPFLAGS) -D__AAL_USER__=1 -g -O2 -c -o ALIReconf.o ALIReconf.cpp
47 | 	
48 | clean:
49 | 	$(RM) Partial_Reconfig main.o ALINLB.o ALIReconf.o
50 | 
51 | .PHONY:all clean
52 | 


--------------------------------------------------------------------------------
/aaluser/ase/LICENSE.txt:
--------------------------------------------------------------------------------
 1 | // Copyright(c) 2015-2016, Intel Corporation
 2 | //
 3 | // Redistribution  and  use  in source  and  binary  forms,  with  or  without
 4 | // modification, are permitted provided that the following conditions are met:
 5 | //
 6 | // * Redistributions of  source code  must retain the  above copyright notice,
 7 | //   this list of conditions and the following disclaimer.
 8 | // * Redistributions in binary form must reproduce the above copyright notice,
 9 | //   this list of conditions and the following disclaimer in the documentation
10 | //   and/or other materials provided with the distribution.
11 | // * Neither the name  of Intel Corporation  nor the names of its contributors
12 | //   may be used to  endorse or promote  products derived  from this  software
13 | //   without specific prior written permission.
14 | //
15 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
16 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,  BUT NOT LIMITED TO,  THE
17 | // IMPLIED WARRANTIES OF  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18 | // ARE DISCLAIMED.  IN NO EVENT  SHALL THE COPYRIGHT OWNER  OR CONTRIBUTORS BE
19 | // LIABLE  FOR  ANY  DIRECT,  INDIRECT,  INCIDENTAL,  SPECIAL,  EXEMPLARY,  OR
20 | // CONSEQUENTIAL  DAMAGES  (INCLUDING,  BUT  NOT LIMITED  TO,  PROCUREMENT  OF
21 | // SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE,  DATA, OR PROFITS;  OR BUSINESS
22 | // INTERRUPTION)  HOWEVER CAUSED  AND ON ANY THEORY  OF LIABILITY,  WHETHER IN
23 | // CONTRACT,  STRICT LIABILITY,  OR TORT  (INCLUDING NEGLIGENCE  OR OTHERWISE)
24 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,  EVEN IF ADVISED OF THE
25 | // POSSIBILITY OF SUCH DAMAGE.
26 | // **************************************************************************
27 | 
28 | 


--------------------------------------------------------------------------------
/valapps/AFU_Reset/runtest.cmake:
--------------------------------------------------------------------------------
 1 | execute_process(COMMAND lsmod
 2 |   COMMAND grep cci
 3 |   RESULT_VARIABLE HAD_ERROR
 4 |   OUTPUT_VARIABLE OUT)
 5 | 
 6 | if(${OUT} STREQUAL "")
 7 |   message(FATAL_ERROR "CCI driver is not loaded")
 8 | endif()
 9 | 
10 | execute_process(COMMAND dmesg
11 |   COMMAND tail -n 1000
12 |   COMMAND dd of=initial.txt
13 |   RESULT_VARIABLE HAD_ERROR)
14 | 
15 | if(HAD_ERROR)
16 |   message(FATAL_ERROR "Unable to query dmesg")
17 | endif()
18 | 
19 | execute_process(COMMAND ${CMAKE_BINARY_DIR}/../bin/AFU_Reset
20 |   OUTPUT_FILE AFU_Reset.log
21 |   ERROR_VARIABLE OUTERROR)
22 | 
23 | if(${OUTERROR} MATCHES ".*Error.*")
24 |   message(FATAL_ERROR "Error raised during execution")
25 | endif()
26 | 
27 | execute_process(COMMAND dmesg
28 |   COMMAND tail -n 1000
29 |   COMMAND dd of=final.txt
30 |   RESULT_VARIABLE HAD_ERROR)
31 | 
32 | if(HAD_ERROR)
33 |   message(FATAL_ERROR "Unable to query dmesg")
34 | endif()
35 | 
36 | execute_process(COMMAND diff -a --suppress-common-lines final.txt initial.txt
37 |   COMMAND grep "<"
38 | #  COMMAND awk '{for (i=2; i
 6 | #include 
 7 | #include 
 8 | #include 
 9 | 
10 | 
11 | bool r = test_manager::register_test();
12 | 
13 | using namespace AAL;
14 | using namespace std;
15 | 
16 | void dma_buffer::register_tests()
17 | {
18 |     register_test("SW-BUF-01", &dma_buffer::allocate_hold)
19 |                  ("size", 's')
20 |                  ("duration", 'd');
21 | }
22 | 
23 | void dma_buffer::setup()
24 | {
25 |     afu_ = get_afu_client("NLB0");
26 | }
27 | 
28 | void dma_buffer::teardown()
29 | {
30 | }
31 | 
32 | void dma_buffer::allocate_hold(const arguments &args)
33 | {
34 |     Log() << "allocate and hold test" << std::endl;
35 |     auto result = afu_->reset();
36 |     
37 |     TEST_FAIL(result != IALIReset::e_OK, "Could not reset AFU");
38 | 
39 |     auto size = args.get_int("size");
40 |     auto duration = args.get_int("duration");
41 |     
42 |     mmio_buffer::ptr_t buffer;
43 |     try
44 |     {
45 |         buffer = afu_->allocate_buffer(size);
46 |     }
47 |     catch(buffer_allocate_error &e)
48 |     {
49 |         TEST_FAIL(true, "buffer allocation failed");
50 |     }
51 | 
52 |     Log() << "Writing to buffer" << std::endl;
53 | 
54 |     struct CacheLine {
55 |         btUnsigned32bitInt uint[16];
56 |     };
57 | 
58 |     struct CacheLine* pCacheLine = reinterpret_cast(buffer->address());
59 |     for (btUnsigned32bitInt i = 0; i < size / CL(1); ++i)
60 |     {
61 |         pCacheLine[i].uint[15] = i;
62 |     }
63 |     Log() << "Holding the buffer for " << duration << std::endl;
64 |     this_thread::sleep_for(chrono::seconds(duration));
65 |     buffer->release();
66 | }
67 | 


--------------------------------------------------------------------------------
/valapps/appbase/CMakeLists.txt:
--------------------------------------------------------------------------------
 1 | cmake_minimum_required(VERSION 2.8.4)
 2 | project(appbase)
 3 | 
 4 | # Header configuration
 5 | set (APPBASE_VERSION_MAJOR 1)
 6 | set (APPBASE_VERSION_MINOR 0)
 7 | set (APPCONSTANTS_VERSION_MAJOR 1)
 8 | set (APPCONSTANTS_VERSION_MINOR 0)
 9 | 
10 | # configure a header file to pass some of the CMake settings
11 | # to the source code
12 | configure_file (
13 |   "${PROJECT_SOURCE_DIR}/appconstants.h.in"
14 |   "${CMAKE_BINARY_DIR}/include/appconstants.h"
15 |   )
16 | 
17 | configure_file (
18 |   "${PROJECT_SOURCE_DIR}/appbuffer.h.in"
19 |   "${CMAKE_BINARY_DIR}/include/appbuffer.h"
20 |   )
21 | 
22 | configure_file (
23 |   "${PROJECT_SOURCE_DIR}/appbase.h.in"
24 |   "${CMAKE_BINARY_DIR}/include/appbase.h"
25 |   )
26 | 
27 | # Boost library
28 | set(SOURCE_FILES appconstants.cpp appbuffer.cpp appbase.cpp)
29 | add_library(appbase STATIC ${SOURCE_FILES} ${HEADER_FILES} ${RESOURCE_FILES} ${CMAKE_HELPER_FILES})
30 | target_link_libraries(appbase ${CMAKE_THREAD_LIBS_INIT})
31 | if(Boost_FOUND)
32 |   target_link_libraries(appbase ${Boost_LIBRARIES})
33 | endif()
34 | 
35 | # add the install targets
36 | install (TARGETS appbase DESTINATION lib)
37 | install (FILES "${PROJECT_BINARY_DIR}/include/appconstants.h"
38 |          DESTINATION include)
39 | install (FILES "${PROJECT_BINARY_DIR}/include/appbase.h"
40 |          DESTINATION include)
41 | install (FILES "${PROJECT_BINARY_DIR}/include/appbuffer.h"
42 |          DESTINATION include)
43 | 
44 | # Sample executable
45 | set(SOURCE_FILES main.cpp)
46 | add_executable(simple_app ${SOURCE_FILES})
47 | 
48 | # Check we compile against right library
49 | find_library(appbase libappbase_location)
50 | message("Generated libappbase was placed at: ${libappbase_location}")
51 | 
52 | # Link to static library
53 | target_link_libraries(simple_app LINK_PUBLIC appbase)
54 | 


--------------------------------------------------------------------------------
/aaluser/utils/fpgadiag/fpgasane_nlb400_0.sh:
--------------------------------------------------------------------------------
 1 | ## Copyright(c) 2015-2016, Intel Corporation
 2 | ##
 3 | ## Redistribution  and  use  in source  and  binary  forms,  with  or  without
 4 | ## modification, are permitted provided that the following conditions are met:
 5 | ##
 6 | ## * Redistributions of  source code  must retain the  above copyright notice,
 7 | ##   this list of conditions and the following disclaimer.
 8 | ## * Redistributions in binary form must reproduce the above copyright notice,
 9 | ##   this list of conditions and the following disclaimer in the documentation
10 | ##   and/or other materials provided with the distribution.
11 | ## * Neither the name  of Intel Corporation  nor the names of its contributors
12 | ##   may be used to  endorse or promote  products derived  from this  software
13 | ##   without specific prior written permission.
14 | ##
15 | ## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
16 | ## AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,  BUT NOT LIMITED TO,  THE
17 | ## IMPLIED WARRANTIES OF  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18 | ## ARE DISCLAIMED.  IN NO EVENT  SHALL THE COPYRIGHT OWNER  OR CONTRIBUTORS BE
19 | ## LIABLE  FOR  ANY  DIRECT,  INDIRECT,  INCIDENTAL,  SPECIAL,  EXEMPLARY,  OR
20 | ## CONSEQUENTIAL  DAMAGES  (INCLUDING,  BUT  NOT LIMITED  TO,  PROCUREMENT  OF
21 | ## SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE,  DATA, OR PROFITS;  OR BUSINESS
22 | ## INTERRUPTION)  HOWEVER CAUSED  AND ON ANY THEORY  OF LIABILITY,  WHETHER IN
23 | ## CONTRACT,  STRICT LIABILITY,  OR TORT  (INCLUDING NEGLIGENCE  OR OTHERWISE)
24 | ## ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,  EVEN IF ADVISED OF THE
25 | ## POSSIBILITY OF SUCH DAMAGE.
26 | 
27 | #Sanity check for nlb400_0 bitstream
28 | #CCIP-LPBK1 test
29 | 
30 | ./fpgadiag --target=fpga --mode=lpbk1 --begin=65535
31 | 


--------------------------------------------------------------------------------
/valapps/tests.md:
--------------------------------------------------------------------------------
 1 | Test specification in JSON format {#tests}
 2 | =================================================
 3 | 
 4 | The tests input file must be formatted such that the top level structure is a dictionary (denoted by the {} 
 5 | characters) with one key called "tests" and an optional key called "collateral". 
 6 | The value of the "tests" key is a list structure (denoted by the [] characters) and must have at least one test specification. If included, the value for the "collateral" key is a list structure and must have at least one collateral specification. The following table shows the data that makes up the test specification.
 7 | 
 8 | Field Name | Description | Required
 9 | -----------|-------------|----------
10 | name | The name of the test library. | Yes
11 | args | A dictionary structure of arguments. Keys are the argument names and values are the argument values. | No
12 | filter | A google test filter to reduce the tests executed | No
13 | disabled | A boolean flag used to indicate to runit.py to skip the test | No
14 | 
15 | The following table shows the collateral specification.
16 | 
17 | Field Name | Description | Required
18 | -----------|-------------|----------
19 | name       | The name of the collateral package | Yes
20 | version    | The version of the collateral package | No (but may be in the future)
21 | type       | The type of collateral (binary, library, source) | No
22 | url        | The URL of the collateral | Yes
23 | fetcher    | The fetcher used to get the collateral in a directory structure | Yes
24 | unpacker   | The unpacker used to unpack the collateral | No
25 | installer  | The installer used to install the collateral | No
26 | 
27 | The dictionary structure of the fetcher, unpacker, and installer will have at a minimum 
28 | the name. The rest of the keys/values vary by the type of fetcher/unpacker/installer.
29 | 


--------------------------------------------------------------------------------
/valapps/DMA_Buffer/SW_BUF_02:
--------------------------------------------------------------------------------
 1 | #!/bin/bash +x
 2 | 
 3 | usage() {
 4 |    echo "./SW_BUF_2    "
 5 | }
 6 | 
 7 | #input parameters
 8 | SocketNum=$1
 9 | size=$2
10 | delay=$3
11 | 
12 | GetDeviceInformation(){
13 |    CMDRST="$(lspci | grep bcc0)"
14 |    DEVINFO1="${CMDRST[0]}"
15 |    DEVINFO2="${CMDRST[1]}"
16 | 
17 |    echo  $DEVINFO1
18 |    Bus1="${DEVINFO1:0:2}"
19 |    Dev1="${DEVINFO1:3:2}"
20 |    Func1="${DEVINFO1:6:1}"
21 |    Bus2="${DEVINFO1:67:2}"
22 |    Dev2="${DEVINFO1:3:2}"
23 |    Func2="${DEVINFO1:6:1}"
24 | }
25 | 
26 | SocketNum=1
27 | size=$2
28 | delay=$3
29 | 
30 | GetDeviceInformation
31 | echo "$Bus1:$Dev1:$Func1"
32 | echo "$Bus2:$Dev2:$Func2"
33 | 
34 | #2 socket test
35 | TwoSocketsTest(){
36 |    echo "Run DMA_Buffer on 2 sockets system Bus: "0x"$Bus1"
37 | 
38 |    ./DMA_Buffer --size=$size --delay=$delay --bus="0x"$Bus1
39 | 
40 |    result1=$?
41 | 
42 |    echo "Run DMA_Buffer on 2 sockets system Bus: "0x"$Bus2"
43 |    
44 |    ./DMA_Buffer --size=$size --delay=$delay --bus="0x"$Bus2
45 |       
46 |    result2=$?  
47 |      
48 |    if [[ $result1 -eq 0 && $result2 -eq 0 ]] ; then 
49 |       echo "Test PASS on 2 sockets system !!!"
50 |       exit 0
51 |    else 
52 |       echo "Test FAILED on 2 sockets system !!!"
53 |       exit 1
54 |    fi
55 | }
56 | 
57 | OneSocketTest(){
58 |    echo "Run DMA_Buffer on 2 sockets system"
59 | 
60 |    ./DMA_Buffer --size=$size --delay=$delay --bus="0x"$Bus1
61 | 
62 |    if [[ $? -eq 0 ]]; then 
63 |          echo "Test PASS on 1 socket system !!!"
64 |          exit 0
65 |     else 
66 |          echo "Test FAILED on 1 socket system !!!"
67 |          exit 1
68 |     fi
69 | }
70 | 
71 | # run fpgadiag test
72 | if [[ $1 -eq 2 ]]; then
73 |    TwoSocketsTest
74 | else
75 |    OneSocketTest
76 | fi
77 | 
78 | 
79 | 
80 | 
81 |  
82 | 
83 |    
84 | 
85 | 


--------------------------------------------------------------------------------
/valapps/valapp/afu_register.h:
--------------------------------------------------------------------------------
 1 | #pragma once 
 2 | class afu_register
 3 | {
 4 |     public:
 5 |         afu_register(const std::string &id,
 6 |                      const std::string &offset,
 7 |                      const std::string &type,
 8 |                      const std::string &width,
 9 |                      const std::string &comment) :
10 |             id_(id),
11 |             type_(type),
12 |             comment_(comment)
13 |         {
14 |             offset_ = std::strtol(offset.c_str(), nullptr, 16);
15 |             width_ = std::strtol(width.c_str(), nullptr, 10);
16 |         }
17 |         
18 |         afu_register(const std::string &id,
19 |                      const unsigned int offset,
20 |                      const std::string &type,
21 |                      const unsigned int width,
22 |                      const std::string &comment) :
23 |             id_(id),
24 |             offset_(offset),
25 |             type_(type),
26 |             width_(width),
27 |             comment_(comment){}
28 | 
29 |         const std::string & id()
30 |         {
31 |             return id_;
32 |         }
33 | 
34 |         const std::string & id() const
35 |         {
36 |             return id_;
37 |         }
38 | 
39 |         const unsigned int & offset()
40 |         {
41 |             return offset_;
42 |         }
43 | 
44 |         const std::string & type()
45 |         {
46 |             return type_;
47 |         }
48 | 
49 |         const unsigned int & width()
50 |         {
51 |             return width_;
52 |         }
53 | 
54 |         const std::string & comment()
55 |         {
56 |             return comment_;
57 |         }
58 | 
59 |     private:
60 |         std::string id_;
61 |         unsigned int offset_;
62 |         std::string type_;
63 |         unsigned int width_;
64 |         std::string comment_;
65 | };
66 | 


--------------------------------------------------------------------------------
/aaluser/utils/fpgadiag/fpgasane_nlb400_7.sh:
--------------------------------------------------------------------------------
 1 | ## Copyright(c) 2015-2016, Intel Corporation
 2 | ##
 3 | ## Redistribution  and  use  in source  and  binary  forms,  with  or  without
 4 | ## modification, are permitted provided that the following conditions are met:
 5 | ##
 6 | ## * Redistributions of  source code  must retain the  above copyright notice,
 7 | ##   this list of conditions and the following disclaimer.
 8 | ## * Redistributions in binary form must reproduce the above copyright notice,
 9 | ##   this list of conditions and the following disclaimer in the documentation
10 | ##   and/or other materials provided with the distribution.
11 | ## * Neither the name  of Intel Corporation  nor the names of its contributors
12 | ##   may be used to  endorse or promote  products derived  from this  software
13 | ##   without specific prior written permission.
14 | ##
15 | ## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
16 | ## AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,  BUT NOT LIMITED TO,  THE
17 | ## IMPLIED WARRANTIES OF  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18 | ## ARE DISCLAIMED.  IN NO EVENT  SHALL THE COPYRIGHT OWNER  OR CONTRIBUTORS BE
19 | ## LIABLE  FOR  ANY  DIRECT,  INDIRECT,  INCIDENTAL,  SPECIAL,  EXEMPLARY,  OR
20 | ## CONSEQUENTIAL  DAMAGES  (INCLUDING,  BUT  NOT LIMITED  TO,  PROCUREMENT  OF
21 | ## SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE,  DATA, OR PROFITS;  OR BUSINESS
22 | ## INTERRUPTION)  HOWEVER CAUSED  AND ON ANY THEORY  OF LIABILITY,  WHETHER IN
23 | ## CONTRACT,  STRICT LIABILITY,  OR TORT  (INCLUDING NEGLIGENCE  OR OTHERWISE)
24 | ## ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,  EVEN IF ADVISED OF THE
25 | ## POSSIBILITY OF SUCH DAMAGE.
26 | 
27 | #Sanity check for nlb400_7 bitstream
28 | #SW test
29 | 
30 | ./fpgadiag --target=fpga --mode=sw --begin=65530 --notice=umsg-data
31 | 


--------------------------------------------------------------------------------
/valapps/Partial_Reconfig/SW_PR_SINGLE_APP:
--------------------------------------------------------------------------------
 1 | #!/bin/bash +x
 2 | 
 3 | usage() {
 4 |    echo "./SW_PR_SINGLE_APP    "
 5 | }
 6 | 
 7 | NumSocket=$1
 8 | bs1=$2
 9 | bs2=$3
10 | testCase=$4
11 | 
12 | echo $SystemConfig $NumSocket
13 | echo $2
14 | echo $3
15 | 
16 | GetDeviceInformation(){
17 |    CMDRST="$(/usr/sbin/lspci | grep bcc0)"
18 |    DEVINFO1="${CMDRST[0]}"
19 |    DEVINFO2="${CMDRST[1]}"
20 | 
21 |    echo  $DEVINFO1
22 |    Bus1="${DEVINFO1:0:2}"
23 |    Dev1="${DEVINFO1:3:2}"
24 |    Func1="${DEVINFO1:6:1}"
25 |    Bus2="${DEVINFO1:67:2}"
26 |    Dev2="${DEVINFO1:3:2}"
27 |    Func2="${DEVINFO1:6:1}"
28 | }
29 | 
30 | GetDeviceInformation
31 | bus1="0x"$Bus1
32 | bus2="0x"$Bus2
33 | 
34 | if [[ $NumSocket -eq 1 ]]; then
35 |    ./PR_SingleApp/Partial_Reconfig --bitstream1=$bs1 --bitstream2=$bs2 --testcase=$testCase 
36 | 
37 |    if [[ $? -eq 0 ]]; then 
38 |       echo "Test PASS on 1 socket system !!!"
39 |       exit 0
40 |    else 
41 |       echo "Test FAILED on 1 socket system !!!"
42 |       exit 1
43 |    fi
44 | fi
45 | 
46 | if [[ $NumSocket -eq 2 ]]; then
47 |    echo ./PR_SingleApp/Partial_Reconfig --bitstream1=$bs1 --bitstream2=$bs2 --testcase=$testCase --bus=$bus1
48 |    ./PR_SingleApp/Partial_Reconfig --bitstream1=$bs1 --bitstream2=$bs2 --testcase=$testCase --bus=$bus1
49 | 
50 |    result1=$?
51 |    
52 |    echo ./PR_SingleApp/Partial_Reconfig --bitstream1=$bs1 --bitstream2=$bs2 --testcase=$testCase --bus=$bus2
53 |    ./PR_SingleApp/Partial_Reconfig --bitstream1=$bs1 --bitstream2=$bs2 --testcase=$testCase --bus=$bus2
54 |       
55 |    result2=$?  
56 |   
57 | 
58 |    if [[ $result1 -eq 0 && $result2 -eq 0 ]] ; then 
59 |       echo "Test PASS on 2 sockets system !!!"
60 |       exit 0
61 |    else 
62 |       echo "Test FAILED on 2 sockets system !!!"
63 |       exit 1
64 |    fi
65 | fi
66 | 
67 | 
68 | 


--------------------------------------------------------------------------------
/aaluser/ase/distclean.sh:
--------------------------------------------------------------------------------
 1 | #!/bin/sh
 2 | ## Copyright(c) 2014-2016, Intel Corporation
 3 | ##
 4 | ## Redistribution  and  use  in source  and  binary  forms,  with  or  without
 5 | ## modification, are permitted provided that the following conditions are met:
 6 | ##
 7 | ## * Redistributions of  source code  must retain the  above copyright notice,
 8 | ##   this list of conditions and the following disclaimer.
 9 | ## * Redistributions in binary form must reproduce the above copyright notice,
10 | ##   this list of conditions and the following disclaimer in the documentation
11 | ##   and/or other materials provided with the distribution.
12 | ## * Neither the name  of Intel Corporation  nor the names of its contributors
13 | ##   may be used to  endorse or promote  products derived  from this  software
14 | ##   without specific prior written permission.
15 | ##
16 | ## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
17 | ## AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,  BUT NOT LIMITED TO,  THE
18 | ## IMPLIED WARRANTIES OF  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19 | ## ARE DISCLAIMED.  IN NO EVENT  SHALL THE COPYRIGHT OWNER  OR CONTRIBUTORS BE
20 | ## LIABLE  FOR  ANY  DIRECT,  INDIRECT,  INCIDENTAL,  SPECIAL,  EXEMPLARY,  OR
21 | ## CONSEQUENTIAL  DAMAGES  (INCLUDING,  BUT  NOT LIMITED  TO,  PROCUREMENT  OF
22 | ## SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE,  DATA, OR PROFITS;  OR BUSINESS
23 | ## INTERRUPTION)  HOWEVER CAUSED  AND ON ANY THEORY  OF LIABILITY,  WHETHER IN
24 | ## CONTRACT,  STRICT LIABILITY,  OR TORT  (INCLUDING NEGLIGENCE  OR OTHERWISE)
25 | ## ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,  EVEN IF ADVISED OF THE
26 | ## POSSIBILITY OF SUCH DAMAGE.
27 | 
28 | rm -rf ase_sources.mk ase_files.files synopsys_sim.setup vlog_files.list vhdl_files.list ucli.key
29 | rm -rf scripts/*.pyc vcs_run.tcl vsim_run.tcl
30 | rm -rf DVEfiles/ ase_seed.txt
31 | 
32 | 


--------------------------------------------------------------------------------
/swval/sdk/tests/harnessed/gtest/gtcommon/gtCommon_ClassOverrides.h:
--------------------------------------------------------------------------------
 1 | // INTEL CONFIDENTIAL - For Intel Internal Use Only
 2 | #ifndef __GTCOMMON_CLASSOVERRIDES_H__
 3 | #define __GTCOMMON_CLASSOVERRIDES_H__
 4 | 
 5 | /// ===================================================================
 6 | /// @brief        A facilitator class for listeners to derive from
 7 | ///               CriticalSection as needed.
 8 | ///
 9 | class GTCOMMON_API Listener : public CAASBase
10 | {
11 | public:
12 |    virtual ~Listener()
13 |    {
14 |    }
15 | };
16 | 
17 | /// ===================================================================
18 | /// @brief        A basic, light-weight spin-lock semaphore that works
19 | ///               without native synchronization primitives.
20 | ///
21 | /// @todo This should ultimately get wrapped around or integrated with
22 | /// the Synchronizing classes in mocks.
23 | ///
24 | /// @internal     Added AutoLock to ensure serial access to the counter
25 | /// variable. Thu 03 Nov 2016 05:26:21 AM PDT
26 | ///
27 | class GTCOMMON_API CListenerLock : public CAASBase
28 | {
29 | 
30 | private:
31 |    volatile int signal_count;
32 |    // volatile may be helpful, but does not guarantee atomic access
33 | 
34 | public:
35 |    CListenerLock() : signal_count( 0 )
36 |    {
37 |    }
38 | 
39 |    virtual ~CListenerLock()
40 |    {
41 |    }
42 | 
43 |    void signal()
44 |    {
45 |       // stdout indicator to aid in debugging
46 |       MSG( "                              >>>>>>>>>>" );
47 |       AutoLock( this );
48 |       --signal_count;
49 |    }
50 | 
51 |    void wait()
52 |    {
53 |       while ( signal_count >= 0 ) {
54 |          SleepZero();
55 |       }
56 |       // stdout indicator to aid in debugging
57 |       MSG( "                              ||||||||||" );
58 |       AutoLock( this );
59 |       ++signal_count;
60 |    }
61 | };
62 | 
63 | #endif   // __GTCOMMON_CLASSOVERRIDES_H__
64 | 


--------------------------------------------------------------------------------