summaryrefslogtreecommitdiff
path: root/src/core/hle (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #1483 from lioncash/codesetGravatar bunnei2018-10-124-40/+14
|\ | | | | kernel/process: Make CodeSet a regular non-inherited object
| * kernel/process: Make CodeSet a regular non-inherited objectGravatar Lioncash2018-10-124-40/+14
| | | | | | | | | | | | | | | | These only exist to ferry data into a Process instance and end up going out of scope quite early. Because of this, we can just make it a plain struct for holding things and just std::move it into the relevant function. There's no need to make this inherit from the kernel's Object type.
* | Merge pull request #1481 from lioncash/typoGravatar bunnei2018-10-121-3/+3
|\ \ | | | | | | svc: Fix typos in sanitizing checks for MapMemory/UnmapMemory
| * | svc: Fix typos in sanitizing checks for MapMemory/UnmapMemoryGravatar Lioncash2018-10-121-3/+3
| |/
* | Merge pull request #1467 from ogniK5377/svcbreak-type-fixGravatar bunnei2018-10-122-28/+36
|\ \ | | | | | | Fixed incorrect types for svcBreak
| * | Changed all casts in svc_wrap.h to be static_cast insteadGravatar David Marcec2018-10-101-25/+28
| | |
| * | Use a better name than "dont_kill_application"Gravatar David Marcec2018-10-101-2/+2
| | | | | | | | | | | | signal_debugger seems like a more fitting name
| * | Fixed incorrect types for svcBreakGravatar David Marcec2018-10-102-3/+8
| | | | | | | | | | | | svcBreak reason should be a u32, not a u64.
* | | Merge pull request #1478 from ogniK5377/remap-invalidhandle-remapGravatar bunnei2018-10-121-3/+10
|\ \ \ | | | | | | | | Passing an invalid nmap handle to Remap should throw an error
| * | | Returned an error before processing other remapsGravatar David Marcec2018-10-121-6/+2
| | | |
| * | | Passing an invalid nmap handle to Remap should throw an errorGravatar David Marcec2018-10-111-3/+14
| | | | | | | | | | | | | | | | Added error for invalid nmap handles
* | | | Merge pull request #1482 from lioncash/initGravatar bunnei2018-10-121-4/+1
|\ \ \ \ | | | | | | | | | | thread: Remove unnecessary memset from ResetThreadContext()
| * | | | thread: Remove unnecessary memset from ResetThreadContext()Gravatar Lioncash2018-10-121-4/+1
| | |_|/ | |/| | | | | | | | | | | | | | | | | | Regular value initialization is adequate here for zeroing out data. It also has the benefit of not invoking undefined behavior if a non-trivial type is ever added to the struct for whatever reason.
* | | | Merge pull request #1479 from ogniK5377/nmap-revampedGravatar bunnei2018-10-121-12/+60
|\ \ \ \ | |/ / / |/| | | Added error codes for nvmap
| * | | Made the minimum alignment more clearGravatar David Marcec2018-10-121-2/+3
| | | |
| * | | Added error codes for nvmapGravatar David Marcec2018-10-111-12/+59
| |/ /
* | | Merge pull request #1474 from ogniK5377/hwopus-decodeinterleavedwithperformanceGravatar bunnei2018-10-111-3/+34
|\ \ \ | | | | | | | | HwOpus, Implemented DecodeInterleavedWithPerformance
| * | | HwOpus, Implemented DecodeInterleavedWithPerformanceGravatar David Marcec2018-10-111-3/+34
| |/ / | | | | | | | | | Used by sonic ages
* | | Merge pull request #1472 from lioncash/sanGravatar bunnei2018-10-112-12/+81
|\ \ \ | | | | | | | | svc: Add missing address range sanitizing checks to MapMemory/UnmapMemory
| * | | svc: Add missing address range sanitizing checks to MapMemory/UnmapMemoryGravatar Lioncash2018-10-102-12/+81
| |/ / | | | | | | | | | | | | | | | | | | | | | This adds the missing address range checking that the service functions do before attempting to map or unmap memory. Given that both service functions perform the same set of checks in the same order, we can wrap these into a function and just call it from both functions, which deduplicates a little bit of code.
* / / nvhost_as_gpu: Flush CPU VAddr on UnmapBuffer.Gravatar bunnei2018-10-111-3/+4
|/ /
* / kernel/thread: Use a regular pointer for the owner/current processGravatar Lioncash2018-10-106-29/+29
|/ | | | | | | | | | | There's no real need to use a shared pointer in these cases, and only makes object management more fragile in terms of how easy it would be to introduce cycles. Instead, just do the simple thing of using a regular pointer. Much of this is just a hold-over from citra anyways. It also doesn't make sense from a behavioral point of view for a process' thread to prolong the lifetime of the process itself (the process is supposed to own the thread, not the other way around).
* Added bitfield instead of manually checking if the bit is setGravatar David Marcec2018-10-091-4/+12
|
* Actual kill execution when the bit isn't set, not the other way aroundGravatar David Marcec2018-10-091-1/+1
|
* svcBreak, Signalling to the debugger should not kill executionGravatar David Marcec2018-10-091-5/+12
| | | | When loading NROs, svcBreak is called to signal to the debugger that a new "module" is loaded. As no debugger is technically attached we shouldn't be killing the programs execution.
* Merge pull request #1456 from ogniK5377/aoc-u-fixupsGravatar bunnei2018-10-081-5/+5
|\ | | | | Fixed assertion due to CountAddOnContent & Casting warnings
| * Fixed assertion due to CountAddOnContentGravatar David Marcec2018-10-081-5/+5
| | | | | | | | | | | | Word count should be 3 since we're pushing a result code and a u32. Also fixed up compiler warnings due to casting
* | Unmapping an unmapped buffer should succeedGravatar David Marcec2018-10-081-1/+6
|/ | | | Hardware tests show that trying to unmap an unmapped buffer already should always succeed. Hardware test was tested up to 32 iterations of attempting to unmap
* Merge pull request #1396 from DarkLordZach/packed-updatesGravatar bunnei2018-10-062-0/+10
|\ | | | | loader: Add support for packed updates
| * romfs_factory: Extract packed update setter to new functionGravatar Zach Hilman2018-10-052-0/+10
| |
* | Added forward define for ServerPortGravatar David Marcec2018-10-062-4/+6
| |
* | Ported #4296 from citraGravatar David Marcec2018-10-063-1/+25
| | | | | | | | This will allow us to easily remove the use of "NFC" in "System"
* | kernel/mutex: Amend behavior of TransferMutexOwnership()Gravatar Lioncash2018-10-061-1/+1
| | | | | | | | | | | | | | | | | | This was the result of a typo accidentally introduced in e51d715700a35a8f14e5b804b6f7553c9a40888b. This restores the previous correct behavior. The behavior with the reference was incorrect and would cause some games to fail to boot.
* | thread: Make the scheduler pointer a regular pointerGravatar balika0112018-10-052-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Conceptually, it doesn't make sense for a thread to be able to persist the lifetime of a scheduler. A scheduler should be taking care of the threads; the threads should not be taking care of the scheduler. If the threads outlive the scheduler (or we simply don't actually terminate/shutdown the threads), then it should be considered a bug that we need to fix. Attributing this to balika011, as they opened #1317 to attempt to fix this in a similar way, but my refactoring of the kernel code caused quite a few conflicts.
* | Merge pull request #1439 from lioncash/threadGravatar bunnei2018-10-0511-187/+363
|\ \ | |/ |/| kernel/thread: Make all instance variables private
| * kernel/thread: Make all instance variables privateGravatar Lioncash2018-10-0411-187/+363
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Many of the member variables of the thread class aren't even used outside of the class itself, so there's no need to make those variables public. This change follows in the steps of the previous changes that made other kernel types' members private. The main motivation behind this is that the Thread class will likely change in the future as emulation becomes more accurate, and letting random bits of the emulator access data members of the Thread class directly makes it a pain to shuffle around and/or modify internals. Having all data members public like this also makes it difficult to reason about certain bits of behavior without first verifying what parts of the core actually use them. Everything being public also generally follows the tendency for changes to be introduced in completely different translation units that would otherwise be better introduced as an addition to the Thread class' public interface.
* | Merge pull request #1434 from DarkLordZach/dlc-edge-caseGravatar bunnei2018-10-031-1/+1
|\ \ | | | | | | aoc_u: Fix edge case with DLC that causes breaks
| * | aoc_u: Fix edge case with DLC that causes breaksGravatar Zach Hilman2018-10-021-1/+1
| | | | | | | | | | | | In some games (Splatoon 2 and Splatoon 2 Splatfest World Premiere, notably), pass offset=0 and count=2047 into the ListAddOnContent method which should return all DLCs for the current title. The (presumably) intended behavior is to successfully return a empty array but because of a < v. <= in an if statement, a failure error code was returned causing these games to svcBreak. This fixes that if statement.
* | | Merge pull request #1433 from lioncash/fsGravatar bunnei2018-10-031-0/+2
|\ \ \ | | | | | | | | services/fsp_srv: Amend service function table
| * | | services/fsp_srv: Amend service function tableGravatar Lioncash2018-10-021-0/+2
| | |/ | |/| | | | | | | | | | Adds new functions that have been given names to the table. Information is based off what is provided on Switchbrew.
* | | service/lbl: Update service function tableGravatar Lioncash2018-10-021-19/+19
| |/ |/| | | | | | | Amends the lbl service table to include new names of functions that were added to Switchbrew.
* | aoc_u: Extract AccumulateAOCTitleIDs to separate functionGravatar Zach Hilman2018-09-301-20/+26
| |
* | aoc_u: Implement GetAddOnContentBaseIdGravatar Zach Hilman2018-09-302-3/+5
| | | | | | Command #5
* | aoc_u: Implement Count, List and Prepare AddOnContentGravatar Zach Hilman2018-09-302-3/+78
|/ | | | Commands #2, #3, and #7
* Merge pull request #1338 from raven02/service_viGravatar bunnei2018-09-301-1/+19
|\ | | | | Implement ISystemDisplayService::GetDisplayMode
| * Implement ISystemDisplayService::GetDisplayModeGravatar raven022018-09-301-1/+19
| |
* | kernel/svc: Implement svcGetThreadContext()Gravatar Lioncash2018-09-303-2/+37
| | | | | | | | | | | | | | | | | | Now that we have all of the rearranging and proper structure sizes in place, it's fairly trivial to implement svcGetThreadContext(). In the 64-bit case we can more or less just write out the context as is, minus some minor value sanitizing. In the 32-bit case we'll need to clear out the registers that wouldn't normally be accessible from a 32-bit AArch32 exectuable (or process).
* | kernel/process: Add a data member to determine if a process is 64-bit or not.Gravatar Lioncash2018-09-302-0/+11
| | | | | | | | | | | | | | | | | | | | | | This will be necessary for the implementation of svcGetThreadContext(), as the kernel checks whether or not the process that owns the thread that has it context being retrieved is a 64-bit or 32-bit process. If the process is 32-bit, then the upper 15 general-purpose registers and upper 16 vector registers are cleared to zero (as AArch32 only has 15 GPRs and 16 128-bit vector registers. not 31 general-purpose registers and 32 128-bit vector registers like AArch64).
* | kernel/process: Make data member variables privateGravatar Lioncash2018-09-307-55/+100
| | | | | | | | | | | | | | Makes the public interface consistent in terms of how accesses are done on a process object. It also makes it slightly nicer to reason about the logic of the process class, as we don't want to expose everything to external code.
* | Merge pull request #1412 from lioncash/moveGravatar bunnei2018-09-292-3/+2
|\ \ | | | | | | kernel/object: Remove unnecessary std::move from DynamicObjectCast()