[iQue] Match skapi.s, create bbskapi.h documenting the syscalls (#2400)

This commit is contained in:
Tharo
2025-01-04 03:58:26 +00:00
committed by GitHub
parent 4c88cfd08a
commit bd606ba038
8 changed files with 421 additions and 41 deletions
+48
View File
@@ -0,0 +1,48 @@
#ifdef BBPLAYER
#include "ultra64/asm.h"
#include "ultra64/regdef.h"
#include "ultra64/bcp.h"
.text
#define SKC(name, num) \
LEAF(name) ;\
.set noreorder ;\
/* Load syscall number into v0 */ ;\
li v0, num ;\
/* Read from MI_SECURE_EXCEPTION_REG to */ ;\
/* transfer control to the Secure Kernel */ ;\
li t0, PHYS_TO_K1(MI_SECURE_EXCEPTION_REG) ;\
lw t1, (t0) ;\
nop ;\
jr ra ;\
nop ;\
.set reorder ;\
END(name)
SKC(skGetId, 0)
SKC(skLaunchSetup, 1)
SKC(skLaunch, 2)
SKC(skRecryptListValid, 3)
SKC(skRecryptBegin, 4)
SKC(skRecryptData, 5)
SKC(skRecryptComputeState, 6)
SKC(skRecryptEnd, 7)
SKC(skSignHash, 8)
SKC(skVerifyHash, 9)
SKC(skGetConsumption, 10)
SKC(skAdvanceTicketWindow, 11)
SKC(skSetLimit, 12)
SKC(skExit, 13)
SKC(skKeepAlive, 14)
/* These are not valid for a retail Secure Kernel, their usage pattern is unknown. */
SKC(skGetRandomKeyData, 15)
SKC(skDumpVirage, 16)
SKC(skTest2, 17)
SKC(skTest3, 18)
SKC(skResetWindow, 19)
SKC(skValidateRls, 20)
#endif
+1 -4
View File
@@ -23,7 +23,4 @@ IPL_SYMBOL(osVersion, 0x80000314, 4)
IPL_SYMBOL(osMemSize, 0x80000318, 4)
IPL_SYMBOL(osAppNMIBuffer, 0x8000031C, 0x40)
.repeat 0x60/4
NOP
.endr
.space 0x60
+2 -4
View File
@@ -52,10 +52,8 @@ END(entrypoint)
#ifdef __sgi
/* IDO can't take absolute differences of symbols so the size of the above is hardcoded */
.repeat (0x60 - 0x34)
.byte 0
.endr
.space PAD_TO - 0x34
#else
/* Pad to a total size taking into account the size of the above */
.fill PAD_TO - (. - entrypoint)
.space PAD_TO - (. - entrypoint)
#endif