Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 367
edf_schedule: reimplement the whole EDF scheduler#1710
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
a757666d3b4d4ad2fc3ed6da32e0fa4e495File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -38,14 +38,6 @@ config HOST_PTABLE | ||
| bool | ||
| default n | ||
| config TASK_HAVE_PRIORITY_MEDIUM | ||
tlauda marked this conversation as resolved.
Outdated
Uh oh!There was an error while loading. Please reload this page. | ||
| bool | ||
| default n | ||
| config TASK_HAVE_PRIORITY_LOW | ||
| bool | ||
| default n | ||
| config BOOT_LOADER | ||
| bool | ||
| default n | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -3,75 +3,59 @@ | ||
| * Copyright(c) 2017 Intel Corporation. All rights reserved. | ||
| * | ||
| * Author: Liam Girdwood <liam.r.girdwood@linux.intel.com> | ||
| * Tomasz Lauda <tomasz.lauda@linux.intel.com> | ||
| */ | ||
tlauda marked this conversation as resolved.
Outdated
Uh oh!There was an error while loading. Please reload this page. | ||
| /** | ||
| * \file arch/xtensa/include/arch/schedule/task.h | ||
| * \brief Arch task header file | ||
| * \authors Liam Girdwood <liam.r.girdwood@linux.intel.com> | ||
| * Tomasz Lauda <tomasz.lauda@linux.intel.com> | ||
| */ | ||
| #ifdef __SOF_SCHEDULE_TASK_H__ | ||
| #ifndef __ARCH_SCHEDULE_TASK_H__ | ||
| #define __ARCH_SCHEDULE_TASK_H__ | ||
| #include <sof/list.h> | ||
| #include <config.h> | ||
| /** \brief IRQ task data. */ | ||
| struct irq_task { | ||
| struct list_item list; /**< list of tasks */ | ||
| int irq; /**< IRQ level */ | ||
| }; | ||
| struct sof; | ||
| struct task; | ||
| #if CONFIG_SMP | ||
| /** | ||
| * \brief Starts slave core main task. | ||
| * \param[in,out] sof Main context. | ||
| * \return Error code. | ||
| */ | ||
| int do_task_slave_core(struct sof *sof); | ||
| #endif | ||
| /** | ||
| * \brief Returns IRQ low task data. | ||
| * \return Pointer to pointer of IRQ low task data. | ||
| * \brief Returns main task data. | ||
| * \return Pointer to pointer of main task data. | ||
| */ | ||
| struct irq_task **task_irq_low_get(void); | ||
| struct task **task_main_get(void); | ||
| /** | ||
| * \brief Returns IRQ medium task data. | ||
| * \return Pointer to pointer of IRQ medium task data. | ||
| * \brief Returns current system context. | ||
| */ | ||
| struct irq_task **task_irq_med_get(void); | ||
| volatile void *task_context_get(void); | ||
| /** | ||
| * \brief Returns IRQ high task data. | ||
| * \return Pointer to pointer of IRQ high task data. | ||
| * \brief Switches system context. | ||
| * \param[in,out] task Task context to be set. | ||
| */ | ||
| struct irq_task **task_irq_high_get(void); | ||
| void task_context_set(void *task_ctx); | ||
| /** | ||
| * \brief Runs task. | ||
| * \param[in,out] task Task data. | ||
| * \brief Initializes task context. | ||
| * \param[in,out] task Task with context to be initialized. | ||
| * \param[in,out] entry Entry point for task execution. | ||
| */ | ||
| int arch_run_task(struct task *task); | ||
| int task_context_init(struct task *task, void *entry); | ||
| /** | ||
| * \brief Allocates IRQ tasks. | ||
| * \brief Frees task context. | ||
| * \param[in,out] task Task with context to be freed. | ||
| */ | ||
| int arch_allocate_tasks(void); | ||
| void task_context_free(struct task *task); | ||
| /** | ||
| * \brief Frees IRQ tasks. | ||
| * \brief Performs cache operation on task's context. | ||
| * \param[in,out] task_ctx Context to be wtb/inv. | ||
| * \param[in] cmd Cache operation to be performed. | ||
| */ | ||
| void arch_free_tasks(void); | ||
| void task_context_cache(void *task_ctx, int cmd); | ||
| #endif /* __ARCH_SCHEDULE_TASK_H__ */ | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -11,6 +11,10 @@ | ||
| #ifndef __ARCH_SOF_H__ | ||
| #define __ARCH_SOF_H__ | ||
| #include <sof/schedule/task.h> | ||
| #include <xtensa/xtruntime-frames.h> | ||
| #include <stdint.h> | ||
| /* entry point to main firmware */ | ||
| void _ResetVector(void); | ||
| @@ -28,6 +32,20 @@ static inline void *arch_get_stack_ptr(void) | ||
| return ptr; | ||
| } | ||
| static inline void *arch_get_stack_entry(void) | ||
| { | ||
| volatile xtos_task_context *task_ctx = task_context_get(); | ||
tlauda marked this conversation as resolved.
Outdated
Uh oh!There was an error while loading. Please reload this page. | ||
| return task_ctx->stack_base; | ||
| } | ||
| static inline uint32_t arch_get_stack_size(void) | ||
| { | ||
| volatile xtos_task_context *task_ctx = task_context_get(); | ||
| return task_ctx->stack_size; | ||
| } | ||
| #endif /* __ARCH_SOF_H__ */ | ||
| #else | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -136,16 +136,30 @@ STRUCT_END(UserFrame) | ||
| * | ||
| * To access the core specific structure from ASM (after threadptr is set): | ||
| * xtos_addr_percore a13, xtos_interrupt_table | ||
| * | ||
| * Access to the core specific structure from C is not supported! | ||
| */ | ||
| STRUCT_BEGIN | ||
| STRUCT_FIELD(void*,4,XTOS_PTR_TO_,xtos_enabled) | ||
| STRUCT_FIELD(void*,4,XTOS_PTR_TO_,xtos_intstruct) | ||
| STRUCT_FIELD(void*,4,XTOS_PTR_TO_,xtos_interrupt_table) | ||
| STRUCT_FIELD(void*,4,XTOS_PTR_TO_,xtos_interrupt_mask_table) | ||
| STRUCT_FIELD(void*,4,XTOS_PTR_TO_,xtos_stack_for_interrupt_1) | ||
tlauda marked this conversation as resolved.
Outdated
Uh oh!There was an error while loading. Please reload this page. | ||
| STRUCT_FIELD(void*,4,XTOS_PTR_TO_,xtos_stack_for_interrupt_2) | ||
| STRUCT_FIELD(void*,4,XTOS_PTR_TO_,xtos_stack_for_interrupt_3) | ||
| STRUCT_FIELD(void*,4,XTOS_PTR_TO_,xtos_stack_for_interrupt_4) | ||
| STRUCT_FIELD(void*,4,XTOS_PTR_TO_,xtos_stack_for_interrupt_5) | ||
| STRUCT_FIELD(void*,4,XTOS_PTR_TO_,xtos_saved_sp) | ||
| STRUCT_END(xtos_structures_pointers) | ||
| /* | ||
| * xtos_task_context contains information about currently | ||
| * executed task | ||
| */ | ||
| STRUCT_BEGIN | ||
| STRUCT_FIELD (UserFrame*,4,TC_,stack_pointer) | ||
| STRUCT_FIELD (void*,4,TC_,stack_base) | ||
| STRUCT_FIELD (long,4,TC_,stack_size) | ||
| STRUCT_END(xtos_task_context) | ||
| #if defined(_ASMLANGUAGE) || defined(__ASSEMBLER__) | ||
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.