Commit Graph

1675 Commits

Author SHA1 Message Date
Michael Scire
e7d6626ef6 fs: update a few loose missed results 2022-04-04 17:46:56 -07:00
Michael Scire
cdadb5e9a2 fs: update nca drivers (and dependents/callees) for 14.0.0 changes 2022-04-04 17:46:56 -07:00
Michael Scire
05fdf2ae75 fs: update HashGeneratorFactorySelector to reflect 14.0.0 2022-04-04 17:46:55 -07:00
SciresM
974526f708 fs: reduce path size 0x28 -> 0x18
This implements two optimizations on fs::Path, which N added in 12.0.0.

The current structure looks like: 

```cpp
struct Path {
    const char *m_str; // Points to the read-only path string
    char *m_write_buffer_buffer; // Part of std::unique_ptr<char[], ams::fs::impl::Deleter>
    ams::fs::impl::Deleter m_write_buffer_deleter; // Parse of std::unique_ptr<char[], ams::fs::impl::Deleter>, stores the size of the buffer.
    size_t m_write_buffer_length; // Copy of the write buffer's size accessible to the Path() structure.
    bool m_is_normalized; // Whether the path buffer is normalized
};
```

This is pretty wasteful. The write buffer size is stored twice, wasting 8 bytes, because one copy of the size isn't accessible to the path.

In addition, due to alignment, the bool wastes 7 padding bytes.

This commit:

* Encodes normalized in the low bit of the write buffer length, saving 8 bytes.
* Use a custom WriteBuffer class rather than generic unique_ptr, to avoid needing to store the WriteBuffer twice.


These each save 8 bytes, for a final size of 0x18 rather than 0x28.
2022-04-04 17:46:55 -07:00
Michael Scire
767f4a9913 util: pointer traits only if <memory>/stratosphere 2022-04-04 17:46:54 -07:00
Michael Scire
7a0bfc4397 util: add pointer utils, use to constrain fs pointers 2022-04-04 17:46:54 -07:00
Michael Scire
2c630d5514 fs: fix removed include 2022-04-04 17:46:53 -07:00
Michael Scire
0f8ae6e04b fs: for my sanity, begin tracking version where code was last checked for accuracy 2022-04-04 17:46:53 -07:00
Michael Scire
726a7efddf fs: fix out of bounds access when parsing directory paths 2022-03-23 13:45:36 -07:00
Michael Scire
af48924e59 crypto: fix aes-128 dec on arm64/cortex-a57 2022-03-23 11:25:20 -07:00
Michael Scire
652828c4f3 strat: fix clang build 2022-03-23 11:25:20 -07:00
Michael Scire
d97cdde1aa os/dd: add missing semicolon to new cache logic 2022-03-23 09:16:08 -07:00
Michael Scire
11f2fadb19 exo: right, Mariko* is a wiki-ism 2022-03-23 09:16:08 -07:00
Michael Scire
80022c72bc exo: update for new dram ids 2022-03-23 09:16:08 -07:00
Michael Scire
737720086b kern: codegen tweaks, now that we're no longer -Os 2022-03-23 09:16:07 -07:00
Michael Scire
2d8a1c85de kern: good night sweet prince 2022-03-23 09:16:07 -07:00
Michael Scire
4689ef9033 kern: on second thought, gcc built ins are for chumps 2022-03-23 09:16:07 -07:00
Michael Scire
8022175f5f kern: implement revised IPI/SGI semantics 2022-03-23 09:16:07 -07:00
Michael Scire
d066ac3d69 kern: update for new hw maintenance semantics 2022-03-23 09:16:06 -07:00
Michael Scire
f38d589516 kern: implement new thread context/fpu semantics 2022-03-23 09:16:06 -07:00
Michael Scire
52e51c0634 kern: implement additional randomness in KPageHeap allocations 2022-03-23 09:16:05 -07:00
Michael Scire
692742b434 kern: enforce end of dram == end of partitions (move our probably outdated KTraceBuffer to new location) 2022-03-23 09:16:04 -07:00
Michael Scire
3be59053ca kern: add new KCapability checks before creating process 2022-03-23 09:16:04 -07:00
Michael Scire
a3b74aece9 kern: add InfoType_IsSvcPermitted 2022-03-23 09:16:04 -07:00
Michael Scire
8bbfe8d277 kern: enforce maximum secure region size 2022-03-23 09:16:04 -07:00
Michael Scire
11cedaf353 kern: print kernel backtrace on panic 2022-03-23 09:16:03 -07:00
Michael Scire
797a6deaf3 ncm: hot take, uninitialized data bad 2022-03-23 09:16:03 -07:00
Michael Scire
d2163e1546 fs/sprof/build: fix minor issues 2022-03-23 09:16:03 -07:00
Michael Scire
396a63e5bb boot2: launch omm before am 2022-03-23 09:16:02 -07:00
Michael Scire
7f987e17f3 pgl: style nitpick 2022-03-23 09:16:02 -07:00
Michael Scire
02056cdc00 pgl: hook up logic for enabling extra system threads 2022-03-23 09:16:01 -07:00
Michael Scire
e5463b4272 pm: hook up the new libnx apis 2022-03-23 09:16:00 -07:00
Michael Scire
6980519e04 pm: loosen restriction on resource limit boost 2022-03-23 09:16:00 -07:00
Michael Scire
2e64ec3dd4 erpt: update id map 2022-03-23 09:16:00 -07:00
Michael Scire
5b408b490e sf: add another sanity assert 2022-03-23 09:15:59 -07:00
Michael Scire
ac73be8eae sf: add new debug-interface-id in cmif out header 2022-03-23 09:15:59 -07:00
Michael Scire
37792803f9 sprofile: fix/simplify import count calculation 2022-03-23 09:15:59 -07:00
Michael Scire
7325bd608e libstrat: misc fixes for unused arg warnings 2022-03-23 09:15:58 -07:00
Michael Scire
a1aea1cb48 fatal: update for new 14.0.0 command 2022-03-23 09:15:58 -07:00
Michael Scire
aab409bf1a kern: update version (note: actual 14-kernel diff/impl todo) 2022-03-23 09:15:58 -07:00
Michael Scire
ab25a959f2 pm/kern: update for 14.0.0 2022-03-23 09:15:57 -07:00
Michael Scire
1cee34d0de sprofile: update for 14.0.0 (orphaned profiles now deleted on import) 2022-03-23 09:15:57 -07:00
Michael Scire
446df35368 exo/fusee: first pass at updating enums for 14.0.0 2022-03-23 09:15:57 -07:00
Michael Scire
39047de5c2 ncm: update client code to better reflect latest sysupdate 2022-03-23 09:15:56 -07:00
Michael Scire
b8be94ed7e strat: only include windows.h in translation units where actually needed 2022-03-23 09:15:56 -07:00
Michael Scire
4577648cc2 windows: link libgcc/libstdc++ statically 2022-03-23 09:15:56 -07:00
Michael Scire
8a5d1ec46c fs: utilities for hac2l to print gc headers 2022-03-23 09:15:55 -07:00
Michael Scire
bf95bc3ede fs: add gc validation wrappers for hac2l 2022-03-23 09:15:55 -07:00
Michael Scire
c895603abf fs: add indirection to raw storage open, for hac2l 2022-03-23 09:15:55 -07:00
Michael Scire
a9aef5024c util: update function dtors, update gitignore 2022-03-23 09:15:54 -07:00