[core] Add additional kernel functionality #8

Merged
sdkchan merged 1 commit from update-core-functionality into master 2025-08-09 09:57:38 +00:00
Collaborator

Adds support for InfoType::SystemResourceSize (0x1C) which is required for
proper initialization of the Virtual Address Memory Manager (VAMM). This
implementation:

  1. Adds SystemResourceSize to the InfoType enum in svc_types.h
  2. Implements the GetInfo handler for SystemResourceSize in svc_info.cpp
  3. Returns 512MB (0x20000000 bytes) as the system resource size
  4. Adds debug logging for the SVC call

The 512MB value is chosen based on typical system resource allocations
needed for VAMM initialization on the Nintendo Switch.

This fixes crashes in games that rely on VAMM functionality, particularly
during nn::os::detail::VammManager::InitializeIfEnabled().

  • Replace stubbed InitialProcessIdRange implementation with proper bounds (1-0x50)
  • Add handle and info_sub_id validation for InitialProcessIdRange
  • Replace process exit ASSERT with graceful error handling and logging
  • Add try-catch block around system.Exit() for safer shutdown
  • Add atomic header inclusion for binder.h

This improves system call reliability by properly implementing process ID
range checks and adding safer process exit handling with proper error logging.

Signed-off-by: default avatarZephyron zephyron@citron-emu.org

Adds support for InfoType::SystemResourceSize (0x1C) which is required for proper initialization of the Virtual Address Memory Manager (VAMM). This implementation: 1. Adds SystemResourceSize to the InfoType enum in svc_types.h 2. Implements the GetInfo handler for SystemResourceSize in svc_info.cpp 3. Returns 512MB (0x20000000 bytes) as the system resource size 4. Adds debug logging for the SVC call The 512MB value is chosen based on typical system resource allocations needed for VAMM initialization on the Nintendo Switch. This fixes crashes in games that rely on VAMM functionality, particularly during nn::os::detail::VammManager::InitializeIfEnabled(). - Replace stubbed InitialProcessIdRange implementation with proper bounds (1-0x50) - Add handle and info_sub_id validation for InitialProcessIdRange - Replace process exit ASSERT with graceful error handling and logging - Add try-catch block around system.Exit() for safer shutdown - Add atomic header inclusion for binder.h This improves system call reliability by properly implementing process ID range checks and adding safer process exit handling with proper error logging. Signed-off-by: default avatarZephyron <zephyron@citron-emu.org>
[core] Add additional kernel functionality
Some checks failed
yuzu-ci / transifex (pull_request) Has been cancelled
yuzu-ci / reuse (pull_request) Has been cancelled
codespell / Check for spelling errors (pull_request) Has been cancelled
yuzu verify / verify format (pull_request) Has been cancelled
yuzu verify / test build (pull_request) Has been cancelled
yuzu verify / test build (macos) (pull_request) Has been cancelled
yuzu verify / test build (windows, msvc) (pull_request) Has been cancelled
yuzu verify / android (pull_request) Has been cancelled
9b0b9d77eb
sdkchan merged commit 44dec3040d into master 2025-08-09 09:57:38 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Bix/yuzu!8
No description provided.