aboutsummaryrefslogtreecommitdiff
path: root/src/core/hle
AgeCommit message (Collapse)Author
2018-09-06core: Migrate current_process pointer to the kernelLioncash
Given we now have the kernel as a class, it doesn't make sense to keep the current process pointer within the System class, as processes are related to the kernel. This also gets rid of a subtle case where memory wouldn't be freed on core shutdown, as the current_process pointer would never be reset, causing the pointed to contents to continue to live.
2018-09-06core/core: Remove unnecessary sm/controller includeLioncash
The only reason this include was necessary, was because the constructor wasn't defaulted in the cpp file and the compiler would inline it wherever it was used. However, given Controller is forward declared, all those inlined constructors would see an incomplete type, causing a compilation failure. So, we just place the constructor in the cpp file, where it can see the complete type definition, allowing us to remove this include.
2018-09-04bktr: Fix bucket overlap errorZach Hilman
2018-09-04registration: Add RegisteredCacheUnionZach Hilman
Aggregates multiple caches into one interface
2018-09-04Merge pull request #1235 from lioncash/forward-declbunnei
file_sys: Replace includes with forward declarations where applicable
2018-09-04Merge pull request #1230 from lioncash/sslbunnei
ssl: Move SSL class to cpp file
2018-09-03file_sys: Replace includes with forward declarations where applicableLioncash
Cuts down on include dependencies, resulting in less files that need to be rebuilt when certain things are changed.
2018-09-02service: Migrate global named port map to the KernelCore classLioncash
Now that we have a class representing the kernel in some capacity, we now have a place to put the named port map, so we move it over and get rid of another piece of global state within the core.
2018-09-02ssl: Move SSL class to cpp fileLioncash
This isn't required to be visible to anything outside of the main source file, and will eliminate needing to rebuild anything else including the header if the SSL class needs to be changed in the future.
2018-09-02Merge pull request #1213 from DarkLordZach/octopath-fsbunnei
filesystem/maxwell_3d: Various changes to boot Project Octopath Traveller
2018-09-02filesystem: Move dir retrieval after path checking in DeleteFile()Lioncash
We don't need to do the lookup if the path is considered empty currently.
2018-08-31filesystem: Implement OpenReadOnlySaveDataFilesystemZach Hilman
2018-08-31filesystem: Add OpenFileSystemWithPatchZach Hilman
2018-08-31core/core: Replace includes with forward declarations where applicableLioncash
The follow-up to e2457418dae19b889b2ad85255bb95d4cd0e4bff, which replaces most of the includes in the core header with forward declarations. This makes it so that if any of the headers the core header was previously including change, then no one will need to rebuild the bulk of the core, due to core.h being quite a prevalent inclusion. This should make turnaround for changes much faster for developers.
2018-08-31gl_renderer: Cache textures, framebuffers, and shaders based on CPU address.bunnei
2018-08-31core: Make the main System class use the PImpl idiomLioncash
core.h is kind of a massive header in terms what it includes within itself. It includes VFS utilities, kernel headers, file_sys header, ARM-related headers, etc. This means that changing anything in the headers included by core.h essentially requires you to rebuild almost all of core. Instead, we can modify the System class to use the PImpl idiom, which allows us to move all of those headers to the cpp file and forward declare the bulk of the types that would otherwise be included, reducing compile times. This change specifically only performs the PImpl portion.
2018-08-28kernel: Eliminate kernel global stateLioncash
As means to pave the way for getting rid of global state within core, This eliminates kernel global state by removing all globals. Instead this introduces a KernelCore class which acts as a kernel instance. This instance lives in the System class, which keeps its lifetime contained to the lifetime of the System class. This also forces the kernel types to actually interact with the main kernel instance itself instead of having transient kernel state placed all over several translation units, keeping everything together. It also has a nice consequence of making dependencies much more explicit. This also makes our initialization a tad bit more correct. Previously we were creating a kernel process before the actual kernel was initialized, which doesn't really make much sense. The KernelCore class itself follows the PImpl idiom, which allows keeping all the implementation details sealed away from everything else, which forces the use of the exposed API and allows us to avoid any unnecessary inclusions within the main kernel header.
2018-08-28Merge pull request #1193 from lioncash/privbunnei
gpu: Make memory_manager private
2018-08-28gpu: Make memory_manager privateLioncash
Makes the class interface consistent and provides accessors for obtaining a reference to the memory manager instance. Given we also return references, this makes our more flimsy uses of const apparent, given const doesn't propagate through pointers in the way one would typically expect. This makes our mutable state more apparent in some places.
2018-08-28hle/result: Make ResultVal's move constructor as noexceptLioncash
Many containers within the standard library provide different behaviors based on whether or not a move constructor/assignment operator can be guaranteed not to throw or not. Notably, implementations will generally use std::move_if_noexcept (or an internal implementation of it) to provide strong exception guarantees. If a move constructor potentially throws (in other words, is not noexcept), then certain behaviors will create copies, rather than moving the values. For example, consider std::vector. When a std::vector calls resize(), there are two ways the elements can be relocated to the new block of memory (if a reallocation happens), by copy, or by moving the existing elements into the new block of memory. If a type does not have a guarantee that it will not throw in the move constructor, a copy will happen. However, if it can be guaranteed that the move constructor won't throw, then the elements will be moved. This just allows ResultVal to be moved instead of copied all the time if ever used in conjunction with containers for whatever reason.
2018-08-27Merge pull request #1177 from lioncash/errbunnei
kernel/error: Amend several error codes
2018-08-27Merge pull request #1175 from lioncash/nsbunnei
core: Namespace all code in the arm subdirectory under the Core namespace
2018-08-27Merge pull request #1176 from lioncash/infobunnei
svc: Return process title ID if queried in GetInfo()
2018-08-27Merge pull request #1162 from ogniK5377/ttf-plubunnei
PL:U Added SharedFonts loading via TTF
2018-08-27Merge pull request #1168 from lioncash/headerbunnei
hid: Move core include to cpp file
2018-08-26set: Fixed GetAvailableLanguageCodes() to follow the max_entriestech4me
Rightnow, in games use GetAvailableLanguageCodes(), there is a WriteBuffer() with size larger than the buffer_size. (Core Critical core\hle\kernel\hle_ipc.cpp:WriteBuffer:296: size (0000000000000088) is greater than buffer_size (0000000000000078)) 0x88 = 17(languages) * 8 0x78 = 15(languages) * 8 GetAvailableLanguageCodes() can only support 15 languages. After firmware 4.0.0 there are 17 supported language instead of 15, to enable this GetAvailableLanguageCodes2() need to be used. So GetAvailableLanguageCodes() will be caped at 15 languages. Reference: http://switchbrew.org/index.php/Settings_services
2018-08-25kernel/error: Amend error code for ERR_MAX_CONNECTIONS_REACHEDLioncash
We can make this error code an alias of the resource limit exceeded error code, allowing us to get rid of the lingering 3DS error code of the same type.
2018-08-25kernel/error: Amend error code for ERR_PORT_NAME_TOO_LONGLioncash
We can treat this as an alias of TooLarge for documentation purposes. This also lets us get rid of another lingering 3DS-related error code.
2018-08-25kernel/error: Add error code for the handle table being fullLioncash
This replaces the lingering 3DS constant with the proper one, and utilizes it within HandleTable's Create() member function.
2018-08-25kernel/error: Add error code for invalid memory permissionsLioncash
2018-08-25kernel/error: Correct kernel error code for invalid combinationLioncash
2018-08-25Merge pull request #1166 from lioncash/typoSebastian Valle
filesystem: Fix typo in log message
2018-08-25svc: Return process title ID if queried in GetInfo()Lioncash
We already have the variable itself set up to perform this task, so we can just return its value from the currently executing process instead of always stubbing it to zero.
2018-08-24Merge pull request #1094 from DarkLordZach/nax0Mat M
file_sys: Add support for NAX archives
2018-08-24core: Namespace all code in the arm subdirectory under the Core namespaceLioncash
Gets all of these types and interfaces out of the global namespace.
2018-08-23hid: Move core include to cpp fileLioncash
This isn't required to be in the header. Instead, directly include what this header needs and move it to the cpp file where it belongs.
2018-08-23filesystem: Fix typo in log messageLioncash
2018-08-23Added GetBootMode (#1107)David
* Added GetBootMode Used by homebrew * Added enum for GetBootMode
2018-08-24Addressed plu TTF changesDavid Marcec
2018-08-23filesystem: Add CreateFactories methods to fsZach Hilman
Allows frontend to create registration caches for use before a game has booted.
2018-08-23filesystem: Add logging to registration gettersZach Hilman
2018-08-23Added SharedFonts loading via TTFDavid Marcec
By having the following TTF files in your yuzu sysdata directory. You can load sharedfonts via TTF files. FontStandard.ttf FontChineseSimplified.ttf FontExtendedChineseSimplified.ttf FontChineseTraditional.ttf FontKorean.ttf FontNintendoExtended.ttf FontNintendoExtended2.ttf
2018-08-22Added missing include for pl:uDavid Marcec
Should fix any compile errors
2018-08-21PL:U Added BFTTF loading(Loading from System NAND dumps) (#1088)David
* Added bfttf loading We can now load system bfttf fonts from system archives AND shared memory dumps. This allows people who have installed their system nand dumps to yuzu to automatically get shared font support. We also now don't hard code the offsets or the sizes of the shared fonts and it's all calculated for us now. * Addressed plu fixups * Style changes for plu * Fixed logic error for plu and added more error checks.
2018-08-21Merge pull request #1145 from lioncash/fwd-declbunnei
vfs: Replace mode.h include with forward declarations where applicable
2018-08-21vfs: Replace mode.h include with forward declarations where applicableLioncash
Avoids the need to rebuild these source files if the mode header changes.
2018-08-21am: Utilize std::array within PopLaunchParameter()Lioncash
Gets rid of the potential for C array-to-pointer decay, and also makes pointer arithmetic to get the end of the copy range unnecessary. We can just use std::array's begin() and end() member functions.
2018-08-21Merge pull request #1129 from lioncash/headerbunnei
romfs_factory, service/filesystem: Use forward declarations where applicable
2018-08-20service/filesystem: Use forward declarations where applicableLioncash
Avoids the need to rebuild multiple source files if the filesystem code headers change. This also gets rid of a few instances of indirect inclusions being relied upon
2018-08-20Merge pull request #1122 from lioncash/accbunnei
acc/profile_manager: General cleanup