Commit Graph

14 Commits

Author SHA1 Message Date
48acb6d369 Address a bunch of issues detected by clang-tidy 2021-03-06 18:58:04 +05:30
c489da610e Add locking to GPU VMM and fix a few codestyle issues
As VMM can be accessed by nvdrv and the GPFIFO thread at the same
time locking is needed to prevent races.
2021-03-05 23:54:32 +05:30
c7e5202042 Rework GPU VMM variable naming 2020-11-22 23:56:17 +05:30
39f0345ac7 Fix bugs introduced by refactoring
GPU VMM was mistakenly checking the alignment of the PA rather than the
VA and NvMap::Free was not accounting for the handle index starting from
one.
2020-11-22 23:56:17 +05:30
02f3e37c4f Remove KProcess Memory Functions 2020-11-22 23:56:17 +05:30
60e82e6af0 Rework VMM + Adapt KMemory Objects to be in-process
Note: This commit isn't functional on it's own, it will require the rest of NCE3 to work
2020-11-22 23:56:17 +05:30
85d5dd3619 Extend NvServices and implement IDirectory (#107)
* Fix alignment handling in NvHostAsGpu::AllocSpace

* Implement Ioctl{2,3} ioctls

These were added in HOS 3.0.0 in order to ease handling ioctl buffers.

* Introduce support for GPU address space remapping

* Fix nvdrv and am service bugs

Syncpoints are supposed to be allocated from ID 1, they were allocated
at 0 before. The ioctl functions were also missing from the service map

* Fix friend:u service name

* Stub NVGPU_IOCTL_CHANNEL_SET_TIMESLICE

* Stub IManagerForApplication::CheckAvailability

* Add OsFileSystem Directory support and add a size field to directory entries

The size field will be needed by the incoming HOS IDirectory support.

* Implement support for IDirectory

This is used by applications to list the contents of a directory.

* Address feedback
2020-11-03 15:10:42 +05:30
4070686897 Refactor Comments + Other Minor Fixes 2020-10-02 15:28:48 +00:00
429af1990a Equal -> Brace Initializer + Remove Constexpr Auto for Integers 2020-10-02 15:28:48 +00:00
e5264f7762 Address review comments 2020-08-15 10:21:41 +00:00
ae131502c6 Fix reservation in GPU VMM
Rather than reserving a region so it *can* be used by MapAllocate
reserved actually prevents a region from being used by MapAllocate.
2020-08-15 10:21:41 +00:00
ed3ff862f6 Extend GPU VMM with unmapping/remapping support + code cleanup 2020-08-15 10:21:41 +00:00
3c5cc33a34 Minor bug fixes in GPU VMM and add support for reading 2020-08-15 10:21:41 +00:00
b23779bda1 Implement a block based GPU virtual memory manager
The GPU has it's own seperate address space to the CPU. It is able to
address 40 bit addresses and accesses the system memory. A sorted vector
has been used to store blocks as insertions are not very frequent.
2020-07-17 16:21:34 +00:00