Changeset 36df4109 in mainline for kernel/arch/arm32/src/arm32.c


Ignore:
Timestamp:
2016-06-06T16:29:56Z (9 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
7510326
Parents:
7f0580d
Message:

Introduce architecure-specific operations

This replaces the arch_*_init() functions with an arch_ops_t structure
defined for each architecture. Undefined operations are treated as NOPs.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/arm32/src/arm32.c

    r7f0580d r36df4109  
    3535
    3636#include <arch.h>
     37#include <arch/arch.h>
    3738#include <config.h>
    3839#include <genarch/fb/fb.h>
     
    5152#include <sysinfo/sysinfo.h>
    5253
     54static void arm32_pre_mm_init(void);
     55static void arm32_post_mm_init(void);
     56static void arm32_post_smp_init(void);
     57
     58arch_ops_t arm32_ops = {
     59        .pre_mm_init = arm32_pre_mm_init,
     60        .post_mm_init = arm32_post_mm_init,
     61        .post_smp_init = arm32_post_smp_init,
     62};
     63
     64arch_ops_t *arch_ops = &arm32_ops;
     65
     66
    5367/** Performs arm32-specific initialization before main_bsp() is called. */
    54 void arch_pre_main(void *entry __attribute__((unused)), bootinfo_t *bootinfo)
     68void arm32_pre_main(void *entry __attribute__((unused)), bootinfo_t *bootinfo)
    5569{
    5670        init.cnt = min3(bootinfo->cnt, TASKMAP_MAX_RECORDS, CONFIG_INIT_TASKS);
     
    6983
    7084/** Performs arm32 specific initialization before mm is initialized. */
    71 void arch_pre_mm_init(void)
     85void arm32_pre_mm_init(void)
    7286{
    7387        /* It is not assumed by default */
     
    7690
    7791/** Performs arm32 specific initialization afterr mm is initialized. */
    78 void arch_post_mm_init(void)
     92void arm32_post_mm_init(void)
    7993{
    8094        machine_init();
     
    90104}
    91105
    92 /** Performs arm32 specific tasks needed after cpu is initialized.
    93  *
    94  * Currently the function is empty.
    95  */
    96 void arch_post_cpu_init(void)
    97 {
    98 }
    99 
    100 
    101 /** Performs arm32 specific tasks needed before the multiprocessing is
    102  * initialized.
    103  *
    104  * Currently the function is empty because SMP is not supported.
    105  */
    106 void arch_pre_smp_init(void)
    107 {
    108 }
    109 
    110 
    111106/** Performs arm32 specific tasks needed after the multiprocessing is
    112107 * initialized.
     
    114109 * Currently the function is empty because SMP is not supported.
    115110 */
    116 void arch_post_smp_init(void)
     111void arm32_post_smp_init(void)
    117112{
    118113        machine_input_init();
Note: See TracChangeset for help on using the changeset viewer.