Tony Xie | f6118cc | 2016-01-15 17:17:32 +0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2016, ARM Limited and Contributors. All rights reserved. |
| 3 | * |
dp-arm | fa3cf0b | 2017-05-03 09:38:09 +0100 | [diff] [blame] | 4 | * SPDX-License-Identifier: BSD-3-Clause |
Tony Xie | f6118cc | 2016-01-15 17:17:32 +0800 | [diff] [blame] | 5 | */ |
| 6 | |
| 7 | #include <arch.h> |
| 8 | #include <asm_macros.S> |
| 9 | #include <platform_def.h> |
Tony Xie | f6118cc | 2016-01-15 17:17:32 +0800 | [diff] [blame] | 10 | |
Lin Huang | 30e4339 | 2017-05-04 16:02:45 +0800 | [diff] [blame] | 11 | .globl pmu_cpuson_entrypoint |
| 12 | .macro pmusram_entry_func _name |
| 13 | .section .pmusram.entry, "ax" |
| 14 | .type \_name, %function |
| 15 | .func \_name |
| 16 | .cfi_startproc |
| 17 | \_name: |
| 18 | .endm |
Tony Xie | f6118cc | 2016-01-15 17:17:32 +0800 | [diff] [blame] | 19 | |
Lin Huang | 30e4339 | 2017-05-04 16:02:45 +0800 | [diff] [blame] | 20 | pmusram_entry_func pmu_cpuson_entrypoint |
| 21 | |
| 22 | #if PSRAM_DO_DDR_RESUME |
Tony Xie | f6118cc | 2016-01-15 17:17:32 +0800 | [diff] [blame] | 23 | ddr_resume: |
Lin Huang | 30e4339 | 2017-05-04 16:02:45 +0800 | [diff] [blame] | 24 | ldr x2, =__bl31_sram_stack_end |
| 25 | mov sp, x2 |
| 26 | bl dmc_restore |
| 27 | #endif |
Tony Xie | f6118cc | 2016-01-15 17:17:32 +0800 | [diff] [blame] | 28 | |
Lin Huang | 30e4339 | 2017-05-04 16:02:45 +0800 | [diff] [blame] | 29 | sys_resume: |
| 30 | bl psci_entrypoint |
Tony Xie | f6118cc | 2016-01-15 17:17:32 +0800 | [diff] [blame] | 31 | endfunc pmu_cpuson_entrypoint |