Compare commits

..

41 Commits

Author SHA1 Message Date
Michael Scire
003f369238 docs: add basic changelog for 1.3.0 2022-03-23 09:07:51 -07:00
Michael Scire
56050a2195 exo: fix typo causing mishandling of carveouts 2022-03-23 08:49:18 -07:00
Michael Scire
e15bcc10a8 emummc: add 14.0.0 patches 2022-03-23 04:32:08 -07:00
Michael Scire
caf0be85fa kern: turns out changing base address gives pretty elfs but breaks relocs 2022-03-23 00:45:48 -07:00
Michael Scire
8c955587f4 os/dd: add missing semicolon to new cache logic 2022-03-23 00:29:49 -07:00
Michael Scire
253ce776cb exo: right, Mariko* is a wiki-ism 2022-03-23 00:04:14 -07:00
Michael Scire
bec0c7ec2f exo: update for new dram ids 2022-03-23 00:03:18 -07:00
Michael Scire
ae09c45f6b kern: codegen tweaks, now that we're no longer -Os 2022-03-22 23:58:39 -07:00
Michael Scire
059a005647 kern: good night sweet prince 2022-03-22 23:13:50 -07:00
Michael Scire
b7091df796 kern: on second thought, gcc built ins are for chumps 2022-03-22 23:10:09 -07:00
Michael Scire
bb0be4de8e kern: implement revised IPI/SGI semantics 2022-03-22 23:02:10 -07:00
Michael Scire
7454507467 kern: update for new hw maintenance semantics 2022-03-22 21:33:43 -07:00
Michael Scire
79dbc22cb2 kern: implement new thread context/fpu semantics 2022-03-22 19:59:39 -07:00
hexkyz
0896d47a92 fusee: add unused mtc table 2022-03-22 23:28:32 +00:00
hexkyz
4288b12f37 fusee: add new sdram params 2022-03-22 23:14:00 +00:00
hexkyz
599c4ebf42 fusee: add new mtc tables 2022-03-22 22:51:29 +00:00
Michael Scire
abede65264 kern: implement additional randomness in KPageHeap allocations 2022-03-22 15:29:55 -07:00
Michael Scire
fee7a4b774 kern: enforce end of dram == end of partitions (move our probably outdated KTraceBuffer to new location) 2022-03-22 15:01:22 -07:00
Michael Scire
a39448905a kern: add new KCapability checks before creating process 2022-03-22 14:45:29 -07:00
Michael Scire
29a53bc572 kern: add InfoType_IsSvcPermitted 2022-03-22 14:29:02 -07:00
Michael Scire
262a066c8c kern: enforce maximum secure region size 2022-03-22 14:16:02 -07:00
Michael Scire
de6d8d4ab4 kern: print kernel backtrace on panic 2022-03-22 14:11:35 -07:00
Michael Scire
dc7184c01f ncm: hot take, uninitialized data bad 2022-03-22 14:02:14 -07:00
Michael Scire
b428e77c16 fs/sprof/build: fix minor issues 2022-03-22 13:27:05 -07:00
Michael Scire
30ff0254a4 pm: grant access to GetResourceLimitPeakValue 2022-03-22 11:10:02 -07:00
Michael Scire
c04ebf10a0 boot2: launch omm before am 2022-03-22 11:09:46 -07:00
Michael Scire
f466f9e825 pgl: style nitpick 2022-03-22 10:29:18 -07:00
Michael Scire
7498958a06 pgl: hook up logic for enabling extra system threads 2022-03-22 10:27:03 -07:00
Michael Scire
f804793fdf pm: hook up the new libnx apis 2022-03-22 10:21:47 -07:00
Michael Scire
0a81889967 fusee: update static_assert on key generation 2022-03-22 10:09:23 -07:00
Michael Scire
cd83a3bd08 pm: loosen restriction on resource limit boost 2022-03-22 09:59:09 -07:00
Michael Scire
11e3d4a620 erpt: update id map 2022-03-22 08:20:45 -07:00
Michael Scire
c593b1be89 sf: add another sanity assert 2022-03-22 05:22:44 -07:00
Michael Scire
36ab24f93a sf: add new debug-interface-id in cmif out header 2022-03-22 05:19:18 -07:00
Michael Scire
41e2c24101 sprofile: fix/simplify import count calculation 2022-03-22 01:00:53 -07:00
Michael Scire
b06ada6ac8 libstrat: misc fixes for unused arg warnings 2022-03-22 01:00:39 -07:00
Michael Scire
b2413b7464 fatal: update for new 14.0.0 command 2022-03-22 00:52:48 -07:00
Michael Scire
fa330deeba kern: update version (note: actual 14-kernel diff/impl todo) 2022-03-21 23:56:54 -07:00
Michael Scire
df1b133bc7 pm/kern: update for 14.0.0 2022-03-21 23:52:16 -07:00
Michael Scire
40601cc74c sprofile: update for 14.0.0 (orphaned profiles now deleted on import) 2022-03-21 23:20:31 -07:00
Michael Scire
9acf48ba5f exo/fusee: first pass at updating enums for 14.0.0 2022-03-21 18:37:48 -07:00
13 changed files with 19 additions and 57 deletions

View File

@@ -15,10 +15,9 @@
+ If you are a developer interested in adding support for another target, please reach out to `SciresM#0524` on discord.
+ This is intended to finally allow sanely testing Atmosphère's code, by allowing most of it to run on a PC (with access to a debugger) instead of on game console hardware.
+ In addition, this will allow making PC tools which reuse code written for Atmosphère directly..
+ **Please Note**: This has no relation to interacting with official software on PC whatsoever. This really allows for making tests and self-contained atmosphère-based command-line tools; the Atmosphère project continues to have zero interest in attempting to run official software of any kind.
+ In the course of adding this support (and working on tooling using it), a number of fairly major revisions were made to stratosphere (particularly surrounding filesystem code).
+ **Please Note**: A number of changes made for this (and ones necessary in the process of adding support for 14.0.0) are api-breaking.
+ If you're a developer and any of this caused your code to break, please feel free to contact `SciresM#0524` for help updating your program.
+ **Please Note**: This has no relation to interacting with official software on PC whatsoever. This does not and is not intended to enable anything with official software, it only really allows for making tests and self-contained atmosphère-based tools.
+ In the course of adding this support (and working on tooling using it), a number of major revisions were added to stratosphere:
+
+ General system stability improvements to enhance the user's experience.
## 1.2.6
+ Support was added for 13.2.1.

6
emummc/.gitrepo vendored
View File

@@ -4,9 +4,9 @@
; git-subrepo command. See https://github.com/git-commands/git-subrepo#readme
;
[subrepo]
remote = https://github.com/m4xw/emummc
remote = https://github.com/m4xw/emuMMC
branch = develop
commit = 56a2e8a2078944d9bf8daead237036254bb6e36d
parent = 4f763b2aa401ac3e3d699ec8c866ae9b3c8fb28d
commit = a9d56959460fc794ce2cb6405402c25a3e89c47f
parent = ff719641396c635b735873fb2b020c910f768a04
method = merge
cmdver = 0.4.1

View File

@@ -27,10 +27,6 @@ CODE_BEGIN armDCacheFlush
bic x8, x0, x10
mov x10, x1
mov w1, #1
mrs x0, tpidrro_el0
strb w1, [x0, #0x104]
armDCacheFlush_L0:
dc civac, x8
add x8, x8, x9
@@ -38,9 +34,6 @@ armDCacheFlush_L0:
bcc armDCacheFlush_L0
dsb sy
strb wzr, [x0, #0x104]
ret
CODE_END
@@ -55,10 +48,6 @@ CODE_BEGIN armDCacheClean
bic x8, x0, x10
mov x10, x1
mov w1, #1
mrs x0, tpidrro_el0
strb w1, [x0, #0x104]
armDCacheClean_L0:
dc cvac, x8
add x8, x8, x9
@@ -66,9 +55,6 @@ armDCacheClean_L0:
bcc armDCacheClean_L0
dsb sy
strb wzr, [x0, #0x104]
ret
CODE_END
@@ -82,10 +68,6 @@ CODE_BEGIN armICacheInvalidate
bic x8, x0, x10
mov x10, x1
mov w1, #1
mrs x0, tpidrro_el0
strb w1, [x0, #0x104]
armICacheInvalidate_L0:
ic ivau, x8
add x8, x8, x9
@@ -93,9 +75,6 @@ armICacheInvalidate_L0:
bcc armICacheInvalidate_L0
dsb sy
strb wzr, [x0, #0x104]
ret
CODE_END
@@ -110,10 +89,6 @@ CODE_BEGIN armDCacheZero
bic x8, x0, x10
mov x10, x1
mov w1, #1
mrs x0, tpidrro_el0
strb w1, [x0, #0x104]
armDCacheZero_L0:
dc zva, x8
add x8, x8, x9
@@ -121,8 +96,5 @@ armDCacheZero_L0:
bcc armDCacheZero_L0
dsb sy
strb wzr, [x0, #0x104]
ret
CODE_END

View File

@@ -6,7 +6,7 @@
[subrepo]
remote = https://github.com/Atmosphere-NX/Atmosphere-libs
branch = master
commit = 726a7efddf8d2950e1b12848cecb66f17fbdde37
parent = 44d553d12ebac4051f2a1adbc12aeff5b3d905d9
commit = 0d161b8588aa6482b84f3c44dd001055b01a047f
parent = 4efa5d7dd0bfbdf89a6261af0aef3878ca784b05
method = merge
cmdver = 0.4.1

View File

@@ -67,8 +67,6 @@ endif
ifeq ($(ATMOSPHERE_BOARD),nx-hac-001)
export LDFLAGS = -specs=$(ATMOSPHERE_LIBRARIES_DIR)/libstratosphere/stratosphere.specs -specs=$(DEVKITPRO)/libnx/switch.specs $(CXXFLAGS) $(CXXWRAPS) $(CXXREQUIRED) -Wl,-Map,$(notdir $*.map)
else ifeq ($(ATMOSPHERE_COMPILER_NAME),clang)
export LDFLAGS = $(CXXFLAGS) $(CXXWRAPS) $(CXXREQUIRED) -Wl,-map,$(notdir $@.map)
else
export LDFLAGS = $(CXXFLAGS) $(CXXWRAPS) $(CXXREQUIRED) -Wl,-Map,$(notdir $@.map)
endif

View File

@@ -101,9 +101,10 @@ namespace ams::fs {
s32 i;
for (i = m_position; m_buffer[i] != StringTraits::DirectorySeparator; ++i) {
if (m_buffer[i] == StringTraits::NullTerminator) {
char * const ret = (i != m_position) ? m_buffer + m_position : nullptr;
m_position = -1;
return ret;
if (i == m_position) {
m_position = -1;
return nullptr;
}
}
}

View File

@@ -41,8 +41,8 @@ namespace ams::fssystem {
private:
Result ResolveFullPath(fs::Path *out, const fs::Path &path) {
if (path.IsMatchHead(m_before_dir.GetString(), m_before_dir.GetLength())) {
R_TRY(out->Initialize(m_after_dir));
R_TRY(out->AppendChild(path));
R_TRY(out->InitializeWithFormat("%s%s", m_after_dir.GetString(), path.GetString() + m_before_dir.GetLength()));
R_TRY(out->Normalize(fs::PathFlags{}));
} else {
R_TRY(out->Initialize(path));
}

View File

@@ -69,7 +69,6 @@ namespace ams::ncm {
/* Set as dirty/not mapped. */
m_is_dirty = false;
m_is_mapped = false;
R_SUCCEED();
}
Result GetMappedMemoryImpl(MappedMemory *out, size_t offset, size_t size) {

View File

@@ -53,10 +53,10 @@ namespace ams::pm::shell {
Result BoostApplicationThreadResourceLimit() {
return ::pmshellBoostApplicationThreadResourceLimit();
}
#endif
Result BoostSystemThreadResourceLimit() {
return ::pmshellBoostSystemThreadResourceLimit();
}
#endif
}

View File

@@ -205,7 +205,7 @@ namespace ams::crypto::impl {
AMS_UNUSED(src_size, dst_size);
/* Get the key. */
const u8 *key8 = reinterpret_cast<const u8 *>(m_round_keys) + (RoundCount * BlockSize);
const u8 *key8 = reinterpret_cast<const u8 *>(m_round_keys) + (RoundCount + BlockSize);
/* Read the block. */
uint8x16_t block = vld1q_u8(static_cast<const u8 *>(src));
@@ -232,7 +232,7 @@ namespace ams::crypto::impl {
}
/* Specializations when building specifically for cortex-a57 (or for apple M* processors). */
#if defined(ATMOSPHERE_CPU_ARM_CORTEX_A57) || defined(ATMOSPHERE_OS_MACOS)
#if defined(ATMOSPHERE_CPU_CORTEX_A57) || defined(ATMOSPHERE_OS_MACOS)
namespace {

View File

@@ -30,12 +30,11 @@ namespace ams::mitm::bpc {
public:
static bool ShouldMitm(const sm::MitmProcessInfo &client_info) {
/* We will mitm:
* - am (omm on 14.0.0+), to intercept the Reboot/Power buttons in the overlay menu.
* - am, to intercept the Reboot/Power buttons in the overlay menu.
* - fatal, to simplify payload reboot logic significantly
* - hbl, to allow homebrew to take advantage of the feature.
*/
return client_info.program_id == ncm::SystemProgramId::Am ||
client_info.program_id == ncm::SystemProgramId::Omm ||
client_info.program_id == ncm::SystemProgramId::Fatal ||
client_info.override_status.IsHbl();
}

View File

@@ -21,7 +21,7 @@ namespace ams::mitm::sysupdater {
namespace {
constexpr inline int AsyncThreadCount = 1;
constexpr inline size_t AsyncThreadStackSize = 32_KB;
constexpr inline size_t AsyncThreadStackSize = 16_KB;
os::ThreadType g_async_threads[AsyncThreadCount];
alignas(os::ThreadStackAlignment) u8 g_async_thread_stack_heap[AsyncThreadCount * AsyncThreadStackSize];

View File

@@ -39,11 +39,6 @@ constexpr inline const EmbeddedPatchEntry Usb30ForceEnablePatches_13_0_0[] = {
{ 0x84B4, "\x20\x00\x80\x52\xC0\x03\x5F\xD6", 8 },
};
constexpr inline const EmbeddedPatchEntry Usb30ForceEnablePatches_14_0_0[] = {
{ 0x7414, "\x20\x00\x80\x52\xC0\x03\x5F\xD6", 8 },
{ 0x74A4, "\x20\x00\x80\x52\xC0\x03\x5F\xD6", 8 },
};
constexpr inline const EmbeddedPatch Usb30ForceEnablePatches[] = {
{ ParseModuleId("C0D3F4E87E8B0FE9BBE9F1968A20767F3DC08E03"), util::size(Usb30ForceEnablePatches_9_0_0), Usb30ForceEnablePatches_9_0_0 },
{ ParseModuleId("B9C700CA8335F8BAA0D2041D8D09F772890BA988"), util::size(Usb30ForceEnablePatches_10_0_0), Usb30ForceEnablePatches_10_0_0 },
@@ -51,5 +46,4 @@ constexpr inline const EmbeddedPatch Usb30ForceEnablePatches[] = {
{ ParseModuleId("F3F88D90EF6B3B6358EDEBAF87D56FA88D3A081C"), util::size(Usb30ForceEnablePatches_12_0_0), Usb30ForceEnablePatches_12_0_0 }, /* 12.0.0 - 12.0.3 */
{ ParseModuleId("A109046278AA99353C20EC38B57C495B74A06D91"), util::size(Usb30ForceEnablePatches_12_0_0), Usb30ForceEnablePatches_12_0_0 }, /* 12.1.0 */
{ ParseModuleId("69384BF4A543C62C4342C94E5E2CED3C5A675251"), util::size(Usb30ForceEnablePatches_13_0_0), Usb30ForceEnablePatches_13_0_0 }, /* 13.0.0 - 13.1.0 */
{ ParseModuleId("1C97AFF30D48AFFEB74B28A530D30ABA0ABB9FFF"), util::size(Usb30ForceEnablePatches_14_0_0), Usb30ForceEnablePatches_14_0_0 }, /* 14.0.0 */
};