fs_user.cpp 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475
  1. // Copyright 2014 Citra Emulator Project
  2. // Licensed under GPLv2
  3. // Refer to the license.txt file included.
  4. #include "common/common.h"
  5. #include "common/string_util.h"
  6. #include "core/hle/kernel/archive.h"
  7. #include "core/hle/kernel/archive.h"
  8. #include "core/hle/result.h"
  9. #include "core/hle/service/fs_user.h"
  10. #include "core/settings.h"
  11. ////////////////////////////////////////////////////////////////////////////////////////////////////
  12. // Namespace FS_User
  13. namespace FS_User {
  14. static void Initialize(Service::Interface* self) {
  15. u32* cmd_buff = Service::GetCommandBuffer();
  16. // TODO(Link Mauve): check the behavior when cmd_buff[1] isn't 32, as per
  17. // http://3dbrew.org/wiki/FS:Initialize#Request
  18. cmd_buff[1] = RESULT_SUCCESS.raw;
  19. LOG_DEBUG(Service_FS, "called");
  20. }
  21. /**
  22. * FS_User::OpenFile service function
  23. * Inputs:
  24. * 1 : Transaction
  25. * 2 : Archive handle lower word
  26. * 3 : Archive handle upper word
  27. * 4 : Low path type
  28. * 5 : Low path size
  29. * 6 : Open flags
  30. * 7 : Attributes
  31. * 8 : (LowPathSize << 14) | 2
  32. * 9 : Low path data pointer
  33. * Outputs:
  34. * 1 : Result of function, 0 on success, otherwise error code
  35. * 3 : File handle
  36. */
  37. static void OpenFile(Service::Interface* self) {
  38. u32* cmd_buff = Service::GetCommandBuffer();
  39. // TODO(Link Mauve): cmd_buff[2], aka archive handle lower word, isn't used according to
  40. // 3dmoo's or ctrulib's implementations. Triple check if it's really the case.
  41. Handle archive_handle = static_cast<Handle>(cmd_buff[3]);
  42. auto filename_type = static_cast<FileSys::LowPathType>(cmd_buff[4]);
  43. u32 filename_size = cmd_buff[5];
  44. FileSys::Mode mode; mode.hex = cmd_buff[6];
  45. u32 attributes = cmd_buff[7]; // TODO(Link Mauve): do something with those attributes.
  46. u32 filename_ptr = cmd_buff[9];
  47. FileSys::Path file_path(filename_type, filename_size, filename_ptr);
  48. LOG_DEBUG(Service_FS, "path=%s, mode=%d attrs=%u", file_path.DebugStr().c_str(), mode.hex, attributes);
  49. ResultVal<Handle> handle = Kernel::OpenFileFromArchive(archive_handle, file_path, mode);
  50. cmd_buff[1] = handle.Code().raw;
  51. if (handle.Succeeded()) {
  52. cmd_buff[3] = *handle;
  53. } else {
  54. LOG_ERROR(Service_FS, "failed to get a handle for file %s", file_path.DebugStr().c_str());
  55. }
  56. }
  57. /**
  58. * FS_User::OpenFileDirectly service function
  59. * Inputs:
  60. * 1 : Transaction
  61. * 2 : Archive ID
  62. * 3 : Archive low path type
  63. * 4 : Archive low path size
  64. * 5 : File low path type
  65. * 6 : File low path size
  66. * 7 : Flags
  67. * 8 : Attributes
  68. * 9 : (ArchiveLowPathSize << 14) | 0x802
  69. * 10 : Archive low path
  70. * 11 : (FileLowPathSize << 14) | 2
  71. * 12 : File low path
  72. * Outputs:
  73. * 1 : Result of function, 0 on success, otherwise error code
  74. * 3 : File handle
  75. */
  76. static void OpenFileDirectly(Service::Interface* self) {
  77. u32* cmd_buff = Service::GetCommandBuffer();
  78. auto archive_id = static_cast<FileSys::Archive::IdCode>(cmd_buff[2]);
  79. auto archivename_type = static_cast<FileSys::LowPathType>(cmd_buff[3]);
  80. u32 archivename_size = cmd_buff[4];
  81. auto filename_type = static_cast<FileSys::LowPathType>(cmd_buff[5]);
  82. u32 filename_size = cmd_buff[6];
  83. FileSys::Mode mode; mode.hex = cmd_buff[7];
  84. u32 attributes = cmd_buff[8]; // TODO(Link Mauve): do something with those attributes.
  85. u32 archivename_ptr = cmd_buff[10];
  86. u32 filename_ptr = cmd_buff[12];
  87. FileSys::Path archive_path(archivename_type, archivename_size, archivename_ptr);
  88. FileSys::Path file_path(filename_type, filename_size, filename_ptr);
  89. LOG_DEBUG(Service_FS, "archive_path=%s file_path=%s, mode=%u attributes=%d",
  90. archive_path.DebugStr().c_str(), file_path.DebugStr().c_str(), mode.hex, attributes);
  91. if (archive_path.GetType() != FileSys::Empty) {
  92. LOG_ERROR(Service_FS, "archive LowPath type other than empty is currently unsupported");
  93. cmd_buff[1] = UnimplementedFunction(ErrorModule::FS).raw;
  94. return;
  95. }
  96. // TODO(Link Mauve): Check if we should even get a handle for the archive, and don't leak it
  97. // TODO(yuriks): Why is there all this duplicate (and seemingly useless) code up here?
  98. ResultVal<Handle> archive_handle = Kernel::OpenArchive(archive_id);
  99. cmd_buff[1] = archive_handle.Code().raw;
  100. if (archive_handle.Failed()) {
  101. LOG_ERROR(Service_FS, "failed to get a handle for archive");
  102. return;
  103. }
  104. // cmd_buff[2] isn't used according to 3dmoo's implementation.
  105. cmd_buff[3] = *archive_handle;
  106. ResultVal<Handle> handle = Kernel::OpenFileFromArchive(*archive_handle, file_path, mode);
  107. cmd_buff[1] = handle.Code().raw;
  108. if (handle.Succeeded()) {
  109. cmd_buff[3] = *handle;
  110. } else {
  111. LOG_ERROR(Service_FS, "failed to get a handle for file %s", file_path.DebugStr().c_str());
  112. }
  113. }
  114. /*
  115. * FS_User::DeleteFile service function
  116. * Inputs:
  117. * 2 : Archive handle lower word
  118. * 3 : Archive handle upper word
  119. * 4 : File path string type
  120. * 5 : File path string size
  121. * 7 : File path string data
  122. * Outputs:
  123. * 1 : Result of function, 0 on success, otherwise error code
  124. */
  125. void DeleteFile(Service::Interface* self) {
  126. u32* cmd_buff = Service::GetCommandBuffer();
  127. // TODO(Link Mauve): cmd_buff[2], aka archive handle lower word, isn't used according to
  128. // 3dmoo's or ctrulib's implementations. Triple check if it's really the case.
  129. Handle archive_handle = static_cast<Handle>(cmd_buff[3]);
  130. auto filename_type = static_cast<FileSys::LowPathType>(cmd_buff[4]);
  131. u32 filename_size = cmd_buff[5];
  132. u32 filename_ptr = cmd_buff[7];
  133. FileSys::Path file_path(filename_type, filename_size, filename_ptr);
  134. LOG_DEBUG(Service_FS, "type=%d size=%d data=%s",
  135. filename_type, filename_size, file_path.DebugStr().c_str());
  136. cmd_buff[1] = Kernel::DeleteFileFromArchive(archive_handle, file_path).raw;
  137. }
  138. /*
  139. * FS_User::RenameFile service function
  140. * Inputs:
  141. * 2 : Source archive handle lower word
  142. * 3 : Source archive handle upper word
  143. * 4 : Source file path type
  144. * 5 : Source file path size
  145. * 6 : Dest archive handle lower word
  146. * 7 : Dest archive handle upper word
  147. * 8 : Dest file path type
  148. * 9 : Dest file path size
  149. * 11: Source file path string data
  150. * 13: Dest file path string
  151. * Outputs:
  152. * 1 : Result of function, 0 on success, otherwise error code
  153. */
  154. void RenameFile(Service::Interface* self) {
  155. u32* cmd_buff = Service::GetCommandBuffer();
  156. // TODO(Link Mauve): cmd_buff[2] and cmd_buff[6], aka archive handle lower word, aren't used according to
  157. // 3dmoo's or ctrulib's implementations. Triple check if it's really the case.
  158. Handle src_archive_handle = static_cast<Handle>(cmd_buff[3]);
  159. auto src_filename_type = static_cast<FileSys::LowPathType>(cmd_buff[4]);
  160. u32 src_filename_size = cmd_buff[5];
  161. Handle dest_archive_handle = static_cast<Handle>(cmd_buff[7]);
  162. auto dest_filename_type = static_cast<FileSys::LowPathType>(cmd_buff[8]);
  163. u32 dest_filename_size = cmd_buff[9];
  164. u32 src_filename_ptr = cmd_buff[11];
  165. u32 dest_filename_ptr = cmd_buff[13];
  166. FileSys::Path src_file_path(src_filename_type, src_filename_size, src_filename_ptr);
  167. FileSys::Path dest_file_path(dest_filename_type, dest_filename_size, dest_filename_ptr);
  168. LOG_DEBUG(Service_FS, "src_type=%d src_size=%d src_data=%s dest_type=%d dest_size=%d dest_data=%s",
  169. src_filename_type, src_filename_size, src_file_path.DebugStr().c_str(),
  170. dest_filename_type, dest_filename_size, dest_file_path.DebugStr().c_str());
  171. cmd_buff[1] = Kernel::RenameFileBetweenArchives(src_archive_handle, src_file_path, dest_archive_handle, dest_file_path).raw;
  172. }
  173. /*
  174. * FS_User::DeleteDirectory service function
  175. * Inputs:
  176. * 2 : Archive handle lower word
  177. * 3 : Archive handle upper word
  178. * 4 : Directory path string type
  179. * 5 : Directory path string size
  180. * 7 : Directory path string data
  181. * Outputs:
  182. * 1 : Result of function, 0 on success, otherwise error code
  183. */
  184. void DeleteDirectory(Service::Interface* self) {
  185. u32* cmd_buff = Service::GetCommandBuffer();
  186. // TODO(Link Mauve): cmd_buff[2], aka archive handle lower word, isn't used according to
  187. // 3dmoo's or ctrulib's implementations. Triple check if it's really the case.
  188. Handle archive_handle = static_cast<Handle>(cmd_buff[3]);
  189. auto dirname_type = static_cast<FileSys::LowPathType>(cmd_buff[4]);
  190. u32 dirname_size = cmd_buff[5];
  191. u32 dirname_ptr = cmd_buff[7];
  192. FileSys::Path dir_path(dirname_type, dirname_size, dirname_ptr);
  193. LOG_DEBUG(Service_FS, "type=%d size=%d data=%s",
  194. dirname_type, dirname_size, dir_path.DebugStr().c_str());
  195. cmd_buff[1] = Kernel::DeleteDirectoryFromArchive(archive_handle, dir_path).raw;
  196. }
  197. /*
  198. * FS_User::CreateDirectory service function
  199. * Inputs:
  200. * 2 : Archive handle lower word
  201. * 3 : Archive handle upper word
  202. * 4 : Directory path string type
  203. * 5 : Directory path string size
  204. * 8 : Directory path string data
  205. * Outputs:
  206. * 1 : Result of function, 0 on success, otherwise error code
  207. */
  208. static void CreateDirectory(Service::Interface* self) {
  209. u32* cmd_buff = Service::GetCommandBuffer();
  210. // TODO: cmd_buff[2], aka archive handle lower word, isn't used according to
  211. // 3dmoo's or ctrulib's implementations. Triple check if it's really the case.
  212. Handle archive_handle = static_cast<Handle>(cmd_buff[3]);
  213. auto dirname_type = static_cast<FileSys::LowPathType>(cmd_buff[4]);
  214. u32 dirname_size = cmd_buff[5];
  215. u32 dirname_ptr = cmd_buff[8];
  216. FileSys::Path dir_path(dirname_type, dirname_size, dirname_ptr);
  217. LOG_DEBUG(Service_FS, "type=%d size=%d data=%s", dirname_type, dirname_size, dir_path.DebugStr().c_str());
  218. cmd_buff[1] = Kernel::CreateDirectoryFromArchive(archive_handle, dir_path).raw;
  219. }
  220. /*
  221. * FS_User::RenameDirectory service function
  222. * Inputs:
  223. * 2 : Source archive handle lower word
  224. * 3 : Source archive handle upper word
  225. * 4 : Source dir path type
  226. * 5 : Source dir path size
  227. * 6 : Dest archive handle lower word
  228. * 7 : Dest archive handle upper word
  229. * 8 : Dest dir path type
  230. * 9 : Dest dir path size
  231. * 11: Source dir path string data
  232. * 13: Dest dir path string
  233. * Outputs:
  234. * 1 : Result of function, 0 on success, otherwise error code
  235. */
  236. void RenameDirectory(Service::Interface* self) {
  237. u32* cmd_buff = Service::GetCommandBuffer();
  238. // TODO(Link Mauve): cmd_buff[2] and cmd_buff[6], aka archive handle lower word, aren't used according to
  239. // 3dmoo's or ctrulib's implementations. Triple check if it's really the case.
  240. Handle src_archive_handle = static_cast<Handle>(cmd_buff[3]);
  241. auto src_dirname_type = static_cast<FileSys::LowPathType>(cmd_buff[4]);
  242. u32 src_dirname_size = cmd_buff[5];
  243. Handle dest_archive_handle = static_cast<Handle>(cmd_buff[7]);
  244. auto dest_dirname_type = static_cast<FileSys::LowPathType>(cmd_buff[8]);
  245. u32 dest_dirname_size = cmd_buff[9];
  246. u32 src_dirname_ptr = cmd_buff[11];
  247. u32 dest_dirname_ptr = cmd_buff[13];
  248. FileSys::Path src_dir_path(src_dirname_type, src_dirname_size, src_dirname_ptr);
  249. FileSys::Path dest_dir_path(dest_dirname_type, dest_dirname_size, dest_dirname_ptr);
  250. LOG_DEBUG(Service_FS, "src_type=%d src_size=%d src_data=%s dest_type=%d dest_size=%d dest_data=%s",
  251. src_dirname_type, src_dirname_size, src_dir_path.DebugStr().c_str(),
  252. dest_dirname_type, dest_dirname_size, dest_dir_path.DebugStr().c_str());
  253. cmd_buff[1] = Kernel::RenameDirectoryBetweenArchives(src_archive_handle, src_dir_path, dest_archive_handle, dest_dir_path).raw;
  254. }
  255. static void OpenDirectory(Service::Interface* self) {
  256. u32* cmd_buff = Service::GetCommandBuffer();
  257. // TODO(Link Mauve): cmd_buff[2], aka archive handle lower word, isn't used according to
  258. // 3dmoo's or ctrulib's implementations. Triple check if it's really the case.
  259. Handle archive_handle = static_cast<Handle>(cmd_buff[2]);
  260. auto dirname_type = static_cast<FileSys::LowPathType>(cmd_buff[3]);
  261. u32 dirname_size = cmd_buff[4];
  262. u32 dirname_ptr = cmd_buff[6];
  263. FileSys::Path dir_path(dirname_type, dirname_size, dirname_ptr);
  264. LOG_DEBUG(Service_FS, "type=%d size=%d data=%s", dirname_type, dirname_size, dir_path.DebugStr().c_str());
  265. ResultVal<Handle> handle = Kernel::OpenDirectoryFromArchive(archive_handle, dir_path);
  266. cmd_buff[1] = handle.Code().raw;
  267. if (handle.Succeeded()) {
  268. cmd_buff[3] = *handle;
  269. } else {
  270. LOG_ERROR(Service_FS, "failed to get a handle for directory");
  271. }
  272. }
  273. /**
  274. * FS_User::OpenArchive service function
  275. * Inputs:
  276. * 1 : Archive ID
  277. * 2 : Archive low path type
  278. * 3 : Archive low path size
  279. * 4 : (LowPathSize << 14) | 2
  280. * 5 : Archive low path
  281. * Outputs:
  282. * 1 : Result of function, 0 on success, otherwise error code
  283. * 2 : Archive handle lower word (unused)
  284. * 3 : Archive handle upper word (same as file handle)
  285. */
  286. static void OpenArchive(Service::Interface* self) {
  287. u32* cmd_buff = Service::GetCommandBuffer();
  288. auto archive_id = static_cast<FileSys::Archive::IdCode>(cmd_buff[1]);
  289. auto archivename_type = static_cast<FileSys::LowPathType>(cmd_buff[2]);
  290. u32 archivename_size = cmd_buff[3];
  291. u32 archivename_ptr = cmd_buff[5];
  292. FileSys::Path archive_path(archivename_type, archivename_size, archivename_ptr);
  293. LOG_DEBUG(Service_FS, "archive_path=%s", archive_path.DebugStr().c_str());
  294. if (archive_path.GetType() != FileSys::Empty) {
  295. LOG_ERROR(Service_FS, "archive LowPath type other than empty is currently unsupported");
  296. cmd_buff[1] = UnimplementedFunction(ErrorModule::FS).raw;
  297. return;
  298. }
  299. ResultVal<Handle> handle = Kernel::OpenArchive(archive_id);
  300. cmd_buff[1] = handle.Code().raw;
  301. if (handle.Succeeded()) {
  302. // cmd_buff[2] isn't used according to 3dmoo's implementation.
  303. cmd_buff[3] = *handle;
  304. } else {
  305. LOG_ERROR(Service_FS, "failed to get a handle for archive");
  306. }
  307. }
  308. /*
  309. * FS_User::IsSdmcDetected service function
  310. * Outputs:
  311. * 1 : Result of function, 0 on success, otherwise error code
  312. * 2 : Whether the Sdmc could be detected
  313. */
  314. static void IsSdmcDetected(Service::Interface* self) {
  315. u32* cmd_buff = Service::GetCommandBuffer();
  316. cmd_buff[1] = 0;
  317. cmd_buff[2] = Settings::values.use_virtual_sd ? 1 : 0;
  318. LOG_DEBUG(Service_FS, "called");
  319. }
  320. const Interface::FunctionInfo FunctionTable[] = {
  321. {0x000100C6, nullptr, "Dummy1"},
  322. {0x040100C4, nullptr, "Control"},
  323. {0x08010002, Initialize, "Initialize"},
  324. {0x080201C2, OpenFile, "OpenFile"},
  325. {0x08030204, OpenFileDirectly, "OpenFileDirectly"},
  326. {0x08040142, DeleteFile, "DeleteFile"},
  327. {0x08050244, RenameFile, "RenameFile"},
  328. {0x08060142, DeleteDirectory, "DeleteDirectory"},
  329. {0x08070142, nullptr, "DeleteDirectoryRecursively"},
  330. {0x08080202, nullptr, "CreateFile"},
  331. {0x08090182, CreateDirectory, "CreateDirectory"},
  332. {0x080A0244, RenameDirectory, "RenameDirectory"},
  333. {0x080B0102, OpenDirectory, "OpenDirectory"},
  334. {0x080C00C2, OpenArchive, "OpenArchive"},
  335. {0x080D0144, nullptr, "ControlArchive"},
  336. {0x080E0080, nullptr, "CloseArchive"},
  337. {0x080F0180, nullptr, "FormatThisUserSaveData"},
  338. {0x08100200, nullptr, "CreateSystemSaveData"},
  339. {0x08110040, nullptr, "DeleteSystemSaveData"},
  340. {0x08120080, nullptr, "GetFreeBytes"},
  341. {0x08130000, nullptr, "GetCardType"},
  342. {0x08140000, nullptr, "GetSdmcArchiveResource"},
  343. {0x08150000, nullptr, "GetNandArchiveResource"},
  344. {0x08160000, nullptr, "GetSdmcFatfsErro"},
  345. {0x08170000, IsSdmcDetected, "IsSdmcDetected"},
  346. {0x08180000, nullptr, "IsSdmcWritable"},
  347. {0x08190042, nullptr, "GetSdmcCid"},
  348. {0x081A0042, nullptr, "GetNandCid"},
  349. {0x081B0000, nullptr, "GetSdmcSpeedInfo"},
  350. {0x081C0000, nullptr, "GetNandSpeedInfo"},
  351. {0x081D0042, nullptr, "GetSdmcLog"},
  352. {0x081E0042, nullptr, "GetNandLog"},
  353. {0x081F0000, nullptr, "ClearSdmcLog"},
  354. {0x08200000, nullptr, "ClearNandLog"},
  355. {0x08210000, nullptr, "CardSlotIsInserted"},
  356. {0x08220000, nullptr, "CardSlotPowerOn"},
  357. {0x08230000, nullptr, "CardSlotPowerOff"},
  358. {0x08240000, nullptr, "CardSlotGetCardIFPowerStatus"},
  359. {0x08250040, nullptr, "CardNorDirectCommand"},
  360. {0x08260080, nullptr, "CardNorDirectCommandWithAddress"},
  361. {0x08270082, nullptr, "CardNorDirectRead"},
  362. {0x082800C2, nullptr, "CardNorDirectReadWithAddress"},
  363. {0x08290082, nullptr, "CardNorDirectWrite"},
  364. {0x082A00C2, nullptr, "CardNorDirectWriteWithAddress"},
  365. {0x082B00C2, nullptr, "CardNorDirectRead_4xIO"},
  366. {0x082C0082, nullptr, "CardNorDirectCpuWriteWithoutVerify"},
  367. {0x082D0040, nullptr, "CardNorDirectSectorEraseWithoutVerify"},
  368. {0x082E0040, nullptr, "GetProductInfo"},
  369. {0x082F0040, nullptr, "GetProgramLaunchInfo"},
  370. {0x08300182, nullptr, "CreateExtSaveData"},
  371. {0x08310180, nullptr, "CreateSharedExtSaveData"},
  372. {0x08320102, nullptr, "ReadExtSaveDataIcon"},
  373. {0x08330082, nullptr, "EnumerateExtSaveData"},
  374. {0x08340082, nullptr, "EnumerateSharedExtSaveData"},
  375. {0x08350080, nullptr, "DeleteExtSaveData"},
  376. {0x08360080, nullptr, "DeleteSharedExtSaveData"},
  377. {0x08370040, nullptr, "SetCardSpiBaudRate"},
  378. {0x08380040, nullptr, "SetCardSpiBusMode"},
  379. {0x08390000, nullptr, "SendInitializeInfoTo9"},
  380. {0x083A0100, nullptr, "GetSpecialContentIndex"},
  381. {0x083B00C2, nullptr, "GetLegacyRomHeader"},
  382. {0x083C00C2, nullptr, "GetLegacyBannerData"},
  383. {0x083D0100, nullptr, "CheckAuthorityToAccessExtSaveData"},
  384. {0x083E00C2, nullptr, "QueryTotalQuotaSize"},
  385. {0x083F00C0, nullptr, "GetExtDataBlockSize"},
  386. {0x08400040, nullptr, "AbnegateAccessRight"},
  387. {0x08410000, nullptr, "DeleteSdmcRoot"},
  388. {0x08420040, nullptr, "DeleteAllExtSaveDataOnNand"},
  389. {0x08430000, nullptr, "InitializeCtrFileSystem"},
  390. {0x08440000, nullptr, "CreateSeed"},
  391. {0x084500C2, nullptr, "GetFormatInfo"},
  392. {0x08460102, nullptr, "GetLegacyRomHeader2"},
  393. {0x08470180, nullptr, "FormatCtrCardUserSaveData"},
  394. {0x08480042, nullptr, "GetSdmcCtrRootPath"},
  395. {0x08490040, nullptr, "GetArchiveResource"},
  396. {0x084A0002, nullptr, "ExportIntegrityVerificationSeed"},
  397. {0x084B0002, nullptr, "ImportIntegrityVerificationSeed"},
  398. {0x084C0242, nullptr, "FormatSaveData"},
  399. {0x084D0102, nullptr, "GetLegacySubBannerData"},
  400. {0x084E0342, nullptr, "UpdateSha256Context"},
  401. {0x084F0102, nullptr, "ReadSpecialFile"},
  402. {0x08500040, nullptr, "GetSpecialFileSize"},
  403. {0x08580000, nullptr, "GetMovableSedHashedKeyYRandomData"},
  404. {0x08610042, nullptr, "InitializeWithSdkVersion"},
  405. {0x08620040, nullptr, "SetPriority"},
  406. {0x08630000, nullptr, "GetPriority"},
  407. };
  408. ////////////////////////////////////////////////////////////////////////////////////////////////////
  409. // Interface class
  410. Interface::Interface() {
  411. Register(FunctionTable, ARRAY_SIZE(FunctionTable));
  412. }
  413. Interface::~Interface() {
  414. }
  415. } // namespace