# RGLoader patches file
# Patches follow same format as freeBOOT:
# [4byte offset] [4byte patch count] [4byte patch]...

# Retail 13599 patches

.set	KernelBase,		0x80000000

		.globl _start
_start:

# ============================================================================
#	RGLP header
# ============================================================================
	.long 0x52474C50

# ============================================================================
#	KV signature check
# ============================================================================
	.long 0x80006AFC - KernelBase
	.long (9f - 0f) / 4
0:
	.long 0x38600001
9:

# ============================================================================
#	XEX RSA check (HV side)
# ============================================================================
	.long 0x80020694 - KernelBase
	.long (9f - 0f) / 4
0:
	.long 0x38600001 # li r3, 1
9:

# ============================================================================
#	XEX region check
# ============================================================================
	.long 0x8002C0B8 - KernelBase
	.long (9f - 0f) / 4
0:
	.long 0x60000000 # nop
9:

# ============================================================================
#	can't remember what this done
# ============================================================================
	.long 0x800967B8 - KernelBase
	.long (9f - 0f) / 4
0:
	.long 0x38600001 # li r3, 1
9:

# ============================================================================
#	StfsMapNewBlock hash mismatch
# ============================================================================
	.long 0x800B13C8 - KernelBase
	.long (9f - 0f) / 4
0:
	.long 0x4800001C # b 0x1C
9:

# ============================================================================
#	StfsNonCachedRead hash mismatch
# ============================================================================
	.long 0x800D3608 - KernelBase
	.long (9f - 0f) / 4
0:
	.long 0x60000000 # nop
9:

# ============================================================================
#	can't remember what this done
# ============================================================================
	.long 0x800DAC38 - KernelBase
	.long (9f - 0f) / 4
0:
	.long 0x38600001 # li r3, 1
9:

# ============================================================================
#	can't remember what this done
# ============================================================================
	.long 0x800DAC40 - KernelBase
	.long (9f - 0f) / 4
0:
	.long 0x38600001 # li r3, 1
9:

# ============================================================================
#	XeKeysVerifyRSASignature
# ============================================================================
	.long 0x80106E70 - KernelBase
	.long (9f - 0f) / 4
0:
	.long 0x60000000 # nop
9:

# ============================================================================
#	XeKeysVerifyRSASignature
# ============================================================================
	.long 0x80106EA4 - KernelBase
	.long (9f - 0f) / 4
0:
	.long 0x38600001 # li r3, 1
9:

# ============================================================================
#	XeKeysVerifyPIRSSignature
# ============================================================================
	.long 0x80106F44 - KernelBase
	.long (9f - 0f) / 4
0:
	.long 0x38600001 # li r3, 1
9:

# ============================================================================
#	XeKeysConsoleSignatureVerification
# ============================================================================
	.long 0x80108FFC - KernelBase
	.long (9f - 0f) / 4
0:
	.long 0x4800014C # b 0x14C
9:

# ============================================================================
#	SvodMapNewBlock hash mismatch
# ============================================================================
	.long 0x80136820 - KernelBase
	.long (9f - 0f) / 4
0:
	.long 0x48000018 # b 0x18
9:

# ============================================================================
#	SvodPartiallyCachedRead hash mismatch
# ============================================================================
	.long 0x80136C04 - KernelBase
	.long (9f - 0f) / 4
0:
	.long 0x60000000 # nop
9:

# ============================================================================
#	SATA/USB signature check
# ============================================================================
	.long 0x8014B290 - KernelBase
	.long (9f - 0f) / 4
0:
	.long 0x38600001 # li r3, 1
9:

# ============================================================================
	.long 0xffffffff
	.end
# ============================================================================
