Commit Graph

31 Commits

Author SHA1 Message Date
PixelyIon
4b80e1f91c Use libcxx from LLVM Project submodule
The version of libcxx shipped with Android NDK is fairly outdated and doesn't contain several features we desire such as C++ 20 ranges. This has been fixed by using libcxx directly from the LLVM Project which has been added as a submodule and can be updated independently of NDK.
2021-10-31 16:04:44 +05:30
Billy Laws
70d1b4994c Enable Wconversion and fix warnings produced 2021-10-26 11:41:24 +01:00
Billy Laws
1e7347bf72 Use semantic wrapping for nvdrv where appropriate 2021-10-26 10:46:36 +05:30
Billy Laws
eb25f60033 Implement multichannel support for GPU
Allows the execution of multiple channels at the same time, with locking
being performed on the host GPU scheduler layer, address spaces can be
bound to one or more channels.
2021-10-16 12:13:30 +01:00
PixelyIon
02bcf98b8c Fix NvDrv Bugs + NACP Parsing Bug
A hotfix for a nvdrv bug where an IOCTL with no input/output buffers would crash and a major `nvmap` bug which broke the `FromId` IOCTL as it didn't write back the handle ID, another minor bug existed in `nvhost` where the `ZCullGetInfo` IOCTL was `INOUT` rather than `OUT`.

A bug with NACPs was also fixed caused by incorrect padding for the `NacpData` structure which resulted in the `saveDataOwnerId` member being read incorrectly and as a result the save data folder being incorrect.

Co-authored-by: artem8086 <artemsvyatoha@gmail.com>
2021-10-02 00:15:53 +05:30
Billy Laws
a18f1aa889 Address feedback 2021-09-30 02:11:19 +05:30
Billy Laws
8db2cf29f2 Implement AsGpu::FreeSpace and clean up locking and debug prints 2021-09-30 02:11:19 +05:30
Billy Laws
d03b288db6 NEEDS CLEANUP: Reimplement GPU VMM and rewrite nvdrv VM impl 2021-09-30 02:11:19 +05:30
Billy Laws
020aa0e43a Add support for Ioctl2/3 and improve debug logging 2021-09-30 02:11:19 +05:30
Billy Laws
c97f5a9315 Entirely rewrite nvmap to separate global and per device state.
This will be required later for NVDEC/SMMU support and fixes many
significant issues in the previous implementation.
Based off of my 2.0.0/12.0.0 nvdrv REs.
2021-09-30 02:11:19 +05:30
Billy Laws
c7e5202042 Rework GPU VMM variable naming 2020-11-22 23:56:17 +05:30
Billy Laws
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
◱ PixelyIon
657beea070 JVM Auto-Attach + Fix Thread Exiting + Fix Thread Signal Handler 2020-11-22 23:56:17 +05:30
◱ PixelyIon
745ea19f42 Use u64s for FmtCast + Remove Functional Casts + Fix VMM Bugs 2020-11-22 23:56:17 +05:30
◱ PixelyIon
878cb24389 Make fmt::ptr implicit for raw pointers + Update Submodules 2020-11-22 23:56:17 +05:30
◱ PixelyIon
02f3e37c4f Remove KProcess Memory Functions 2020-11-22 23:56:17 +05:30
◱ PixelyIon
4070686897 Refactor Comments + Other Minor Fixes 2020-10-02 15:28:48 +00:00
◱ PixelyIon
429af1990a Equal -> Brace Initializer + Remove Constexpr Auto for Integers 2020-10-02 15:28:48 +00:00
◱ PixelyIon
2764bd7c96 Use Vector for Kernel Handles + Remove Redundant Includes 2020-10-02 15:28:48 +00:00
◱ PixelyIon
20559c5dca Introduce Custom Span Class + IPC Buffer -> Span 2020-10-02 15:28:48 +00:00
◱ PixelyIon
a5fece8020 NVDRV IOCTL Refactor
Buffer -> Span + All buffers as arguments + Return -> NvStatus + Print Service Names + Function Names
2020-09-20 20:07:33 +00:00
◱ PixelyIon
70d67ef563 Constexpr Maps for NvDevice IOCTLs 2020-09-20 20:07:33 +00:00
◱ PixelyIon
20253a9573 Improve NvDevice Registration + Access 2020-09-20 20:07:33 +00:00
Billy Laws
89718804d0 Refactor service functions to return result codes 2020-09-06 19:12:18 +00:00
Billy Laws
68d5a48df1 Implement syncpoints and nvhost events and fix an nvmap bug
These are used to allow the CPU to synchronise with the GPU as it
reaches specific points in its command stream.

Also fixes an nvmap bug where a struct was incorrect.
2020-08-15 10:21:41 +00:00
Billy Laws
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
◱ PixelyIon
05f3e3c3ac Improve NCE and Finish Up Refactor
This commit mainly finishes up refactor by fixing everything brought up in the CR + Improving NCE somewhat and actually killing the child processes properly now.
2020-04-23 22:26:27 +05:30
◱ PixelyIon
c76ef3730b Move to MPL-2.0
We earlier moved to LGPLv3.0 or Later. This was a mistake as what we wanted was being able to link to proprietary libraries but LGPL is the opposite and it allows linking proprietary libraries to libskyline instead. After further consideration, we've moved to MPL-2.0, it allows linking to proprietary libraries and is a standardized license as compared to adding an exception to GPL.
2020-04-23 22:26:27 +05:30
◱ PixelyIon
c37f350c02 Move from GPLv3 to LGPLv3 or later
Skyline has been licensed with GPLv3 but as we want to look into optional ads in the future, and that would require linking AdMob SDKs which are proprietary. So, we decided to move to LGPLv3 so we could keep that option open as a revenue stream. 

We've gathered consent from all contributors for the license change:
* PixelyIon - https://github.com/PixelyIon (Commit Author)
* Zephyren25 - https://github.com/zephyren25
* ByLaws - https://github.com/bylaws
* IvarWithoutBones - https://github.com/IvarWithoutBones
* Cyuubi - https://github.com/Cyuubi
* greggamesplayer - https://github.com/greggameplayer
2020-04-23 22:26:27 +05:30
◱ PixelyIon
a60ab89c5d Fix Include Order
This commit fixes the include order of files throughout the code-base to be compliant with the new guidelines.
2020-04-23 22:26:27 +05:30
◱ PixelyIon
42d982c6fb Refactor Display Services and GPU
This commit addresses the incorrect hierarchy of the GPU and refactors them at the same time. Now, the hierarchy much closely matches HOS. This commit also introduces a texture classes, albeit they're not complete and only partially implemented.
2020-04-23 22:26:27 +05:30