text
stringlengths
9
39.2M
dir
stringlengths
25
226
lang
stringclasses
163 values
created_date
timestamp[s]
updated_date
timestamp[s]
repo_name
stringclasses
751 values
repo_full_name
stringclasses
752 values
star
int64
1.01k
183k
len_tokens
int64
1
18.5M
```unknown config RISCV_ISA_RV32I bool help RV32I Base Integer Instruction Set - 32bit config RISCV_ISA_RV32E bool help RV32E Base Integer Instruction Set (Embedded) - 32bit config RISCV_ISA_RV64I bool default y if 64BIT help RV64I Base Integer Instruction Set - 64bit config RISCV_ISA_RV128I bool ...
/content/code_sandbox/arch/riscv/Kconfig.isa
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
1,080
```c /* * */ #include <zephyr/device.h> #include <zephyr/init.h> #include <zephyr/kernel.h> #include <kernel_arch_func.h> #include <zephyr/arch/arm64/mm.h> #include <zephyr/linker/linker-defs.h> #include <zephyr/logging/log.h> #include <zephyr/sys/check.h> #include <zephyr/sys/barrier.h> #include <zephyr/cache.h> #i...
/content/code_sandbox/arch/arm64/core/cortex_r/arm_mpu.c
c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
6,059
```unknown menu "RISCV Options" depends on RISCV config ARCH string default "riscv" config FLOAT_HARD bool "Hard-float calling convention" default y depends on FPU help This option enables the hard-float calling convention. config RISCV_GP bool "RISC-V global pointer relative addressing" default n help...
/content/code_sandbox/arch/riscv/Kconfig
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
2,994
```unknown /* * */ #include <zephyr/toolchain.h> #include <zephyr/linker/sections.h> #include <zephyr/kernel.h> #include <zephyr/sys/util.h> #include <offsets_short.h> #include <zephyr/arch/cpu.h> #include "asm_macros.inc" /* Convenience macros for loading/storing register states. */ #define DO_CALLEE_SAVED(op, re...
/content/code_sandbox/arch/riscv/core/switch.S
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
810
```c /* * Written by: Nicolas Pitre * */ #include <zephyr/kernel.h> #include <zephyr/kernel_structs.h> #include <kernel_arch_interface.h> #include <zephyr/sys/atomic.h> /* to be found in fpu.S */ extern void z_riscv_fpu_save(struct z_riscv_fp_context *saved_fp_context); extern void z_riscv_fpu_restore(struct z_ris...
/content/code_sandbox/arch/riscv/core/fpu.c
c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
2,665
```c /* * */ #include <zephyr/kernel.h> #include <ksched.h> #include <zephyr/arch/riscv/csr.h> #include <stdio.h> #include <pmp.h> #ifdef CONFIG_USERSPACE /* * Per-thread (TLS) variable indicating whether execution is in user mode. */ __thread uint8_t is_user_mode; #endif void arch_new_thread(struct k_thread *th...
/content/code_sandbox/arch/riscv/core/thread.c
c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
1,805
```c /* * */ #include <zephyr/irq_offload.h> #include <zephyr/arch/riscv/syscall.h> void arch_irq_offload(irq_offload_routine_t routine, const void *parameter) { arch_syscall_invoke2((uintptr_t)routine, (uintptr_t)parameter, RV_ECALL_IRQ_OFFLOAD); } ```
/content/code_sandbox/arch/riscv/core/irq_offload.c
c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
74
```unknown /* * */ #include <zephyr/toolchain.h> #include <zephyr/linker/sections.h> #include <zephyr/arch/cpu.h> #include "asm_macros.inc" #define CSR_PMPCFG_BASE 0x3a0 #define CSR_PMPADDR_BASE 0x3b0 /* * Prototype: * * void z_riscv_write_pmp_entries(unsigned int start, // a0 * ...
/content/code_sandbox/arch/riscv/core/pmp.S
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
843
```c /* * */ /** * @file * @brief RISC-V reboot interface */ #include <zephyr/kernel.h> #include <zephyr/arch/cpu.h> #include <zephyr/sys/util.h> /** * @brief Reset the system * * This is stub function to avoid build error with CONFIG_REBOOT=y * RISC-V specification does not have a common interface for syst...
/content/code_sandbox/arch/riscv/core/reboot.c
c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
119
```c /* * */ #include <string.h> #include <zephyr/debug/coredump.h> #ifndef CONFIG_64BIT #define ARCH_HDR_VER 1 #else #define ARCH_HDR_VER 2 #endif struct riscv_arch_block { #ifdef CONFIG_64BIT struct { uint64_t ra; uint64_t tp; uint64_t t0; uint64_t t1; uint64_t t2; uint64_t a0; uint64_t a1; uint...
/content/code_sandbox/arch/riscv/core/coredump.c
c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
858
```linker script /* * */ KEEP(*(.vectors.*)) ```
/content/code_sandbox/arch/riscv/core/vector_table.ld
linker script
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
11
```unknown /* * Written by: Nicolas Pitre * */ #include <zephyr/toolchain.h> #include <zephyr/linker/sections.h> #include <zephyr/offsets.h> #ifdef CONFIG_CPU_HAS_FPU_DOUBLE_PRECISION #define LOAD fld #define STORE fsd #else #define LOAD flw #define STORE fsw #endif #define DO_FP_REGS(op, ptr) \ op fa0, __z_ris...
/content/code_sandbox/arch/riscv/core/fpu.S
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
833
```unknown /* * */ #include <zephyr/toolchain.h> #include <zephyr/linker/sections.h> #include <offsets_short.h> #include <zephyr/arch/cpu.h> #include <zephyr/sys/util.h> #include <zephyr/kernel.h> #include <zephyr/syscall.h> #include <zephyr/arch/riscv/csr.h> #include <zephyr/arch/riscv/irq.h> #include <zephyr/arch/...
/content/code_sandbox/arch/riscv/core/isr.S
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
6,815
```unknown /* * Userspace and service handler hooks * * */ #include <zephyr/toolchain.h> #include <zephyr/linker/sections.h> #include <offsets_short.h> #include <zephyr/arch/cpu.h> #include <zephyr/syscall.h> #include <zephyr/kernel_structs.h> #include <zephyr/arch/riscv/csr.h> #include "asm_macros.inc" /* export...
/content/code_sandbox/arch/riscv/core/userspace.S
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
371
```c /* * */ /** * @file * @brief Full C support initialization * * * Initialization of full C support: zero the .bss and call z_cstart(). * * Stack is available in this module, but not the global data/bss until their * initialization is performed. */ #include <stddef.h> #include <zephyr/toolchain.h> #incl...
/content/code_sandbox/arch/riscv/core/prep_c.c
c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
182
```c /* * */ #include <zephyr/irq.h> #include <zephyr/tracing/tracing.h> #ifndef CONFIG_ARCH_HAS_CUSTOM_CPU_IDLE void arch_cpu_idle(void) { sys_trace_idle(); __asm__ volatile("wfi"); irq_unlock(MSTATUS_IEN); } #endif #ifndef CONFIG_ARCH_HAS_CUSTOM_CPU_ATOMIC_IDLE void arch_cpu_atomic_idle(unsigned int key) { s...
/content/code_sandbox/arch/riscv/core/cpu_idle.c
c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
103
```c /* * */ #include <zephyr/kernel.h> #include <zephyr/kernel_structs.h> #include <kernel_internal.h> #include <kernel_tls.h> #include <zephyr/app_memory/app_memdomain.h> #include <zephyr/sys/util.h> size_t arch_tls_stack_setup(struct k_thread *new_thread, char *stack_ptr) { /* * TLS area for RISC-V is simple ...
/content/code_sandbox/arch/riscv/core/tls.c
c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
178
```c /* * */ #include <zephyr/init.h> #include <zephyr/kernel.h> #include <ksched.h> #include <ipi.h> #include <zephyr/irq.h> #include <zephyr/sys/atomic.h> #include <zephyr/arch/riscv/irq.h> #include <zephyr/drivers/pm_cpu_ops.h> volatile struct { arch_cpustart_t fn; void *arg; } riscv_cpu_init[CONFIG_MP_MAX_NUM...
/content/code_sandbox/arch/riscv/core/smp.c
c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
1,225
```c /* * */ #include <zephyr/debug/symtab.h> #include <zephyr/kernel.h> #include <zephyr/kernel_structs.h> #include <kernel_internal.h> #include <zephyr/logging/log.h> LOG_MODULE_DECLARE(os, CONFIG_KERNEL_LOG_LEVEL); uintptr_t z_riscv_get_sp_before_exc(const struct arch_esf *esf); #define MAX_STACK_FRAMES ...
/content/code_sandbox/arch/riscv/core/stacktrace.c
c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
2,183
```c /* * Organisation (CSIRO) ABN 41 687 119 230. * */ #include <zephyr/toolchain.h> #include <zephyr/arch/common/semihost.h> /* * QEMU requires that the semihosting trap instruction sequence, consisting of * three uncompressed instructions, lie in the same page, and refuses to * interpret the trap sequence if...
/content/code_sandbox/arch/riscv/core/semihost.c
c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
296
```sourcepawn /* * Assembly macros and helpers * * */ #ifdef CONFIG_64BIT /* register-wide load/store based on ld/sd (XLEN = 64) */ .macro lr, rd, mem ld \rd, \mem .endm .macro sr, rs, mem sd \rs, \mem .endm #else /* register-wide load/store based on lw/sw (XLEN = 32) */ .macro lr, rd, mem lw \rd, \m...
/content/code_sandbox/arch/riscv/core/asm_macros.inc
sourcepawn
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
485
```unknown /* * Contributors: 2018 Antmicro <www.antmicro.com> * */ #include <zephyr/toolchain.h> #include <zephyr/linker/sections.h> #include <zephyr/arch/cpu.h> #include <zephyr/offsets.h> #include "asm_macros.inc" /* exports */ GTEXT(__initialize) GTEXT(__reset) /* imports */ GTEXT(z_prep_c) GTEXT(riscv_cpu_wa...
/content/code_sandbox/arch/riscv/core/reset.S
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
741
```c /* * */ #include <zephyr/kernel.h> #include <kernel_internal.h> #include <zephyr/logging/log.h> #include <zephyr/arch/riscv/csr.h> #include <zephyr/irq_multilevel.h> #include <zephyr/sw_isr_table.h> #ifdef CONFIG_RISCV_HAS_PLIC #include <zephyr/drivers/interrupt_controller/riscv_plic.h> #endif LOG_MODULE_DECL...
/content/code_sandbox/arch/riscv/core/irq_manage.c
c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
461
```c /* * */ #include <zephyr/kernel.h> #include <zephyr/kernel_structs.h> #include <kernel_internal.h> #include <inttypes.h> #include <zephyr/arch/common/exc_handle.h> #include <zephyr/logging/log.h> LOG_MODULE_DECLARE(os, CONFIG_KERNEL_LOG_LEVEL); #ifdef CONFIG_USERSPACE Z_EXC_DECLARE(z_riscv_user_string_nlen); ...
/content/code_sandbox/arch/riscv/core/fatal.c
c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
2,214
```c /* * */ /** * @file * @brief RISCV32 kernel structure member offset definition file * * This module is responsible for the generation of the absolute symbols whose * value represents the member offsets for various RISCV32 kernel * structures. */ #include <zephyr/arch/exception.h> #include <zephyr/kernel...
/content/code_sandbox/arch/riscv/core/offsets/offsets.c
c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
1,208
```objective-c /* * */ /** * @file * @brief Private kernel definitions * * This file contains private kernel function/macro definitions and various * other definitions for the RISCV processor architecture. */ #ifndef ZEPHYR_ARCH_RISCV_INCLUDE_KERNEL_ARCH_FUNC_H_ #define ZEPHYR_ARCH_RISCV_INCLUDE_KERNEL_ARCH_F...
/content/code_sandbox/arch/riscv/include/kernel_arch_func.h
objective-c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
810
```objective-c /* * */ /** * @file * @brief Private kernel definitions * * This file contains private kernel structures definitions and various * other definitions for the RISCV processor architecture. */ #ifndef ZEPHYR_ARCH_RISCV_INCLUDE_KERNEL_ARCH_DATA_H_ #define ZEPHYR_ARCH_RISCV_INCLUDE_KERNEL_ARCH_DATA_...
/content/code_sandbox/arch/riscv/include/kernel_arch_data.h
objective-c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
182
```objective-c /* * */ #ifndef ZEPHYR_ARCH_RISCV_INCLUDE_OFFSETS_SHORT_ARCH_H_ #define ZEPHYR_ARCH_RISCV_INCLUDE_OFFSETS_SHORT_ARCH_H_ #include <zephyr/offsets.h> #define _thread_offset_to_sp \ (___thread_t_callee_saved_OFFSET + ___callee_saved_t_sp_OFFSET) #define _thread_offset_to_ra \ (___thread_t_callee_sav...
/content/code_sandbox/arch/riscv/include/offsets_short_arch.h
objective-c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
554
```objective-c /* * */ #ifndef PMP_H_ #define PMP_H_ void z_riscv_pmp_init(void); void z_riscv_pmp_stackguard_prepare(struct k_thread *thread); void z_riscv_pmp_stackguard_enable(struct k_thread *thread); void z_riscv_pmp_stackguard_disable(void); void z_riscv_pmp_usermode_init(struct k_thread *thread); void z_risc...
/content/code_sandbox/arch/riscv/include/pmp.h
objective-c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
123
```c /* * * * Physical Memory Protection (PMP) is RISC-V parlance for an MPU. * * The PMP is comprized of a number of entries or slots. This number depends * on the hardware design. For each slot there is an address register and * a configuration register. While each address register is matched to an * actual C...
/content/code_sandbox/arch/riscv/core/pmp.c
c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
6,590
```python #!/usr/bin/env python3 # # """Generate Interrupt Descriptor Table for x86 CPUs. This script generates the interrupt descriptor table (IDT) for x86. Please consult the IA Architecture SW Developer Manual, volume 3, for more details on this data structure. This script accepts as input the zephyr_prebuilt.elf...
/content/code_sandbox/arch/x86/gen_idt.py
python
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
2,404
```python #!/usr/bin/env python3 # # """Generate a Global Descriptor Table (GDT) for x86 CPUs. For additional detail on GDT and x86 memory management, please consult the IA Architecture SW Developer Manual, vol. 3. This script accepts as input the zephyr_prebuilt.elf binary, which is a link of the Zephyr kernel with...
/content/code_sandbox/arch/x86/gen_gdt.py
python
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
1,994
```cmake zephyr_cc_option(-m64) set_property(GLOBAL PROPERTY PROPERTY_OUTPUT_ARCH "i386:x86-64") set_property(GLOBAL PROPERTY PROPERTY_OUTPUT_FORMAT "elf64-x86-64") get_property(OUTPUT_ARCH GLOBAL PROPERTY PROPERTY_OUTPUT_ARCH) get_property(OUTPUT_FORMAT GLOBAL PROPERTY PROPERTY_OUTPUT_FORMAT) if(CONFIG_X86_SSE) ...
/content/code_sandbox/arch/x86/intel64.cmake
cmake
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
314
```c /* * */ #include <zephyr/arch/x86/arch.h> #include <zephyr/kernel.h> #include <zephyr/sys_clock.h> #include <zephyr/timing/timing.h> #include <zephyr/app_memory/app_memdomain.h> K_APP_BMEM(z_libc_partition) static uint64_t tsc_freq; void arch_timing_x86_init(void) { uint32_t cyc_start, cyc_end; uint64_t tsc...
/content/code_sandbox/arch/x86/timing.c
c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
498
```cmake # Find out if we are optimizing for size get_target_property(zephyr_COMPILE_OPTIONS zephyr_interface INTERFACE_COMPILE_OPTIONS) if ("-Os" IN_LIST zephyr_COMPILE_OPTIONS) zephyr_cc_option(-mpreferred-stack-boundary=2) else() zephyr_compile_definitions(PERF_OPT) endif() set_property(GLOBAL PROPERTY PROPERT...
/content/code_sandbox/arch/x86/ia32.cmake
cmake
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
1,146
```unknown # x86 general configuration options menu "X86 Architecture Options" depends on X86 config ARCH default "x86" # # CPU Families - the SoC configuration should select the right one. # config CPU_ATOM bool select CPU_HAS_FPU select ARCH_HAS_STACK_PROTECTION if X86_MMU select ARCH_HAS_USERSPACE if X86_...
/content/code_sandbox/arch/x86/Kconfig
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
3,620
```python #!/usr/bin/env python3 # # """Create the kernel's page tables for x86 CPUs. For additional detail on paging and x86 memory management, please consult the IA Architecture SW Developer Manual, volume 3a, chapter 4. This script produces the initial page tables installed into the CPU at early boot. These pages...
/content/code_sandbox/arch/x86/gen_mmu.py
python
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
7,648
```python #!/usr/bin/env python3 import os.path import subprocess import elftools.elf.elffile import argparse ENTRY_SYM = "__start64" def verbose(msg): if args.verbose: print(msg) def build_elf(elf_file, include_dirs): base_dir = os.path.dirname(os.path.abspath(__file__)) cfile = os.path.join(b...
/content/code_sandbox/arch/x86/zefi/zefi.py
python
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
1,421
```c /* * */ #include <stdint.h> #include <stddef.h> #include <string.h> #include "efi.h" #include "printf.h" #include <zefi-segments.h> #include <zephyr/arch/x86/efi.h> #define PUTCHAR_BUFSZ 128 /* EFI GUID for RSDP * See "Finding the RSDP on UEFI Enabled Systems" in ACPI specs. */ #define ACPI_1_0_RSDP_EFI_GUID...
/content/code_sandbox/arch/x86/zefi/zefi.c
c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
2,026
```objective-c /* * */ #include <stdarg.h> #include <stdbool.h> #include <stddef.h> /* Tiny, but not-as-primitive-as-it-looks implementation of something * like s/n/printf(). Handles %d, %x, %p, %c and %s only, allows a * "l" qualifier on %d and %x (and silently ignores one %s/%c/%p). * Accepts, but ignores, fie...
/content/code_sandbox/arch/x86/zefi/printf.h
objective-c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
1,054
```linker script /* * */ ENTRY(efi_entry) SECTIONS { /* Pick a reasonable base address, EFI won't load us there anyway */ . = 0x4000000; .text : { *(.text) *(.rodata) } /* Must be a separately visible section to the EFI loader, doesn't * need to be page-aligned and can be...
/content/code_sandbox/arch/x86/zefi/efi.ld
linker script
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
302
```c /* * */ /** * @file * @brief Cache manipulation * * This module contains functions for manipulation caches. */ #include <zephyr/kernel.h> #include <zephyr/arch/cpu.h> #include <zephyr/sys/util.h> #include <zephyr/toolchain.h> #include <zephyr/cache.h> #include <stdbool.h> /* Not Write-through bit */ #defi...
/content/code_sandbox/arch/x86/core/cache.c
c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
749
```c /* */ #include <zephyr/kernel.h> #include <zephyr/tracing/tracing.h> #include <zephyr/arch/cpu.h> #ifndef CONFIG_ARCH_HAS_CUSTOM_CPU_IDLE __pinned_func void arch_cpu_idle(void) { sys_trace_idle(); __asm__ volatile ( "sti\n\t" "hlt\n\t"); } #endif #ifndef CONFIG_ARCH_HAS_CUSTOM_CPU_ATOMIC_IDLE __pin...
/content/code_sandbox/arch/x86/core/cpuhalt.c
c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
273
```objective-c /* * */ #ifndef ZEPHYR_ARCH_X86_EFI_H_ #define ZEPHYR_ARCH_X86_EFI_H_ #ifndef _ASMLANGUAGE #include <stdbool.h> #define __abi __attribute__((ms_abi)) /* * This is a quick installment of EFI structures and functions. * Only a very minimal subset will be used and documented, thus the * lack of do...
/content/code_sandbox/arch/x86/zefi/efi.h
objective-c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
4,421
```c /* * */ #include <zephyr/kernel.h> #include <zephyr/sys/device_mmio.h> #include <zephyr/sys/util.h> #include <zephyr/drivers/pcie/pcie.h> #include <soc.h> #if DT_PROP_OR(DT_CHOSEN(zephyr_console), io_mapped, 0) != 0 #define UART_IS_IOPORT_ACCESS 1 #endif #if defined(UART_IS_IOPORT_ACCESS) /* Legacy I/O Port ...
/content/code_sandbox/arch/x86/core/early_serial.c
c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
1,117
```c /* * */ #include <cpuid.h> /* Header provided by the toolchain. */ #include <zephyr/kernel_structs.h> #include <zephyr/arch/x86/cpuid.h> #include <zephyr/kernel.h> uint32_t z_x86_cpuid_extended_features(void) { uint32_t eax, ebx, ecx = 0U, edx; if (__get_cpuid(CPUID_EXTENDED_FEATURES_LVL, &eax, &ebx, &e...
/content/code_sandbox/arch/x86/core/cpuid.c
c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
361
```c /* * */ #include <zephyr/init.h> #include <zephyr/kernel.h> #include <kernel_arch_data.h> #include <kernel_arch_func.h> #include <zephyr/arch/x86/msr.h> #include <zephyr/arch/x86/cpuid.h> /* * See: * path_to_url */ #if defined(CONFIG_X86_DISABLE_SSBD) || defined(CONFIG_X86_ENABLE_EXTENDED_IBRS) static int ...
/content/code_sandbox/arch/x86/core/spec_ctrl.c
c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
299
```c /* * */ #include <zephyr/kernel.h> #include <zephyr/sys/speculation.h> #include <zephyr/internal/syscall_handler.h> #include <kernel_arch_func.h> #include <ksched.h> #include <x86_mmu.h> BUILD_ASSERT((CONFIG_PRIVILEGED_STACK_SIZE > 0) && (CONFIG_PRIVILEGED_STACK_SIZE % CONFIG_MMU_PAGE_SIZE) == 0); #ifde...
/content/code_sandbox/arch/x86/core/userspace.c
c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
1,203
```c /* * */ /** * @file x86-specific reboot functionalities * * @details Implements the required 'arch' sub-APIs. */ #include <zephyr/kernel.h> #include <zephyr/sys/reboot.h> /* reboot through Reset Control Register (I/O port 0xcf9) */ #define X86_RST_CNT_REG 0xcf9 #define X86_RST_CNT_SYS_RST 0x02 #define X8...
/content/code_sandbox/arch/x86/core/reboot_rst_cnt.c
c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
207
```c /* * */ #include <zephyr/acpi/acpi.h> #include <zephyr/dt-bindings/interrupt-controller/intel-ioapic.h> uint32_t arch_acpi_encode_irq_flags(uint8_t polarity, uint8_t trigger) { uint32_t irq_flag = IRQ_DELIVERY_LOWEST; if (trigger == ACPI_LEVEL_SENSITIVE) { irq_flag |= IRQ_TYPE_LEVEL; } else { irq_flag |...
/content/code_sandbox/arch/x86/core/x86_acpi.c
c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
148
```c /* * */ #include <zephyr/kernel.h> #include <zephyr/sys/device_mmio.h> #include <zephyr/drivers/pcie/pcie.h> #ifdef CONFIG_ACPI #include <zephyr/acpi/acpi.h> #endif #ifdef CONFIG_PCIE_MSI #include <kernel_arch_func.h> #include <zephyr/device.h> #include <zephyr/drivers/pcie/msi.h> #include <zephyr/drivers/int...
/content/code_sandbox/arch/x86/core/pcie.c
c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
2,235
```cmake # # XXX: When using the Intel toolchain, cmake doesn't recognize .S files # automatically, and I can't be bothered to figure out how to fix this. # set_property(SOURCE intel64/locore.S PROPERTY LANGUAGE ASM) zephyr_library_sources( intel64/locore.S intel64/cpu.c intel64/irq.c intel64/thread.c inte...
/content/code_sandbox/arch/x86/core/intel64.cmake
cmake
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
187
```c /* */ #include <zephyr/kernel.h> #include <string.h> #include <zephyr/arch/x86/memmap.h> #include <zephyr/linker/linker-defs.h> #include <kernel_arch_data.h> struct x86_memmap_exclusion x86_memmap_exclusions[] = { #ifdef CONFIG_X86_64 { "locore", _locore_start, _locore_end }, #endif #ifdef CONFIG_XIP { "rom",...
/content/code_sandbox/arch/x86/core/memmap.c
c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
323
```c /* * */ #include <zephyr/kernel.h> #include <string.h> #include <zephyr/arch/x86/multiboot.h> #include <zephyr/arch/x86/memmap.h> struct multiboot_info multiboot_info; /* * called very early in the boot process to fetch data out of the multiboot * info struct. we need to grab the relevant data before any dy...
/content/code_sandbox/arch/x86/core/multiboot.c
c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
993
```c /* * */ #include <zephyr/kernel.h> #include <kernel_internal.h> #include <zephyr/arch/x86/multiboot.h> #include <zephyr/arch/x86/efi.h> #include <x86_mmu.h> extern FUNC_NORETURN void z_cstart(void); extern void x86_64_irq_init(void); #if !defined(CONFIG_X86_64) __pinned_data x86_boot_arg_t x86_cpu_boot_arg; #...
/content/code_sandbox/arch/x86/core/prep_c.c
c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
511
```unknown # Intel64-specific X86 subarchitecture options if X86_64 config MAIN_STACK_SIZE default 8192 config IDLE_STACK_SIZE default 4096 config ISR_STACK_SIZE default 16384 config TEST_EXTRA_STACK_SIZE default 4096 config SYSTEM_WORKQUEUE_STACK_SIZE default 8192 config X86_EXCEPTION_STACK_SIZE int "Siz...
/content/code_sandbox/arch/x86/core/Kconfig.intel64
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
600
```c /* * */ #include <zephyr/kernel.h> #include <zephyr/kernel_structs.h> #include <kernel_internal.h> #include <kernel_tls.h> #include <zephyr/sys/util.h> size_t arch_tls_stack_setup(struct k_thread *new_thread, char *stack_ptr) { /* * TLS area for x86 and x86_64 has the data/bss first, * then a pointer poin...
/content/code_sandbox/arch/x86/core/tls.c
c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
282
```unknown # IA32-specific X86 subarchitecture options if !X86_64 config NESTED_INTERRUPTS bool "Nested interrupts" default y help This option enables support for nested interrupts. menu "Memory Layout Options" config IDT_NUM_VECTORS int "Number of IDT vectors" default 256 range 32 256 help This optio...
/content/code_sandbox/arch/x86/core/Kconfig.ia32
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
1,296
```unknown /* */ #include <zephyr/arch/x86/multiboot.h> #include <zephyr/devicetree.h> /* * This is included by ia32/crt0.S and intel64/locore.S * at their 32-bit entry points to cover common ground. */ #ifdef CONFIG_MULTIBOOT_INFO /* * If we were loaded by a multiboot-compliant loader, then EAX...
/content/code_sandbox/arch/x86/core/common.S
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
454
```c /* * */ #include <zephyr/kernel.h> #define DATA_SIZE_K(n) (n * 1024u) #define RSDP_SIGNATURE ((uint64_t)0x2052545020445352) #define EBDA_ADD (0x040e) #define BIOS_RODATA_ADD (0xe0000) #define BIOS_EXT_DATA_LOW (0x80000UL) #define BIOS_EXT_DATA_HIGH (0x100000UL) static uintptr_t bios_sear...
/content/code_sandbox/arch/x86/core/legacy_bios.c
c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
462
```c /* * */ #include <zephyr/spinlock.h> #include <zephyr/arch/x86/efi.h> #include <zephyr/kernel/mm.h> #include "../zefi/efi.h" /* ZEFI not on include path */ #include <zephyr/kernel.h> #include <kernel_arch_func.h> #define EFI_CON_BUFSZ 128 /* Big stack for the EFI code to use */ static uint64_t __aligned(64) e...
/content/code_sandbox/arch/x86/core/efi.c
c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
1,639
```cmake if (CMAKE_C_COMPILER_ID STREQUAL "Clang" OR CMAKE_C_COMPILER_ID STREQUAL "IntelLLVM") # We rely on GAS for assembling, so don't use the integrated assembler zephyr_compile_options($<$<COMPILE_LANGUAGE:ASM>:-no-integrated-as>) elseif(CMAKE_C_COMPILER_ID STREQUAL "GNU") zephyr_compile_options($<$<COMPIL...
/content/code_sandbox/arch/x86/core/ia32.cmake
cmake
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
332
```c /* */ #include <zephyr/kernel.h> #include <ksched.h> #include <zephyr/kernel_structs.h> #include <kernel_internal.h> #include <zephyr/arch/common/exc_handle.h> #include <zephyr/logging/log.h> #include <x86_mmu.h> #include <mmu.h> LOG_MODULE_DECLARE(os, CONFIG_KERNEL_LOG_LEVEL); #if defined(CONFIG_BOARD_QEMU_X86...
/content/code_sandbox/arch/x86/core/fatal.c
c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
3,959
```c /* * */ /** * @file * @brief Kernel structure member offset definition file * * This module is responsible for the generation of the absolute symbols whose * value represents the member offsets for various IA-32 structures. * * All of the absolute symbols defined by this module will be present in the * ...
/content/code_sandbox/arch/x86/core/offsets/ia32_offsets.c
c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
350
```c /* */ #ifndef _X86_OFFSETS_INC_ #define _X86_OFFSETS_INC_ GEN_OFFSET_SYM(_callee_saved_t, rsp); GEN_OFFSET_SYM(_callee_saved_t, rbp); GEN_OFFSET_SYM(_callee_saved_t, rbx); GEN_OFFSET_SYM(_callee_saved_t, r12); GEN_OFFSET_SYM(_callee_saved_t, r13); GEN_OFFSET_SYM(_callee_saved_t, r14); GEN_OFFSET_SYM(_callee_sav...
/content/code_sandbox/arch/x86/core/offsets/intel64_offsets.c
c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
492
```c /* */ #include <zephyr/kernel.h> #include <kernel_arch_data.h> #include <gen_offset.h> #include <kernel_offsets.h> #ifdef CONFIG_X86_64 #include "intel64_offsets.c" #else #include "ia32_offsets.c" #endif GEN_OFFSET_SYM(x86_boot_arg_t, boot_type); GEN_OFFSET_SYM(x86_boot_arg_t, arg); GEN_OFFSET_SYM(_thread_arc...
/content/code_sandbox/arch/x86/core/offsets/offsets.c
c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
93
```c /* * */ #include <zephyr/kernel.h> #include <zephyr/arch/x86/mmustructs.h> #include <zephyr/kernel/mm.h> #include <zephyr/sys/__assert.h> #include <zephyr/sys/check.h> #include <zephyr/logging/log.h> #include <errno.h> #include <ctype.h> #include <zephyr/spinlock.h> #include <kernel_arch_func.h> #include <x86_m...
/content/code_sandbox/arch/x86/core/x86_mmu.c
c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
16,694
```c /* */ #include <zephyr/kernel.h> #include <ksched.h> #include <zephyr/kernel_structs.h> #include <kernel_internal.h> #include <offsets_short.h> #include <x86_mmu.h> extern void x86_sse_init(struct k_thread *thread); /* in locore.S */ /* FIXME: This exists to make space for a "return address" at the top * of t...
/content/code_sandbox/arch/x86/core/intel64/thread.c
c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
617
```c /* * */ /** * @file IRQ offload - x8664 implementation */ #include <zephyr/kernel.h> #include <zephyr/init.h> #include <zephyr/irq_offload.h> #include <kernel_arch_data.h> #define NR_IRQ_VECTORS (IV_NR_VECTORS - IV_IRQS) /* # vectors free for IRQs */ extern void (*x86_irq_funcs[NR_IRQ_VECTORS])(const void...
/content/code_sandbox/arch/x86/core/intel64/irq_offload.c
c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
349
```c /* * */ #include <string.h> #include <zephyr/debug/coredump.h> #define ARCH_HDR_VER 1 struct x86_64_arch_block { uint64_t vector; uint64_t code; struct { uint64_t rax; uint64_t rcx; uint64_t rdx; uint64_t rsi; uint64_t rdi; uint64_t rsp; uint64_t r8; uint64_t r9; uint64_t r10; uint64...
/content/code_sandbox/arch/x86/core/intel64/coredump.c
c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
744
```c /* */ #include <cpuid.h> #include <zephyr/kernel.h> #include <zephyr/arch/cpu.h> #include <kernel_arch_data.h> #include <kernel_arch_func.h> #include <zephyr/kernel_structs.h> #include <kernel_internal.h> #include <zephyr/arch/x86/multiboot.h> #include <x86_mmu.h> #include <zephyr/drivers/interrupt_controller/lo...
/content/code_sandbox/arch/x86/core/intel64/cpu.c
c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
1,069
```unknown /* * */ #include <zephyr/toolchain.h> #include <zephyr/arch/cpu.h> #include <offsets_short.h> #include <zephyr/syscall.h> #include <zephyr/kernel/mm.h> #ifdef CONFIG_X86_KPTI /* Copy interrupt return stack context to the trampoline stack, switch back * to the user page table, and only then 'iret'. We ju...
/content/code_sandbox/arch/x86/core/intel64/userspace.S
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
2,962
```c /* * */ #include <kernel_internal.h> FUNC_NO_STACK_PROTECTOR void z_x86_early_tls_update_gdt(char *stack_ptr) { uintptr_t *self_ptr; uint32_t fs_base = X86_FS_BASE; /* * Since we are populating things backwards, store * the pointer to the TLS area at top of stack. */ stack_ptr -= sizeof(uintptr_t); ...
/content/code_sandbox/arch/x86/core/intel64/tls.c
c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
204
```c /* * */ #include <zephyr/kernel.h> #include <zephyr/irq_offload.h> #include <kernel_arch_data.h> #include <x86_mmu.h> #include <zephyr/init.h> #define NR_IRQ_VECTORS (IV_NR_VECTORS - IV_IRQS) /* # vectors free for IRQs */ extern void (*x86_irq_funcs[NR_IRQ_VECTORS])(const void *arg); extern const void *x86_ir...
/content/code_sandbox/arch/x86/core/intel64/smp.c
c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
292
```unknown /* */ #define LOAPIC_BASE_ADDRESS DT_REG_ADDR(DT_NODELABEL(intc_loapic)) #include <zephyr/toolchain.h> #include <zephyr/arch/x86/multiboot.h> #include <zephyr/arch/x86/efi.h> #include <zephyr/sys/util.h> #include <zephyr/arch/x86/msr.h> #include <kernel_arch_data.h> #include <offsets_short.h> #include <zep...
/content/code_sandbox/arch/x86/core/intel64/locore.S
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
12,511
```c /* */ #include <zephyr/kernel.h> #include <ksched.h> #include <zephyr/kernel_structs.h> #include <kernel_internal.h> #include <zephyr/logging/log.h> LOG_MODULE_DECLARE(os, CONFIG_KERNEL_LOG_LEVEL); /* NMI handlers should override weak implementation * return true if NMI is handled, false otherwise */ __weak b...
/content/code_sandbox/arch/x86/core/intel64/fatal.c
c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
314
```c /* */ #include <zephyr/kernel.h> #include <ksched.h> #include <zephyr/arch/cpu.h> #include <kernel_arch_data.h> #include <kernel_arch_func.h> #include <zephyr/drivers/interrupt_controller/sysapic.h> #include <zephyr/drivers/interrupt_controller/loapic.h> #include <zephyr/irq.h> #include <zephyr/logging/log.h> #i...
/content/code_sandbox/arch/x86/core/intel64/irq.c
c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
1,242
```c /* * */ /** * @file * @brief Thread support primitives * * This module provides core thread related primitives for the IA-32 * processor architecture. */ #include <zephyr/kernel.h> #include <ksched.h> #include <zephyr/arch/x86/mmustructs.h> #include <kswap.h> #include <x86_mmu.h> /* forward declaration ...
/content/code_sandbox/arch/x86/core/ia32/thread.c
c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
948
```unknown /* * */ /** * @file * @brief Crt0 module for the IA-32 boards * * This module contains the initial code executed by the Zephyr Kernel ELF image * after having been loaded into RAM. * * Note that most addresses (functions and variables) must be in physical * address space. Depending on page table se...
/content/code_sandbox/arch/x86/core/ia32/crt0.S
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
3,083
```c /* * */ /** * @file IRQ offload - x86 implementation */ #include <zephyr/kernel.h> #include <zephyr/irq_offload.h> extern void (*_irq_sw_handler)(void); NANO_CPU_INT_REGISTER(_irq_sw_handler, NANO_SOFT_IRQ, CONFIG_IRQ_OFFLOAD_VECTOR / 16, CONFIG_IRQ_OFFLOAD_VECTOR, 0); __pinned_bss static i...
/content/code_sandbox/arch/x86/core/ia32/irq_offload.c
c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
246
```c /* * */ #include <string.h> #include <zephyr/debug/coredump.h> #define ARCH_HDR_VER 1 struct x86_arch_block { uint32_t vector; uint32_t code; struct { uint32_t eax; uint32_t ecx; uint32_t edx; uint32_t ebx; uint32_t esp; uint32_t ebp; uint32_t esi; uint32_t edi; uint32_t eip; uint32_...
/content/code_sandbox/arch/x86/core/ia32/coredump.c
c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
540
```unknown /* * */ /** * @file * @brief Exception management support for IA-32 architecture * * This module implements assembly routines to manage exceptions (synchronous * interrupts) on the Intel IA-32 architecture. More specifically, * exceptions are implemented in this module. The stubs are invoked when ...
/content/code_sandbox/arch/x86/core/ia32/excstub.S
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
1,593
```c /* * */ /** * @file * @brief Floating point register sharing routines * * This module allows multiple preemptible threads to safely share the system's * floating point registers, by allowing the system to save FPU state info * in a thread's stack region when a preemptive context switch occurs. * * Note:...
/content/code_sandbox/arch/x86/core/ia32/float.c
c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
2,350
```unknown /* * */ #include <zephyr/arch/x86/ia32/asm.h> #include <zephyr/arch/cpu.h> #include <offsets_short.h> #include <zephyr/syscall.h> #include <zephyr/kernel/mm.h> #include <x86_mmu.h> /* Exports */ GTEXT(z_x86_syscall_entry_stub) GTEXT(z_x86_userspace_enter) GTEXT(arch_user_string_nlen) GTEXT(z_x86_user_str...
/content/code_sandbox/arch/x86/core/ia32/userspace.S
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
3,015
```c /* * */ #include <kernel_internal.h> #include <zephyr/arch/x86/ia32/arch.h> #include <zephyr/arch/x86/ia32/segmentation.h> #define ENTRY_NUM (GS_TLS_SEG >> 3) void z_x86_tls_update_gdt(struct k_thread *thread) { /* * GS is used for thread local storage to pointer to * the TLS storage area in stack. Here ...
/content/code_sandbox/arch/x86/core/ia32/tls.c
c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
431
```c /* * */ #include <zephyr/kernel.h> #include <kernel_internal.h> #include <ia32/exception.h> #include <inttypes.h> #include <zephyr/debug/gdbstub.h> static struct gdb_ctx debug_ctx; /** * Currently we just handle vectors 1 and 3 but lets keep it generic * to be able to notify other exceptions in the future ...
/content/code_sandbox/arch/x86/core/ia32/gdbstub.c
c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
1,854
```unknown /* * */ /** * @file * @brief Kernel swapper code for IA-32 * * This module implements the arch_swap() routine for the IA-32 architecture. */ #include <zephyr/arch/x86/ia32/asm.h> #include <zephyr/kernel.h> #include <zephyr/arch/cpu.h> #include <kernel_arch_data.h> #include <offsets_short.h> /* exp...
/content/code_sandbox/arch/x86/core/ia32/swap.S
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
3,075
```c /* * */ /** * @file * @brief Kernel fatal error handler */ #include <zephyr/kernel.h> #include <kernel_internal.h> #include <zephyr/drivers/interrupt_controller/sysapic.h> #include <zephyr/arch/x86/ia32/segmentation.h> #include <zephyr/arch/syscall.h> #include <ia32/exception.h> #include <inttypes.h> #inclu...
/content/code_sandbox/arch/x86/core/ia32/fatal.c
c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
1,912
```unknown /* * */ /** * @file * @brief Interrupt management support for IA-32 architecture * * This module implements assembly routines to manage interrupts on * the Intel IA-32 architecture. More specifically, the interrupt (asynchronous * exception) stubs are implemented in this module. The stubs are invo...
/content/code_sandbox/arch/x86/core/ia32/intstub.S
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
3,202
```c /* * */ #include <zephyr/kernel.h> #include <zephyr/toolchain.h> /** * @file * @brief Provide soft float function stubs for long double operations. * * GCC soft float does not support long double so these need to be * stubbed out. * * The function names come from the GCC public documentation. */ exter...
/content/code_sandbox/arch/x86/core/ia32/soft_float_stubs.c
c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
1,068
```objective-c /* */ #ifndef ZEPHYR_ARCH_X86_INCLUDE_KERNEL_ARCH_FUNC_H_ #define ZEPHYR_ARCH_X86_INCLUDE_KERNEL_ARCH_FUNC_H_ #include <kernel_arch_data.h> #include <zephyr/arch/x86/mmustructs.h> #ifdef CONFIG_X86_64 #include <intel64/kernel_arch_func.h> #else #include <ia32/kernel_arch_func.h> #endif #ifndef _ASML...
/content/code_sandbox/arch/x86/include/kernel_arch_func.h
objective-c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
801
```c /* * */ /** * @file * @brief Interrupt support for IA-32 arch * * INTERNAL * The _idt_base_address symbol is used to determine the base address of the IDT. * (It is generated by the linker script, and doesn't correspond to an actual * global variable.) */ #include <zephyr/kernel.h> #include <zephyr/arc...
/content/code_sandbox/arch/x86/core/ia32/irq_manage.c
c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
1,841
```objective-c /* */ #ifndef ZEPHYR_ARCH_X86_INCLUDE_OFFSETS_SHORT_ARCH_H_ #define ZEPHYR_ARCH_X86_INCLUDE_OFFSETS_SHORT_ARCH_H_ #ifdef CONFIG_X86_64 #include <intel64/offsets_short_arch.h> #else #include <ia32/offsets_short_arch.h> #endif #define _thread_offset_to_flags \ (___thread_t_arch_OFFSET + ___thread_arch...
/content/code_sandbox/arch/x86/include/offsets_short_arch.h
objective-c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
161
```objective-c /* */ #ifndef ZEPHYR_ARCH_X86_INCLUDE_KERNEL_ARCH_DATA_H_ #define ZEPHYR_ARCH_X86_INCLUDE_KERNEL_ARCH_DATA_H_ /* * Exception/interrupt vector definitions: vectors 20 to 31 are reserved * for Intel; vectors 32 to 255 are user defined interrupt vectors. */ #define IV_DIVIDE_ERROR 0 #define IV_DEBUG ...
/content/code_sandbox/arch/x86/include/kernel_arch_data.h
objective-c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
537
```objective-c /* */ #ifndef ZEPHYR_ARCH_X86_INCLUDE_INTEL64_KERNEL_ARCH_FUNC_H_ #define ZEPHYR_ARCH_X86_INCLUDE_INTEL64_KERNEL_ARCH_FUNC_H_ #include <zephyr/kernel_structs.h> #ifndef _ASMLANGUAGE extern void z_x86_switch(void *switch_to, void **switched_from); static inline void arch_switch(void *switch_to, void...
/content/code_sandbox/arch/x86/include/intel64/kernel_arch_func.h
objective-c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
235
```objective-c /* * * * Internal memory management interfaces implemented in x86_mmu.c. * None of these are application-facing, use only if you know what you are * doing! */ #ifndef ZEPHYR_ARCH_X86_INCLUDE_X86_MMU_H #define ZEPHYR_ARCH_X86_INCLUDE_X86_MMU_H #include <zephyr/kernel.h> #include <zephyr/arch/x86/m...
/content/code_sandbox/arch/x86/include/x86_mmu.h
objective-c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
2,036
```objective-c /* */ #ifndef ZEPHYR_ARCH_X86_INCLUDE_INTEL64_KERNEL_ARCH_DATA_H_ #define ZEPHYR_ARCH_X86_INCLUDE_INTEL64_KERNEL_ARCH_DATA_H_ #include <zephyr/arch/x86/mmustructs.h> #ifndef _ASMLANGUAGE /* linker symbols defining the bounds of the kernel part loaded in locore */ extern char _locore_start[], _locor...
/content/code_sandbox/arch/x86/include/intel64/kernel_arch_data.h
objective-c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
765
```objective-c /* * */ /* this file is only meant to be included by kernel_structs.h */ #ifndef ZEPHYR_ARCH_X86_INCLUDE_IA32_KERNEL_ARCH_FUNC_H_ #define ZEPHYR_ARCH_X86_INCLUDE_IA32_KERNEL_ARCH_FUNC_H_ #ifndef _ASMLANGUAGE #include <stddef.h> /* For size_t */ #ifdef __cplusplus extern "C" { #endif static inline...
/content/code_sandbox/arch/x86/include/ia32/kernel_arch_func.h
objective-c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
216
```objective-c /* */ #ifndef ZEPHYR_ARCH_X86_INCLUDE_INTEL64_OFFSETS_SHORT_ARCH_H_ #define ZEPHYR_ARCH_X86_INCLUDE_INTEL64_OFFSETS_SHORT_ARCH_H_ #include <zephyr/offsets.h> #define _thread_offset_to_rsp \ (___thread_t_callee_saved_OFFSET + ___callee_saved_t_rsp_OFFSET) #define _thread_offset_to_rbx \ (___thread_...
/content/code_sandbox/arch/x86/include/intel64/offsets_short_arch.h
objective-c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
564
```objective-c /* * */ /** * @file * @brief Private kernel definitions (IA-32) * * This file contains private kernel structures definitions and various * other definitions for the Intel Architecture 32 bit (IA-32) processor * architecture. * The header include/kernel.h contains the public kernel interface * ...
/content/code_sandbox/arch/x86/include/ia32/kernel_arch_data.h
objective-c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
488