summaryrefslogtreecommitdiffstats
path: root/userspace
Commit message (Collapse)AuthorAge
* gpu: nvgpu: unit: build posix-bitops in tmakePhilip Elcan2018-09-24
| | | | | | | | | | | | | | | | | This builds the posix-bitops unit test shared library in the tmake build system for target. The systemimage output is in nvgpu_unit/build/units/libunit-posix-bitops.so JIRA NVGPU-1042 Change-Id: Id73a1f3e7d8de4e21e3a7f5c5bd036e0ce62ad3e Signed-off-by: Philip Elcan <pelcan@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1822288 Reviewed-by: svc-misra-checker <svc-misra-checker@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Alex Waterman <alexw@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
* gpu: nvgpu: unit: build in tmakePhilip Elcan2018-09-24
| | | | | | | | | | | | | | | | | This builds the nvgpu userspace in the tmake build system. The shared library and the unit test binary are built for target. The output goes to the systemimage in nvgpu_unit/build. JIRA NVGPU-1042 Change-Id: I70a118bc02789caf838b2b8e9d6778e94239c56f Signed-off-by: Philip Elcan <pelcan@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1822287 Reviewed-by: svc-misra-checker <svc-misra-checker@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Alex Waterman <alexw@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
* gpu: nvgpu: unit: Add mockio unit testNicolas Benech2018-09-24
| | | | | | | | | | | | | | | | | Add a unit test to make sure the posix IO mocking works corretly. JIRA NVGPU-1040 Change-Id: Iadec2f515c9dd74dc0723885b3a6560dc91ce052 Signed-off-by: Nicolas Benech <nbenech@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1741954 Reviewed-by: svc-misra-checker <svc-misra-checker@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Konsta Holtta <kholtta@nvidia.com> Reviewed-by: Alex Waterman <alexw@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
* gpu: nvgpu: Add POSIX sanity unit testAlex Waterman2018-09-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a unit test to do sanity checks for the environment. These checks currently include: - Size of types (f.e. u32 is really 4 bytes) - Signedness of types (u32 is really unsigned) - Endianness check - Pointers fit in u64s Note: the endianness check does not fail for either detected endianness. It just prints the determined endianness. The exception to this is if the check itself is broken and does not successfully determine what endianness the underlying machine is. In that case the test fails. Unless the underlying architure is a so called middle endian machine something is horribly wrong. We will determine what to actually do about this endianness check once we determine what we need to do with BIOS fields, etc. We proabbly don't really care what the machine endianness is but we do need to make sure that we access data that may not match machine endianness correctly. JIRA NVGPU-1039 Change-Id: I5be68cf4dcea87e9e746262fcc0372380ef57df4 Signed-off-by: Alex Waterman <alexw@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1816897 Reviewed-by: svc-misra-checker <svc-misra-checker@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
* gpu: nvgpu: unit: posix_bitops: fix fls() testsPhilip Elcan2018-09-20
| | | | | | | | | | | | | | | | The fls() test assumed fls(1)=0, but really fls(1)=1, etc. Bug found as result of JIRA NVGPU-1042. Change-Id: I8d0ffe53277f4923a970b46788165ef03b385703 Signed-off-by: Philip Elcan <pelcan@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1828362 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: svc-misra-checker <svc-misra-checker@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Alex Waterman <alexw@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
* gpu: nvgpu: unit: deref twice in qsort callbackKonsta Holtta2018-09-18
| | | | | | | | | | | | | | | | | | The compare function for qsort takes pointers to compared elements, and our elements are already pointers so the void pointer has to be cast to a pointer pointer. Dereferencing only once would compare some data that's in the array of module pointers (or past it), not the actual data where the module pointers point to. Change-Id: I65678863eddd6fc86d4ffceb621f8123944b058d Signed-off-by: Konsta Holtta <kholtta@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1828164 Reviewed-by: svc-misra-checker <svc-misra-checker@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Alex Waterman <alexw@nvidia.com> Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
* gpu: nvgpu: include correct header in bitops testKonsta Holtta2018-09-04
| | | | | | | | | | | | | | | | | The right one is nvgpu/bitops.h, not nvgpu/posix/bitops.h even though this is a test for the posix layer. The latter is not meant to be included directly and does not contain everything necessary. Change-Id: I86a580abc6202064a3fbaa445bb1618b91e5ac4c Signed-off-by: Konsta Holtta <kholtta@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1812230 Reviewed-by: svc-misra-checker <svc-misra-checker@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Scott Long <scottl@nvidia.com> Reviewed-by: Alex Waterman <alexw@nvidia.com> Tested-by: Alex Waterman <alexw@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
* userspace: Enable nvgpu-next buildAnup Mahindre2018-08-14
| | | | | | | | | | | | | | | Added targets in corresponding makefiles/sources to enable building nvgpu-next from userspace. JIRA NVGPU-1015 Change-Id: Ia358162e14205035e4552bfb7f32825c7de48fc2 Signed-off-by: Anup Mahindre <amahindre@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1792003 GVS: Gerrit_Virtual_Submit Reviewed-by: Alex Waterman <alexw@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
* gpu: nvgpu: Make userspace build stricterTerje Bergstrom2018-08-11
| | | | | | | | | | | | | | | Add a bunch of build warning flags to make userspace builds mimic the strictness of standard tmake builds. Change-Id: If6f1f716f2bb2d64d240a66be2cb3aae814f24d0 Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1796239 Reviewed-by: Alex Waterman <alexw@nvidia.com> Reviewed-by: svc-misra-checker <svc-misra-checker@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Scott Long <scottl@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
* gpu: nvgpu: module.c should #include its own hdrTerje Bergstrom2018-08-11
| | | | | | | | | | | | | | | userspace/src/module.c should #include its own <unit/module.h> to get declarations for the functions defined. Change-Id: Icff647f19468607ebfb757360b83ce9f133bd5ec Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1797034 Reviewed-by: svc-misra-checker <svc-misra-checker@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Vinod Gopalakrishnakurup <vinodg@nvidia.com> Reviewed-by: Scott Long <scottl@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
* gpu: nvgpu: unit: Add a posix-bitmap impl unit testAlex Waterman2018-08-10
| | | | | | | | | | | | | | | | | | Add a unit test to test the nvgpu-posix bitmap implementation. This unit test aims to both verify the functionality of this low level set of APIs and provide a reference for how to use the basic unit test functionality. JIRA NVGPU-525 Change-Id: Ide5263e5ce49f18f5f2a3d4a6f9e494395299386 Signed-off-by: Alex Waterman <alexw@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1695007 GVS: Gerrit_Virtual_Submit Reviewed-by: Konsta Holtta <kholtta@nvidia.com> Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
* gpu: nvgpu: unit: Add test unit moduleAlex Waterman2018-08-10
| | | | | | | | | | | | | | | | | | | | Add a super simple tiny test unit module to test the unit test framework. This unit test has a test that deliberately fails so it obviously cannot be part of a real unit test run. Eventually this will have to be removed or otherwise skipped. JIRA NVGPU-525 Change-Id: I41532a85156445a778897bbc84bb5919deab56ae Signed-off-by: Alex Waterman <alexw@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1687095 GVS: Gerrit_Virtual_Submit Reviewed-by: Konsta Holtta <kholtta@nvidia.com> Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
* gpu: nvgpu: unit: Sort unit tests by priorityAlex Waterman2018-08-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sort unit tests by their priority before running said unit tests. There are three available priorities: UNIT_PRIO_SELF_TEST UNIT_PRIO_POSIX_TEST UNIT_PRIO_NVGPU_TEST Which correspond to the types of testing expected to be run. In general unit tests should always just use UNIT_PRIO_NVGPU_TEST but in the case of tests for the POSIX API layer or the unit test framework the other two priorities are provided. The reason for this is that it doesn't make much sense to run a bunch of unit tests if the environment itself or the POSIX API layer is broken. By placing these tests at the front of the list of tests to run an engineer will easily be able to see if there are core problems versus nvgpu problems. This also lets users fine grain control of test order by adding or subtracting to UNIT_PRIO_NVGPU_TEST but one must be very careful about how they do this. JIRA NVGPU-525 Change-Id: I12a5b798e998f34e4d1168bb3696c579460f20b1 Signed-off-by: Alex Waterman <alexw@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1741953 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Konsta Holtta <kholtta@nvidia.com> Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
* gpu: nvgpu: unit: Add unit testing FWAlex Waterman2018-08-10
| | | | | | | | | | | | | | | | | Full documentation for this is in the unit testing confluence page. JIRA NVGPU-525 Bug 2261555 Change-Id: I463e6267eb0eb12b7313f8b275266e8faabe5ccf Signed-off-by: Alex Waterman <alexw@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1683915 GVS: Gerrit_Virtual_Submit Reviewed-by: Konsta Holtta <kholtta@nvidia.com> Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
* gpu: nvgpu: Delete README for POSIX codeAlex Waterman2018-05-11
| | | | | | | | | | | | This was not useful: documentation is in confluence. Change-Id: I6028d751ca518e7105fea4e30bb0b20f40a701a6 Signed-off-by: Alex Waterman <alexw@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1710838 GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
* gpu: nvgpu: Userspace POSIX supportAlex Waterman2018-05-07
Add support for compiling nvgpu in a POSIX compliant userspace. This code adds all of the necessary abstraction interfaces (mostly stubbed) to enabled extremely limited and basic functionality in nvgpu. The goal of this code is to facilitate unit testing of the nvgpu common core. By doing this in userspace it is much easier to write tests that rely on very particular states within nvgpu since a user can very precisely control the state of nvgpu. JIRA NVGPU-525 Change-Id: I30e95016df14997d951075777e0585f912dc5960 Signed-off-by: Alex Waterman <alexw@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1683914 GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>