Skip to content

svc: Add svc headers - #63

Open
Fuzzy2319 wants to merge 6 commits into
open-ead:masterfrom
Fuzzy2319:svc
Open

Fuzzy2319 wants to merge 6 commits into
open-ead:masterfrom
Fuzzy2319:svc

Conversation

@Fuzzy2319

@Fuzzy2319 Fuzzy2319 commented May 1, 2026

Copy link
Copy Markdown

This PR add headers for svc service.


This change is Reviewable

@Pistonight

Copy link
Copy Markdown

Actually most of the addition in the svc header belongs to nn::os. The exported symbols shows nn::svc::Handle being the only one in nn::svc

@Pistonight Pistonight closed this Sep 9, 2026
@Fuzzy2319

Copy link
Copy Markdown
Author

That's not true, exemple in the SMO's SDK
image
I double checked all the signatures with both SMO and MK8DX

@Pistonight

Copy link
Copy Markdown

Interesting.. what SDK version is that? It's probably an early version, because botw (4.4.0) don't have them

@Pistonight Pistonight reopened this Sep 9, 2026
@Pistonight

Copy link
Copy Markdown

I found them in 3.5.1 (smo 1.2.0) but not 4.4.0 (botw 1.5.0/mk8dx 1.7.0) - so very likely nn::svc::* other than Handle were removed in major ver 4?

@Fuzzy2319

Copy link
Copy Markdown
Author

In 4.4.0 nn::svc functions still exist, they just don't have symbols.
image

@Pistonight

Copy link
Copy Markdown

Yeah sorry that's what I meant, they removed it from the exported symbols. We should probably still have them in the header unconditionally.

I guess the types also need to be in svc because it's needed to match the mangled symbol. Maybe they were moved/duplicated to nn::os in newer sdks but I haven't checked

Comment thread include/nn/svc.h
operator u32() const { return handle; }
};

enum class MemoryPermission { Read = 1 << 0, Write = 1 << 1, Execute = 1 << 2, DontCare = 1 << 28 };

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In newer SDKs there is nn::os::MemoryPermission which seems to be the same

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I’ll take a look at that Thursday.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In 3.5.1 there is both nn::os::MemoryPermission and nn::svc::MemoryPermission
_ZN2nn2os6detail23SetMemoryPermissionImplEmmNS0_16MemoryPermissionE
_ZN2nn3svc7aarch644lp6419SetMemoryPermissionEmmNS0_16MemoryPermissionE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants