arch/x86: initial Intel64 support
First "complete" version of Intel64 support for x86. Compilation of apps for supported boards (read: up_squared) with CONFIG_X86_LONGMODE=y is now working. Booting, device drivers, interrupts, scheduling, etc. appear to be functioning properly. Beware that this is ALHPA quality, not ready for production use, but the port has advanced far enough that it's time to start working through the test suite and samples, fleshing out any missing features, and squashing bugs. Signed-off-by: Charles E. Youse <charles.youse@intel.com>
This commit is contained in:
parent
9b00f7821a
commit
4ddaa59a89
26 changed files with 733 additions and 117 deletions
|
@ -3,8 +3,27 @@
|
|||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
void func(void)
|
||||
#include <kernel.h>
|
||||
#include <ksched.h>
|
||||
#include <kernel_structs.h>
|
||||
#include <kernel_internal.h>
|
||||
|
||||
void z_new_thread(struct k_thread *thread, k_thread_stack_t *stack,
|
||||
size_t stack_size, k_thread_entry_t entry,
|
||||
void *parameter1, void *parameter2, void *parameter3,
|
||||
int priority, unsigned int options)
|
||||
{
|
||||
for (;;) {
|
||||
}
|
||||
Z_ASSERT_VALID_PRIO(priority, entry);
|
||||
z_new_thread_init(thread, Z_THREAD_STACK_BUFFER(stack),
|
||||
stack_size, priority, options);
|
||||
|
||||
thread->callee_saved.rsp = (long) Z_THREAD_STACK_BUFFER(stack);
|
||||
thread->callee_saved.rsp += (stack_size - 8); /* fake RIP for ABI */
|
||||
thread->callee_saved.rip = (long) z_thread_entry;
|
||||
thread->callee_saved.rflags = EFLAGS_INITIAL;
|
||||
|
||||
thread->arch.rdi = (long) entry;
|
||||
thread->arch.rsi = (long) parameter1;
|
||||
thread->arch.rdx = (long) parameter2;
|
||||
thread->arch.rcx = (long) parameter3;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue