1 /*************************************************************************** 2 * Copyright (c) 2024 Microsoft Corporation 3 * 4 * This program and the accompanying materials are made available under the 5 * terms of the MIT License which is available at 6 * https://opensource.org/licenses/MIT. 7 * 8 * SPDX-License-Identifier: MIT 9 **************************************************************************/ 10 11 12 /**************************************************************************/ 13 /**************************************************************************/ 14 /** */ 15 /** ThreadX Component */ 16 /** */ 17 /** Initialize */ 18 /** */ 19 /**************************************************************************/ 20 /**************************************************************************/ 21 22 23 /**************************************************************************/ 24 /* */ 25 /* COMPONENT DEFINITION RELEASE */ 26 /* */ 27 /* tx_initialize.h PORTABLE C */ 28 /* 6.1 */ 29 /* AUTHOR */ 30 /* */ 31 /* William E. Lamie, Microsoft Corporation */ 32 /* */ 33 /* DESCRIPTION */ 34 /* */ 35 /* This file defines the ThreadX initialization component, including */ 36 /* data types and external references. It is assumed that tx_api.h */ 37 /* and tx_port.h have already been included. */ 38 /* */ 39 /* RELEASE HISTORY */ 40 /* */ 41 /* DATE NAME DESCRIPTION */ 42 /* */ 43 /* 05-19-2020 William E. Lamie Initial Version 6.0 */ 44 /* 09-30-2020 Yuxin Zhou Modified comment(s), */ 45 /* resulting in version 6.1 */ 46 /* */ 47 /**************************************************************************/ 48 49 #ifndef TX_INITIALIZE_H 50 #define TX_INITIALIZE_H 51 52 53 /* Define constants that indicate initialization is in progress. */ 54 55 #define TX_INITIALIZE_IN_PROGRESS ((ULONG) 0xF0F0F0F0UL) 56 #define TX_INITIALIZE_ALMOST_DONE ((ULONG) 0xF0F0F0F1UL) 57 #define TX_INITIALIZE_IS_FINISHED ((ULONG) 0x00000000UL) 58 59 60 /* Define internal initialization function prototypes. */ 61 62 VOID _tx_initialize_high_level(VOID); 63 VOID _tx_initialize_kernel_setup(VOID); 64 VOID _tx_initialize_low_level(VOID); 65 66 67 /* Define the macro for adding additional port-specific global data. This macro is defined 68 as white space, unless defined by tx_port.h. */ 69 70 #ifndef TX_PORT_SPECIFIC_DATA 71 #define TX_PORT_SPECIFIC_DATA 72 #endif 73 74 75 /* Define the macro for adding additional port-specific pre and post initialization processing. 76 These macros is defined as white space, unless defined by tx_port.h. */ 77 78 #ifndef TX_PORT_SPECIFIC_PRE_INITIALIZATION 79 #define TX_PORT_SPECIFIC_PRE_INITIALIZATION 80 #endif 81 82 #ifndef TX_PORT_SPECIFIC_POST_INITIALIZATION 83 #define TX_PORT_SPECIFIC_POST_INITIALIZATION 84 #endif 85 86 #ifndef TX_PORT_SPECIFIC_PRE_SCHEDULER_INITIALIZATION 87 #define TX_PORT_SPECIFIC_PRE_SCHEDULER_INITIALIZATION 88 #endif 89 90 91 /* Initialization component data declarations follow. */ 92 93 /* Determine if the initialization function of this component is including 94 this file. If so, make the data definitions really happen. Otherwise, 95 make them extern so other functions in the component can access them. */ 96 97 #ifdef TX_INITIALIZE_INIT 98 #define INITIALIZE_DECLARE 99 #else 100 #define INITIALIZE_DECLARE extern 101 #endif 102 103 104 /* Define the unused memory pointer. The value of the first available 105 memory address is placed in this variable in the low-level 106 initialization function. The content of this variable is passed 107 to the application's system definition function. */ 108 109 INITIALIZE_DECLARE VOID *_tx_initialize_unused_memory; 110 111 112 #endif 113