LCOV - code coverage report
Current view: top level - zephyr/platform - hooks.h Coverage Total Hit
Test: new.info Lines: 12.5 % 8 1
Test Date: 2025-09-25 19:22:35

            Line data    Source code
       1            1 : /*
       2              :  * Copyright (c) 2024 Intel Corporation
       3              :  *
       4              :  * SPDX-License-Identifier: Apache-2.0
       5              :  */
       6              : #ifndef ZEPHYR_INCLUDE_PLATFORM_PLATFORM_H_
       7              : #define ZEPHYR_INCLUDE_PLATFORM_PLATFORM_H_
       8              : 
       9              : /**
      10              :  * @file
      11              :  * @brief Soc and Board hooks
      12              :  *
      13              :  * This header file contains function prototypes for the interfaces between
      14              :  * zephyr architecture and initialization code and the SoC and board specific logic
      15              :  * that resides under boards/ and soc/
      16              :  *
      17              :  * @note These are all standard soc and board interfaces that are exported from
      18              :  * soc and board specific logic to OS internal logic.  These should never be accessed
      19              :  * directly from application code but may be freely used within the OS.
      20              :  */
      21              : 
      22              : 
      23              : #ifdef CONFIG_SOC_RESET_HOOK
      24              : /**
      25              :  * @brief SoC  hook executed at the beginning of the reset vector.
      26              :  *
      27              :  * This hook is implemented by the SoC and can be used to perform any
      28              :  * SoC-specific initialization.
      29              :  */
      30              : void soc_reset_hook(void);
      31              : #else
      32            0 : #define soc_reset_hook() do { } while (0)
      33              : #endif
      34              : 
      35              : #ifdef CONFIG_SOC_PREP_HOOK
      36              : /**
      37              :  * @brief SoC hook executed after the reset vector.
      38              :  *
      39              :  * This hook is implemented by the SoC and can be used to perform any
      40              :  * SoC-specific initialization.
      41              :  */
      42              : void soc_prep_hook(void);
      43              : #else
      44            0 : #define soc_prep_hook() do { } while (0)
      45              : #endif
      46              : 
      47              : #ifdef CONFIG_SOC_EARLY_INIT_HOOK
      48              : /**
      49              :  * @brief SoC hook executed before the kernel and devices are initialized.
      50              :  *
      51              :  * This hook is implemented by the SoC and can be used to perform any
      52              :  * SoC-specific initialization.
      53              :  */
      54              : void soc_early_init_hook(void);
      55              : #else
      56            0 : #define soc_early_init_hook() do { } while (0)
      57              : #endif
      58              : 
      59              : #ifdef CONFIG_SOC_LATE_INIT_HOOK
      60              : /**
      61              :  * @brief SoC hook executed after the kernel and devices are initialized.
      62              :  *
      63              :  * This hook is implemented by the SoC and can be used to perform any
      64              :  * SoC-specific initialization.
      65              :  */
      66              : void soc_late_init_hook(void);
      67              : #else
      68            0 : #define soc_late_init_hook() do { } while (0)
      69              : #endif
      70              : 
      71              : #ifdef CONFIG_SOC_PER_CORE_INIT_HOOK
      72              : /**
      73              :  * @brief SoC per-core initialization
      74              :  *
      75              :  * This hook is implemented by the SoC and can be used to perform any
      76              :  * SoC-specific per-core initialization
      77              :  */
      78              : void soc_per_core_init_hook(void);
      79              : #else
      80            0 : #define soc_per_core_init_hook() do { } while (0)
      81              : #endif
      82              : 
      83              : #ifdef CONFIG_BOARD_EARLY_INIT_HOOK
      84              : /**
      85              :  * @brief Board hook executed before the kernel starts.
      86              :  *
      87              :  * This is called before the kernel has started. This hook
      88              :  * is implemented by the board and can be used to perform any board-specific
      89              :  * initialization.
      90              :  */
      91              : void board_early_init_hook(void);
      92              : #else
      93            0 : #define board_early_init_hook() do { } while (0)
      94              : #endif
      95              : 
      96              : #ifdef CONFIG_BOARD_LATE_INIT_HOOK
      97              : /**
      98              :  * @brief Board hook executed after the kernel starts.
      99              :  *
     100              :  * This is called after the kernel has started, but before the main function is
     101              :  * called. This hook is implemented by the board and can be used to perform
     102              :  * any board-specific initialization.
     103              :  */
     104              : void board_late_init_hook(void);
     105              : #else
     106            0 : #define board_late_init_hook() do { } while (0)
     107              : #endif
     108              : 
     109              : #endif
        

Generated by: LCOV version 2.0-1