- update core detection code and Kconfig file
- update kernel stack managment so that BSP does not use boot stack before IPI APs
- move arch dependant data to a single structure
- add cache line size to Kconfig
- add cpu indexing and apic id mapping
- boot APs to halting state
- add guard for kernel stack if there is only one core
53 lines
1.6 KiB
C
53 lines
1.6 KiB
C
/*
|
|
* Copyright 2014, General Dynamics C4 Systems
|
|
*
|
|
* This software may be distributed and modified according to the terms of
|
|
* the GNU General Public License version 2. Note that NO WARRANTY is provided.
|
|
* See "LICENSE_GPLv2.txt" for details.
|
|
*
|
|
* @TAG(GD_GPL)
|
|
*/
|
|
|
|
#ifndef __MODEL_STATEDATA_H
|
|
#define __MODEL_STATEDATA_H
|
|
|
|
#include <types.h>
|
|
#include <object/structures.h>
|
|
#include <object/tcb.h>
|
|
#include <arch/model/statedata.h>
|
|
|
|
NODE_STATE_BEGIN(nodeState)
|
|
NODE_STATE_TYPE_DECLARE(archNodeState, arch);
|
|
NODE_STATE_END(nodeState);
|
|
|
|
#include <arch/machine.h>
|
|
#include <arch/model/smp.h>
|
|
#include <mode/machine.h>
|
|
|
|
extern word_t ksNumCPUs VISIBLE;
|
|
extern tcb_queue_t ksReadyQueues[] VISIBLE;
|
|
extern word_t ksReadyQueuesL1Bitmap[CONFIG_NUM_DOMAINS] VISIBLE;
|
|
extern word_t ksReadyQueuesL2Bitmap[CONFIG_NUM_DOMAINS][(CONFIG_NUM_PRIORITIES / wordBits) + 1] VISIBLE;
|
|
extern tcb_t *ksCurThread VISIBLE;
|
|
extern tcb_t *ksIdleThread VISIBLE;
|
|
extern tcb_t *ksSchedulerAction VISIBLE;
|
|
extern word_t ksWorkUnitsCompleted;
|
|
extern irq_state_t intStateIRQTable[] VISIBLE;
|
|
extern cte_t *intStateIRQNode VISIBLE;
|
|
extern const dschedule_t ksDomSchedule[];
|
|
extern const word_t ksDomScheduleLength;
|
|
extern word_t ksDomScheduleIdx;
|
|
extern dom_t ksCurDomain;
|
|
extern word_t ksDomainTime;
|
|
extern word_t tlbLockCount VISIBLE;
|
|
|
|
#ifdef CONFIG_BENCHMARK_USE_KERNEL_LOG_BUFFER
|
|
extern paddr_t ksUserLogBuffer;
|
|
#endif /* CONFIG_BENCHMARK_USE_KERNEL_LOG_BUFFER */
|
|
|
|
#define SchedulerAction_ResumeCurrentThread ((tcb_t*)0)
|
|
#define SchedulerAction_ChooseNewThread ((tcb_t*)~0)
|
|
|
|
#define NUM_READY_QUEUES (CONFIG_NUM_DOMAINS * CONFIG_NUM_PRIORITIES)
|
|
|
|
#endif
|