Commit Graph

45 Commits (46fc7d85023f4449b542f0c58830421d667f92b7)

Author SHA1 Message Date
Subv 827f8ca3c7 Kernel: Store the program id in the Process class instead of the CodeSet class.
There may be many CodeSets per Process, so it's wasteful and overcomplicated to store the program id in each of them.
7 years ago
bunnei 557b2496d7
Merge pull request #117 from jroweboy/clang-format
Clang format as a build target
7 years ago
James Rowe 096be16636 Format: Run the new clang format on everything 7 years ago
bunnei 386df282a3 loader: Clean up ctors and includes. 7 years ago
bunnei 023aef053c loader: Refactor to also pass filepath into IdentifyType. 7 years ago
bunnei 746c2a3ae7 core: Refactor MakeMagic usage and remove dead code. 8 years ago
bunnei b1d5db1cf6 Merge remote-tracking branch 'upstream/master' into nx
# Conflicts:
#	src/core/CMakeLists.txt
#	src/core/arm/dynarmic/arm_dynarmic.cpp
#	src/core/arm/dyncom/arm_dyncom.cpp
#	src/core/hle/kernel/process.cpp
#	src/core/hle/kernel/thread.cpp
#	src/core/hle/kernel/thread.h
#	src/core/hle/kernel/vm_manager.cpp
#	src/core/loader/3dsx.cpp
#	src/core/loader/elf.cpp
#	src/core/loader/ncch.cpp
#	src/core/memory.cpp
#	src/core/memory.h
#	src/core/memory_setup.h
8 years ago
bunnei 8c92435ded nso: Refactor and allocate .bss section. 8 years ago
bunnei 1c4f9e822c elf: Check if machine is ARM. 8 years ago
Subv 7f48aa8d25 Loaders: Don't automatically set the current process every time we load an application.
The loaders will now just create a Kernel::Process, construct it and return it to the caller, which is responsible for setting it as the current process and configuring the global page table.
8 years ago
MerryMage c02bbb7030 memory: Add GetCurrentPageTable/SetCurrentPageTable
Don't expose Memory::current_page_table as a global.
8 years ago
Subv 6d2734a074 Kernel/Memory: Give each Process its own page table.
The loader is in charge of setting the newly created process's page table as the main one during the loading process.
8 years ago
Yuri Kunde Schlesner 6577bbc3c5 Remove ability to load symbol maps
This was now mostly unused except by thread creation, which used a
symbol of the entrypoint, if available, to name the thread.
8 years ago
Yuri Kunde Schlesner 84fbbe2629 Use negative priorities to avoid special-casing the self-include 9 years ago
Emmanuel Gil Peyrot ebdae19fd2 Remove empty newlines in #include blocks.
This makes clang-format useful on those.

Also add a bunch of forgotten transitive includes, which otherwise
prevented compilation.
9 years ago
Emmanuel Gil Peyrot dc8479928c Sources: Run clang-format on everything. 9 years ago
Lioncash a89e32b157 elf: Don't cast away const 10 years ago
Yuri Kunde Schlesner 62c2a262b2 Loader: Fix variable type and remove unused variable 10 years ago
Yuri Kunde Schlesner 2d7299a86f Loader: Remove unnecessary pointer indirection to IOFile 10 years ago
Yuri Kunde Schlesner 5c5cf2f8e0 Core: Properly configure address space when loading a binary
The code now properly configures the process image to match the loaded
binary segments (code, rodata, data) instead of just blindly allocating
a large chunk of dummy memory.
10 years ago
Emmanuel Gil Peyrot 45c4781544 CitraQt: Cleanup includes. 10 years ago
Subv d3634d4bf4 Core/ResourceLimits: Implemented the basic structure of ResourceLimits.
Implemented svcs GetResourceLimit, GetResourceLimitCurrentValues and GetResourceLimitLimitValues.

Note that the resource limits do not currently keep track of used objects, since we have no way to distinguish between an object created by the application, and an object created by some HLE module once we're inside Kernel::T::Create.
10 years ago
Yuri Kunde Schlesner 7ada357b2d Memmap: Re-organize memory function in two files
memory.cpp/h contains definitions related to acessing memory and
configuring the address space
mem_map.cpp/h contains higher-level definitions related to configuring
the address space accoording to the kernel and allocating memory.
10 years ago
Yuri Kunde Schlesner 1c0b87edc2 Memory: Re-organize and rename memory area address constants 10 years ago
Yuri Kunde Schlesner 3cb19c9589 Process: Rename StaticAddressMapping => AddressMapping 10 years ago
Yuri Kunde Schlesner 2af30d465f Process: Support parsing of exheader kernel caps 10 years ago
Yuri Kunde Schlesner 6d60acf0f1 Kernel: Introduce skeleton Process class to hold process data 10 years ago
Yuri Kunde Schlesner e1fbac3ca1 Common: Remove common.h 10 years ago
Rohit Nirmal 5ebf35db96 Silence a few warnings. 11 years ago
Emmanuel Gil Peyrot df0d66c7cf Loader: Clean up the ELF AppLoader. 11 years ago
Emmanuel Gil Peyrot 82ec17db7d Loader: Guess filetype from the magic, or fallback to the extension. 11 years ago
Emmanuel Gil Peyrot 04622a859c Loader: Don’t assume the file hasn’t been read before. 11 years ago
Emmanuel Gil Peyrot b5237e885d Loader: Keep a reference to the file and pass it to the correct AppLoader, instead of loading it multiple times. 11 years ago
Emmanuel Gil Peyrot 85030c6e6b Loader: Never forget to change is_loaded. 11 years ago
Emmanuel Gil Peyrot 43e699d849 Loader: Don’t duplicate the docstring into the cpp file. 11 years ago
Lioncash bf23f94571 elf: Make DidRelocate const 11 years ago
purpasmart96 ebfd831ccb License change 11 years ago
Yuri Kunde Schlesner 0600e2d8b5 Convert old logging calls to new logging macros 11 years ago
Emmanuel Gil Peyrot f5d38649c7 Remove trailing spaces in every file but the ones imported from SkyEye, AOSP or generated 11 years ago
Emmanuel Gil Peyrot 6b7b36a874 Common: Rename the File namespace to FileUtil, to match the filename and prevent collisions. 11 years ago
bunnei cedc28dcc6 ELF: Refactored LoadInto(..) to use memcpy, removed unnecessary code. 11 years ago
bunnei 62b444cd17 Loader: Refactored use of const. 11 years ago
bunnei 7889cafc76 Loader: Implemented AppLoader interface for abstracting application loading.
- Various cleanups/refactorings to Loader, ELF, and NCCH modules.
- Added AppLoader interface to ELF and NCCH.
- Updated Qt/GLFW frontends to check AppLoader ResultStatus.

NCCH: Removed extra qualification typos.

Loader: Removed unnecessary #include's.

NCCH: Improved readability of memcmp statements.

NCCH: Added missing space.

Elf: Removed unnecessary usage of unique_ptr.

Loader: Removed unnecessary usage of unique_ptr.
11 years ago
bunnei 13bdaa6c60 Loader: Cleaned up and removed unused code, refactored ELF namespace. 11 years ago
bunnei 1da361c7ab Elf: Renamed modules to be consistent with new loader naming, fixed tabs -> spaces. 11 years ago