summaryrefslogtreecommitdiffstats
path: root/src/core/file_sys/program_metadata.cpp (follow)
Commit message (Collapse)AuthorAgeFilesLines
* general: Enforce C4800 everywhere except in video_coreMorph2022-10-221-1/+1
|
* Merge pull request #6142 from lat9nq/prog_meta_ref_bind_addressbunnei2022-10-071-5/+47
|\ | | | | program_metadata: Avoid reference binding to misaligned address
| * program_metadata: Unpack FileAccessHeader and FileAccessControllat9nq2022-02-131-5/+47
| | | | | | | | | | | | Avoids a reference binding to a misaligned addresses. Unpacking one requires unpacking the other, otherwise there'll be a misaligned address on the leftover one.
* | general: Convert source file copyright comments over to SPDXMorph2022-04-231-3/+2
|/ | | | | This formats all copyright comments according to SPDX formatting guidelines. Additionally, this resolves the remaining GPLv2 only licensed files by relicensing them to GPLv2.0-or-later.
* program_metadata: Add default ThreadInfo kernel capabilityOatmealDome2021-11-111-1/+4
|
* style: Remove extra space preceding the :: operatorMorph2021-09-291-1/+1
|
* Fix GCC undefined behavior sanitizer.Markus Wick2021-06-101-1/+3
| | | | | | | | | * Wrong alignment in u64 LOG_DEBUG -> memcpy. * Huge shift exponent in stride calculation for linear buffer, unused result -> skipped. * Large shift in buffer cache if word = 0, skip checking for set bits. Non of those were critical, so this should not change any behavior. At least with the assumption, that the last one used masking behavior, which always yield continuous_bits = 0.
* program_metadata: Set a default resource size when a NPDM is not presentMorph2021-04-231-2/+4
| | | | Sets a default size of 0x1FE00000 bytes (510 MiB) for the system_resource_size when a NPDM is not present.
* file_sys: Replace inclusions with forward declarations where applicableLioncash2020-08-231-0/+1
| | | | Same behavior, minus unnecessary inclusions where not necessary.
* file_sys: program_metadata: Add a helper function for generating reasonable default metadata.bunnei2020-04-211-0/+11
| | | | - We need this for homebrew process initialization.
* loader; Resolve sign conversion/truncation errorsLioncash2019-11-121-3/+3
|
* Implement MapPhysicalMemory/UnmapPhysicalMemoryMichael Scire2019-07-071-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | This implements svcMapPhysicalMemory/svcUnmapPhysicalMemory for Yuzu, which can be used to map memory at a desired address by games since 3.0.0. It also properly parses SystemResourceSize from NPDM, and makes information available via svcGetInfo. This is needed for games like Super Smash Bros. and Diablo 3 -- this PR's implementation does not run into the "ASCII reads" issue mentioned in the comments of #2626, which was caused by the following bugs in Yuzu's memory management that this PR also addresses: * Yuzu's memory coalescing does not properly merge blocks. This results in a polluted address space/svcQueryMemory results that would be impossible to replicate on hardware, which can lead to game code making the wrong assumptions about memory layout. * This implements better merging for AllocatedMemoryBlocks. * Yuzu's implementation of svcMirrorMemory unprotected the entire virtual memory range containing the range being mirrored. This could lead to games attempting to map data at that unprotected range/attempting to access that range after yuzu improperly unmapped it. * This PR fixes it by simply calling ReprotectRange instead of Reprotect.
* program_metadata: Add function to load meta from raw parametersZach Hilman2019-06-051-0/+15
| | | | Needed for KIP loading as KIPs do not have an NPDM but do have the essential parts of the data within.
* file_sys/program_metadata: Remove obsolete TODOsLioncash2019-04-051-13/+14
| | | | | | | BitField has been trivially copyable since e99a14862841841d74be8d0ea9426c2d23546b5e, so we can eliminate these TODO comments and use ReadObject() directly instead of memcpying the data.
* file_sys/program_metadata: Print out more descriptive address space descriptionsLioncash2018-12-281-3/+7
| | | | | | | Provides extra information that makes it easier to tell if an executable being run is using a 36-bit address space or a 39-bit address space. While we don't support AArch32 executables yet, this also puts in distinguishing information for the 32-bit address space types as well.
* kernel/process: Hook up the process capability parser to the process itselfLioncash2018-12-211-0/+11
| | | | | While we're at it, we can also toss out the leftover capability parsing from Citra.
* process/vm_manager: Amend API to allow reading parameters from NPDM metadataLioncash2018-09-241-1/+3
| | | | | | | | | Rather than hard-code the address range to be 36-bit, we can derive the parameters from supplied NPDM metadata if the supplied exectuable supports it. This is the bare minimum necessary for this to be possible. The following commits will rework the memory code further to adjust to this.
* file-sys: Default heavy-weight class destructors in the cpp fileLioncash2018-09-201-0/+4
| | | | | | | | | | Several classes have a lot of non-trivial members within them, or don't but likely should have the destructor defaulted in the cpp file for future-proofing/being more friendly to forward declarations. Leaving the destructor unspecified allows the compiler to inline the destruction code all over the place, which is generally undesirable from a code bloat perspective.
* Port #4182 from Citra: "Prefix all size_t with std::"fearlessTobi2018-09-151-1/+1
|
* file_sys: Replace includes with forward declarations where applicableLioncash2018-09-041-1/+4
| | | | | Cuts down on include dependencies, resulting in less files that need to be rebuilt when certain things are changed.
* loader: Add more descriptive errorsZach Hilman2018-08-101-6/+6
| | | Full list of new errors and descriptions in core/loader/loader.h
* Virtual Filesystem 2: Electric Boogaloo (#676)Zach Hilman2018-07-191-27/+16
| | | | | | | | | | * Virtual Filesystem * Fix delete bug and documentate * Review fixes + other stuff * Fix puyo regression
* Revert "Virtual Filesystem (#597)"bunnei2018-07-081-16/+27
| | | | This reverts commit 77c684c1140f6bf3fb7d4560d06d2efb1a2ee5e2.
* Virtual Filesystem (#597)Zach Hilman2018-07-061-27/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add VfsFile and VfsDirectory classes * Finish abstract Vfs classes * Implement RealVfsFile (computer fs backend) * Finish RealVfsFile and RealVfsDirectory * Finished OffsetVfsFile * More changes * Fix import paths * Major refactor * Remove double const * Use experimental/filesystem or filesystem depending on compiler * Port partition_filesystem * More changes * More Overhaul * FSP_SRV fixes * Fixes and testing * Try to get filesystem to compile * Filesystem on linux * Remove std::filesystem and document/test * Compile fixes * Missing include * Bug fixes * Fixes * Rename v_file and v_dir * clang-format fix * Rename NGLOG_* to LOG_* * Most review changes * Fix TODO * Guess 'main' to be Directory by filename
* Update clang formatJames Rowe2018-07-031-1/+1
|
* Rename logging macro back to LOG_*James Rowe2018-07-031-18/+18
|
* general: Make formatting of logged hex values more straightforwardLioncash2018-05-021-9/+9
| | | | | | This makes the formatting expectations more obvious (e.g. any zero padding specified is padding that's entirely dedicated to the value being printed, not any pretty-printing that also gets tacked on).
* file-sys: Move logging macros over to the new fmt-capable onesLioncash2018-04-251-20/+19
|
* file_sys: Style tweaksshinyquagsire232018-02-261-3/+0
| | | | Asdf
* file_sys: Add support for parsing NPDM filesshinyquagsire232018-02-251-0/+117