0001
0002
0003
0004
0005
0006
0007
0008
0009 #include <asm/asm-offsets.h>
0010 #include <asm/regdef.h>
0011 #include <asm/asm.h>
0012
0013 .text
0014 LEAF(swsusp_arch_suspend)
0015 PTR_LA t0, saved_regs
0016 PTR_S ra, PT_R31(t0)
0017 PTR_S sp, PT_R29(t0)
0018 PTR_S fp, PT_R30(t0)
0019 PTR_S gp, PT_R28(t0)
0020 PTR_S s0, PT_R16(t0)
0021 PTR_S s1, PT_R17(t0)
0022 PTR_S s2, PT_R18(t0)
0023 PTR_S s3, PT_R19(t0)
0024 PTR_S s4, PT_R20(t0)
0025 PTR_S s5, PT_R21(t0)
0026 PTR_S s6, PT_R22(t0)
0027 PTR_S s7, PT_R23(t0)
0028 j swsusp_save
0029 END(swsusp_arch_suspend)
0030
0031 LEAF(restore_image)
0032 PTR_L t0, restore_pblist
0033 0:
0034 PTR_L t1, PBE_ADDRESS(t0)
0035 PTR_L t2, PBE_ORIG_ADDRESS(t0)
0036 PTR_ADDU t3, t1, _PAGE_SIZE
0037 1:
0038 REG_L t8, (t1)
0039 REG_S t8, (t2)
0040 PTR_ADDIU t1, t1, SZREG
0041 PTR_ADDIU t2, t2, SZREG
0042 bne t1, t3, 1b
0043 PTR_L t0, PBE_NEXT(t0)
0044 bnez t0, 0b
0045 PTR_LA t0, saved_regs
0046 PTR_L ra, PT_R31(t0)
0047 PTR_L sp, PT_R29(t0)
0048 PTR_L fp, PT_R30(t0)
0049 PTR_L gp, PT_R28(t0)
0050 PTR_L s0, PT_R16(t0)
0051 PTR_L s1, PT_R17(t0)
0052 PTR_L s2, PT_R18(t0)
0053 PTR_L s3, PT_R19(t0)
0054 PTR_L s4, PT_R20(t0)
0055 PTR_L s5, PT_R21(t0)
0056 PTR_L s6, PT_R22(t0)
0057 PTR_L s7, PT_R23(t0)
0058 PTR_LI v0, 0x0
0059 jr ra
0060 END(restore_image)