erpt: add remaining SubmitFsInfo helpers
This commit is contained in:
@@ -19,6 +19,9 @@
|
||||
namespace ams::fs {
|
||||
|
||||
/* ACCURATE_TO_VERSION: Unknown */
|
||||
constexpr inline size_t GameCardCidSize = 0x10;
|
||||
constexpr inline size_t GameCardDeviceIdSize = 0x10;
|
||||
|
||||
enum class GameCardPartition {
|
||||
Update = 0,
|
||||
Normal = 1,
|
||||
@@ -47,9 +50,44 @@ namespace ams::fs {
|
||||
Terra = 1,
|
||||
};
|
||||
|
||||
struct GameCardErrorReportInfo {
|
||||
u16 game_card_crc_error_num;
|
||||
u16 reserved1;
|
||||
u16 asic_crc_error_num;
|
||||
u16 reserved2;
|
||||
u16 refresh_num;
|
||||
u16 reserved3;
|
||||
u16 retry_limit_out_num;
|
||||
u16 timeout_retry_num;
|
||||
u16 asic_reinitialize_failure_detail;
|
||||
u16 insertion_count;
|
||||
u16 removal_count;
|
||||
u16 asic_reinitialize_num;
|
||||
u32 initialize_count;
|
||||
u16 asic_reinitialize_failure_num;
|
||||
u16 awaken_failure_num;
|
||||
u16 reserved4;
|
||||
u16 refresh_succeeded_count;
|
||||
u32 last_read_error_page_address;
|
||||
u32 last_read_error_page_count;
|
||||
u32 awaken_count;
|
||||
u32 read_count_from_insert;
|
||||
u32 read_count_from_awaken;
|
||||
u8 reserved5[8];
|
||||
};
|
||||
static_assert(util::is_pod<GameCardErrorReportInfo>::value);
|
||||
static_assert(sizeof(GameCardErrorReportInfo) == 0x40);
|
||||
|
||||
using GameCardHandle = u32;
|
||||
|
||||
Result GetGameCardHandle(GameCardHandle *out);
|
||||
Result MountGameCardPartition(const char *name, GameCardHandle handle, GameCardPartition partition);
|
||||
|
||||
Result GetGameCardCid(void *dst, size_t size);
|
||||
Result GetGameCardDeviceId(void *dst, size_t size);
|
||||
|
||||
Result GetGameCardErrorReportInfo(GameCardErrorReportInfo *out);
|
||||
|
||||
bool IsGameCardInserted();
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
/*
|
||||
* Copyright (c) Atmosphère-NX
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms and conditions of the GNU General Public License,
|
||||
* version 2, as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#pragma once
|
||||
#include <stratosphere/fs/fs_common.hpp>
|
||||
|
||||
namespace ams::fs {
|
||||
|
||||
struct MemoryReportInfo {
|
||||
u64 pooled_buffer_peak_free_size;
|
||||
u64 pooled_buffer_retried_count;
|
||||
u64 pooled_buffer_reduce_allocation_count;
|
||||
u64 buffer_manager_peak_free_size;
|
||||
u64 buffer_manager_retried_count;
|
||||
u64 exp_heap_peak_free_size;
|
||||
u64 buffer_pool_peak_free_size;
|
||||
u64 patrol_read_allocate_buffer_success_count;
|
||||
u64 patrol_read_allocate_buffer_failure_count;
|
||||
u64 buffer_manager_peak_total_allocatable_size;
|
||||
u64 buffer_pool_max_allocate_size;
|
||||
u64 pooled_buffer_failed_ideal_allocation_count_on_async_access;
|
||||
|
||||
u8 reserved[0x20];
|
||||
};
|
||||
static_assert(sizeof(MemoryReportInfo) == 0x80);
|
||||
static_assert(util::is_pod<MemoryReportInfo>::value);
|
||||
|
||||
Result GetAndClearMemoryReportInfo(MemoryReportInfo *out);
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user