Commit graph

394 commits

Author SHA1 Message Date
bunnei 3d592972dc
Revert "core: Fix clang build" 2020-10-20 19:07:39 -07:00
Lioncash be1954e04c core: Fix clang build
Recent changes to the build system that made more warnings be flagged as
errors caused building via clang to break.

Fixes #4795
2020-10-17 19:50:39 -04:00
Lioncash 39c8d18feb core/CMakeLists: Make some warnings errors
Makes our error coverage a little more consistent across the board by
applying it to Linux side of things as well. This also makes it more
consistent with the warning settings in other libraries in the project.

This also updates httplib to 0.7.9, as there are several warning
cleanups made that allow us to enable several warnings as errors.
2020-10-13 13:16:49 -04:00
Lioncash ff45c39578 General: Make use of std::nullopt where applicable
Allows some implementations to avoid completely zeroing out the internal
buffer of the optional, and instead only set the validity byte within
the structure.

This also makes it consistent how we return empty optionals.
2020-09-22 17:32:33 -04:00
Lioncash a62c1999c5 file_sys/romfs_factory: Eliminate usage of the global system accessor 2020-09-16 19:15:19 -04:00
Lioncash aa8d6fc041 loader/nso: Remove unnecessary [[maybe_unused]] 2020-09-16 18:09:01 -04:00
Lioncash 113a3972a6 core/loader: Remove dependencies on the global system instance
Now all that remains is:

18 instances in file_sys code
14 instances in GDB stub code (this can be tossed wholesale)
4 instances in HLE code
2 instances in settings code.
2020-09-16 08:46:59 -04:00
Lioncash c4ed791164 common/fileutil: Convert namespace to Common::FS
Migrates a remaining common file over to the Common namespace, making it
consistent with the rest of common files.

This also allows for high-traffic FS related code to alias the
filesystem function namespace as

namespace FS = Common::FS;

for more concise typing.
2020-08-16 06:52:40 -04:00
Lioncash 8e86fa7e60 common/concepts: Rename IsBaseOf to DerivedFrom
This makes it more inline with its currently unavailable standardized
analogue std::derived_from.

While we're at it, we can also make the template match the requirements
of the standardized variant as well.
2020-08-07 08:09:57 -04:00
David Marcec a5af1161c9 Place in anonymous namespace 2020-08-03 21:31:28 +10:00
David Marcec 6cfff2c3f6 loader: Make IdentifyFile typesafe
Relies on #4465 for concept.h Common::IsBaseOf
2020-08-03 21:31:27 +10:00
bunnei 9c12aef2f8 loader: nro: Fix process initialization using ProgramMetadata default. 2020-04-20 18:19:45 -04:00
bunnei 68039addbc loader: elf: Fix process initialization using ProgramMetadata default. 2020-04-20 18:19:45 -04:00
Lioncash 441a2812ed loader/nso: Resolve moves not occurring in DecompressSegment
Given the std::vector was const, an automatic move out of the function
could not occur.

We can allow automatic return value optimizations to occur by making the
buffer non-const.
2020-04-17 19:26:50 -04:00
bunnei bebfb05c1b loader: nso: Fix loader size and arguments. 2020-04-17 00:59:35 -04:00
bunnei 83761d5316 loader: elf/kip/nro: Updates for new VMM. 2020-04-17 00:59:35 -04:00
bunnei 4caff51710 core: memory: Move to Core::Memory namespace.
- helpful to disambiguate Kernel::Memory namespace.
2020-04-17 00:59:28 -04:00
bunnei 7aa0e4a7ca loader: nso: Fix loading of static objects to be properly sized and aligned. 2020-04-17 00:59:27 -04:00
bunnei 6fc485a607 core: loader: Remove check for 32-bit. 2020-03-02 21:43:15 -05:00
Michael Scire 5a7eecc3ad loader: provide default arguments (zero byte) to NSOs
Certain newer unity games (Terraria, Pokemon Mystery Dungeon) require
that the argument region be populated. Failure to do so results in
an integer underflow in argument count, and eventually an unmapped
read at 0x800000000. Providing this default fixes this.

Note that the behavior of official software is as yet unverified,
arguments-wise.
2020-01-22 20:14:06 -08:00
Markus Wick 7e94e544f4 core/loaders: Simplify PhysicalMemory usage.
It is currently a std::vector, however we might want to replace it with a more fancy allocator.
So we can't use the C++ iterators any more.
2020-01-18 08:29:19 +01:00
Zach Hilman f6c53526b3 core/loader: Track the NSO build ID of the current process 2019-09-30 17:21:53 -04:00
Zach Hilman c6becfc9f5 nso: Pass build ID directly
As opposed to converting to string and then back to hex array
2019-09-21 21:44:22 -04:00
Zach Hilman c6ff4a6f4d yuzu: Port old usages of Filesystem namespace to FilesystemController 2019-09-21 16:43:10 -04:00
David 25383b9ff2
Merge pull request #2576 from DarkLordZach/nsp-fix-1
nsp: Fix various errors with loading and processing of extracted NSPs
2019-09-21 20:05:24 +10:00
Nick Renieris bfc5bacecd nro: Implement ReadControlData
With this, the "Developer" field in the Properties for homebrew is now populated.

Signed-off-by: Nick Renieris <velocityra@gmail.com>
2019-09-08 00:40:21 +03:00
Fernando Sahmkow 9bede4eeed VM_Manager: Align allocated memory to 256bytes
This commit ensures that all backing memory allocated for the Guest CPU
is aligned to 256 bytes. This due to how gpu memory works and the heavy
constraints it has in the alignment of physical memory.
2019-07-19 10:06:08 -04:00
Bakugo b50557d1f0 file_sys: Rename other ContentRecordType members 2019-07-02 00:57:23 +01:00
bunnei e2f7933b3f
Merge pull request #2546 from DarkLordZach/kips
loader, file_sys: Add support for parsing and loading KIP (Kernel Internal Process) files
2019-06-21 14:28:18 -04:00
bunnei 96412848a9
Merge pull request #2482 from DarkLordZach/prepo
core: Add detailed local reporting feature for development
2019-06-21 14:05:18 -04:00
Lioncash a62088539e
common/hex_util: Combine HexVectorToString() and HexArrayToString()
These can be generified together by using a concept type to designate
them. This also has the benefit of not making copies of potentially very
large arrays.
2019-06-12 17:54:05 -04:00
Zach Hilman b957a4862f nsp: Correct status codes for extracted NSPs
Avoids all extracted NSPs being marked as error file type because they don't have program NCAs.
2019-06-10 00:21:41 -04:00
Zach Hilman 1c75945dc4 nsp: Use title ID from NPDM metadata for extracted type NSPs
Avoids 0 being used as title ID for all extracted NSPs.
2019-06-10 00:19:23 -04:00
Zach Hilman 9db119f8a2 kernel_executable: Optimize BLZ decompression 2019-06-06 19:20:15 -04:00
Zach Hilman 799302bc9d
Merge pull request #2526 from lioncash/global
core/telemetry_session: Remove usages of the global system accessor
2019-06-05 15:57:48 -04:00
Zach Hilman ce9f7ac4f2 loader: Add recognition for KIP file type 2019-06-05 00:22:07 -04:00
Zach Hilman a76bd49268 loader: Add KIP and INI file parser-specific errors 2019-06-05 00:21:44 -04:00
Zach Hilman c3548967b1 loader: Add AppLoader_KIP for KIP files 2019-06-05 00:21:17 -04:00
Lioncash 84a8fb9264 core/loader: Remove LoadKernelSystemMode
This is a hold-over from Citra and doesn't apply to yuzu.
2019-05-28 22:28:44 -04:00
Zach Hilman b77fde7c5c loader: Move NSO module tracking to AppLoader
Also cleanup of general stuff
2019-05-26 11:40:46 -04:00
Lioncash e5159cfb84 loader/nso: Silence sign-comparison warning
This was previously performing a size_t == int comparison. Silences a
-Wsign-compare warning.
2019-05-25 16:53:33 -04:00
Zach Hilman 2179ad7483 core: Track load offsets of NSO modules
Needed for backtrace decomposition
2019-05-25 16:06:53 -04:00
Lioncash 75a8b304d4 loader/nso: Remove left-in debug pragma
Unintentionally introduced in 552d5071fa
2019-04-30 22:55:53 -04:00
Lioncash 612e1388df core/core: Move process execution start to System's Load()
This gives us significantly more control over where in the
initialization process we start execution of the main process.

Previously we were running the main process before the CPU or GPU
threads were initialized (not good). This amends execution to start
after all of our threads are properly set up.
2019-04-11 22:11:41 -04:00
bunnei 61f63bb994
Merge pull request #1957 from DarkLordZach/title-provider
file_sys: Provide generic interface for accessing game data
2019-04-09 19:16:37 -04:00
Lioncash 5b0a9f8ba8 core: Add missing override specifiers where applicable
Applies the override specifier where applicable. In the case of
destructors that are  defaulted in their definition, they can
simply be removed.

This also removes the unnecessary inclusions being done in audin_u and
audrec_u, given their close proximity.
2019-04-04 12:19:44 -04:00
bunnei d6374b2522
Merge pull request #2093 from FreddyFunk/disk-cache-better-compression
Better LZ4 compression utilization for the disk based shader cache and the yuzu build system
2019-04-03 21:50:29 -04:00
bunnei 29df6bbbd3
Merge pull request #2281 from lioncash/memory
kernel/codeset: Make CodeSet's memory data member a regular std::vector
2019-04-01 22:20:05 -04:00
unknown c791192d64 Addressed feedback 2019-03-29 18:12:42 +01:00
unknown 6a1a2d4aa5 core: Do not link LZ4 to core. Use common/data_compression for nso segment decompression instead. 2019-03-29 16:42:34 +01:00