Yann Gautier | 35527fb | 2023-06-14 10:40:59 +0200 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2023, STMicroelectronics - All Rights Reserved |
| 3 | * |
| 4 | * SPDX-License-Identifier: BSD-3-Clause |
| 5 | */ |
| 6 | |
| 7 | #include <asm_macros.S> |
| 8 | |
| 9 | #include <platform_def.h> |
| 10 | |
| 11 | .globl platform_mem_init |
| 12 | .globl plat_secondary_cold_boot_setup |
| 13 | .globl plat_is_my_cpu_primary |
| 14 | .globl plat_crash_console_init |
| 15 | .globl plat_crash_console_flush |
| 16 | .globl plat_crash_console_putc |
| 17 | |
| 18 | func platform_mem_init |
| 19 | /* Nothing to do, don't need to init SYSRAM */ |
| 20 | ret |
| 21 | endfunc platform_mem_init |
| 22 | |
| 23 | /* --------------------------------------------- |
| 24 | * void plat_secondary_cold_boot_setup (void); |
| 25 | * |
| 26 | * Set secondary core in WFI waiting for core reset. |
| 27 | * --------------------------------------------- |
| 28 | */ |
| 29 | func plat_secondary_cold_boot_setup |
| 30 | dsb sy |
| 31 | wfi |
| 32 | /* This shouldn't be reached */ |
| 33 | b . |
| 34 | endfunc plat_secondary_cold_boot_setup |
| 35 | |
| 36 | /* ---------------------------------------------- |
| 37 | * unsigned int plat_is_my_cpu_primary(void); |
| 38 | * This function checks if this is the primary CPU |
| 39 | * ---------------------------------------------- |
| 40 | */ |
| 41 | func plat_is_my_cpu_primary |
| 42 | mrs x0, mpidr_el1 |
| 43 | and x0, x0, #(MPIDR_CPU_MASK) |
| 44 | cmp x0, #STM32MP_PRIMARY_CPU |
| 45 | cset x0, eq |
| 46 | ret |
| 47 | endfunc plat_is_my_cpu_primary |
| 48 | |
| 49 | /* --------------------------------------------- |
| 50 | * int plat_crash_console_init(void) |
| 51 | * |
| 52 | * Initialize the crash console without a C Runtime stack. |
| 53 | * --------------------------------------------- |
| 54 | */ |
| 55 | func plat_crash_console_init |
| 56 | endfunc plat_crash_console_init |
| 57 | |
| 58 | func plat_crash_console_flush |
| 59 | endfunc plat_crash_console_flush |
| 60 | |
| 61 | func plat_crash_console_putc |
| 62 | endfunc plat_crash_console_putc |
| 63 | |