├── .gitignore ├── LICENSE ├── README.md ├── build-busybox.sh ├── build-floppy.sh ├── build-linux.sh ├── build-modules.sh ├── build-toolchain.sh ├── busybox ├── Makefile.flags.patch └── libbb.h.patch ├── config-5.17.2tiny ├── config-buildroot-2022.02.1 ├── config-busybox-1.20.0 ├── config-uclibc ├── floppy └── boot │ └── lilo.conf ├── linux ├── fstab ├── group ├── inittab ├── passwd ├── patches │ ├── bugs.c.patch │ ├── gen_initramfs.sh.patch │ ├── init.c.patch │ ├── initramfs.c.patch │ ├── intel.c.patch │ └── rmpiggy.S.patch └── rcS └── preinit ├── Makefile ├── init.c ├── linux-headers ├── asm-generic │ ├── .auxvec.h.cmd │ ├── .bitsperlong.h.cmd │ ├── .bpf_perf_event.h.cmd │ ├── .errno-base.h.cmd │ ├── .errno.h.cmd │ ├── .fcntl.h.cmd │ ├── .hugetlb_encode.h.cmd │ ├── .int-l64.h.cmd │ ├── .int-ll64.h.cmd │ ├── .ioctl.h.cmd │ ├── .ioctls.h.cmd │ ├── .ipcbuf.h.cmd │ ├── .kvm_para.h.cmd │ ├── .mman-common.h.cmd │ ├── .mman.h.cmd │ ├── .msgbuf.h.cmd │ ├── .param.h.cmd │ ├── .poll.h.cmd │ ├── .posix_types.h.cmd │ ├── .resource.h.cmd │ ├── .sembuf.h.cmd │ ├── .setup.h.cmd │ ├── .shmbuf.h.cmd │ ├── .siginfo.h.cmd │ ├── .signal-defs.h.cmd │ ├── .signal.h.cmd │ ├── .socket.h.cmd │ ├── .sockios.h.cmd │ ├── .stat.h.cmd │ ├── .statfs.h.cmd │ ├── .swab.h.cmd │ ├── .termbits.h.cmd │ ├── .termios.h.cmd │ ├── .types.h.cmd │ ├── .ucontext.h.cmd │ ├── .unistd.h.cmd │ ├── auxvec.h │ ├── bitsperlong.h │ ├── bpf_perf_event.h │ ├── errno-base.h │ ├── errno.h │ ├── fcntl.h │ ├── hugetlb_encode.h │ ├── int-l64.h │ ├── int-ll64.h │ ├── ioctl.h │ ├── ioctls.h │ ├── ipcbuf.h │ ├── kvm_para.h │ ├── mman-common.h │ ├── mman.h │ ├── msgbuf.h │ ├── param.h │ ├── poll.h │ ├── posix_types.h │ ├── resource.h │ ├── sembuf.h │ ├── setup.h │ ├── shmbuf.h │ ├── siginfo.h │ ├── signal-defs.h │ ├── signal.h │ ├── socket.h │ ├── sockios.h │ ├── stat.h │ ├── statfs.h │ ├── swab.h │ ├── termbits.h │ ├── termios.h │ ├── types.h │ ├── ucontext.h │ └── unistd.h └── asm │ ├── .a.out.h.cmd │ ├── .auxvec.h.cmd │ ├── .bitsperlong.h.cmd │ ├── .boot.h.cmd │ ├── .bootparam.h.cmd │ ├── .bpf_perf_event.h.cmd │ ├── .byteorder.h.cmd │ ├── .debugreg.h.cmd │ ├── .e820.h.cmd │ ├── .errno.h.cmd │ ├── .fcntl.h.cmd │ ├── .hw_breakpoint.h.cmd │ ├── .hwcap2.h.cmd │ ├── .ioctl.h.cmd │ ├── .ioctls.h.cmd │ ├── .ipcbuf.h.cmd │ ├── .ist.h.cmd │ ├── .kvm.h.cmd │ ├── .kvm_para.h.cmd │ ├── .kvm_perf.h.cmd │ ├── .ldt.h.cmd │ ├── .mce.h.cmd │ ├── .mman.h.cmd │ ├── .msgbuf.h.cmd │ ├── .msr.h.cmd │ ├── .mtrr.h.cmd │ ├── .param.h.cmd │ ├── .perf_regs.h.cmd │ ├── .poll.h.cmd │ ├── .posix_types.h.cmd │ ├── .posix_types_32.h.cmd │ ├── .posix_types_64.h.cmd │ ├── .posix_types_x32.h.cmd │ ├── .prctl.h.cmd │ ├── .processor-flags.h.cmd │ ├── .ptrace-abi.h.cmd │ ├── .ptrace.h.cmd │ ├── .resource.h.cmd │ ├── .sembuf.h.cmd │ ├── .setup.h.cmd │ ├── .sgx.h.cmd │ ├── .shmbuf.h.cmd │ ├── .sigcontext.h.cmd │ ├── .sigcontext32.h.cmd │ ├── .siginfo.h.cmd │ ├── .signal.h.cmd │ ├── .socket.h.cmd │ ├── .sockios.h.cmd │ ├── .stat.h.cmd │ ├── .statfs.h.cmd │ ├── .svm.h.cmd │ ├── .swab.h.cmd │ ├── .termbits.h.cmd │ ├── .termios.h.cmd │ ├── .types.h.cmd │ ├── .ucontext.h.cmd │ ├── .unistd.h.cmd │ ├── .unistd_32.h.cmd │ ├── .unistd_64.h.cmd │ ├── .unistd_x32.h.cmd │ ├── .vm86.h.cmd │ ├── .vmx.h.cmd │ ├── .vsyscall.h.cmd │ ├── a.out.h │ ├── auxvec.h │ ├── bitsperlong.h │ ├── boot.h │ ├── bootparam.h │ ├── bpf_perf_event.h │ ├── byteorder.h │ ├── debugreg.h │ ├── e820.h │ ├── errno.h │ ├── fcntl.h │ ├── hw_breakpoint.h │ ├── hwcap2.h │ ├── ioctl.h │ ├── ioctls.h │ ├── ipcbuf.h │ ├── ist.h │ ├── kvm.h │ ├── kvm_para.h │ ├── kvm_perf.h │ ├── ldt.h │ ├── mce.h │ ├── mman.h │ ├── msgbuf.h │ ├── msr.h │ ├── mtrr.h │ ├── param.h │ ├── perf_regs.h │ ├── poll.h │ ├── posix_types.h │ ├── posix_types_32.h │ ├── posix_types_64.h │ ├── posix_types_x32.h │ ├── prctl.h │ ├── processor-flags.h │ ├── ptrace-abi.h │ ├── ptrace.h │ ├── resource.h │ ├── sembuf.h │ ├── setup.h │ ├── sgx.h │ ├── shmbuf.h │ ├── sigcontext.h │ ├── sigcontext32.h │ ├── siginfo.h │ ├── signal.h │ ├── socket.h │ ├── sockios.h │ ├── stat.h │ ├── statfs.h │ ├── svm.h │ ├── swab.h │ ├── termbits.h │ ├── termios.h │ ├── types.h │ ├── ucontext.h │ ├── unistd.h │ ├── unistd_32.h │ ├── unistd_64.h │ ├── unistd_x32.h │ ├── vm86.h │ ├── vmx.h │ └── vsyscall.h └── linux_syscall_support.h /.gitignore: -------------------------------------------------------------------------------- 1 | .* 2 | buildroot-2022.02.1.tar.xz 3 | buildroot-2022.02.1/ 4 | busybox-1.20.0.tar.bz2 5 | busybox-1.20.0/ 6 | linux-5.17.2.tar.xz 7 | linux-5.17.2/ 8 | 9 | floppy.img 10 | floppy/boot/busyboz 11 | floppy/boot/bzImage 12 | floppy/lib/ 13 | modules.img 14 | modules/ 15 | preinit/init 16 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | This is free and unencumbered software released into the public domain. 2 | 3 | Anyone is free to copy, modify, publish, use, compile, sell, or 4 | distribute this software, either in source code form or as a compiled 5 | binary, for any purpose, commercial or non-commercial, and by any 6 | means. 7 | 8 | In jurisdictions that recognize copyright laws, the author or authors 9 | of this software dedicate any and all copyright interest in the 10 | software to the public domain. We make this dedication for the benefit 11 | of the public at large and to the detriment of our heirs and 12 | successors. We intend this dedication to be an overt act of 13 | relinquishment in perpetuity of all present and future rights to this 14 | software under copyright law. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR 20 | OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 21 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 22 | OTHER DEALINGS IN THE SOFTWARE. 23 | 24 | For more information, please refer to 25 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # linux-486 2 | 3 | This repo provides the files necessary to build a modern Linux-based "operating system" for old i486 systems with at least 8MB of RAM. Build scripts for all components of the system are provided. An i486-linux toolchain is also built, enabling you to compile other programs for use with the system. 4 | 5 | The generated boot floppy disk provides you with a Busybox system that is kept entirely in memory. uClibc's shared library files are also loaded into memory, allowing other programs to save on memory (as opposed to using static binaries). 6 | 7 | A second floppy containing additional kernel modules can also be generated. Both floppies are ext2 formatted. 8 | 9 | ## Build requirements 10 | 11 | * building tools (make, gcc, linux kernel's requirements, etc.) 12 | * bash 13 | * wget 14 | * tar, xz, bzip2 15 | * Around **6GB** of available disk space 16 | 17 | ## Build steps 18 | 19 | Run the build scripts in this order: 20 | 21 | 1. `build-toolchain.sh` (after this script, add ~/i486-linux/bin to your PATH) 22 | 2. `build-linux.sh` 23 | 3. `build-busybox.sh` 24 | 4. `build-floppy.sh` 25 | 5. `build-modules.sh` 26 | 27 | On my machine (Ryzen 1700x, 16GB RAM), building the toolchain takes around ten minutes; building Linux takes around a minute, and the remaining steps take less than a minute each. 28 | 29 | After successful execution of all scripts, you should have `floppy.img` (boot image) and `modules.img` (modules). These can be `dd`'d to a 1.44M 3.5" floppy disk. 30 | 31 | ## Booting the system 32 | 33 | The system requires an i486 or better processor, a 3.5" floppy drive, and at least 8MB of RAM (8320K for QEMU). 34 | 35 | Notes: 36 | 37 | * Current Linux is v5.17.2. Older Linux (v2.x) uses less RAM for the kernel, and may be added later as a build option. Newer Linux (v6.x) appears to require well over 8MB of RAM to boot, so targeting newer kernels will be unlikely. 38 | * Once the system is booted, the boot floppy can be removed. 39 | * root's password is `toor`. 40 | * Mount the modules floppy to `/lib/modules`; then, use `modprobe` for loading and unloading. 41 | -------------------------------------------------------------------------------- /build-busybox.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [ ! -e ./busybox-1.20.0.tar.bz2 ] ; then 4 | echo "Fetching busybox..." 5 | wget https://www.busybox.net/downloads/busybox-1.20.0.tar.bz2 6 | fi 7 | 8 | if [ ! -e ./busybox-1.20.0 ] ; then 9 | echo "Extracting busybox..." 10 | tar xf busybox-1.20.0.tar.bz2 11 | cp config-busybox-1.20.0 busybox-1.20.0/.config 12 | cd busybox-1.20.0 13 | echo "Patching busybox..." 14 | patch include/libbb.h < ../busybox/libbb.h.patch 15 | patch Makefile.flags < ../busybox/Makefile.flags.patch 16 | cd .. 17 | fi 18 | 19 | BUSYBOX_NO_CRYPT_CHECK=1 make -C busybox-1.20.0 -j8 20 | 21 | lzma -zc9 busybox-1.20.0/busybox > floppy/boot/busyboz 22 | echo "Busybox is now installed to the floppy folder." 23 | 24 | -------------------------------------------------------------------------------- /build-floppy.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | dd if=/dev/zero of=floppy.img bs=1k count=1440 4 | mkfs.ext2 -b 1024 -i 65536 -I 128 -m 0 -r 0 -T floppy -d floppy floppy.img 5 | 6 | sudo mount floppy.img /mnt -oloop 7 | sudo mkdir /mnt/dev 8 | sudo mount devtmpfs /mnt/dev -t devtmpfs 9 | 10 | sudo chown -R root:root /mnt/* 11 | sudo lilo -v -g -b /dev/loop0 -r /mnt -C /boot/lilo.conf 12 | 13 | sudo umount /mnt/dev 14 | sudo rmdir /mnt/dev 15 | df -h /mnt 16 | sudo umount /mnt 17 | 18 | -------------------------------------------------------------------------------- /build-linux.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [ ! -e ./linux-5.17.2.tar.xz ] ; then 4 | echo "Fetching Linux..." 5 | wget https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.17.2.tar.xz 6 | fi 7 | 8 | if [ ! -e ./linux-5.17.2 ] ; then 9 | echo "Extracting Linux..." 10 | tar xf ./linux-5.17.2.tar.xz 11 | cp config-5.17.2tiny ./linux-5.17.2/.config 12 | 13 | cd ./linux-5.17.2 14 | 15 | echo "Patching Linux..." 16 | patch usr/gen_initramfs.sh < ../linux/patches/gen_initramfs.sh.patch 17 | # TODO: Other patches necessary? They do save some space... 18 | 19 | ARCH=x86 CROSS_COMPILE=i486-buildroot-linux-uclibc- make olddefconfig 20 | else 21 | cd ./linux-5.17.2 22 | fi 23 | 24 | echo "Creating initramfs file structure..." 25 | sudo rm -rf initrd 26 | mkdir -p initrd/{bin,dev/pts,etc/init.d,lib/modules,mnt,proc,root,run,sys} 27 | cp ../linux/{fstab,group,inittab,passwd} initrd/etc 28 | 29 | make -C ../preinit 30 | cp ../preinit/init initrd/init 31 | 32 | echo "Calling sudo to create initramfs's /dev/console..." 33 | sudo mknod initrd/dev/console c 5 1 34 | 35 | echo "Building Linux..." 36 | ARCH=x86 CROSS_COMPILE=i486-buildroot-linux-uclibc- make -j8 37 | 38 | echo "Calling sudo to copy bzImage to the floppy folder..." 39 | sudo cp arch/x86/boot/bzImage ../floppy/boot/bzImage 40 | 41 | -------------------------------------------------------------------------------- /build-modules.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | echo "Building ./modules/ floppy folder..." 4 | 5 | rm -rf ./modules 6 | INSTALL_MOD_PATH=$(pwd)/modules make -C linux-5.17.2 modules_install 7 | mv modules/lib/modules/* modules/ 8 | rmdir modules/lib/modules modules/lib 9 | rm modules/5.17.2clyne/{source,build} 10 | find modules/ -type f -name "*.ko" -exec strip --strip-debug {} \; 11 | du -sh ./modules 12 | 13 | echo "Creating modules.img..." 14 | 15 | dd if=/dev/zero of=modules.img bs=1k count=1440 16 | mkfs.vfat -F 12 modules.img 17 | sudo mount -oloop modules.img /mnt 18 | sudo cp -R modules/* /mnt/ 19 | sudo chown root:root /mnt/* 20 | df -h /mnt 21 | sudo umount /mnt 22 | 23 | -------------------------------------------------------------------------------- /build-toolchain.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [ ! -e ./buildroot-2022.02.1.tar.xz ] ; then 4 | echo "Fetching buildroot..." 5 | wget https://buildroot.org/downloads/buildroot-2022.02.1.tar.xz 6 | fi 7 | 8 | if [ ! -e ./buildroot-2022.02.1 ] ; then 9 | echo "Extracting buildroot..." 10 | tar xf buildroot-2022.02.1.tar.xz 11 | 12 | cp config-buildroot-2022.02.1 buildroot-2022.02.1/.config 13 | cp config-uclibc buildroot-2022.02.1/config-uclibc 14 | fi 15 | 16 | echo "Building with sudo..." 17 | sudo make -C buildroot-2022.02.1 toolchain -j8 18 | 19 | echo "Installing i486-linux toolchain to ~ (and adding to PATH)..." 20 | cp -R buildroot-2022.02.1/output/host ~/i486-linux 21 | export PATH=$PATH:~/i486-linux/bin 22 | 23 | echo "Copying libc files to the floppy folder..." 24 | mkdir floppy/lib 25 | sudo strip buildroot-2022.02.1/output/target/lib/ld-uClibc-1.0.40.so 26 | sudo strip buildroot-2022.02.1/output/target/lib/libuClibc-1.0.40.so 27 | sudo bash -c "lzma -zc9 buildroot-2022.02.1/output/target/lib/ld-uClibc-1.0.40.so > floppy/lib/lduClibc.lzm" 28 | sudo bash -c "lzma -zc9 buildroot-2022.02.1/output/target/lib/libuClibc-1.0.40.so > floppy/lib/libc.lzm" 29 | 30 | -------------------------------------------------------------------------------- /busybox/Makefile.flags.patch: -------------------------------------------------------------------------------- 1 | --- Makefile.flags 2022-11-01 18:18:43.006550705 -0400 2 | +++ Makefile.flags.new 2022-11-01 18:20:21.794697686 -0400 3 | @@ -108,12 +108,15 @@ 4 | # gcc-4.2.1 fails if we try to feed C source on stdin: 5 | # echo 'int main(void){return 0;}' | $(CC) $(CFLAGS) -lcrypt -o /dev/null -xc - 6 | # fall back to using a temp file: 7 | +ifeq ($(BUSYBOX_NO_CRYPT_CHECK),1) 8 | +else 9 | CRYPT_AVAILABLE := $(shell echo 'int main(void){return 0;}' >crypttest.c; $(CC) $(CFLAGS) -lcrypt -o /dev/null crypttest.c >/dev/null 2>&1 && echo "y"; rm crypttest.c) 10 | ifeq ($(CRYPT_AVAILABLE),y) 11 | LDLIBS += m crypt 12 | else 13 | LDLIBS += m 14 | endif 15 | +endif 16 | 17 | ifeq ($(CONFIG_PAM),y) 18 | # libpam uses libpthread, so for static builds busybox must be linked to 19 | -------------------------------------------------------------------------------- /busybox/libbb.h.patch: -------------------------------------------------------------------------------- 1 | --- include/libbb.h 2012-04-21 21:33:23.000000000 -0400 2 | +++ include/libbb.h.new 2022-04-29 20:49:40.674509941 -0400 3 | @@ -40,6 +40,7 @@ 4 | #include 5 | #include 6 | #include 7 | +#include 8 | #include 9 | #include 10 | #include 11 | -------------------------------------------------------------------------------- /config-uclibc: -------------------------------------------------------------------------------- 1 | # 2 | # Automatically generated file; DO NOT EDIT. 3 | # uClibc-ng 1.0.40 C Library Configuration 4 | # 5 | # TARGET_aarch64 is not set 6 | # TARGET_alpha is not set 7 | # TARGET_arc is not set 8 | # TARGET_arm is not set 9 | # TARGET_avr32 is not set 10 | # TARGET_bfin is not set 11 | # TARGET_c6x is not set 12 | # TARGET_cris is not set 13 | # TARGET_csky is not set 14 | # TARGET_frv is not set 15 | # TARGET_h8300 is not set 16 | # TARGET_hppa is not set 17 | TARGET_i386=y 18 | # TARGET_ia64 is not set 19 | # TARGET_kvx is not set 20 | # TARGET_lm32 is not set 21 | # TARGET_m68k is not set 22 | # TARGET_metag is not set 23 | # TARGET_microblaze is not set 24 | # TARGET_mips is not set 25 | # TARGET_nds32 is not set 26 | # TARGET_nios2 is not set 27 | # TARGET_or1k is not set 28 | # TARGET_powerpc is not set 29 | # TARGET_riscv64 is not set 30 | # TARGET_sh is not set 31 | # TARGET_sparc is not set 32 | # TARGET_sparc64 is not set 33 | # TARGET_tile is not set 34 | # TARGET_x86_64 is not set 35 | # TARGET_xtensa is not set 36 | 37 | # 38 | # Target Architecture Features and Options 39 | # 40 | TARGET_ARCH="i386" 41 | FORCE_OPTIONS_FOR_ARCH=y 42 | # CONFIG_386 is not set 43 | CONFIG_486=y 44 | # CONFIG_586 is not set 45 | # CONFIG_686 is not set 46 | TARGET_SUBARCH="i486" 47 | 48 | # 49 | # Using ELF file format 50 | # 51 | ARCH_HAS_DEPRECATED_SYSCALLS=y 52 | ARCH_LITTLE_ENDIAN=y 53 | 54 | # 55 | # Using Little Endian 56 | # 57 | ARCH_HAS_MMU=y 58 | ARCH_USE_MMU=y 59 | UCLIBC_HAS_FLOATS=y 60 | UCLIBC_HAS_FPU=y 61 | # DO_C99_MATH is not set 62 | # DO_XSI_MATH is not set 63 | # UCLIBC_HAS_FENV is not set 64 | KERNEL_HEADERS="/home/clyne/Programming/486/buildroot-2022.02.1/output/build/linux-headers-5.17.2/usr/include" 65 | HAVE_DOT_CONFIG=y 66 | 67 | # 68 | # General Library Settings 69 | # 70 | DOPIC=y 71 | ARCH_HAS_UCONTEXT=y 72 | HAVE_SHARED=y 73 | # FORCE_SHAREABLE_TEXT_SEGMENTS is not set 74 | LDSO_LDD_SUPPORT=y 75 | # LDSO_CACHE_SUPPORT is not set 76 | LDSO_PRELOAD_ENV_SUPPORT=y 77 | # LDSO_PRELOAD_FILE_SUPPORT is not set 78 | LDSO_STANDALONE_SUPPORT=y 79 | LDSO_PRELINK_SUPPORT=y 80 | # UCLIBC_STATIC_LDCONFIG is not set 81 | # LDSO_RUNPATH is not set 82 | LDSO_SEARCH_INTERP_PATH=y 83 | LDSO_LD_LIBRARY_PATH=y 84 | UCLIBC_CTOR_DTOR=y 85 | # LDSO_GNU_HASH_SUPPORT is not set 86 | # HAS_NO_THREADS is not set 87 | # UCLIBC_HAS_LINUXTHREADS is not set 88 | UCLIBC_HAS_THREADS_NATIVE=y 89 | UCLIBC_HAS_THREADS=y 90 | UCLIBC_HAS_TLS=y 91 | # PTHREADS_DEBUG_SUPPORT is not set 92 | UCLIBC_HAS_SYSLOG=y 93 | UCLIBC_HAS_LFS=y 94 | # MALLOC is not set 95 | # MALLOC_SIMPLE is not set 96 | MALLOC_STANDARD=y 97 | UCLIBC_DYNAMIC_ATEXIT=y 98 | # UCLIBC_HAS_UTMPX is not set 99 | # UCLIBC_SUSV2_LEGACY is not set 100 | UCLIBC_SUSV3_LEGACY=y 101 | UCLIBC_HAS_CONTEXT_FUNCS=y 102 | UCLIBC_SUSV3_LEGACY_MACROS=y 103 | UCLIBC_SUSV4_LEGACY=y 104 | UCLIBC_STRICT_HEADERS=y 105 | # UCLIBC_HAS_STUBS is not set 106 | # UCLIBC_HAS_SHADOW is not set 107 | # UCLIBC_HAS_PROGRAM_INVOCATION_NAME is not set 108 | # UCLIBC_HAS___PROGNAME is not set 109 | UCLIBC_HAS_PTY=y 110 | ASSUME_DEVPTS=y 111 | UNIX98PTY_ONLY=y 112 | UCLIBC_HAS_GETPT=y 113 | # UCLIBC_HAS_LIBUTIL is not set 114 | UCLIBC_HAS_TM_EXTENSIONS=y 115 | UCLIBC_HAS_TZ_CACHING=y 116 | # UCLIBC_HAS_TZ_FILE is not set 117 | 118 | # 119 | # Advanced Library Settings 120 | # 121 | UCLIBC_PWD_BUFFER_SIZE=256 122 | UCLIBC_GRP_BUFFER_SIZE=256 123 | 124 | # 125 | # Support various families of functions 126 | # 127 | UCLIBC_LINUX_SPECIFIC=y 128 | UCLIBC_HAS_GNU_ERROR=y 129 | UCLIBC_BSD_SPECIFIC=y 130 | # UCLIBC_HAS_BSD_ERR is not set 131 | # UCLIBC_HAS_OBSOLETE_BSD_SIGNAL is not set 132 | # UCLIBC_HAS_BSD_B64_NTOP_B64_PTON is not set 133 | # UCLIBC_HAS_OBSOLETE_SYSV_SIGNAL is not set 134 | # UCLIBC_NTP_LEGACY is not set 135 | # UCLIBC_SV4_DEPRECATED is not set 136 | UCLIBC_HAS_REALTIME=y 137 | UCLIBC_HAS_ADVANCED_REALTIME=y 138 | UCLIBC_HAS_EPOLL=y 139 | # UCLIBC_HAS_XATTR is not set 140 | # UCLIBC_HAS_PROFILING is not set 141 | # UCLIBC_HAS_CRYPT_IMPL is not set 142 | UCLIBC_HAS_CRYPT_STUB=y 143 | UCLIBC_HAS_CRYPT=y 144 | UCLIBC_HAS_NETWORK_SUPPORT=y 145 | UCLIBC_HAS_SOCKET=y 146 | UCLIBC_HAS_IPV4=y 147 | UCLIBC_HAS_IPV6=y 148 | # UCLIBC_USE_NETLINK is not set 149 | # UCLIBC_HAS_BSD_RES_CLOSE is not set 150 | UCLIBC_HAS_COMPAT_RES_STATE=y 151 | # UCLIBC_HAS_EXTRA_COMPAT_RES_STATE is not set 152 | UCLIBC_HAS_RESOLVER_SUPPORT=y 153 | 154 | # 155 | # String and Stdio Support 156 | # 157 | # UCLIBC_HAS_STRING_GENERIC_OPT is not set 158 | UCLIBC_HAS_STRING_ARCH_OPT=y 159 | UCLIBC_HAS_STDIO_FUTEXES=y 160 | UCLIBC_HAS_CTYPE_TABLES=y 161 | UCLIBC_HAS_CTYPE_SIGNED=y 162 | UCLIBC_HAS_CTYPE_UNSAFE=y 163 | # UCLIBC_HAS_CTYPE_CHECKED is not set 164 | # UCLIBC_HAS_CTYPE_ENFORCED is not set 165 | UCLIBC_HAS_WCHAR=y 166 | UCLIBC_HAS_LIBICONV=y 167 | UCLIBC_HAS_LIBINTL=y 168 | # UCLIBC_HAS_LOCALE is not set 169 | # UCLIBC_HAS_HEXADECIMAL_FLOATS is not set 170 | UCLIBC_HAS_GLIBC_CUSTOM_PRINTF=y 171 | UCLIBC_PRINTF_SCANF_POSITIONAL_ARGS=9 172 | # UCLIBC_HAS_STDIO_BUFSIZ_256 is not set 173 | # UCLIBC_HAS_STDIO_BUFSIZ_512 is not set 174 | # UCLIBC_HAS_STDIO_BUFSIZ_1024 is not set 175 | # UCLIBC_HAS_STDIO_BUFSIZ_2048 is not set 176 | UCLIBC_HAS_STDIO_BUFSIZ_4096=y 177 | # UCLIBC_HAS_STDIO_BUFSIZ_8192 is not set 178 | UCLIBC_HAS_STDIO_BUILTIN_BUFFER_NONE=y 179 | # UCLIBC_HAS_STDIO_BUILTIN_BUFFER_4 is not set 180 | # UCLIBC_HAS_STDIO_BUILTIN_BUFFER_8 is not set 181 | # UCLIBC_HAS_STDIO_SHUTDOWN_ON_ABORT is not set 182 | UCLIBC_HAS_STDIO_GETC_MACRO=y 183 | UCLIBC_HAS_STDIO_PUTC_MACRO=y 184 | UCLIBC_HAS_STDIO_AUTO_RW_TRANSITION=y 185 | # UCLIBC_HAS_FOPEN_LARGEFILE_MODE is not set 186 | UCLIBC_HAS_FOPEN_EXCLUSIVE_MODE=y 187 | # UCLIBC_HAS_FOPEN_CLOSEEXEC_MODE is not set 188 | # UCLIBC_HAS_GLIBC_CUSTOM_STREAMS is not set 189 | UCLIBC_HAS_PRINTF_M_SPEC=y 190 | UCLIBC_HAS_ERRNO_MESSAGES=y 191 | # UCLIBC_HAS_SYS_ERRLIST is not set 192 | UCLIBC_HAS_SIGNUM_MESSAGES=y 193 | # UCLIBC_HAS_SYS_SIGLIST is not set 194 | UCLIBC_HAS_GNU_GETOPT=y 195 | UCLIBC_HAS_GETOPT_LONG=y 196 | UCLIBC_HAS_GNU_GETSUBOPT=y 197 | # UCLIBC_HAS_ARGP is not set 198 | 199 | # 200 | # Big and Tall 201 | # 202 | UCLIBC_HAS_REGEX=y 203 | UCLIBC_HAS_FNMATCH=y 204 | UCLIBC_HAS_WORDEXP=y 205 | # UCLIBC_HAS_NFTW is not set 206 | # UCLIBC_HAS_FTW is not set 207 | # UCLIBC_HAS_FTS is not set 208 | UCLIBC_HAS_GLOB=y 209 | UCLIBC_HAS_GNU_GLOB=y 210 | 211 | # 212 | # Library Installation Options 213 | # 214 | RUNTIME_PREFIX="/" 215 | DEVEL_PREFIX="/usr" 216 | MULTILIB_DIR="lib" 217 | HARDWIRED_ABSPATH=y 218 | 219 | # 220 | # Security options 221 | # 222 | # UCLIBC_BUILD_PIE is not set 223 | # UCLIBC_HAS_SSP is not set 224 | UCLIBC_BUILD_RELRO=y 225 | UCLIBC_BUILD_NOW=y 226 | UCLIBC_BUILD_NOEXECSTACK=y 227 | 228 | # 229 | # Development/debugging options 230 | # 231 | CROSS_COMPILER_PREFIX="/home/clyne/Programming/486/buildroot-2022.02.1/output/host/bin/i486-buildroot-linux-uclibc-" 232 | UCLIBC_EXTRA_CFLAGS="" 233 | # DODEBUG is not set 234 | DOSTRIP=y 235 | # DOASSERTS is not set 236 | # SUPPORT_LD_DEBUG is not set 237 | # SUPPORT_LD_DEBUG_EARLY is not set 238 | # UCLIBC_MALLOC_DEBUGGING is not set 239 | # UCLIBC_HAS_BACKTRACE is not set 240 | WARNINGS="" 241 | # EXTRA_WARNINGS is not set 242 | -------------------------------------------------------------------------------- /floppy/boot/lilo.conf: -------------------------------------------------------------------------------- 1 | disk=/dev/loop0 2 | bios=0 3 | sectors=18 4 | heads=2 5 | cylinders=80 6 | backup=/dev/null 7 | install=text 8 | compact 9 | image=/boot/bzImage 10 | label=linux 11 | append="root=/dev/ram0 rw" 12 | -------------------------------------------------------------------------------- /linux/fstab: -------------------------------------------------------------------------------- 1 | none /proc proc defaults 0 0 2 | #devpts /dev/pts devpts gid=5,mode=620 0 0 3 | #devtmpfs /dev devtmpfs mode=0755,nosuid 0 0 4 | sysfs /sys sysfs defaults 0 0 5 | tmpfs /run tmpfs defaults 0 0 6 | -------------------------------------------------------------------------------- /linux/group: -------------------------------------------------------------------------------- 1 | root::0:root 2 | -------------------------------------------------------------------------------- /linux/inittab: -------------------------------------------------------------------------------- 1 | # Note: BusyBox init works just fine without an inittab. If no inittab is 2 | # found, it has the following default behavior: 3 | # ::sysinit:/etc/init.d/rcS 4 | # ::askfirst:/bin/sh 5 | # ::ctrlaltdel:/sbin/reboot 6 | # ::shutdown:/sbin/swapoff -a 7 | # ::shutdown:/bin/umount -a -r 8 | # ::restart:/sbin/init 9 | # tty2::askfirst:/bin/sh 10 | # tty3::askfirst:/bin/sh 11 | # tty4::askfirst:/bin/sh 12 | # 13 | # Boot-time system configuration/initialization script. 14 | # This is run first except when booting in single-user mode. 15 | # 16 | #::sysinit:/etc/init.d/rcS 17 | ::sysinit:/bin/mount -a 18 | 19 | # /bin/sh invocations on selected ttys 20 | # 21 | # Note below that we prefix the shell commands with a "-" to indicate to the 22 | # shell that it is supposed to be a login shell. Normally this is handled by 23 | # login, but since we are bypassing login in this case, BusyBox lets you do 24 | # this yourself... 25 | # 26 | # Start an "askfirst" shell on the console (whatever that may be) 27 | ::askfirst:-/bin/sh 28 | # Start an "askfirst" shell on /dev/tty2-4 29 | #tty2::askfirst:-/bin/sh 30 | #tty3::askfirst:-/bin/sh 31 | #tty4::askfirst:-/bin/sh 32 | 33 | # /bin/getty invocations for selected ttys 34 | #tty4::respawn:/bin/getty 38400 tty5 35 | #tty5::respawn:/bin/getty 38400 tty6 36 | 37 | # Example of how to put a getty on a serial line (for a terminal) 38 | ::respawn:/bin/getty -L ttyS0 9600 vt100 39 | #::respawn:/bin/getty -L ttyS1 9600 vt100 40 | # 41 | # Example how to put a getty on a modem line. 42 | #::respawn:/bin/getty 57600 ttyS2 43 | 44 | # Stuff to do when restarting the init process 45 | ::restart:/bin/init 46 | 47 | # Stuff to do before rebooting 48 | #::ctrlaltdel:/bin/reboot 49 | ::shutdown:/bin/umount -a -r 50 | #::shutdown:/bin/swapoff -a 51 | 52 | -------------------------------------------------------------------------------- /linux/passwd: -------------------------------------------------------------------------------- 1 | root:Dtd09GUh1f5sY:0:0:root:/root:/bin/sh 2 | -------------------------------------------------------------------------------- /linux/patches/bugs.c.patch: -------------------------------------------------------------------------------- 1 | --- arch/x86/kernel/cpu/bugs.c.new 2022-04-21 10:22:57.337425325 -0400 2 | +++ arch/x86/kernel/cpu/bugs.c 2022-04-21 10:34:47.550249356 -0400 3 | @@ -36,6 +36,7 @@ 4 | 5 | #include "cpu.h" 6 | 7 | +#ifndef CONFIG_M486 8 | static void __init spectre_v1_select_mitigation(void); 9 | static void __init spectre_v2_select_mitigation(void); 10 | static void __init ssb_select_mitigation(void); 11 | @@ -45,6 +46,7 @@ 12 | static void __init taa_select_mitigation(void); 13 | static void __init srbds_select_mitigation(void); 14 | static void __init l1d_flush_select_mitigation(void); 15 | +#endif // CONFIG_M486 16 | 17 | /* The base value of the SPEC_CTRL MSR that always has to be preserved. */ 18 | u64 x86_spec_ctrl_base; 19 | @@ -112,6 +114,7 @@ 20 | if (boot_cpu_has(X86_FEATURE_STIBP)) 21 | x86_spec_ctrl_mask |= SPEC_CTRL_STIBP; 22 | 23 | +#ifndef CONFIG_M486 24 | /* Select the proper CPU mitigations before patching alternatives: */ 25 | spectre_v1_select_mitigation(); 26 | spectre_v2_select_mitigation(); 27 | @@ -127,6 +130,7 @@ 28 | * mitigation until after TAA mitigation selection is done. 29 | */ 30 | mds_print_mitigation(); 31 | +#endif // CONFIG_M486 32 | 33 | arch_smt_update(); 34 | 35 | @@ -248,6 +252,7 @@ 36 | [MDS_MITIGATION_VMWERV] = "Vulnerable: Clear CPU buffers attempted, no microcode", 37 | }; 38 | 39 | +#ifndef CONFIG_M486 40 | static void __init mds_select_mitigation(void) 41 | { 42 | if (!boot_cpu_has_bug(X86_BUG_MDS) || cpu_mitigations_off()) { 43 | @@ -274,6 +279,7 @@ 44 | 45 | pr_info("%s\n", mds_strings[mds_mitigation]); 46 | } 47 | +#endif // CONFIG_M486 48 | 49 | static int __init mds_cmdline(char *str) 50 | { 51 | @@ -317,6 +323,7 @@ 52 | [TAA_MITIGATION_TSX_DISABLED] = "Mitigation: TSX disabled", 53 | }; 54 | 55 | +#ifndef CONFIG_M486 56 | static void __init taa_select_mitigation(void) 57 | { 58 | u64 ia32_cap; 59 | @@ -388,6 +395,7 @@ 60 | out: 61 | pr_info("%s\n", taa_strings[taa_mitigation]); 62 | } 63 | +#endif // CONFIG_M486 64 | 65 | static int __init tsx_async_abort_parse_cmdline(char *str) 66 | { 67 | @@ -463,6 +471,7 @@ 68 | wrmsrl(MSR_IA32_MCU_OPT_CTRL, mcu_ctrl); 69 | } 70 | 71 | +#ifndef CONFIG_M486 72 | static void __init srbds_select_mitigation(void) 73 | { 74 | u64 ia32_cap; 75 | @@ -487,6 +496,7 @@ 76 | update_srbds_msr(); 77 | pr_info("%s\n", srbds_strings[srbds_mitigation]); 78 | } 79 | +#endif // CONFIG_M486 80 | 81 | static int __init srbds_parse_cmdline(char *str) 82 | { 83 | @@ -504,6 +514,7 @@ 84 | #undef pr_fmt 85 | #define pr_fmt(fmt) "L1D Flush : " fmt 86 | 87 | +#ifndef CONFIG_M486 88 | enum l1d_flush_mitigations { 89 | L1D_FLUSH_OFF = 0, 90 | L1D_FLUSH_ON, 91 | @@ -528,10 +539,12 @@ 92 | return 0; 93 | } 94 | early_param("l1d_flush", l1d_flush_parse_cmdline); 95 | +#endif // CONFIG_M486 96 | 97 | #undef pr_fmt 98 | #define pr_fmt(fmt) "Spectre V1 : " fmt 99 | 100 | +#ifndef CONFIG_M486 101 | enum spectre_v1_mitigation { 102 | SPECTRE_V1_MITIGATION_NONE, 103 | SPECTRE_V1_MITIGATION_AUTO, 104 | @@ -618,6 +631,7 @@ 105 | return 0; 106 | } 107 | early_param("nospectre_v1", nospectre_v1_cmdline); 108 | +#endif // CONFIG_M486 109 | 110 | #undef pr_fmt 111 | #define pr_fmt(fmt) "Spectre V2 : " fmt 112 | @@ -729,6 +743,7 @@ 113 | { "seccomp,ibpb", SPECTRE_V2_USER_CMD_SECCOMP_IBPB, false }, 114 | }; 115 | 116 | +#ifndef CONFIG_M486 117 | static void __init spec_v2_user_print_cond(const char *reason, bool secure) 118 | { 119 | if (boot_cpu_has_bug(X86_BUG_SPECTRE_V2) != secure) 120 | @@ -1071,6 +1086,7 @@ 121 | /* Set up IBPB and STIBP depending on the general spectre V2 command */ 122 | spectre_v2_user_select_mitigation(cmd); 123 | } 124 | +#endif // CONFIG_M486 125 | 126 | static void update_stibp_msr(void * __unused) 127 | { 128 | @@ -1207,6 +1223,7 @@ 129 | { "seccomp", SPEC_STORE_BYPASS_CMD_SECCOMP }, /* Disable Speculative Store Bypass via prctl and seccomp */ 130 | }; 131 | 132 | +#ifndef CONFIG_M486 133 | static enum ssb_mitigation_cmd __init ssb_parse_cmdline(void) 134 | { 135 | enum ssb_mitigation_cmd cmd = SPEC_STORE_BYPASS_CMD_AUTO; 136 | @@ -1316,6 +1333,7 @@ 137 | if (boot_cpu_has_bug(X86_BUG_SPEC_STORE_BYPASS)) 138 | pr_info("%s\n", ssb_strings[ssb_mode]); 139 | } 140 | +#endif // CONFIG_M486 141 | 142 | #undef pr_fmt 143 | #define pr_fmt(fmt) "Speculation prctl: " fmt 144 | @@ -1573,6 +1591,7 @@ 145 | enum vmx_l1d_flush_state l1tf_vmx_mitigation = VMENTER_L1D_FLUSH_AUTO; 146 | EXPORT_SYMBOL_GPL(l1tf_vmx_mitigation); 147 | 148 | +#ifndef CONFIG_M486 149 | /* 150 | * These CPUs all support 44bits physical address space internally in the 151 | * cache but CPUID can report a smaller number of physical address bits. 152 | @@ -1926,3 +1945,4 @@ 153 | return cpu_show_common(dev, attr, buf, X86_BUG_SRBDS); 154 | } 155 | #endif 156 | +#endif // CONFIG_M486 157 | -------------------------------------------------------------------------------- /linux/patches/gen_initramfs.sh.patch: -------------------------------------------------------------------------------- 1 | --- usr/gen_initramfs.sh 2022-04-08 07:59:05.000000000 -0400 2 | +++ usr/gen_initramfs.sh.new 2022-04-21 08:51:04.635080820 -0400 3 | @@ -187,8 +187,8 @@ 4 | } 5 | 6 | prog=$0 7 | -root_uid=0 8 | -root_gid=0 9 | +root_uid="squash" 10 | +root_gid="squash" 11 | dep_list= 12 | cpio_list=$(mktemp ${TMPDIR:-/tmp}/cpiolist.XXXXXX) 13 | output="/dev/stdout" 14 | @@ -209,13 +209,13 @@ 15 | shift 16 | ;; 17 | "-u") # map $1 to uid=0 (root) 18 | - root_uid="$1" 19 | - [ "$root_uid" = "-1" ] && root_uid=$(id -u || echo 0) 20 | +# root_uid="$1" 21 | +# [ "$root_uid" = "-1" ] && root_uid=$(id -u || echo 0) 22 | shift 23 | ;; 24 | "-g") # map $1 to gid=0 (root) 25 | - root_gid="$1" 26 | - [ "$root_gid" = "-1" ] && root_gid=$(id -g || echo 0) 27 | +# root_gid="$1" 28 | +# [ "$root_gid" = "-1" ] && root_gid=$(id -g || echo 0) 29 | shift 30 | ;; 31 | "-h") 32 | -------------------------------------------------------------------------------- /linux/patches/initramfs.c.patch: -------------------------------------------------------------------------------- 1 | --- init/initramfs.c.new 2022-04-21 10:43:58.644900319 -0400 2 | +++ init/initramfs.c 2022-04-21 10:46:57.309758246 -0400 3 | @@ -461,7 +461,7 @@ 4 | 5 | #include 6 | 7 | -static char * __init unpack_to_rootfs(char *buf, unsigned long len) 8 | +static char * __init do_unpack_to_rootfs(char *buf, unsigned long len, char *output) 9 | { 10 | long written; 11 | decompress_fn decompress; 12 | @@ -497,7 +497,7 @@ 13 | decompress = decompress_method(buf, len, &compress_name); 14 | pr_debug("Detected %s compressed data\n", compress_name); 15 | if (decompress) { 16 | - int res = decompress(buf, len, NULL, flush_buffer, NULL, 17 | + int res = decompress(buf, len, NULL, flush_buffer, output, 18 | &my_inptr, error); 19 | if (res) 20 | error("decompressor failed"); 21 | @@ -523,6 +523,11 @@ 22 | return message; 23 | } 24 | 25 | +static char * __init unpack_to_rootfs(char *buf, unsigned long len) 26 | +{ 27 | + return do_unpack_to_rootfs(buf, len, NULL); 28 | +} 29 | + 30 | static int __initdata do_retain_initrd; 31 | 32 | static int __init retain_initrd_param(char *str) 33 | @@ -683,7 +688,11 @@ 34 | else 35 | printk(KERN_INFO "Unpacking initramfs...\n"); 36 | 37 | - err = unpack_to_rootfs((char *)initrd_start, initrd_end - initrd_start); 38 | + //err = unpack_to_rootfs((char *)initrd_start, initrd_end - initrd_start); 39 | + void *output = vmalloc(0x80000); 40 | + err = do_unpack_to_rootfs((char *)initrd_start, initrd_end - initrd_start, output); 41 | + vfree(output); 42 | + 43 | if (err) { 44 | #ifdef CONFIG_BLK_DEV_RAM 45 | populate_initrd_image(err); 46 | -------------------------------------------------------------------------------- /linux/patches/intel.c.patch: -------------------------------------------------------------------------------- 1 | --- arch/x86/kernel/cpu/intel.c.new 2022-04-21 10:30:16.303395343 -0400 2 | +++ arch/x86/kernel/cpu/intel.c 2022-04-21 10:31:18.648938081 -0400 3 | @@ -752,6 +752,8 @@ 4 | } 5 | #endif 6 | 7 | +#ifndef CONFIG_M486 8 | + 9 | #define TLB_INST_4K 0x01 10 | #define TLB_INST_4M 0x02 11 | #define TLB_INST_2M_4M 0x03 12 | @@ -926,6 +928,14 @@ 13 | } 14 | } 15 | 16 | +#else 17 | + 18 | +static void intel_detect_tlb(struct cpuinfo_x86 *c) 19 | +{ 20 | +} 21 | + 22 | +#endif // CONFIG_M486 23 | + 24 | static const struct cpu_dev intel_cpu_dev = { 25 | .c_vendor = "Intel", 26 | .c_ident = { "GenuineIntel" }, 27 | -------------------------------------------------------------------------------- /linux/patches/rmpiggy.S.patch: -------------------------------------------------------------------------------- 1 | --- arch/x86/realmode/rmpiggy.S.new 2022-04-21 09:00:39.636016815 -0400 2 | +++ arch/x86/realmode/rmpiggy.S 2022-04-21 09:00:51.392134904 -0400 3 | @@ -3,17 +3,17 @@ 4 | * Wrapper script for the realmode binary as a transport object 5 | * before copying to low memory. 6 | */ 7 | -#include 8 | -#include 9 | - 10 | - .section ".init.data","aw" 11 | - 12 | - .balign PAGE_SIZE 13 | - 14 | -SYM_DATA_START(real_mode_blob) 15 | - .incbin "arch/x86/realmode/rm/realmode.bin" 16 | -SYM_DATA_END_LABEL(real_mode_blob, SYM_L_GLOBAL, real_mode_blob_end) 17 | - 18 | -SYM_DATA_START(real_mode_relocs) 19 | - .incbin "arch/x86/realmode/rm/realmode.relocs" 20 | -SYM_DATA_END(real_mode_relocs) 21 | +//#include 22 | +//#include 23 | +// 24 | +// .section ".init.data","aw" 25 | +// 26 | +// .balign PAGE_SIZE 27 | +// 28 | +//SYM_DATA_START(real_mode_blob) 29 | +// .incbin "arch/x86/realmode/rm/realmode.bin" 30 | +//SYM_DATA_END_LABEL(real_mode_blob, SYM_L_GLOBAL, real_mode_blob_end) 31 | +// 32 | +//SYM_DATA_START(real_mode_relocs) 33 | +// .incbin "arch/x86/realmode/rm/realmode.relocs" 34 | +//SYM_DATA_END(real_mode_relocs) 35 | -------------------------------------------------------------------------------- /linux/rcS: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | echo "Mounting filesystems..." 4 | mount -a 5 | mkdir /dev/pts 6 | mount devpts /dev/pts -t devpts -o gid=5,mode=620 7 | 8 | echo "Ready." 9 | 10 | -------------------------------------------------------------------------------- /preinit/Makefile: -------------------------------------------------------------------------------- 1 | all: 2 | i486-linux-gcc \ 3 | -static -nostdlib -nostartfiles -ffreestanding -fno-pic -fno-pie \ 4 | -Os -ffunction-sections -fdata-sections -Wl,-gc-sections \ 5 | -Ilinux-headers \ 6 | init.c -o init 7 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm-generic/.auxvec.h.cmd: -------------------------------------------------------------------------------- 1 | cmd_usr/include/asm-generic/auxvec.h := sh ./scripts/headers_install.sh include/uapi/asm-generic/auxvec.h usr/include/asm-generic/auxvec.h 2 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm-generic/.bitsperlong.h.cmd: -------------------------------------------------------------------------------- 1 | cmd_usr/include/asm-generic/bitsperlong.h := sh ./scripts/headers_install.sh include/uapi/asm-generic/bitsperlong.h usr/include/asm-generic/bitsperlong.h 2 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm-generic/.bpf_perf_event.h.cmd: -------------------------------------------------------------------------------- 1 | cmd_usr/include/asm-generic/bpf_perf_event.h := sh ./scripts/headers_install.sh include/uapi/asm-generic/bpf_perf_event.h usr/include/asm-generic/bpf_perf_event.h 2 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm-generic/.errno-base.h.cmd: -------------------------------------------------------------------------------- 1 | cmd_usr/include/asm-generic/errno-base.h := sh ./scripts/headers_install.sh include/uapi/asm-generic/errno-base.h usr/include/asm-generic/errno-base.h 2 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm-generic/.errno.h.cmd: -------------------------------------------------------------------------------- 1 | cmd_usr/include/asm-generic/errno.h := sh ./scripts/headers_install.sh include/uapi/asm-generic/errno.h usr/include/asm-generic/errno.h 2 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm-generic/.fcntl.h.cmd: -------------------------------------------------------------------------------- 1 | cmd_usr/include/asm-generic/fcntl.h := sh ./scripts/headers_install.sh include/uapi/asm-generic/fcntl.h usr/include/asm-generic/fcntl.h 2 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm-generic/.hugetlb_encode.h.cmd: -------------------------------------------------------------------------------- 1 | cmd_usr/include/asm-generic/hugetlb_encode.h := sh ./scripts/headers_install.sh include/uapi/asm-generic/hugetlb_encode.h usr/include/asm-generic/hugetlb_encode.h 2 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm-generic/.int-l64.h.cmd: -------------------------------------------------------------------------------- 1 | cmd_usr/include/asm-generic/int-l64.h := sh ./scripts/headers_install.sh include/uapi/asm-generic/int-l64.h usr/include/asm-generic/int-l64.h 2 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm-generic/.int-ll64.h.cmd: -------------------------------------------------------------------------------- 1 | cmd_usr/include/asm-generic/int-ll64.h := sh ./scripts/headers_install.sh include/uapi/asm-generic/int-ll64.h usr/include/asm-generic/int-ll64.h 2 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm-generic/.ioctl.h.cmd: -------------------------------------------------------------------------------- 1 | cmd_usr/include/asm-generic/ioctl.h := sh ./scripts/headers_install.sh include/uapi/asm-generic/ioctl.h usr/include/asm-generic/ioctl.h 2 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm-generic/.ioctls.h.cmd: -------------------------------------------------------------------------------- 1 | cmd_usr/include/asm-generic/ioctls.h := sh ./scripts/headers_install.sh include/uapi/asm-generic/ioctls.h usr/include/asm-generic/ioctls.h 2 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm-generic/.ipcbuf.h.cmd: -------------------------------------------------------------------------------- 1 | cmd_usr/include/asm-generic/ipcbuf.h := sh ./scripts/headers_install.sh include/uapi/asm-generic/ipcbuf.h usr/include/asm-generic/ipcbuf.h 2 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm-generic/.kvm_para.h.cmd: -------------------------------------------------------------------------------- 1 | cmd_usr/include/asm-generic/kvm_para.h := sh ./scripts/headers_install.sh include/uapi/asm-generic/kvm_para.h usr/include/asm-generic/kvm_para.h 2 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm-generic/.mman-common.h.cmd: -------------------------------------------------------------------------------- 1 | cmd_usr/include/asm-generic/mman-common.h := sh ./scripts/headers_install.sh include/uapi/asm-generic/mman-common.h usr/include/asm-generic/mman-common.h 2 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm-generic/.mman.h.cmd: -------------------------------------------------------------------------------- 1 | cmd_usr/include/asm-generic/mman.h := sh ./scripts/headers_install.sh include/uapi/asm-generic/mman.h usr/include/asm-generic/mman.h 2 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm-generic/.msgbuf.h.cmd: -------------------------------------------------------------------------------- 1 | cmd_usr/include/asm-generic/msgbuf.h := sh ./scripts/headers_install.sh include/uapi/asm-generic/msgbuf.h usr/include/asm-generic/msgbuf.h 2 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm-generic/.param.h.cmd: -------------------------------------------------------------------------------- 1 | cmd_usr/include/asm-generic/param.h := sh ./scripts/headers_install.sh include/uapi/asm-generic/param.h usr/include/asm-generic/param.h 2 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm-generic/.poll.h.cmd: -------------------------------------------------------------------------------- 1 | cmd_usr/include/asm-generic/poll.h := sh ./scripts/headers_install.sh include/uapi/asm-generic/poll.h usr/include/asm-generic/poll.h 2 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm-generic/.posix_types.h.cmd: -------------------------------------------------------------------------------- 1 | cmd_usr/include/asm-generic/posix_types.h := sh ./scripts/headers_install.sh include/uapi/asm-generic/posix_types.h usr/include/asm-generic/posix_types.h 2 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm-generic/.resource.h.cmd: -------------------------------------------------------------------------------- 1 | cmd_usr/include/asm-generic/resource.h := sh ./scripts/headers_install.sh include/uapi/asm-generic/resource.h usr/include/asm-generic/resource.h 2 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm-generic/.sembuf.h.cmd: -------------------------------------------------------------------------------- 1 | cmd_usr/include/asm-generic/sembuf.h := sh ./scripts/headers_install.sh include/uapi/asm-generic/sembuf.h usr/include/asm-generic/sembuf.h 2 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm-generic/.setup.h.cmd: -------------------------------------------------------------------------------- 1 | cmd_usr/include/asm-generic/setup.h := sh ./scripts/headers_install.sh include/uapi/asm-generic/setup.h usr/include/asm-generic/setup.h 2 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm-generic/.shmbuf.h.cmd: -------------------------------------------------------------------------------- 1 | cmd_usr/include/asm-generic/shmbuf.h := sh ./scripts/headers_install.sh include/uapi/asm-generic/shmbuf.h usr/include/asm-generic/shmbuf.h 2 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm-generic/.siginfo.h.cmd: -------------------------------------------------------------------------------- 1 | cmd_usr/include/asm-generic/siginfo.h := sh ./scripts/headers_install.sh include/uapi/asm-generic/siginfo.h usr/include/asm-generic/siginfo.h 2 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm-generic/.signal-defs.h.cmd: -------------------------------------------------------------------------------- 1 | cmd_usr/include/asm-generic/signal-defs.h := sh ./scripts/headers_install.sh include/uapi/asm-generic/signal-defs.h usr/include/asm-generic/signal-defs.h 2 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm-generic/.signal.h.cmd: -------------------------------------------------------------------------------- 1 | cmd_usr/include/asm-generic/signal.h := sh ./scripts/headers_install.sh include/uapi/asm-generic/signal.h usr/include/asm-generic/signal.h 2 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm-generic/.socket.h.cmd: -------------------------------------------------------------------------------- 1 | cmd_usr/include/asm-generic/socket.h := sh ./scripts/headers_install.sh include/uapi/asm-generic/socket.h usr/include/asm-generic/socket.h 2 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm-generic/.sockios.h.cmd: -------------------------------------------------------------------------------- 1 | cmd_usr/include/asm-generic/sockios.h := sh ./scripts/headers_install.sh include/uapi/asm-generic/sockios.h usr/include/asm-generic/sockios.h 2 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm-generic/.stat.h.cmd: -------------------------------------------------------------------------------- 1 | cmd_usr/include/asm-generic/stat.h := sh ./scripts/headers_install.sh include/uapi/asm-generic/stat.h usr/include/asm-generic/stat.h 2 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm-generic/.statfs.h.cmd: -------------------------------------------------------------------------------- 1 | cmd_usr/include/asm-generic/statfs.h := sh ./scripts/headers_install.sh include/uapi/asm-generic/statfs.h usr/include/asm-generic/statfs.h 2 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm-generic/.swab.h.cmd: -------------------------------------------------------------------------------- 1 | cmd_usr/include/asm-generic/swab.h := sh ./scripts/headers_install.sh include/uapi/asm-generic/swab.h usr/include/asm-generic/swab.h 2 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm-generic/.termbits.h.cmd: -------------------------------------------------------------------------------- 1 | cmd_usr/include/asm-generic/termbits.h := sh ./scripts/headers_install.sh include/uapi/asm-generic/termbits.h usr/include/asm-generic/termbits.h 2 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm-generic/.termios.h.cmd: -------------------------------------------------------------------------------- 1 | cmd_usr/include/asm-generic/termios.h := sh ./scripts/headers_install.sh include/uapi/asm-generic/termios.h usr/include/asm-generic/termios.h 2 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm-generic/.types.h.cmd: -------------------------------------------------------------------------------- 1 | cmd_usr/include/asm-generic/types.h := sh ./scripts/headers_install.sh include/uapi/asm-generic/types.h usr/include/asm-generic/types.h 2 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm-generic/.ucontext.h.cmd: -------------------------------------------------------------------------------- 1 | cmd_usr/include/asm-generic/ucontext.h := sh ./scripts/headers_install.sh include/uapi/asm-generic/ucontext.h usr/include/asm-generic/ucontext.h 2 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm-generic/.unistd.h.cmd: -------------------------------------------------------------------------------- 1 | cmd_usr/include/asm-generic/unistd.h := sh ./scripts/headers_install.sh include/uapi/asm-generic/unistd.h usr/include/asm-generic/unistd.h 2 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm-generic/auxvec.h: -------------------------------------------------------------------------------- 1 | #ifndef __ASM_GENERIC_AUXVEC_H 2 | #define __ASM_GENERIC_AUXVEC_H 3 | /* 4 | * Not all architectures need their own auxvec.h, the most 5 | * common definitions are already in linux/auxvec.h. 6 | */ 7 | 8 | #endif /* __ASM_GENERIC_AUXVEC_H */ 9 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm-generic/bitsperlong.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 | #ifndef __ASM_GENERIC_BITS_PER_LONG 3 | #define __ASM_GENERIC_BITS_PER_LONG 4 | 5 | /* 6 | * There seems to be no way of detecting this automatically from user 7 | * space, so 64 bit architectures should override this in their 8 | * bitsperlong.h. In particular, an architecture that supports 9 | * both 32 and 64 bit user space must not rely on CONFIG_64BIT 10 | * to decide it, but rather check a compiler provided macro. 11 | */ 12 | #ifndef __BITS_PER_LONG 13 | #define __BITS_PER_LONG 32 14 | #endif 15 | 16 | #endif /* __ASM_GENERIC_BITS_PER_LONG */ 17 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm-generic/bpf_perf_event.h: -------------------------------------------------------------------------------- 1 | #ifndef __ASM_GENERIC_BPF_PERF_EVENT_H__ 2 | #define __ASM_GENERIC_BPF_PERF_EVENT_H__ 3 | 4 | #include 5 | 6 | /* Export kernel pt_regs structure */ 7 | typedef struct pt_regs bpf_user_pt_regs_t; 8 | 9 | #endif /* __ASM_GENERIC_BPF_PERF_EVENT_H__ */ 10 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm-generic/errno-base.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 | #ifndef _ASM_GENERIC_ERRNO_BASE_H 3 | #define _ASM_GENERIC_ERRNO_BASE_H 4 | 5 | #define EPERM 1 /* Operation not permitted */ 6 | #define ENOENT 2 /* No such file or directory */ 7 | #define ESRCH 3 /* No such process */ 8 | #define EINTR 4 /* Interrupted system call */ 9 | #define EIO 5 /* I/O error */ 10 | #define ENXIO 6 /* No such device or address */ 11 | #define E2BIG 7 /* Argument list too long */ 12 | #define ENOEXEC 8 /* Exec format error */ 13 | #define EBADF 9 /* Bad file number */ 14 | #define ECHILD 10 /* No child processes */ 15 | #define EAGAIN 11 /* Try again */ 16 | #define ENOMEM 12 /* Out of memory */ 17 | #define EACCES 13 /* Permission denied */ 18 | #define EFAULT 14 /* Bad address */ 19 | #define ENOTBLK 15 /* Block device required */ 20 | #define EBUSY 16 /* Device or resource busy */ 21 | #define EEXIST 17 /* File exists */ 22 | #define EXDEV 18 /* Cross-device link */ 23 | #define ENODEV 19 /* No such device */ 24 | #define ENOTDIR 20 /* Not a directory */ 25 | #define EISDIR 21 /* Is a directory */ 26 | #define EINVAL 22 /* Invalid argument */ 27 | #define ENFILE 23 /* File table overflow */ 28 | #define EMFILE 24 /* Too many open files */ 29 | #define ENOTTY 25 /* Not a typewriter */ 30 | #define ETXTBSY 26 /* Text file busy */ 31 | #define EFBIG 27 /* File too large */ 32 | #define ENOSPC 28 /* No space left on device */ 33 | #define ESPIPE 29 /* Illegal seek */ 34 | #define EROFS 30 /* Read-only file system */ 35 | #define EMLINK 31 /* Too many links */ 36 | #define EPIPE 32 /* Broken pipe */ 37 | #define EDOM 33 /* Math argument out of domain of func */ 38 | #define ERANGE 34 /* Math result not representable */ 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm-generic/errno.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 | #ifndef _ASM_GENERIC_ERRNO_H 3 | #define _ASM_GENERIC_ERRNO_H 4 | 5 | #include 6 | 7 | #define EDEADLK 35 /* Resource deadlock would occur */ 8 | #define ENAMETOOLONG 36 /* File name too long */ 9 | #define ENOLCK 37 /* No record locks available */ 10 | 11 | /* 12 | * This error code is special: arch syscall entry code will return 13 | * -ENOSYS if users try to call a syscall that doesn't exist. To keep 14 | * failures of syscalls that really do exist distinguishable from 15 | * failures due to attempts to use a nonexistent syscall, syscall 16 | * implementations should refrain from returning -ENOSYS. 17 | */ 18 | #define ENOSYS 38 /* Invalid system call number */ 19 | 20 | #define ENOTEMPTY 39 /* Directory not empty */ 21 | #define ELOOP 40 /* Too many symbolic links encountered */ 22 | #define EWOULDBLOCK EAGAIN /* Operation would block */ 23 | #define ENOMSG 42 /* No message of desired type */ 24 | #define EIDRM 43 /* Identifier removed */ 25 | #define ECHRNG 44 /* Channel number out of range */ 26 | #define EL2NSYNC 45 /* Level 2 not synchronized */ 27 | #define EL3HLT 46 /* Level 3 halted */ 28 | #define EL3RST 47 /* Level 3 reset */ 29 | #define ELNRNG 48 /* Link number out of range */ 30 | #define EUNATCH 49 /* Protocol driver not attached */ 31 | #define ENOCSI 50 /* No CSI structure available */ 32 | #define EL2HLT 51 /* Level 2 halted */ 33 | #define EBADE 52 /* Invalid exchange */ 34 | #define EBADR 53 /* Invalid request descriptor */ 35 | #define EXFULL 54 /* Exchange full */ 36 | #define ENOANO 55 /* No anode */ 37 | #define EBADRQC 56 /* Invalid request code */ 38 | #define EBADSLT 57 /* Invalid slot */ 39 | 40 | #define EDEADLOCK EDEADLK 41 | 42 | #define EBFONT 59 /* Bad font file format */ 43 | #define ENOSTR 60 /* Device not a stream */ 44 | #define ENODATA 61 /* No data available */ 45 | #define ETIME 62 /* Timer expired */ 46 | #define ENOSR 63 /* Out of streams resources */ 47 | #define ENONET 64 /* Machine is not on the network */ 48 | #define ENOPKG 65 /* Package not installed */ 49 | #define EREMOTE 66 /* Object is remote */ 50 | #define ENOLINK 67 /* Link has been severed */ 51 | #define EADV 68 /* Advertise error */ 52 | #define ESRMNT 69 /* Srmount error */ 53 | #define ECOMM 70 /* Communication error on send */ 54 | #define EPROTO 71 /* Protocol error */ 55 | #define EMULTIHOP 72 /* Multihop attempted */ 56 | #define EDOTDOT 73 /* RFS specific error */ 57 | #define EBADMSG 74 /* Not a data message */ 58 | #define EOVERFLOW 75 /* Value too large for defined data type */ 59 | #define ENOTUNIQ 76 /* Name not unique on network */ 60 | #define EBADFD 77 /* File descriptor in bad state */ 61 | #define EREMCHG 78 /* Remote address changed */ 62 | #define ELIBACC 79 /* Can not access a needed shared library */ 63 | #define ELIBBAD 80 /* Accessing a corrupted shared library */ 64 | #define ELIBSCN 81 /* .lib section in a.out corrupted */ 65 | #define ELIBMAX 82 /* Attempting to link in too many shared libraries */ 66 | #define ELIBEXEC 83 /* Cannot exec a shared library directly */ 67 | #define EILSEQ 84 /* Illegal byte sequence */ 68 | #define ERESTART 85 /* Interrupted system call should be restarted */ 69 | #define ESTRPIPE 86 /* Streams pipe error */ 70 | #define EUSERS 87 /* Too many users */ 71 | #define ENOTSOCK 88 /* Socket operation on non-socket */ 72 | #define EDESTADDRREQ 89 /* Destination address required */ 73 | #define EMSGSIZE 90 /* Message too long */ 74 | #define EPROTOTYPE 91 /* Protocol wrong type for socket */ 75 | #define ENOPROTOOPT 92 /* Protocol not available */ 76 | #define EPROTONOSUPPORT 93 /* Protocol not supported */ 77 | #define ESOCKTNOSUPPORT 94 /* Socket type not supported */ 78 | #define EOPNOTSUPP 95 /* Operation not supported on transport endpoint */ 79 | #define EPFNOSUPPORT 96 /* Protocol family not supported */ 80 | #define EAFNOSUPPORT 97 /* Address family not supported by protocol */ 81 | #define EADDRINUSE 98 /* Address already in use */ 82 | #define EADDRNOTAVAIL 99 /* Cannot assign requested address */ 83 | #define ENETDOWN 100 /* Network is down */ 84 | #define ENETUNREACH 101 /* Network is unreachable */ 85 | #define ENETRESET 102 /* Network dropped connection because of reset */ 86 | #define ECONNABORTED 103 /* Software caused connection abort */ 87 | #define ECONNRESET 104 /* Connection reset by peer */ 88 | #define ENOBUFS 105 /* No buffer space available */ 89 | #define EISCONN 106 /* Transport endpoint is already connected */ 90 | #define ENOTCONN 107 /* Transport endpoint is not connected */ 91 | #define ESHUTDOWN 108 /* Cannot send after transport endpoint shutdown */ 92 | #define ETOOMANYREFS 109 /* Too many references: cannot splice */ 93 | #define ETIMEDOUT 110 /* Connection timed out */ 94 | #define ECONNREFUSED 111 /* Connection refused */ 95 | #define EHOSTDOWN 112 /* Host is down */ 96 | #define EHOSTUNREACH 113 /* No route to host */ 97 | #define EALREADY 114 /* Operation already in progress */ 98 | #define EINPROGRESS 115 /* Operation now in progress */ 99 | #define ESTALE 116 /* Stale file handle */ 100 | #define EUCLEAN 117 /* Structure needs cleaning */ 101 | #define ENOTNAM 118 /* Not a XENIX named type file */ 102 | #define ENAVAIL 119 /* No XENIX semaphores available */ 103 | #define EISNAM 120 /* Is a named type file */ 104 | #define EREMOTEIO 121 /* Remote I/O error */ 105 | #define EDQUOT 122 /* Quota exceeded */ 106 | 107 | #define ENOMEDIUM 123 /* No medium found */ 108 | #define EMEDIUMTYPE 124 /* Wrong medium type */ 109 | #define ECANCELED 125 /* Operation Canceled */ 110 | #define ENOKEY 126 /* Required key not available */ 111 | #define EKEYEXPIRED 127 /* Key has expired */ 112 | #define EKEYREVOKED 128 /* Key has been revoked */ 113 | #define EKEYREJECTED 129 /* Key was rejected by service */ 114 | 115 | /* for robust mutexes */ 116 | #define EOWNERDEAD 130 /* Owner died */ 117 | #define ENOTRECOVERABLE 131 /* State not recoverable */ 118 | 119 | #define ERFKILL 132 /* Operation not possible due to RF-kill */ 120 | 121 | #define EHWPOISON 133 /* Memory page has hardware error */ 122 | 123 | #endif 124 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm-generic/fcntl.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 | #ifndef _ASM_GENERIC_FCNTL_H 3 | #define _ASM_GENERIC_FCNTL_H 4 | 5 | #include 6 | 7 | /* 8 | * FMODE_EXEC is 0x20 9 | * FMODE_NONOTIFY is 0x4000000 10 | * These cannot be used by userspace O_* until internal and external open 11 | * flags are split. 12 | * -Eric Paris 13 | */ 14 | 15 | /* 16 | * When introducing new O_* bits, please check its uniqueness in fcntl_init(). 17 | */ 18 | 19 | #define O_ACCMODE 00000003 20 | #define O_RDONLY 00000000 21 | #define O_WRONLY 00000001 22 | #define O_RDWR 00000002 23 | #ifndef O_CREAT 24 | #define O_CREAT 00000100 /* not fcntl */ 25 | #endif 26 | #ifndef O_EXCL 27 | #define O_EXCL 00000200 /* not fcntl */ 28 | #endif 29 | #ifndef O_NOCTTY 30 | #define O_NOCTTY 00000400 /* not fcntl */ 31 | #endif 32 | #ifndef O_TRUNC 33 | #define O_TRUNC 00001000 /* not fcntl */ 34 | #endif 35 | #ifndef O_APPEND 36 | #define O_APPEND 00002000 37 | #endif 38 | #ifndef O_NONBLOCK 39 | #define O_NONBLOCK 00004000 40 | #endif 41 | #ifndef O_DSYNC 42 | #define O_DSYNC 00010000 /* used to be O_SYNC, see below */ 43 | #endif 44 | #ifndef FASYNC 45 | #define FASYNC 00020000 /* fcntl, for BSD compatibility */ 46 | #endif 47 | #ifndef O_DIRECT 48 | #define O_DIRECT 00040000 /* direct disk access hint */ 49 | #endif 50 | #ifndef O_LARGEFILE 51 | #define O_LARGEFILE 00100000 52 | #endif 53 | #ifndef O_DIRECTORY 54 | #define O_DIRECTORY 00200000 /* must be a directory */ 55 | #endif 56 | #ifndef O_NOFOLLOW 57 | #define O_NOFOLLOW 00400000 /* don't follow links */ 58 | #endif 59 | #ifndef O_NOATIME 60 | #define O_NOATIME 01000000 61 | #endif 62 | #ifndef O_CLOEXEC 63 | #define O_CLOEXEC 02000000 /* set close_on_exec */ 64 | #endif 65 | 66 | /* 67 | * Before Linux 2.6.33 only O_DSYNC semantics were implemented, but using 68 | * the O_SYNC flag. We continue to use the existing numerical value 69 | * for O_DSYNC semantics now, but using the correct symbolic name for it. 70 | * This new value is used to request true Posix O_SYNC semantics. It is 71 | * defined in this strange way to make sure applications compiled against 72 | * new headers get at least O_DSYNC semantics on older kernels. 73 | * 74 | * This has the nice side-effect that we can simply test for O_DSYNC 75 | * wherever we do not care if O_DSYNC or O_SYNC is used. 76 | * 77 | * Note: __O_SYNC must never be used directly. 78 | */ 79 | #ifndef O_SYNC 80 | #define __O_SYNC 04000000 81 | #define O_SYNC (__O_SYNC|O_DSYNC) 82 | #endif 83 | 84 | #ifndef O_PATH 85 | #define O_PATH 010000000 86 | #endif 87 | 88 | #ifndef __O_TMPFILE 89 | #define __O_TMPFILE 020000000 90 | #endif 91 | 92 | /* a horrid kludge trying to make sure that this will fail on old kernels */ 93 | #define O_TMPFILE (__O_TMPFILE | O_DIRECTORY) 94 | #define O_TMPFILE_MASK (__O_TMPFILE | O_DIRECTORY | O_CREAT) 95 | 96 | #ifndef O_NDELAY 97 | #define O_NDELAY O_NONBLOCK 98 | #endif 99 | 100 | #define F_DUPFD 0 /* dup */ 101 | #define F_GETFD 1 /* get close_on_exec */ 102 | #define F_SETFD 2 /* set/clear close_on_exec */ 103 | #define F_GETFL 3 /* get file->f_flags */ 104 | #define F_SETFL 4 /* set file->f_flags */ 105 | #ifndef F_GETLK 106 | #define F_GETLK 5 107 | #define F_SETLK 6 108 | #define F_SETLKW 7 109 | #endif 110 | #ifndef F_SETOWN 111 | #define F_SETOWN 8 /* for sockets. */ 112 | #define F_GETOWN 9 /* for sockets. */ 113 | #endif 114 | #ifndef F_SETSIG 115 | #define F_SETSIG 10 /* for sockets. */ 116 | #define F_GETSIG 11 /* for sockets. */ 117 | #endif 118 | 119 | #ifndef CONFIG_64BIT 120 | #ifndef F_GETLK64 121 | #define F_GETLK64 12 /* using 'struct flock64' */ 122 | #define F_SETLK64 13 123 | #define F_SETLKW64 14 124 | #endif 125 | #endif 126 | 127 | #ifndef F_SETOWN_EX 128 | #define F_SETOWN_EX 15 129 | #define F_GETOWN_EX 16 130 | #endif 131 | 132 | #ifndef F_GETOWNER_UIDS 133 | #define F_GETOWNER_UIDS 17 134 | #endif 135 | 136 | /* 137 | * Open File Description Locks 138 | * 139 | * Usually record locks held by a process are released on *any* close and are 140 | * not inherited across a fork(). 141 | * 142 | * These cmd values will set locks that conflict with process-associated 143 | * record locks, but are "owned" by the open file description, not the 144 | * process. This means that they are inherited across fork() like BSD (flock) 145 | * locks, and they are only released automatically when the last reference to 146 | * the the open file against which they were acquired is put. 147 | */ 148 | #define F_OFD_GETLK 36 149 | #define F_OFD_SETLK 37 150 | #define F_OFD_SETLKW 38 151 | 152 | #define F_OWNER_TID 0 153 | #define F_OWNER_PID 1 154 | #define F_OWNER_PGRP 2 155 | 156 | struct f_owner_ex { 157 | int type; 158 | __kernel_pid_t pid; 159 | }; 160 | 161 | /* for F_[GET|SET]FL */ 162 | #define FD_CLOEXEC 1 /* actually anything with low bit set goes */ 163 | 164 | /* for posix fcntl() and lockf() */ 165 | #ifndef F_RDLCK 166 | #define F_RDLCK 0 167 | #define F_WRLCK 1 168 | #define F_UNLCK 2 169 | #endif 170 | 171 | /* for old implementation of bsd flock () */ 172 | #ifndef F_EXLCK 173 | #define F_EXLCK 4 /* or 3 */ 174 | #define F_SHLCK 8 /* or 4 */ 175 | #endif 176 | 177 | /* operations for bsd flock(), also used by the kernel implementation */ 178 | #define LOCK_SH 1 /* shared lock */ 179 | #define LOCK_EX 2 /* exclusive lock */ 180 | #define LOCK_NB 4 /* or'd with one of the above to prevent 181 | blocking */ 182 | #define LOCK_UN 8 /* remove lock */ 183 | 184 | /* 185 | * LOCK_MAND support has been removed from the kernel. We leave the symbols 186 | * here to not break legacy builds, but these should not be used in new code. 187 | */ 188 | #define LOCK_MAND 32 /* This is a mandatory flock ... */ 189 | #define LOCK_READ 64 /* which allows concurrent read operations */ 190 | #define LOCK_WRITE 128 /* which allows concurrent write operations */ 191 | #define LOCK_RW 192 /* which allows concurrent read & write ops */ 192 | 193 | #define F_LINUX_SPECIFIC_BASE 1024 194 | 195 | #ifndef HAVE_ARCH_STRUCT_FLOCK 196 | #ifndef __ARCH_FLOCK_PAD 197 | #define __ARCH_FLOCK_PAD 198 | #endif 199 | 200 | struct flock { 201 | short l_type; 202 | short l_whence; 203 | __kernel_off_t l_start; 204 | __kernel_off_t l_len; 205 | __kernel_pid_t l_pid; 206 | __ARCH_FLOCK_PAD 207 | }; 208 | #endif 209 | 210 | #ifndef HAVE_ARCH_STRUCT_FLOCK64 211 | #ifndef __ARCH_FLOCK64_PAD 212 | #define __ARCH_FLOCK64_PAD 213 | #endif 214 | 215 | struct flock64 { 216 | short l_type; 217 | short l_whence; 218 | __kernel_loff_t l_start; 219 | __kernel_loff_t l_len; 220 | __kernel_pid_t l_pid; 221 | __ARCH_FLOCK64_PAD 222 | }; 223 | #endif 224 | 225 | #endif /* _ASM_GENERIC_FCNTL_H */ 226 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm-generic/hugetlb_encode.h: -------------------------------------------------------------------------------- 1 | #ifndef _ASM_GENERIC_HUGETLB_ENCODE_H_ 2 | #define _ASM_GENERIC_HUGETLB_ENCODE_H_ 3 | 4 | /* 5 | * Several system calls take a flag to request "hugetlb" huge pages. 6 | * Without further specification, these system calls will use the 7 | * system's default huge page size. If a system supports multiple 8 | * huge page sizes, the desired huge page size can be specified in 9 | * bits [26:31] of the flag arguments. The value in these 6 bits 10 | * will encode the log2 of the huge page size. 11 | * 12 | * The following definitions are associated with this huge page size 13 | * encoding in flag arguments. System call specific header files 14 | * that use this encoding should include this file. They can then 15 | * provide definitions based on these with their own specific prefix. 16 | * for example: 17 | * #define MAP_HUGE_SHIFT HUGETLB_FLAG_ENCODE_SHIFT 18 | */ 19 | 20 | #define HUGETLB_FLAG_ENCODE_SHIFT 26 21 | #define HUGETLB_FLAG_ENCODE_MASK 0x3f 22 | 23 | #define HUGETLB_FLAG_ENCODE_16KB (14 << HUGETLB_FLAG_ENCODE_SHIFT) 24 | #define HUGETLB_FLAG_ENCODE_64KB (16 << HUGETLB_FLAG_ENCODE_SHIFT) 25 | #define HUGETLB_FLAG_ENCODE_512KB (19 << HUGETLB_FLAG_ENCODE_SHIFT) 26 | #define HUGETLB_FLAG_ENCODE_1MB (20 << HUGETLB_FLAG_ENCODE_SHIFT) 27 | #define HUGETLB_FLAG_ENCODE_2MB (21 << HUGETLB_FLAG_ENCODE_SHIFT) 28 | #define HUGETLB_FLAG_ENCODE_8MB (23 << HUGETLB_FLAG_ENCODE_SHIFT) 29 | #define HUGETLB_FLAG_ENCODE_16MB (24 << HUGETLB_FLAG_ENCODE_SHIFT) 30 | #define HUGETLB_FLAG_ENCODE_32MB (25 << HUGETLB_FLAG_ENCODE_SHIFT) 31 | #define HUGETLB_FLAG_ENCODE_256MB (28 << HUGETLB_FLAG_ENCODE_SHIFT) 32 | #define HUGETLB_FLAG_ENCODE_512MB (29 << HUGETLB_FLAG_ENCODE_SHIFT) 33 | #define HUGETLB_FLAG_ENCODE_1GB (30 << HUGETLB_FLAG_ENCODE_SHIFT) 34 | #define HUGETLB_FLAG_ENCODE_2GB (31 << HUGETLB_FLAG_ENCODE_SHIFT) 35 | #define HUGETLB_FLAG_ENCODE_16GB (34 << HUGETLB_FLAG_ENCODE_SHIFT) 36 | 37 | #endif /* _ASM_GENERIC_HUGETLB_ENCODE_H_ */ 38 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm-generic/int-l64.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 | /* 3 | * asm-generic/int-l64.h 4 | * 5 | * Integer declarations for architectures which use "long" 6 | * for 64-bit types. 7 | */ 8 | 9 | #ifndef _ASM_GENERIC_INT_L64_H 10 | #define _ASM_GENERIC_INT_L64_H 11 | 12 | #include 13 | 14 | #ifndef __ASSEMBLY__ 15 | /* 16 | * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the 17 | * header files exported to user space 18 | */ 19 | 20 | typedef __signed__ char __s8; 21 | typedef unsigned char __u8; 22 | 23 | typedef __signed__ short __s16; 24 | typedef unsigned short __u16; 25 | 26 | typedef __signed__ int __s32; 27 | typedef unsigned int __u32; 28 | 29 | typedef __signed__ long __s64; 30 | typedef unsigned long __u64; 31 | 32 | #endif /* __ASSEMBLY__ */ 33 | 34 | 35 | #endif /* _ASM_GENERIC_INT_L64_H */ 36 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm-generic/int-ll64.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 | /* 3 | * asm-generic/int-ll64.h 4 | * 5 | * Integer declarations for architectures which use "long long" 6 | * for 64-bit types. 7 | */ 8 | 9 | #ifndef _ASM_GENERIC_INT_LL64_H 10 | #define _ASM_GENERIC_INT_LL64_H 11 | 12 | #include 13 | 14 | #ifndef __ASSEMBLY__ 15 | /* 16 | * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the 17 | * header files exported to user space 18 | */ 19 | 20 | typedef __signed__ char __s8; 21 | typedef unsigned char __u8; 22 | 23 | typedef __signed__ short __s16; 24 | typedef unsigned short __u16; 25 | 26 | typedef __signed__ int __s32; 27 | typedef unsigned int __u32; 28 | 29 | #ifdef __GNUC__ 30 | __extension__ typedef __signed__ long long __s64; 31 | __extension__ typedef unsigned long long __u64; 32 | #else 33 | typedef __signed__ long long __s64; 34 | typedef unsigned long long __u64; 35 | #endif 36 | 37 | #endif /* __ASSEMBLY__ */ 38 | 39 | 40 | #endif /* _ASM_GENERIC_INT_LL64_H */ 41 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm-generic/ioctl.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 | #ifndef _ASM_GENERIC_IOCTL_H 3 | #define _ASM_GENERIC_IOCTL_H 4 | 5 | /* ioctl command encoding: 32 bits total, command in lower 16 bits, 6 | * size of the parameter structure in the lower 14 bits of the 7 | * upper 16 bits. 8 | * Encoding the size of the parameter structure in the ioctl request 9 | * is useful for catching programs compiled with old versions 10 | * and to avoid overwriting user space outside the user buffer area. 11 | * The highest 2 bits are reserved for indicating the ``access mode''. 12 | * NOTE: This limits the max parameter size to 16kB -1 ! 13 | */ 14 | 15 | /* 16 | * The following is for compatibility across the various Linux 17 | * platforms. The generic ioctl numbering scheme doesn't really enforce 18 | * a type field. De facto, however, the top 8 bits of the lower 16 19 | * bits are indeed used as a type field, so we might just as well make 20 | * this explicit here. Please be sure to use the decoding macros 21 | * below from now on. 22 | */ 23 | #define _IOC_NRBITS 8 24 | #define _IOC_TYPEBITS 8 25 | 26 | /* 27 | * Let any architecture override either of the following before 28 | * including this file. 29 | */ 30 | 31 | #ifndef _IOC_SIZEBITS 32 | # define _IOC_SIZEBITS 14 33 | #endif 34 | 35 | #ifndef _IOC_DIRBITS 36 | # define _IOC_DIRBITS 2 37 | #endif 38 | 39 | #define _IOC_NRMASK ((1 << _IOC_NRBITS)-1) 40 | #define _IOC_TYPEMASK ((1 << _IOC_TYPEBITS)-1) 41 | #define _IOC_SIZEMASK ((1 << _IOC_SIZEBITS)-1) 42 | #define _IOC_DIRMASK ((1 << _IOC_DIRBITS)-1) 43 | 44 | #define _IOC_NRSHIFT 0 45 | #define _IOC_TYPESHIFT (_IOC_NRSHIFT+_IOC_NRBITS) 46 | #define _IOC_SIZESHIFT (_IOC_TYPESHIFT+_IOC_TYPEBITS) 47 | #define _IOC_DIRSHIFT (_IOC_SIZESHIFT+_IOC_SIZEBITS) 48 | 49 | /* 50 | * Direction bits, which any architecture can choose to override 51 | * before including this file. 52 | * 53 | * NOTE: _IOC_WRITE means userland is writing and kernel is 54 | * reading. _IOC_READ means userland is reading and kernel is writing. 55 | */ 56 | 57 | #ifndef _IOC_NONE 58 | # define _IOC_NONE 0U 59 | #endif 60 | 61 | #ifndef _IOC_WRITE 62 | # define _IOC_WRITE 1U 63 | #endif 64 | 65 | #ifndef _IOC_READ 66 | # define _IOC_READ 2U 67 | #endif 68 | 69 | #define _IOC(dir,type,nr,size) \ 70 | (((dir) << _IOC_DIRSHIFT) | \ 71 | ((type) << _IOC_TYPESHIFT) | \ 72 | ((nr) << _IOC_NRSHIFT) | \ 73 | ((size) << _IOC_SIZESHIFT)) 74 | 75 | #define _IOC_TYPECHECK(t) (sizeof(t)) 76 | 77 | /* 78 | * Used to create numbers. 79 | * 80 | * NOTE: _IOW means userland is writing and kernel is reading. _IOR 81 | * means userland is reading and kernel is writing. 82 | */ 83 | #define _IO(type,nr) _IOC(_IOC_NONE,(type),(nr),0) 84 | #define _IOR(type,nr,size) _IOC(_IOC_READ,(type),(nr),(_IOC_TYPECHECK(size))) 85 | #define _IOW(type,nr,size) _IOC(_IOC_WRITE,(type),(nr),(_IOC_TYPECHECK(size))) 86 | #define _IOWR(type,nr,size) _IOC(_IOC_READ|_IOC_WRITE,(type),(nr),(_IOC_TYPECHECK(size))) 87 | #define _IOR_BAD(type,nr,size) _IOC(_IOC_READ,(type),(nr),sizeof(size)) 88 | #define _IOW_BAD(type,nr,size) _IOC(_IOC_WRITE,(type),(nr),sizeof(size)) 89 | #define _IOWR_BAD(type,nr,size) _IOC(_IOC_READ|_IOC_WRITE,(type),(nr),sizeof(size)) 90 | 91 | /* used to decode ioctl numbers.. */ 92 | #define _IOC_DIR(nr) (((nr) >> _IOC_DIRSHIFT) & _IOC_DIRMASK) 93 | #define _IOC_TYPE(nr) (((nr) >> _IOC_TYPESHIFT) & _IOC_TYPEMASK) 94 | #define _IOC_NR(nr) (((nr) >> _IOC_NRSHIFT) & _IOC_NRMASK) 95 | #define _IOC_SIZE(nr) (((nr) >> _IOC_SIZESHIFT) & _IOC_SIZEMASK) 96 | 97 | /* ...and for the drivers/sound files... */ 98 | 99 | #define IOC_IN (_IOC_WRITE << _IOC_DIRSHIFT) 100 | #define IOC_OUT (_IOC_READ << _IOC_DIRSHIFT) 101 | #define IOC_INOUT ((_IOC_WRITE|_IOC_READ) << _IOC_DIRSHIFT) 102 | #define IOCSIZE_MASK (_IOC_SIZEMASK << _IOC_SIZESHIFT) 103 | #define IOCSIZE_SHIFT (_IOC_SIZESHIFT) 104 | 105 | #endif /* _ASM_GENERIC_IOCTL_H */ 106 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm-generic/ioctls.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 | #ifndef __ASM_GENERIC_IOCTLS_H 3 | #define __ASM_GENERIC_IOCTLS_H 4 | 5 | #include 6 | 7 | /* 8 | * These are the most common definitions for tty ioctl numbers. 9 | * Most of them do not use the recommended _IOC(), but there is 10 | * probably some source code out there hardcoding the number, 11 | * so we might as well use them for all new platforms. 12 | * 13 | * The architectures that use different values here typically 14 | * try to be compatible with some Unix variants for the same 15 | * architecture. 16 | */ 17 | 18 | /* 0x54 is just a magic number to make these relatively unique ('T') */ 19 | 20 | #define TCGETS 0x5401 21 | #define TCSETS 0x5402 22 | #define TCSETSW 0x5403 23 | #define TCSETSF 0x5404 24 | #define TCGETA 0x5405 25 | #define TCSETA 0x5406 26 | #define TCSETAW 0x5407 27 | #define TCSETAF 0x5408 28 | #define TCSBRK 0x5409 29 | #define TCXONC 0x540A 30 | #define TCFLSH 0x540B 31 | #define TIOCEXCL 0x540C 32 | #define TIOCNXCL 0x540D 33 | #define TIOCSCTTY 0x540E 34 | #define TIOCGPGRP 0x540F 35 | #define TIOCSPGRP 0x5410 36 | #define TIOCOUTQ 0x5411 37 | #define TIOCSTI 0x5412 38 | #define TIOCGWINSZ 0x5413 39 | #define TIOCSWINSZ 0x5414 40 | #define TIOCMGET 0x5415 41 | #define TIOCMBIS 0x5416 42 | #define TIOCMBIC 0x5417 43 | #define TIOCMSET 0x5418 44 | #define TIOCGSOFTCAR 0x5419 45 | #define TIOCSSOFTCAR 0x541A 46 | #define FIONREAD 0x541B 47 | #define TIOCINQ FIONREAD 48 | #define TIOCLINUX 0x541C 49 | #define TIOCCONS 0x541D 50 | #define TIOCGSERIAL 0x541E 51 | #define TIOCSSERIAL 0x541F 52 | #define TIOCPKT 0x5420 53 | #define FIONBIO 0x5421 54 | #define TIOCNOTTY 0x5422 55 | #define TIOCSETD 0x5423 56 | #define TIOCGETD 0x5424 57 | #define TCSBRKP 0x5425 /* Needed for POSIX tcsendbreak() */ 58 | #define TIOCSBRK 0x5427 /* BSD compatibility */ 59 | #define TIOCCBRK 0x5428 /* BSD compatibility */ 60 | #define TIOCGSID 0x5429 /* Return the session ID of FD */ 61 | #define TCGETS2 _IOR('T', 0x2A, struct termios2) 62 | #define TCSETS2 _IOW('T', 0x2B, struct termios2) 63 | #define TCSETSW2 _IOW('T', 0x2C, struct termios2) 64 | #define TCSETSF2 _IOW('T', 0x2D, struct termios2) 65 | #define TIOCGRS485 0x542E 66 | #ifndef TIOCSRS485 67 | #define TIOCSRS485 0x542F 68 | #endif 69 | #define TIOCGPTN _IOR('T', 0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ 70 | #define TIOCSPTLCK _IOW('T', 0x31, int) /* Lock/unlock Pty */ 71 | #define TIOCGDEV _IOR('T', 0x32, unsigned int) /* Get primary device node of /dev/console */ 72 | #define TCGETX 0x5432 /* SYS5 TCGETX compatibility */ 73 | #define TCSETX 0x5433 74 | #define TCSETXF 0x5434 75 | #define TCSETXW 0x5435 76 | #define TIOCSIG _IOW('T', 0x36, int) /* pty: generate signal */ 77 | #define TIOCVHANGUP 0x5437 78 | #define TIOCGPKT _IOR('T', 0x38, int) /* Get packet mode state */ 79 | #define TIOCGPTLCK _IOR('T', 0x39, int) /* Get Pty lock state */ 80 | #define TIOCGEXCL _IOR('T', 0x40, int) /* Get exclusive mode state */ 81 | #define TIOCGPTPEER _IO('T', 0x41) /* Safely open the slave */ 82 | #define TIOCGISO7816 _IOR('T', 0x42, struct serial_iso7816) 83 | #define TIOCSISO7816 _IOWR('T', 0x43, struct serial_iso7816) 84 | 85 | #define FIONCLEX 0x5450 86 | #define FIOCLEX 0x5451 87 | #define FIOASYNC 0x5452 88 | #define TIOCSERCONFIG 0x5453 89 | #define TIOCSERGWILD 0x5454 90 | #define TIOCSERSWILD 0x5455 91 | #define TIOCGLCKTRMIOS 0x5456 92 | #define TIOCSLCKTRMIOS 0x5457 93 | #define TIOCSERGSTRUCT 0x5458 /* For debugging only */ 94 | #define TIOCSERGETLSR 0x5459 /* Get line status register */ 95 | #define TIOCSERGETMULTI 0x545A /* Get multiport config */ 96 | #define TIOCSERSETMULTI 0x545B /* Set multiport config */ 97 | 98 | #define TIOCMIWAIT 0x545C /* wait for a change on serial input line(s) */ 99 | #define TIOCGICOUNT 0x545D /* read serial port __inline__ interrupt counts */ 100 | 101 | /* 102 | * Some arches already define FIOQSIZE due to a historical 103 | * conflict with a Hayes modem-specific ioctl value. 104 | */ 105 | #ifndef FIOQSIZE 106 | # define FIOQSIZE 0x5460 107 | #endif 108 | 109 | /* Used for packet mode */ 110 | #define TIOCPKT_DATA 0 111 | #define TIOCPKT_FLUSHREAD 1 112 | #define TIOCPKT_FLUSHWRITE 2 113 | #define TIOCPKT_STOP 4 114 | #define TIOCPKT_START 8 115 | #define TIOCPKT_NOSTOP 16 116 | #define TIOCPKT_DOSTOP 32 117 | #define TIOCPKT_IOCTL 64 118 | 119 | #define TIOCSER_TEMT 0x01 /* Transmitter physically empty */ 120 | 121 | #endif /* __ASM_GENERIC_IOCTLS_H */ 122 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm-generic/ipcbuf.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 | #ifndef __ASM_GENERIC_IPCBUF_H 3 | #define __ASM_GENERIC_IPCBUF_H 4 | 5 | #include 6 | 7 | /* 8 | * The generic ipc64_perm structure: 9 | * Note extra padding because this structure is passed back and forth 10 | * between kernel and user space. 11 | * 12 | * ipc64_perm was originally meant to be architecture specific, but 13 | * everyone just ended up making identical copies without specific 14 | * optimizations, so we may just as well all use the same one. 15 | * 16 | * Pad space is left for: 17 | * - 32-bit mode_t on architectures that only had 16 bit 18 | * - 32-bit seq 19 | * - 2 miscellaneous 32-bit values 20 | */ 21 | 22 | struct ipc64_perm { 23 | __kernel_key_t key; 24 | __kernel_uid32_t uid; 25 | __kernel_gid32_t gid; 26 | __kernel_uid32_t cuid; 27 | __kernel_gid32_t cgid; 28 | __kernel_mode_t mode; 29 | /* pad if mode_t is u16: */ 30 | unsigned char __pad1[4 - sizeof(__kernel_mode_t)]; 31 | unsigned short seq; 32 | unsigned short __pad2; 33 | __kernel_ulong_t __unused1; 34 | __kernel_ulong_t __unused2; 35 | }; 36 | 37 | #endif /* __ASM_GENERIC_IPCBUF_H */ 38 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm-generic/kvm_para.h: -------------------------------------------------------------------------------- 1 | /* 2 | * There isn't anything here, but the file must not be empty or patch 3 | * will delete it. 4 | */ 5 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm-generic/mman-common.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 | #ifndef __ASM_GENERIC_MMAN_COMMON_H 3 | #define __ASM_GENERIC_MMAN_COMMON_H 4 | 5 | /* 6 | Author: Michael S. Tsirkin , Mellanox Technologies Ltd. 7 | Based on: asm-xxx/mman.h 8 | */ 9 | 10 | #define PROT_READ 0x1 /* page can be read */ 11 | #define PROT_WRITE 0x2 /* page can be written */ 12 | #define PROT_EXEC 0x4 /* page can be executed */ 13 | #define PROT_SEM 0x8 /* page may be used for atomic ops */ 14 | /* 0x10 reserved for arch-specific use */ 15 | /* 0x20 reserved for arch-specific use */ 16 | #define PROT_NONE 0x0 /* page can not be accessed */ 17 | #define PROT_GROWSDOWN 0x01000000 /* mprotect flag: extend change to start of growsdown vma */ 18 | #define PROT_GROWSUP 0x02000000 /* mprotect flag: extend change to end of growsup vma */ 19 | 20 | /* 0x01 - 0x03 are defined in linux/mman.h */ 21 | #define MAP_TYPE 0x0f /* Mask for type of mapping */ 22 | #define MAP_FIXED 0x10 /* Interpret addr exactly */ 23 | #define MAP_ANONYMOUS 0x20 /* don't use a file */ 24 | 25 | /* 0x0100 - 0x4000 flags are defined in asm-generic/mman.h */ 26 | #define MAP_POPULATE 0x008000 /* populate (prefault) pagetables */ 27 | #define MAP_NONBLOCK 0x010000 /* do not block on IO */ 28 | #define MAP_STACK 0x020000 /* give out an address that is best suited for process/thread stacks */ 29 | #define MAP_HUGETLB 0x040000 /* create a huge page mapping */ 30 | #define MAP_SYNC 0x080000 /* perform synchronous page faults for the mapping */ 31 | #define MAP_FIXED_NOREPLACE 0x100000 /* MAP_FIXED which doesn't unmap underlying mapping */ 32 | 33 | #define MAP_UNINITIALIZED 0x4000000 /* For anonymous mmap, memory could be 34 | * uninitialized */ 35 | 36 | /* 37 | * Flags for mlock 38 | */ 39 | #define MLOCK_ONFAULT 0x01 /* Lock pages in range after they are faulted in, do not prefault */ 40 | 41 | #define MS_ASYNC 1 /* sync memory asynchronously */ 42 | #define MS_INVALIDATE 2 /* invalidate the caches */ 43 | #define MS_SYNC 4 /* synchronous memory sync */ 44 | 45 | #define MADV_NORMAL 0 /* no further special treatment */ 46 | #define MADV_RANDOM 1 /* expect random page references */ 47 | #define MADV_SEQUENTIAL 2 /* expect sequential page references */ 48 | #define MADV_WILLNEED 3 /* will need these pages */ 49 | #define MADV_DONTNEED 4 /* don't need these pages */ 50 | 51 | /* common parameters: try to keep these consistent across architectures */ 52 | #define MADV_FREE 8 /* free pages only if memory pressure */ 53 | #define MADV_REMOVE 9 /* remove these pages & resources */ 54 | #define MADV_DONTFORK 10 /* don't inherit across fork */ 55 | #define MADV_DOFORK 11 /* do inherit across fork */ 56 | #define MADV_HWPOISON 100 /* poison a page for testing */ 57 | #define MADV_SOFT_OFFLINE 101 /* soft offline page for testing */ 58 | 59 | #define MADV_MERGEABLE 12 /* KSM may merge identical pages */ 60 | #define MADV_UNMERGEABLE 13 /* KSM may not merge identical pages */ 61 | 62 | #define MADV_HUGEPAGE 14 /* Worth backing with hugepages */ 63 | #define MADV_NOHUGEPAGE 15 /* Not worth backing with hugepages */ 64 | 65 | #define MADV_DONTDUMP 16 /* Explicity exclude from the core dump, 66 | overrides the coredump filter bits */ 67 | #define MADV_DODUMP 17 /* Clear the MADV_DONTDUMP flag */ 68 | 69 | #define MADV_WIPEONFORK 18 /* Zero memory on fork, child only */ 70 | #define MADV_KEEPONFORK 19 /* Undo MADV_WIPEONFORK */ 71 | 72 | #define MADV_COLD 20 /* deactivate these pages */ 73 | #define MADV_PAGEOUT 21 /* reclaim these pages */ 74 | 75 | #define MADV_POPULATE_READ 22 /* populate (prefault) page tables readable */ 76 | #define MADV_POPULATE_WRITE 23 /* populate (prefault) page tables writable */ 77 | 78 | /* compatibility flags */ 79 | #define MAP_FILE 0 80 | 81 | #define PKEY_DISABLE_ACCESS 0x1 82 | #define PKEY_DISABLE_WRITE 0x2 83 | #define PKEY_ACCESS_MASK (PKEY_DISABLE_ACCESS |\ 84 | PKEY_DISABLE_WRITE) 85 | 86 | #endif /* __ASM_GENERIC_MMAN_COMMON_H */ 87 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm-generic/mman.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 | #ifndef __ASM_GENERIC_MMAN_H 3 | #define __ASM_GENERIC_MMAN_H 4 | 5 | #include 6 | 7 | #define MAP_GROWSDOWN 0x0100 /* stack-like segment */ 8 | #define MAP_DENYWRITE 0x0800 /* ETXTBSY */ 9 | #define MAP_EXECUTABLE 0x1000 /* mark it as an executable */ 10 | #define MAP_LOCKED 0x2000 /* pages are locked */ 11 | #define MAP_NORESERVE 0x4000 /* don't check for reservations */ 12 | 13 | /* 14 | * Bits [26:31] are reserved, see asm-generic/hugetlb_encode.h 15 | * for MAP_HUGETLB usage 16 | */ 17 | 18 | #define MCL_CURRENT 1 /* lock all current mappings */ 19 | #define MCL_FUTURE 2 /* lock all future mappings */ 20 | #define MCL_ONFAULT 4 /* lock all pages that are faulted in */ 21 | 22 | #endif /* __ASM_GENERIC_MMAN_H */ 23 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm-generic/msgbuf.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 | #ifndef __ASM_GENERIC_MSGBUF_H 3 | #define __ASM_GENERIC_MSGBUF_H 4 | 5 | #include 6 | #include 7 | 8 | /* 9 | * generic msqid64_ds structure. 10 | * 11 | * Note extra padding because this structure is passed back and forth 12 | * between kernel and user space. 13 | * 14 | * msqid64_ds was originally meant to be architecture specific, but 15 | * everyone just ended up making identical copies without specific 16 | * optimizations, so we may just as well all use the same one. 17 | * 18 | * 64 bit architectures use a 64-bit long time field here, while 19 | * 32 bit architectures have a pair of unsigned long values. 20 | * On big-endian systems, the lower half is in the wrong place. 21 | * 22 | * Pad space is left for: 23 | * - 2 miscellaneous 32-bit values 24 | */ 25 | 26 | struct msqid64_ds { 27 | struct ipc64_perm msg_perm; 28 | #if __BITS_PER_LONG == 64 29 | long msg_stime; /* last msgsnd time */ 30 | long msg_rtime; /* last msgrcv time */ 31 | long msg_ctime; /* last change time */ 32 | #else 33 | unsigned long msg_stime; /* last msgsnd time */ 34 | unsigned long msg_stime_high; 35 | unsigned long msg_rtime; /* last msgrcv time */ 36 | unsigned long msg_rtime_high; 37 | unsigned long msg_ctime; /* last change time */ 38 | unsigned long msg_ctime_high; 39 | #endif 40 | unsigned long msg_cbytes; /* current number of bytes on queue */ 41 | unsigned long msg_qnum; /* number of messages in queue */ 42 | unsigned long msg_qbytes; /* max number of bytes on queue */ 43 | __kernel_pid_t msg_lspid; /* pid of last msgsnd */ 44 | __kernel_pid_t msg_lrpid; /* last receive pid */ 45 | unsigned long __unused4; 46 | unsigned long __unused5; 47 | }; 48 | 49 | #endif /* __ASM_GENERIC_MSGBUF_H */ 50 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm-generic/param.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 | #ifndef __ASM_GENERIC_PARAM_H 3 | #define __ASM_GENERIC_PARAM_H 4 | 5 | #ifndef HZ 6 | #define HZ 100 7 | #endif 8 | 9 | #ifndef EXEC_PAGESIZE 10 | #define EXEC_PAGESIZE 4096 11 | #endif 12 | 13 | #ifndef NOGROUP 14 | #define NOGROUP (-1) 15 | #endif 16 | 17 | #define MAXHOSTNAMELEN 64 /* max length of hostname */ 18 | 19 | 20 | #endif /* __ASM_GENERIC_PARAM_H */ 21 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm-generic/poll.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 | #ifndef __ASM_GENERIC_POLL_H 3 | #define __ASM_GENERIC_POLL_H 4 | 5 | /* These are specified by iBCS2 */ 6 | #define POLLIN 0x0001 7 | #define POLLPRI 0x0002 8 | #define POLLOUT 0x0004 9 | #define POLLERR 0x0008 10 | #define POLLHUP 0x0010 11 | #define POLLNVAL 0x0020 12 | 13 | /* The rest seem to be more-or-less nonstandard. Check them! */ 14 | #define POLLRDNORM 0x0040 15 | #define POLLRDBAND 0x0080 16 | #ifndef POLLWRNORM 17 | #define POLLWRNORM 0x0100 18 | #endif 19 | #ifndef POLLWRBAND 20 | #define POLLWRBAND 0x0200 21 | #endif 22 | #ifndef POLLMSG 23 | #define POLLMSG 0x0400 24 | #endif 25 | #ifndef POLLREMOVE 26 | #define POLLREMOVE 0x1000 27 | #endif 28 | #ifndef POLLRDHUP 29 | #define POLLRDHUP 0x2000 30 | #endif 31 | 32 | #define POLLFREE (__poll_t)0x4000 33 | 34 | #define POLL_BUSY_LOOP (__poll_t)0x8000 35 | 36 | struct pollfd { 37 | int fd; 38 | short events; 39 | short revents; 40 | }; 41 | 42 | #endif /* __ASM_GENERIC_POLL_H */ 43 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm-generic/posix_types.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 | #ifndef __ASM_GENERIC_POSIX_TYPES_H 3 | #define __ASM_GENERIC_POSIX_TYPES_H 4 | 5 | #include 6 | /* 7 | * This file is generally used by user-level software, so you need to 8 | * be a little careful about namespace pollution etc. 9 | * 10 | * First the types that are often defined in different ways across 11 | * architectures, so that you can override them. 12 | */ 13 | 14 | #ifndef __kernel_long_t 15 | typedef long __kernel_long_t; 16 | typedef unsigned long __kernel_ulong_t; 17 | #endif 18 | 19 | #ifndef __kernel_ino_t 20 | typedef __kernel_ulong_t __kernel_ino_t; 21 | #endif 22 | 23 | #ifndef __kernel_mode_t 24 | typedef unsigned int __kernel_mode_t; 25 | #endif 26 | 27 | #ifndef __kernel_pid_t 28 | typedef int __kernel_pid_t; 29 | #endif 30 | 31 | #ifndef __kernel_ipc_pid_t 32 | typedef int __kernel_ipc_pid_t; 33 | #endif 34 | 35 | #ifndef __kernel_uid_t 36 | typedef unsigned int __kernel_uid_t; 37 | typedef unsigned int __kernel_gid_t; 38 | #endif 39 | 40 | #ifndef __kernel_suseconds_t 41 | typedef __kernel_long_t __kernel_suseconds_t; 42 | #endif 43 | 44 | #ifndef __kernel_daddr_t 45 | typedef int __kernel_daddr_t; 46 | #endif 47 | 48 | #ifndef __kernel_uid32_t 49 | typedef unsigned int __kernel_uid32_t; 50 | typedef unsigned int __kernel_gid32_t; 51 | #endif 52 | 53 | #ifndef __kernel_old_uid_t 54 | typedef __kernel_uid_t __kernel_old_uid_t; 55 | typedef __kernel_gid_t __kernel_old_gid_t; 56 | #endif 57 | 58 | #ifndef __kernel_old_dev_t 59 | typedef unsigned int __kernel_old_dev_t; 60 | #endif 61 | 62 | /* 63 | * Most 32 bit architectures use "unsigned int" size_t, 64 | * and all 64 bit architectures use "unsigned long" size_t. 65 | */ 66 | #ifndef __kernel_size_t 67 | #if __BITS_PER_LONG != 64 68 | typedef unsigned int __kernel_size_t; 69 | typedef int __kernel_ssize_t; 70 | typedef int __kernel_ptrdiff_t; 71 | #else 72 | typedef __kernel_ulong_t __kernel_size_t; 73 | typedef __kernel_long_t __kernel_ssize_t; 74 | typedef __kernel_long_t __kernel_ptrdiff_t; 75 | #endif 76 | #endif 77 | 78 | #ifndef __kernel_fsid_t 79 | typedef struct { 80 | int val[2]; 81 | } __kernel_fsid_t; 82 | #endif 83 | 84 | /* 85 | * anything below here should be completely generic 86 | */ 87 | typedef __kernel_long_t __kernel_off_t; 88 | typedef long long __kernel_loff_t; 89 | typedef __kernel_long_t __kernel_old_time_t; 90 | typedef __kernel_long_t __kernel_time_t; 91 | typedef long long __kernel_time64_t; 92 | typedef __kernel_long_t __kernel_clock_t; 93 | typedef int __kernel_timer_t; 94 | typedef int __kernel_clockid_t; 95 | typedef char * __kernel_caddr_t; 96 | typedef unsigned short __kernel_uid16_t; 97 | typedef unsigned short __kernel_gid16_t; 98 | 99 | #endif /* __ASM_GENERIC_POSIX_TYPES_H */ 100 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm-generic/resource.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 | #ifndef _ASM_GENERIC_RESOURCE_H 3 | #define _ASM_GENERIC_RESOURCE_H 4 | 5 | /* 6 | * Resource limit IDs 7 | * 8 | * ( Compatibility detail: there are architectures that have 9 | * a different rlimit ID order in the 5-9 range and want 10 | * to keep that order for binary compatibility. The reasons 11 | * are historic and all new rlimits are identical across all 12 | * arches. If an arch has such special order for some rlimits 13 | * then it defines them prior including asm-generic/resource.h. ) 14 | */ 15 | 16 | #define RLIMIT_CPU 0 /* CPU time in sec */ 17 | #define RLIMIT_FSIZE 1 /* Maximum filesize */ 18 | #define RLIMIT_DATA 2 /* max data size */ 19 | #define RLIMIT_STACK 3 /* max stack size */ 20 | #define RLIMIT_CORE 4 /* max core file size */ 21 | 22 | #ifndef RLIMIT_RSS 23 | # define RLIMIT_RSS 5 /* max resident set size */ 24 | #endif 25 | 26 | #ifndef RLIMIT_NPROC 27 | # define RLIMIT_NPROC 6 /* max number of processes */ 28 | #endif 29 | 30 | #ifndef RLIMIT_NOFILE 31 | # define RLIMIT_NOFILE 7 /* max number of open files */ 32 | #endif 33 | 34 | #ifndef RLIMIT_MEMLOCK 35 | # define RLIMIT_MEMLOCK 8 /* max locked-in-memory address space */ 36 | #endif 37 | 38 | #ifndef RLIMIT_AS 39 | # define RLIMIT_AS 9 /* address space limit */ 40 | #endif 41 | 42 | #define RLIMIT_LOCKS 10 /* maximum file locks held */ 43 | #define RLIMIT_SIGPENDING 11 /* max number of pending signals */ 44 | #define RLIMIT_MSGQUEUE 12 /* maximum bytes in POSIX mqueues */ 45 | #define RLIMIT_NICE 13 /* max nice prio allowed to raise to 46 | 0-39 for nice level 19 .. -20 */ 47 | #define RLIMIT_RTPRIO 14 /* maximum realtime priority */ 48 | #define RLIMIT_RTTIME 15 /* timeout for RT tasks in us */ 49 | #define RLIM_NLIMITS 16 50 | 51 | /* 52 | * SuS says limits have to be unsigned. 53 | * Which makes a ton more sense anyway. 54 | * 55 | * Some architectures override this (for compatibility reasons): 56 | */ 57 | #ifndef RLIM_INFINITY 58 | # define RLIM_INFINITY (~0UL) 59 | #endif 60 | 61 | 62 | #endif /* _ASM_GENERIC_RESOURCE_H */ 63 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm-generic/sembuf.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 | #ifndef __ASM_GENERIC_SEMBUF_H 3 | #define __ASM_GENERIC_SEMBUF_H 4 | 5 | #include 6 | #include 7 | 8 | /* 9 | * The semid64_ds structure for most architectures (though it came from x86_32 10 | * originally). Note extra padding because this structure is passed back and 11 | * forth between kernel and user space. 12 | * 13 | * semid64_ds was originally meant to be architecture specific, but 14 | * everyone just ended up making identical copies without specific 15 | * optimizations, so we may just as well all use the same one. 16 | * 17 | * 64 bit architectures use a 64-bit long time field here, while 18 | * 32 bit architectures have a pair of unsigned long values. 19 | * 20 | * On big-endian systems, the padding is in the wrong place for 21 | * historic reasons, so user space has to reconstruct a time_t 22 | * value using 23 | * 24 | * user_semid_ds.sem_otime = kernel_semid64_ds.sem_otime + 25 | * ((long long)kernel_semid64_ds.sem_otime_high << 32) 26 | * 27 | * Pad space is left for 2 miscellaneous 32-bit values 28 | */ 29 | struct semid64_ds { 30 | struct ipc64_perm sem_perm; /* permissions .. see ipc.h */ 31 | #if __BITS_PER_LONG == 64 32 | long sem_otime; /* last semop time */ 33 | long sem_ctime; /* last change time */ 34 | #else 35 | unsigned long sem_otime; /* last semop time */ 36 | unsigned long sem_otime_high; 37 | unsigned long sem_ctime; /* last change time */ 38 | unsigned long sem_ctime_high; 39 | #endif 40 | unsigned long sem_nsems; /* no. of semaphores in array */ 41 | unsigned long __unused3; 42 | unsigned long __unused4; 43 | }; 44 | 45 | #endif /* __ASM_GENERIC_SEMBUF_H */ 46 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm-generic/setup.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 | #ifndef __ASM_GENERIC_SETUP_H 3 | #define __ASM_GENERIC_SETUP_H 4 | 5 | #define COMMAND_LINE_SIZE 512 6 | 7 | #endif /* __ASM_GENERIC_SETUP_H */ 8 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm-generic/shmbuf.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 | #ifndef __ASM_GENERIC_SHMBUF_H 3 | #define __ASM_GENERIC_SHMBUF_H 4 | 5 | #include 6 | 7 | /* 8 | * The shmid64_ds structure for x86 architecture. 9 | * Note extra padding because this structure is passed back and forth 10 | * between kernel and user space. 11 | * 12 | * shmid64_ds was originally meant to be architecture specific, but 13 | * everyone just ended up making identical copies without specific 14 | * optimizations, so we may just as well all use the same one. 15 | * 16 | * 64 bit architectures use a 64-bit long time field here, while 17 | * 32 bit architectures have a pair of unsigned long values. 18 | * On big-endian systems, the lower half is in the wrong place. 19 | * 20 | * 21 | * Pad space is left for: 22 | * - 2 miscellaneous 32-bit values 23 | */ 24 | 25 | struct shmid64_ds { 26 | struct ipc64_perm shm_perm; /* operation perms */ 27 | size_t shm_segsz; /* size of segment (bytes) */ 28 | #if __BITS_PER_LONG == 64 29 | long shm_atime; /* last attach time */ 30 | long shm_dtime; /* last detach time */ 31 | long shm_ctime; /* last change time */ 32 | #else 33 | unsigned long shm_atime; /* last attach time */ 34 | unsigned long shm_atime_high; 35 | unsigned long shm_dtime; /* last detach time */ 36 | unsigned long shm_dtime_high; 37 | unsigned long shm_ctime; /* last change time */ 38 | unsigned long shm_ctime_high; 39 | #endif 40 | __kernel_pid_t shm_cpid; /* pid of creator */ 41 | __kernel_pid_t shm_lpid; /* pid of last operator */ 42 | unsigned long shm_nattch; /* no. of current attaches */ 43 | unsigned long __unused4; 44 | unsigned long __unused5; 45 | }; 46 | 47 | struct shminfo64 { 48 | unsigned long shmmax; 49 | unsigned long shmmin; 50 | unsigned long shmmni; 51 | unsigned long shmseg; 52 | unsigned long shmall; 53 | unsigned long __unused1; 54 | unsigned long __unused2; 55 | unsigned long __unused3; 56 | unsigned long __unused4; 57 | }; 58 | 59 | #endif /* __ASM_GENERIC_SHMBUF_H */ 60 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm-generic/signal-defs.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 | #ifndef __ASM_GENERIC_SIGNAL_DEFS_H 3 | #define __ASM_GENERIC_SIGNAL_DEFS_H 4 | 5 | 6 | 7 | /* 8 | * SA_FLAGS values: 9 | * 10 | * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. 11 | * SA_NOCLDWAIT flag on SIGCHLD to inhibit zombies. 12 | * SA_SIGINFO delivers the signal with SIGINFO structs. 13 | * SA_ONSTACK indicates that a registered stack_t will be used. 14 | * SA_RESTART flag to get restarting signals (which were the default long ago) 15 | * SA_NODEFER prevents the current signal from being masked in the handler. 16 | * SA_RESETHAND clears the handler when the signal is delivered. 17 | * SA_UNSUPPORTED is a flag bit that will never be supported. Kernels from 18 | * before the introduction of SA_UNSUPPORTED did not clear unknown bits from 19 | * sa_flags when read using the oldact argument to sigaction and rt_sigaction, 20 | * so this bit allows flag bit support to be detected from userspace while 21 | * allowing an old kernel to be distinguished from a kernel that supports every 22 | * flag bit. 23 | * SA_EXPOSE_TAGBITS exposes an architecture-defined set of tag bits in 24 | * siginfo.si_addr. 25 | * 26 | * SA_ONESHOT and SA_NOMASK are the historical Linux names for the Single 27 | * Unix names RESETHAND and NODEFER respectively. 28 | */ 29 | #ifndef SA_NOCLDSTOP 30 | #define SA_NOCLDSTOP 0x00000001 31 | #endif 32 | #ifndef SA_NOCLDWAIT 33 | #define SA_NOCLDWAIT 0x00000002 34 | #endif 35 | #ifndef SA_SIGINFO 36 | #define SA_SIGINFO 0x00000004 37 | #endif 38 | /* 0x00000008 used on alpha, mips, parisc */ 39 | /* 0x00000010 used on alpha, parisc */ 40 | /* 0x00000020 used on alpha, parisc, sparc */ 41 | /* 0x00000040 used on alpha, parisc */ 42 | /* 0x00000080 used on parisc */ 43 | /* 0x00000100 used on sparc */ 44 | /* 0x00000200 used on sparc */ 45 | #define SA_UNSUPPORTED 0x00000400 46 | #define SA_EXPOSE_TAGBITS 0x00000800 47 | /* 0x00010000 used on mips */ 48 | /* 0x00800000 used for internal SA_IMMUTABLE */ 49 | /* 0x01000000 used on x86 */ 50 | /* 0x02000000 used on x86 */ 51 | /* 52 | * New architectures should not define the obsolete 53 | * SA_RESTORER 0x04000000 54 | */ 55 | #ifndef SA_ONSTACK 56 | #define SA_ONSTACK 0x08000000 57 | #endif 58 | #ifndef SA_RESTART 59 | #define SA_RESTART 0x10000000 60 | #endif 61 | #ifndef SA_NODEFER 62 | #define SA_NODEFER 0x40000000 63 | #endif 64 | #ifndef SA_RESETHAND 65 | #define SA_RESETHAND 0x80000000 66 | #endif 67 | 68 | #define SA_NOMASK SA_NODEFER 69 | #define SA_ONESHOT SA_RESETHAND 70 | 71 | #ifndef SIG_BLOCK 72 | #define SIG_BLOCK 0 /* for blocking signals */ 73 | #endif 74 | #ifndef SIG_UNBLOCK 75 | #define SIG_UNBLOCK 1 /* for unblocking signals */ 76 | #endif 77 | #ifndef SIG_SETMASK 78 | #define SIG_SETMASK 2 /* for setting the signal mask */ 79 | #endif 80 | 81 | #ifndef __ASSEMBLY__ 82 | typedef void __signalfn_t(int); 83 | typedef __signalfn_t *__sighandler_t; 84 | 85 | typedef void __restorefn_t(void); 86 | typedef __restorefn_t *__sigrestore_t; 87 | 88 | #define SIG_DFL ((__sighandler_t)0) /* default signal handling */ 89 | #define SIG_IGN ((__sighandler_t)1) /* ignore signal */ 90 | #define SIG_ERR ((__sighandler_t)-1) /* error return from signal */ 91 | #endif 92 | 93 | #endif /* __ASM_GENERIC_SIGNAL_DEFS_H */ 94 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm-generic/signal.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 | #ifndef __ASM_GENERIC_SIGNAL_H 3 | #define __ASM_GENERIC_SIGNAL_H 4 | 5 | #include 6 | 7 | #define _NSIG 64 8 | #define _NSIG_BPW __BITS_PER_LONG 9 | #define _NSIG_WORDS (_NSIG / _NSIG_BPW) 10 | 11 | #define SIGHUP 1 12 | #define SIGINT 2 13 | #define SIGQUIT 3 14 | #define SIGILL 4 15 | #define SIGTRAP 5 16 | #define SIGABRT 6 17 | #define SIGIOT 6 18 | #define SIGBUS 7 19 | #define SIGFPE 8 20 | #define SIGKILL 9 21 | #define SIGUSR1 10 22 | #define SIGSEGV 11 23 | #define SIGUSR2 12 24 | #define SIGPIPE 13 25 | #define SIGALRM 14 26 | #define SIGTERM 15 27 | #define SIGSTKFLT 16 28 | #define SIGCHLD 17 29 | #define SIGCONT 18 30 | #define SIGSTOP 19 31 | #define SIGTSTP 20 32 | #define SIGTTIN 21 33 | #define SIGTTOU 22 34 | #define SIGURG 23 35 | #define SIGXCPU 24 36 | #define SIGXFSZ 25 37 | #define SIGVTALRM 26 38 | #define SIGPROF 27 39 | #define SIGWINCH 28 40 | #define SIGIO 29 41 | #define SIGPOLL SIGIO 42 | /* 43 | #define SIGLOST 29 44 | */ 45 | #define SIGPWR 30 46 | #define SIGSYS 31 47 | #define SIGUNUSED 31 48 | 49 | /* These should not be considered constants from userland. */ 50 | #define SIGRTMIN 32 51 | #ifndef SIGRTMAX 52 | #define SIGRTMAX _NSIG 53 | #endif 54 | 55 | #if !defined MINSIGSTKSZ || !defined SIGSTKSZ 56 | #define MINSIGSTKSZ 2048 57 | #define SIGSTKSZ 8192 58 | #endif 59 | 60 | #ifndef __ASSEMBLY__ 61 | typedef struct { 62 | unsigned long sig[_NSIG_WORDS]; 63 | } sigset_t; 64 | 65 | /* not actually used, but required for linux/syscalls.h */ 66 | typedef unsigned long old_sigset_t; 67 | 68 | #include 69 | 70 | #ifdef SA_RESTORER 71 | #define __ARCH_HAS_SA_RESTORER 72 | #endif 73 | 74 | struct sigaction { 75 | __sighandler_t sa_handler; 76 | unsigned long sa_flags; 77 | #ifdef SA_RESTORER 78 | __sigrestore_t sa_restorer; 79 | #endif 80 | sigset_t sa_mask; /* mask last for extensibility */ 81 | }; 82 | 83 | typedef struct sigaltstack { 84 | void *ss_sp; 85 | int ss_flags; 86 | size_t ss_size; 87 | } stack_t; 88 | 89 | #endif /* __ASSEMBLY__ */ 90 | 91 | #endif /* __ASM_GENERIC_SIGNAL_H */ 92 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm-generic/socket.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 | #ifndef __ASM_GENERIC_SOCKET_H 3 | #define __ASM_GENERIC_SOCKET_H 4 | 5 | #include 6 | #include 7 | 8 | /* For setsockopt(2) */ 9 | #define SOL_SOCKET 1 10 | 11 | #define SO_DEBUG 1 12 | #define SO_REUSEADDR 2 13 | #define SO_TYPE 3 14 | #define SO_ERROR 4 15 | #define SO_DONTROUTE 5 16 | #define SO_BROADCAST 6 17 | #define SO_SNDBUF 7 18 | #define SO_RCVBUF 8 19 | #define SO_SNDBUFFORCE 32 20 | #define SO_RCVBUFFORCE 33 21 | #define SO_KEEPALIVE 9 22 | #define SO_OOBINLINE 10 23 | #define SO_NO_CHECK 11 24 | #define SO_PRIORITY 12 25 | #define SO_LINGER 13 26 | #define SO_BSDCOMPAT 14 27 | #define SO_REUSEPORT 15 28 | #ifndef SO_PASSCRED /* powerpc only differs in these */ 29 | #define SO_PASSCRED 16 30 | #define SO_PEERCRED 17 31 | #define SO_RCVLOWAT 18 32 | #define SO_SNDLOWAT 19 33 | #define SO_RCVTIMEO_OLD 20 34 | #define SO_SNDTIMEO_OLD 21 35 | #endif 36 | 37 | /* Security levels - as per NRL IPv6 - don't actually do anything */ 38 | #define SO_SECURITY_AUTHENTICATION 22 39 | #define SO_SECURITY_ENCRYPTION_TRANSPORT 23 40 | #define SO_SECURITY_ENCRYPTION_NETWORK 24 41 | 42 | #define SO_BINDTODEVICE 25 43 | 44 | /* Socket filtering */ 45 | #define SO_ATTACH_FILTER 26 46 | #define SO_DETACH_FILTER 27 47 | #define SO_GET_FILTER SO_ATTACH_FILTER 48 | 49 | #define SO_PEERNAME 28 50 | 51 | #define SO_ACCEPTCONN 30 52 | 53 | #define SO_PEERSEC 31 54 | #define SO_PASSSEC 34 55 | 56 | #define SO_MARK 36 57 | 58 | #define SO_PROTOCOL 38 59 | #define SO_DOMAIN 39 60 | 61 | #define SO_RXQ_OVFL 40 62 | 63 | #define SO_WIFI_STATUS 41 64 | #define SCM_WIFI_STATUS SO_WIFI_STATUS 65 | #define SO_PEEK_OFF 42 66 | 67 | /* Instruct lower device to use last 4-bytes of skb data as FCS */ 68 | #define SO_NOFCS 43 69 | 70 | #define SO_LOCK_FILTER 44 71 | 72 | #define SO_SELECT_ERR_QUEUE 45 73 | 74 | #define SO_BUSY_POLL 46 75 | 76 | #define SO_MAX_PACING_RATE 47 77 | 78 | #define SO_BPF_EXTENSIONS 48 79 | 80 | #define SO_INCOMING_CPU 49 81 | 82 | #define SO_ATTACH_BPF 50 83 | #define SO_DETACH_BPF SO_DETACH_FILTER 84 | 85 | #define SO_ATTACH_REUSEPORT_CBPF 51 86 | #define SO_ATTACH_REUSEPORT_EBPF 52 87 | 88 | #define SO_CNX_ADVICE 53 89 | 90 | #define SCM_TIMESTAMPING_OPT_STATS 54 91 | 92 | #define SO_MEMINFO 55 93 | 94 | #define SO_INCOMING_NAPI_ID 56 95 | 96 | #define SO_COOKIE 57 97 | 98 | #define SCM_TIMESTAMPING_PKTINFO 58 99 | 100 | #define SO_PEERGROUPS 59 101 | 102 | #define SO_ZEROCOPY 60 103 | 104 | #define SO_TXTIME 61 105 | #define SCM_TXTIME SO_TXTIME 106 | 107 | #define SO_BINDTOIFINDEX 62 108 | 109 | #define SO_TIMESTAMP_OLD 29 110 | #define SO_TIMESTAMPNS_OLD 35 111 | #define SO_TIMESTAMPING_OLD 37 112 | 113 | #define SO_TIMESTAMP_NEW 63 114 | #define SO_TIMESTAMPNS_NEW 64 115 | #define SO_TIMESTAMPING_NEW 65 116 | 117 | #define SO_RCVTIMEO_NEW 66 118 | #define SO_SNDTIMEO_NEW 67 119 | 120 | #define SO_DETACH_REUSEPORT_BPF 68 121 | 122 | #define SO_PREFER_BUSY_POLL 69 123 | #define SO_BUSY_POLL_BUDGET 70 124 | 125 | #define SO_NETNS_COOKIE 71 126 | 127 | #define SO_BUF_LOCK 72 128 | 129 | #define SO_RESERVE_MEM 73 130 | 131 | 132 | #if __BITS_PER_LONG == 64 || (defined(__x86_64__) && defined(__ILP32__)) 133 | /* on 64-bit and x32, avoid the ?: operator */ 134 | #define SO_TIMESTAMP SO_TIMESTAMP_OLD 135 | #define SO_TIMESTAMPNS SO_TIMESTAMPNS_OLD 136 | #define SO_TIMESTAMPING SO_TIMESTAMPING_OLD 137 | 138 | #define SO_RCVTIMEO SO_RCVTIMEO_OLD 139 | #define SO_SNDTIMEO SO_SNDTIMEO_OLD 140 | #else 141 | #define SO_TIMESTAMP (sizeof(time_t) == sizeof(__kernel_long_t) ? SO_TIMESTAMP_OLD : SO_TIMESTAMP_NEW) 142 | #define SO_TIMESTAMPNS (sizeof(time_t) == sizeof(__kernel_long_t) ? SO_TIMESTAMPNS_OLD : SO_TIMESTAMPNS_NEW) 143 | #define SO_TIMESTAMPING (sizeof(time_t) == sizeof(__kernel_long_t) ? SO_TIMESTAMPING_OLD : SO_TIMESTAMPING_NEW) 144 | 145 | #define SO_RCVTIMEO (sizeof(time_t) == sizeof(__kernel_long_t) ? SO_RCVTIMEO_OLD : SO_RCVTIMEO_NEW) 146 | #define SO_SNDTIMEO (sizeof(time_t) == sizeof(__kernel_long_t) ? SO_SNDTIMEO_OLD : SO_SNDTIMEO_NEW) 147 | #endif 148 | 149 | #define SCM_TIMESTAMP SO_TIMESTAMP 150 | #define SCM_TIMESTAMPNS SO_TIMESTAMPNS 151 | #define SCM_TIMESTAMPING SO_TIMESTAMPING 152 | 153 | 154 | #endif /* __ASM_GENERIC_SOCKET_H */ 155 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm-generic/sockios.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 | #ifndef __ASM_GENERIC_SOCKIOS_H 3 | #define __ASM_GENERIC_SOCKIOS_H 4 | 5 | /* Socket-level I/O control calls. */ 6 | #define FIOSETOWN 0x8901 7 | #define SIOCSPGRP 0x8902 8 | #define FIOGETOWN 0x8903 9 | #define SIOCGPGRP 0x8904 10 | #define SIOCATMARK 0x8905 11 | #define SIOCGSTAMP_OLD 0x8906 /* Get stamp (timeval) */ 12 | #define SIOCGSTAMPNS_OLD 0x8907 /* Get stamp (timespec) */ 13 | 14 | #endif /* __ASM_GENERIC_SOCKIOS_H */ 15 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm-generic/stat.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 | #ifndef __ASM_GENERIC_STAT_H 3 | #define __ASM_GENERIC_STAT_H 4 | 5 | /* 6 | * Everybody gets this wrong and has to stick with it for all 7 | * eternity. Hopefully, this version gets used by new architectures 8 | * so they don't fall into the same traps. 9 | * 10 | * stat64 is copied from powerpc64, with explicit padding added. 11 | * stat is the same structure layout on 64-bit, without the 'long long' 12 | * types. 13 | * 14 | * By convention, 64 bit architectures use the stat interface, while 15 | * 32 bit architectures use the stat64 interface. Note that we don't 16 | * provide an __old_kernel_stat here, which new architecture should 17 | * not have to start with. 18 | */ 19 | 20 | #include 21 | 22 | #define STAT_HAVE_NSEC 1 23 | 24 | struct stat { 25 | unsigned long st_dev; /* Device. */ 26 | unsigned long st_ino; /* File serial number. */ 27 | unsigned int st_mode; /* File mode. */ 28 | unsigned int st_nlink; /* Link count. */ 29 | unsigned int st_uid; /* User ID of the file's owner. */ 30 | unsigned int st_gid; /* Group ID of the file's group. */ 31 | unsigned long st_rdev; /* Device number, if device. */ 32 | unsigned long __pad1; 33 | long st_size; /* Size of file, in bytes. */ 34 | int st_blksize; /* Optimal block size for I/O. */ 35 | int __pad2; 36 | long st_blocks; /* Number 512-byte blocks allocated. */ 37 | long st_atime; /* Time of last access. */ 38 | unsigned long st_atime_nsec; 39 | long st_mtime; /* Time of last modification. */ 40 | unsigned long st_mtime_nsec; 41 | long st_ctime; /* Time of last status change. */ 42 | unsigned long st_ctime_nsec; 43 | unsigned int __unused4; 44 | unsigned int __unused5; 45 | }; 46 | 47 | /* This matches struct stat64 in glibc2.1. Only used for 32 bit. */ 48 | #if __BITS_PER_LONG != 64 || defined(__ARCH_WANT_STAT64) 49 | struct stat64 { 50 | unsigned long long st_dev; /* Device. */ 51 | unsigned long long st_ino; /* File serial number. */ 52 | unsigned int st_mode; /* File mode. */ 53 | unsigned int st_nlink; /* Link count. */ 54 | unsigned int st_uid; /* User ID of the file's owner. */ 55 | unsigned int st_gid; /* Group ID of the file's group. */ 56 | unsigned long long st_rdev; /* Device number, if device. */ 57 | unsigned long long __pad1; 58 | long long st_size; /* Size of file, in bytes. */ 59 | int st_blksize; /* Optimal block size for I/O. */ 60 | int __pad2; 61 | long long st_blocks; /* Number 512-byte blocks allocated. */ 62 | int st_atime; /* Time of last access. */ 63 | unsigned int st_atime_nsec; 64 | int st_mtime; /* Time of last modification. */ 65 | unsigned int st_mtime_nsec; 66 | int st_ctime; /* Time of last status change. */ 67 | unsigned int st_ctime_nsec; 68 | unsigned int __unused4; 69 | unsigned int __unused5; 70 | }; 71 | #endif 72 | 73 | #endif /* __ASM_GENERIC_STAT_H */ 74 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm-generic/statfs.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 | #ifndef _GENERIC_STATFS_H 3 | #define _GENERIC_STATFS_H 4 | 5 | #include 6 | 7 | 8 | /* 9 | * Most 64-bit platforms use 'long', while most 32-bit platforms use '__u32'. 10 | * Yes, they differ in signedness as well as size. 11 | * Special cases can override it for themselves -- except for S390x, which 12 | * is just a little too special for us. And MIPS, which I'm not touching 13 | * with a 10' pole. 14 | */ 15 | #ifndef __statfs_word 16 | #if __BITS_PER_LONG == 64 17 | #define __statfs_word __kernel_long_t 18 | #else 19 | #define __statfs_word __u32 20 | #endif 21 | #endif 22 | 23 | struct statfs { 24 | __statfs_word f_type; 25 | __statfs_word f_bsize; 26 | __statfs_word f_blocks; 27 | __statfs_word f_bfree; 28 | __statfs_word f_bavail; 29 | __statfs_word f_files; 30 | __statfs_word f_ffree; 31 | __kernel_fsid_t f_fsid; 32 | __statfs_word f_namelen; 33 | __statfs_word f_frsize; 34 | __statfs_word f_flags; 35 | __statfs_word f_spare[4]; 36 | }; 37 | 38 | /* 39 | * ARM needs to avoid the 32-bit padding at the end, for consistency 40 | * between EABI and OABI 41 | */ 42 | #ifndef ARCH_PACK_STATFS64 43 | #define ARCH_PACK_STATFS64 44 | #endif 45 | 46 | struct statfs64 { 47 | __statfs_word f_type; 48 | __statfs_word f_bsize; 49 | __u64 f_blocks; 50 | __u64 f_bfree; 51 | __u64 f_bavail; 52 | __u64 f_files; 53 | __u64 f_ffree; 54 | __kernel_fsid_t f_fsid; 55 | __statfs_word f_namelen; 56 | __statfs_word f_frsize; 57 | __statfs_word f_flags; 58 | __statfs_word f_spare[4]; 59 | } ARCH_PACK_STATFS64; 60 | 61 | /* 62 | * IA64 and x86_64 need to avoid the 32-bit padding at the end, 63 | * to be compatible with the i386 ABI 64 | */ 65 | #ifndef ARCH_PACK_COMPAT_STATFS64 66 | #define ARCH_PACK_COMPAT_STATFS64 67 | #endif 68 | 69 | struct compat_statfs64 { 70 | __u32 f_type; 71 | __u32 f_bsize; 72 | __u64 f_blocks; 73 | __u64 f_bfree; 74 | __u64 f_bavail; 75 | __u64 f_files; 76 | __u64 f_ffree; 77 | __kernel_fsid_t f_fsid; 78 | __u32 f_namelen; 79 | __u32 f_frsize; 80 | __u32 f_flags; 81 | __u32 f_spare[4]; 82 | } ARCH_PACK_COMPAT_STATFS64; 83 | 84 | #endif /* _GENERIC_STATFS_H */ 85 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm-generic/swab.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 | #ifndef _ASM_GENERIC_SWAB_H 3 | #define _ASM_GENERIC_SWAB_H 4 | 5 | #include 6 | 7 | /* 8 | * 32 bit architectures typically (but not always) want to 9 | * set __SWAB_64_THRU_32__. In user space, this is only 10 | * valid if the compiler supports 64 bit data types. 11 | */ 12 | 13 | #if __BITS_PER_LONG == 32 14 | #if defined(__GNUC__) && !defined(__STRICT_ANSI__) || defined(__KERNEL__) 15 | #define __SWAB_64_THRU_32__ 16 | #endif 17 | #endif 18 | 19 | #endif /* _ASM_GENERIC_SWAB_H */ 20 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm-generic/termbits.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 | #ifndef __ASM_GENERIC_TERMBITS_H 3 | #define __ASM_GENERIC_TERMBITS_H 4 | 5 | #include 6 | 7 | typedef unsigned char cc_t; 8 | typedef unsigned int speed_t; 9 | typedef unsigned int tcflag_t; 10 | 11 | #define NCCS 19 12 | struct termios { 13 | tcflag_t c_iflag; /* input mode flags */ 14 | tcflag_t c_oflag; /* output mode flags */ 15 | tcflag_t c_cflag; /* control mode flags */ 16 | tcflag_t c_lflag; /* local mode flags */ 17 | cc_t c_line; /* line discipline */ 18 | cc_t c_cc[NCCS]; /* control characters */ 19 | }; 20 | 21 | struct termios2 { 22 | tcflag_t c_iflag; /* input mode flags */ 23 | tcflag_t c_oflag; /* output mode flags */ 24 | tcflag_t c_cflag; /* control mode flags */ 25 | tcflag_t c_lflag; /* local mode flags */ 26 | cc_t c_line; /* line discipline */ 27 | cc_t c_cc[NCCS]; /* control characters */ 28 | speed_t c_ispeed; /* input speed */ 29 | speed_t c_ospeed; /* output speed */ 30 | }; 31 | 32 | struct ktermios { 33 | tcflag_t c_iflag; /* input mode flags */ 34 | tcflag_t c_oflag; /* output mode flags */ 35 | tcflag_t c_cflag; /* control mode flags */ 36 | tcflag_t c_lflag; /* local mode flags */ 37 | cc_t c_line; /* line discipline */ 38 | cc_t c_cc[NCCS]; /* control characters */ 39 | speed_t c_ispeed; /* input speed */ 40 | speed_t c_ospeed; /* output speed */ 41 | }; 42 | 43 | /* c_cc characters */ 44 | #define VINTR 0 45 | #define VQUIT 1 46 | #define VERASE 2 47 | #define VKILL 3 48 | #define VEOF 4 49 | #define VTIME 5 50 | #define VMIN 6 51 | #define VSWTC 7 52 | #define VSTART 8 53 | #define VSTOP 9 54 | #define VSUSP 10 55 | #define VEOL 11 56 | #define VREPRINT 12 57 | #define VDISCARD 13 58 | #define VWERASE 14 59 | #define VLNEXT 15 60 | #define VEOL2 16 61 | 62 | /* c_iflag bits */ 63 | #define IGNBRK 0000001 64 | #define BRKINT 0000002 65 | #define IGNPAR 0000004 66 | #define PARMRK 0000010 67 | #define INPCK 0000020 68 | #define ISTRIP 0000040 69 | #define INLCR 0000100 70 | #define IGNCR 0000200 71 | #define ICRNL 0000400 72 | #define IUCLC 0001000 73 | #define IXON 0002000 74 | #define IXANY 0004000 75 | #define IXOFF 0010000 76 | #define IMAXBEL 0020000 77 | #define IUTF8 0040000 78 | 79 | /* c_oflag bits */ 80 | #define OPOST 0000001 81 | #define OLCUC 0000002 82 | #define ONLCR 0000004 83 | #define OCRNL 0000010 84 | #define ONOCR 0000020 85 | #define ONLRET 0000040 86 | #define OFILL 0000100 87 | #define OFDEL 0000200 88 | #define NLDLY 0000400 89 | #define NL0 0000000 90 | #define NL1 0000400 91 | #define CRDLY 0003000 92 | #define CR0 0000000 93 | #define CR1 0001000 94 | #define CR2 0002000 95 | #define CR3 0003000 96 | #define TABDLY 0014000 97 | #define TAB0 0000000 98 | #define TAB1 0004000 99 | #define TAB2 0010000 100 | #define TAB3 0014000 101 | #define XTABS 0014000 102 | #define BSDLY 0020000 103 | #define BS0 0000000 104 | #define BS1 0020000 105 | #define VTDLY 0040000 106 | #define VT0 0000000 107 | #define VT1 0040000 108 | #define FFDLY 0100000 109 | #define FF0 0000000 110 | #define FF1 0100000 111 | 112 | /* c_cflag bit meaning */ 113 | #define CBAUD 0010017 114 | #define B0 0000000 /* hang up */ 115 | #define B50 0000001 116 | #define B75 0000002 117 | #define B110 0000003 118 | #define B134 0000004 119 | #define B150 0000005 120 | #define B200 0000006 121 | #define B300 0000007 122 | #define B600 0000010 123 | #define B1200 0000011 124 | #define B1800 0000012 125 | #define B2400 0000013 126 | #define B4800 0000014 127 | #define B9600 0000015 128 | #define B19200 0000016 129 | #define B38400 0000017 130 | #define EXTA B19200 131 | #define EXTB B38400 132 | #define CSIZE 0000060 133 | #define CS5 0000000 134 | #define CS6 0000020 135 | #define CS7 0000040 136 | #define CS8 0000060 137 | #define CSTOPB 0000100 138 | #define CREAD 0000200 139 | #define PARENB 0000400 140 | #define PARODD 0001000 141 | #define HUPCL 0002000 142 | #define CLOCAL 0004000 143 | #define CBAUDEX 0010000 144 | #define BOTHER 0010000 145 | #define B57600 0010001 146 | #define B115200 0010002 147 | #define B230400 0010003 148 | #define B460800 0010004 149 | #define B500000 0010005 150 | #define B576000 0010006 151 | #define B921600 0010007 152 | #define B1000000 0010010 153 | #define B1152000 0010011 154 | #define B1500000 0010012 155 | #define B2000000 0010013 156 | #define B2500000 0010014 157 | #define B3000000 0010015 158 | #define B3500000 0010016 159 | #define B4000000 0010017 160 | #define CIBAUD 002003600000 /* input baud rate */ 161 | #define CMSPAR 010000000000 /* mark or space (stick) parity */ 162 | #define CRTSCTS 020000000000 /* flow control */ 163 | 164 | #define IBSHIFT 16 /* Shift from CBAUD to CIBAUD */ 165 | 166 | /* c_lflag bits */ 167 | #define ISIG 0000001 168 | #define ICANON 0000002 169 | #define XCASE 0000004 170 | #define ECHO 0000010 171 | #define ECHOE 0000020 172 | #define ECHOK 0000040 173 | #define ECHONL 0000100 174 | #define NOFLSH 0000200 175 | #define TOSTOP 0000400 176 | #define ECHOCTL 0001000 177 | #define ECHOPRT 0002000 178 | #define ECHOKE 0004000 179 | #define FLUSHO 0010000 180 | #define PENDIN 0040000 181 | #define IEXTEN 0100000 182 | #define EXTPROC 0200000 183 | 184 | /* tcflow() and TCXONC use these */ 185 | #define TCOOFF 0 186 | #define TCOON 1 187 | #define TCIOFF 2 188 | #define TCION 3 189 | 190 | /* tcflush() and TCFLSH use these */ 191 | #define TCIFLUSH 0 192 | #define TCOFLUSH 1 193 | #define TCIOFLUSH 2 194 | 195 | /* tcsetattr uses these */ 196 | #define TCSANOW 0 197 | #define TCSADRAIN 1 198 | #define TCSAFLUSH 2 199 | 200 | #endif /* __ASM_GENERIC_TERMBITS_H */ 201 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm-generic/termios.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 | #ifndef _ASM_GENERIC_TERMIOS_H 3 | #define _ASM_GENERIC_TERMIOS_H 4 | /* 5 | * Most architectures have straight copies of the x86 code, with 6 | * varying levels of bug fixes on top. Usually it's a good idea 7 | * to use this generic version instead, but be careful to avoid 8 | * ABI changes. 9 | * New architectures should not provide their own version. 10 | */ 11 | 12 | #include 13 | #include 14 | 15 | struct winsize { 16 | unsigned short ws_row; 17 | unsigned short ws_col; 18 | unsigned short ws_xpixel; 19 | unsigned short ws_ypixel; 20 | }; 21 | 22 | #define NCC 8 23 | struct termio { 24 | unsigned short c_iflag; /* input mode flags */ 25 | unsigned short c_oflag; /* output mode flags */ 26 | unsigned short c_cflag; /* control mode flags */ 27 | unsigned short c_lflag; /* local mode flags */ 28 | unsigned char c_line; /* line discipline */ 29 | unsigned char c_cc[NCC]; /* control characters */ 30 | }; 31 | 32 | /* modem lines */ 33 | #define TIOCM_LE 0x001 34 | #define TIOCM_DTR 0x002 35 | #define TIOCM_RTS 0x004 36 | #define TIOCM_ST 0x008 37 | #define TIOCM_SR 0x010 38 | #define TIOCM_CTS 0x020 39 | #define TIOCM_CAR 0x040 40 | #define TIOCM_RNG 0x080 41 | #define TIOCM_DSR 0x100 42 | #define TIOCM_CD TIOCM_CAR 43 | #define TIOCM_RI TIOCM_RNG 44 | #define TIOCM_OUT1 0x2000 45 | #define TIOCM_OUT2 0x4000 46 | #define TIOCM_LOOP 0x8000 47 | 48 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ 49 | 50 | 51 | #endif /* _ASM_GENERIC_TERMIOS_H */ 52 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm-generic/types.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 | #ifndef _ASM_GENERIC_TYPES_H 3 | #define _ASM_GENERIC_TYPES_H 4 | /* 5 | * int-ll64 is used everywhere now. 6 | */ 7 | #include 8 | 9 | #endif /* _ASM_GENERIC_TYPES_H */ 10 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm-generic/ucontext.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 | #ifndef __ASM_GENERIC_UCONTEXT_H 3 | #define __ASM_GENERIC_UCONTEXT_H 4 | 5 | struct ucontext { 6 | unsigned long uc_flags; 7 | struct ucontext *uc_link; 8 | stack_t uc_stack; 9 | struct sigcontext uc_mcontext; 10 | sigset_t uc_sigmask; /* mask last for extensibility */ 11 | }; 12 | 13 | #endif /* __ASM_GENERIC_UCONTEXT_H */ 14 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm/.a.out.h.cmd: -------------------------------------------------------------------------------- 1 | cmd_usr/include/asm/a.out.h := sh ./scripts/headers_install.sh arch/x86/include/uapi/asm/a.out.h usr/include/asm/a.out.h 2 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm/.auxvec.h.cmd: -------------------------------------------------------------------------------- 1 | cmd_usr/include/asm/auxvec.h := sh ./scripts/headers_install.sh arch/x86/include/uapi/asm/auxvec.h usr/include/asm/auxvec.h 2 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm/.bitsperlong.h.cmd: -------------------------------------------------------------------------------- 1 | cmd_usr/include/asm/bitsperlong.h := sh ./scripts/headers_install.sh arch/x86/include/uapi/asm/bitsperlong.h usr/include/asm/bitsperlong.h 2 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm/.boot.h.cmd: -------------------------------------------------------------------------------- 1 | cmd_usr/include/asm/boot.h := sh ./scripts/headers_install.sh arch/x86/include/uapi/asm/boot.h usr/include/asm/boot.h 2 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm/.bootparam.h.cmd: -------------------------------------------------------------------------------- 1 | cmd_usr/include/asm/bootparam.h := sh ./scripts/headers_install.sh arch/x86/include/uapi/asm/bootparam.h usr/include/asm/bootparam.h 2 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm/.bpf_perf_event.h.cmd: -------------------------------------------------------------------------------- 1 | cmd_usr/include/asm/bpf_perf_event.h := sh ./scripts/headers_install.sh arch/x86/include/generated/uapi/asm/bpf_perf_event.h usr/include/asm/bpf_perf_event.h 2 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm/.byteorder.h.cmd: -------------------------------------------------------------------------------- 1 | cmd_usr/include/asm/byteorder.h := sh ./scripts/headers_install.sh arch/x86/include/uapi/asm/byteorder.h usr/include/asm/byteorder.h 2 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm/.debugreg.h.cmd: -------------------------------------------------------------------------------- 1 | cmd_usr/include/asm/debugreg.h := sh ./scripts/headers_install.sh arch/x86/include/uapi/asm/debugreg.h usr/include/asm/debugreg.h 2 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm/.e820.h.cmd: -------------------------------------------------------------------------------- 1 | cmd_usr/include/asm/e820.h := sh ./scripts/headers_install.sh arch/x86/include/uapi/asm/e820.h usr/include/asm/e820.h 2 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm/.errno.h.cmd: -------------------------------------------------------------------------------- 1 | cmd_usr/include/asm/errno.h := sh ./scripts/headers_install.sh arch/x86/include/generated/uapi/asm/errno.h usr/include/asm/errno.h 2 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm/.fcntl.h.cmd: -------------------------------------------------------------------------------- 1 | cmd_usr/include/asm/fcntl.h := sh ./scripts/headers_install.sh arch/x86/include/generated/uapi/asm/fcntl.h usr/include/asm/fcntl.h 2 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm/.hw_breakpoint.h.cmd: -------------------------------------------------------------------------------- 1 | cmd_usr/include/asm/hw_breakpoint.h := sh ./scripts/headers_install.sh arch/x86/include/uapi/asm/hw_breakpoint.h usr/include/asm/hw_breakpoint.h 2 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm/.hwcap2.h.cmd: -------------------------------------------------------------------------------- 1 | cmd_usr/include/asm/hwcap2.h := sh ./scripts/headers_install.sh arch/x86/include/uapi/asm/hwcap2.h usr/include/asm/hwcap2.h 2 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm/.ioctl.h.cmd: -------------------------------------------------------------------------------- 1 | cmd_usr/include/asm/ioctl.h := sh ./scripts/headers_install.sh arch/x86/include/generated/uapi/asm/ioctl.h usr/include/asm/ioctl.h 2 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm/.ioctls.h.cmd: -------------------------------------------------------------------------------- 1 | cmd_usr/include/asm/ioctls.h := sh ./scripts/headers_install.sh arch/x86/include/generated/uapi/asm/ioctls.h usr/include/asm/ioctls.h 2 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm/.ipcbuf.h.cmd: -------------------------------------------------------------------------------- 1 | cmd_usr/include/asm/ipcbuf.h := sh ./scripts/headers_install.sh arch/x86/include/generated/uapi/asm/ipcbuf.h usr/include/asm/ipcbuf.h 2 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm/.ist.h.cmd: -------------------------------------------------------------------------------- 1 | cmd_usr/include/asm/ist.h := sh ./scripts/headers_install.sh arch/x86/include/uapi/asm/ist.h usr/include/asm/ist.h 2 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm/.kvm.h.cmd: -------------------------------------------------------------------------------- 1 | cmd_usr/include/asm/kvm.h := sh ./scripts/headers_install.sh arch/x86/include/uapi/asm/kvm.h usr/include/asm/kvm.h 2 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm/.kvm_para.h.cmd: -------------------------------------------------------------------------------- 1 | cmd_usr/include/asm/kvm_para.h := sh ./scripts/headers_install.sh arch/x86/include/uapi/asm/kvm_para.h usr/include/asm/kvm_para.h 2 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm/.kvm_perf.h.cmd: -------------------------------------------------------------------------------- 1 | cmd_usr/include/asm/kvm_perf.h := sh ./scripts/headers_install.sh arch/x86/include/uapi/asm/kvm_perf.h usr/include/asm/kvm_perf.h 2 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm/.ldt.h.cmd: -------------------------------------------------------------------------------- 1 | cmd_usr/include/asm/ldt.h := sh ./scripts/headers_install.sh arch/x86/include/uapi/asm/ldt.h usr/include/asm/ldt.h 2 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm/.mce.h.cmd: -------------------------------------------------------------------------------- 1 | cmd_usr/include/asm/mce.h := sh ./scripts/headers_install.sh arch/x86/include/uapi/asm/mce.h usr/include/asm/mce.h 2 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm/.mman.h.cmd: -------------------------------------------------------------------------------- 1 | cmd_usr/include/asm/mman.h := sh ./scripts/headers_install.sh arch/x86/include/uapi/asm/mman.h usr/include/asm/mman.h 2 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm/.msgbuf.h.cmd: -------------------------------------------------------------------------------- 1 | cmd_usr/include/asm/msgbuf.h := sh ./scripts/headers_install.sh arch/x86/include/uapi/asm/msgbuf.h usr/include/asm/msgbuf.h 2 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm/.msr.h.cmd: -------------------------------------------------------------------------------- 1 | cmd_usr/include/asm/msr.h := sh ./scripts/headers_install.sh arch/x86/include/uapi/asm/msr.h usr/include/asm/msr.h 2 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm/.mtrr.h.cmd: -------------------------------------------------------------------------------- 1 | cmd_usr/include/asm/mtrr.h := sh ./scripts/headers_install.sh arch/x86/include/uapi/asm/mtrr.h usr/include/asm/mtrr.h 2 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm/.param.h.cmd: -------------------------------------------------------------------------------- 1 | cmd_usr/include/asm/param.h := sh ./scripts/headers_install.sh arch/x86/include/generated/uapi/asm/param.h usr/include/asm/param.h 2 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm/.perf_regs.h.cmd: -------------------------------------------------------------------------------- 1 | cmd_usr/include/asm/perf_regs.h := sh ./scripts/headers_install.sh arch/x86/include/uapi/asm/perf_regs.h usr/include/asm/perf_regs.h 2 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm/.poll.h.cmd: -------------------------------------------------------------------------------- 1 | cmd_usr/include/asm/poll.h := sh ./scripts/headers_install.sh arch/x86/include/generated/uapi/asm/poll.h usr/include/asm/poll.h 2 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm/.posix_types.h.cmd: -------------------------------------------------------------------------------- 1 | cmd_usr/include/asm/posix_types.h := sh ./scripts/headers_install.sh arch/x86/include/uapi/asm/posix_types.h usr/include/asm/posix_types.h 2 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm/.posix_types_32.h.cmd: -------------------------------------------------------------------------------- 1 | cmd_usr/include/asm/posix_types_32.h := sh ./scripts/headers_install.sh arch/x86/include/uapi/asm/posix_types_32.h usr/include/asm/posix_types_32.h 2 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm/.posix_types_64.h.cmd: -------------------------------------------------------------------------------- 1 | cmd_usr/include/asm/posix_types_64.h := sh ./scripts/headers_install.sh arch/x86/include/uapi/asm/posix_types_64.h usr/include/asm/posix_types_64.h 2 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm/.posix_types_x32.h.cmd: -------------------------------------------------------------------------------- 1 | cmd_usr/include/asm/posix_types_x32.h := sh ./scripts/headers_install.sh arch/x86/include/uapi/asm/posix_types_x32.h usr/include/asm/posix_types_x32.h 2 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm/.prctl.h.cmd: -------------------------------------------------------------------------------- 1 | cmd_usr/include/asm/prctl.h := sh ./scripts/headers_install.sh arch/x86/include/uapi/asm/prctl.h usr/include/asm/prctl.h 2 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm/.processor-flags.h.cmd: -------------------------------------------------------------------------------- 1 | cmd_usr/include/asm/processor-flags.h := sh ./scripts/headers_install.sh arch/x86/include/uapi/asm/processor-flags.h usr/include/asm/processor-flags.h 2 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm/.ptrace-abi.h.cmd: -------------------------------------------------------------------------------- 1 | cmd_usr/include/asm/ptrace-abi.h := sh ./scripts/headers_install.sh arch/x86/include/uapi/asm/ptrace-abi.h usr/include/asm/ptrace-abi.h 2 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm/.ptrace.h.cmd: -------------------------------------------------------------------------------- 1 | cmd_usr/include/asm/ptrace.h := sh ./scripts/headers_install.sh arch/x86/include/uapi/asm/ptrace.h usr/include/asm/ptrace.h 2 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm/.resource.h.cmd: -------------------------------------------------------------------------------- 1 | cmd_usr/include/asm/resource.h := sh ./scripts/headers_install.sh arch/x86/include/generated/uapi/asm/resource.h usr/include/asm/resource.h 2 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm/.sembuf.h.cmd: -------------------------------------------------------------------------------- 1 | cmd_usr/include/asm/sembuf.h := sh ./scripts/headers_install.sh arch/x86/include/uapi/asm/sembuf.h usr/include/asm/sembuf.h 2 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm/.setup.h.cmd: -------------------------------------------------------------------------------- 1 | cmd_usr/include/asm/setup.h := sh ./scripts/headers_install.sh arch/x86/include/uapi/asm/setup.h usr/include/asm/setup.h 2 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm/.sgx.h.cmd: -------------------------------------------------------------------------------- 1 | cmd_usr/include/asm/sgx.h := sh ./scripts/headers_install.sh arch/x86/include/uapi/asm/sgx.h usr/include/asm/sgx.h 2 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm/.shmbuf.h.cmd: -------------------------------------------------------------------------------- 1 | cmd_usr/include/asm/shmbuf.h := sh ./scripts/headers_install.sh arch/x86/include/uapi/asm/shmbuf.h usr/include/asm/shmbuf.h 2 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm/.sigcontext.h.cmd: -------------------------------------------------------------------------------- 1 | cmd_usr/include/asm/sigcontext.h := sh ./scripts/headers_install.sh arch/x86/include/uapi/asm/sigcontext.h usr/include/asm/sigcontext.h 2 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm/.sigcontext32.h.cmd: -------------------------------------------------------------------------------- 1 | cmd_usr/include/asm/sigcontext32.h := sh ./scripts/headers_install.sh arch/x86/include/uapi/asm/sigcontext32.h usr/include/asm/sigcontext32.h 2 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm/.siginfo.h.cmd: -------------------------------------------------------------------------------- 1 | cmd_usr/include/asm/siginfo.h := sh ./scripts/headers_install.sh arch/x86/include/uapi/asm/siginfo.h usr/include/asm/siginfo.h 2 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm/.signal.h.cmd: -------------------------------------------------------------------------------- 1 | cmd_usr/include/asm/signal.h := sh ./scripts/headers_install.sh arch/x86/include/uapi/asm/signal.h usr/include/asm/signal.h 2 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm/.socket.h.cmd: -------------------------------------------------------------------------------- 1 | cmd_usr/include/asm/socket.h := sh ./scripts/headers_install.sh arch/x86/include/generated/uapi/asm/socket.h usr/include/asm/socket.h 2 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm/.sockios.h.cmd: -------------------------------------------------------------------------------- 1 | cmd_usr/include/asm/sockios.h := sh ./scripts/headers_install.sh arch/x86/include/generated/uapi/asm/sockios.h usr/include/asm/sockios.h 2 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm/.stat.h.cmd: -------------------------------------------------------------------------------- 1 | cmd_usr/include/asm/stat.h := sh ./scripts/headers_install.sh arch/x86/include/uapi/asm/stat.h usr/include/asm/stat.h 2 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm/.statfs.h.cmd: -------------------------------------------------------------------------------- 1 | cmd_usr/include/asm/statfs.h := sh ./scripts/headers_install.sh arch/x86/include/uapi/asm/statfs.h usr/include/asm/statfs.h 2 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm/.svm.h.cmd: -------------------------------------------------------------------------------- 1 | cmd_usr/include/asm/svm.h := sh ./scripts/headers_install.sh arch/x86/include/uapi/asm/svm.h usr/include/asm/svm.h 2 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm/.swab.h.cmd: -------------------------------------------------------------------------------- 1 | cmd_usr/include/asm/swab.h := sh ./scripts/headers_install.sh arch/x86/include/uapi/asm/swab.h usr/include/asm/swab.h 2 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm/.termbits.h.cmd: -------------------------------------------------------------------------------- 1 | cmd_usr/include/asm/termbits.h := sh ./scripts/headers_install.sh arch/x86/include/generated/uapi/asm/termbits.h usr/include/asm/termbits.h 2 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm/.termios.h.cmd: -------------------------------------------------------------------------------- 1 | cmd_usr/include/asm/termios.h := sh ./scripts/headers_install.sh arch/x86/include/generated/uapi/asm/termios.h usr/include/asm/termios.h 2 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm/.types.h.cmd: -------------------------------------------------------------------------------- 1 | cmd_usr/include/asm/types.h := sh ./scripts/headers_install.sh arch/x86/include/generated/uapi/asm/types.h usr/include/asm/types.h 2 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm/.ucontext.h.cmd: -------------------------------------------------------------------------------- 1 | cmd_usr/include/asm/ucontext.h := sh ./scripts/headers_install.sh arch/x86/include/uapi/asm/ucontext.h usr/include/asm/ucontext.h 2 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm/.unistd.h.cmd: -------------------------------------------------------------------------------- 1 | cmd_usr/include/asm/unistd.h := sh ./scripts/headers_install.sh arch/x86/include/uapi/asm/unistd.h usr/include/asm/unistd.h 2 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm/.unistd_32.h.cmd: -------------------------------------------------------------------------------- 1 | cmd_usr/include/asm/unistd_32.h := sh ./scripts/headers_install.sh arch/x86/include/generated/uapi/asm/unistd_32.h usr/include/asm/unistd_32.h 2 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm/.unistd_64.h.cmd: -------------------------------------------------------------------------------- 1 | cmd_usr/include/asm/unistd_64.h := sh ./scripts/headers_install.sh arch/x86/include/generated/uapi/asm/unistd_64.h usr/include/asm/unistd_64.h 2 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm/.unistd_x32.h.cmd: -------------------------------------------------------------------------------- 1 | cmd_usr/include/asm/unistd_x32.h := sh ./scripts/headers_install.sh arch/x86/include/generated/uapi/asm/unistd_x32.h usr/include/asm/unistd_x32.h 2 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm/.vm86.h.cmd: -------------------------------------------------------------------------------- 1 | cmd_usr/include/asm/vm86.h := sh ./scripts/headers_install.sh arch/x86/include/uapi/asm/vm86.h usr/include/asm/vm86.h 2 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm/.vmx.h.cmd: -------------------------------------------------------------------------------- 1 | cmd_usr/include/asm/vmx.h := sh ./scripts/headers_install.sh arch/x86/include/uapi/asm/vmx.h usr/include/asm/vmx.h 2 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm/.vsyscall.h.cmd: -------------------------------------------------------------------------------- 1 | cmd_usr/include/asm/vsyscall.h := sh ./scripts/headers_install.sh arch/x86/include/uapi/asm/vsyscall.h usr/include/asm/vsyscall.h 2 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm/a.out.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 | #ifndef _ASM_X86_A_OUT_H 3 | #define _ASM_X86_A_OUT_H 4 | 5 | struct exec 6 | { 7 | unsigned int a_info; /* Use macros N_MAGIC, etc for access */ 8 | unsigned a_text; /* length of text, in bytes */ 9 | unsigned a_data; /* length of data, in bytes */ 10 | unsigned a_bss; /* length of uninitialized data area for file, in bytes */ 11 | unsigned a_syms; /* length of symbol table data in file, in bytes */ 12 | unsigned a_entry; /* start address */ 13 | unsigned a_trsize; /* length of relocation info for text, in bytes */ 14 | unsigned a_drsize; /* length of relocation info for data, in bytes */ 15 | }; 16 | 17 | #define N_TRSIZE(a) ((a).a_trsize) 18 | #define N_DRSIZE(a) ((a).a_drsize) 19 | #define N_SYMSIZE(a) ((a).a_syms) 20 | 21 | #endif /* _ASM_X86_A_OUT_H */ 22 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm/auxvec.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 | #ifndef _ASM_X86_AUXVEC_H 3 | #define _ASM_X86_AUXVEC_H 4 | /* 5 | * Architecture-neutral AT_ values in 0-17, leave some room 6 | * for more of them, start the x86-specific ones at 32. 7 | */ 8 | #ifdef __i386__ 9 | #define AT_SYSINFO 32 10 | #endif 11 | #define AT_SYSINFO_EHDR 33 12 | 13 | /* entries in ARCH_DLINFO: */ 14 | #if defined(CONFIG_IA32_EMULATION) || !defined(CONFIG_X86_64) 15 | # define AT_VECTOR_SIZE_ARCH 3 16 | #else /* else it's non-compat x86-64 */ 17 | # define AT_VECTOR_SIZE_ARCH 2 18 | #endif 19 | 20 | #endif /* _ASM_X86_AUXVEC_H */ 21 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm/bitsperlong.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 | #ifndef __ASM_X86_BITSPERLONG_H 3 | #define __ASM_X86_BITSPERLONG_H 4 | 5 | #if defined(__x86_64__) && !defined(__ILP32__) 6 | # define __BITS_PER_LONG 64 7 | #else 8 | # define __BITS_PER_LONG 32 9 | #endif 10 | 11 | #include 12 | 13 | #endif /* __ASM_X86_BITSPERLONG_H */ 14 | 15 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm/boot.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 | #ifndef _ASM_X86_BOOT_H 3 | #define _ASM_X86_BOOT_H 4 | 5 | /* Internal svga startup constants */ 6 | #define NORMAL_VGA 0xffff /* 80x25 mode */ 7 | #define EXTENDED_VGA 0xfffe /* 80x50 mode */ 8 | #define ASK_VGA 0xfffd /* ask for it at bootup */ 9 | 10 | 11 | #endif /* _ASM_X86_BOOT_H */ 12 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm/bpf_perf_event.h: -------------------------------------------------------------------------------- 1 | #include 2 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm/byteorder.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 | #ifndef _ASM_X86_BYTEORDER_H 3 | #define _ASM_X86_BYTEORDER_H 4 | 5 | #include 6 | 7 | #endif /* _ASM_X86_BYTEORDER_H */ 8 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm/debugreg.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 | #ifndef _ASM_X86_DEBUGREG_H 3 | #define _ASM_X86_DEBUGREG_H 4 | 5 | 6 | /* Indicate the register numbers for a number of the specific 7 | debug registers. Registers 0-3 contain the addresses we wish to trap on */ 8 | #define DR_FIRSTADDR 0 /* u_debugreg[DR_FIRSTADDR] */ 9 | #define DR_LASTADDR 3 /* u_debugreg[DR_LASTADDR] */ 10 | 11 | #define DR_STATUS 6 /* u_debugreg[DR_STATUS] */ 12 | #define DR_CONTROL 7 /* u_debugreg[DR_CONTROL] */ 13 | 14 | /* Define a few things for the status register. We can use this to determine 15 | which debugging register was responsible for the trap. The other bits 16 | are either reserved or not of interest to us. */ 17 | 18 | /* Define reserved bits in DR6 which are always set to 1 */ 19 | #define DR6_RESERVED (0xFFFF0FF0) 20 | 21 | #define DR_TRAP0 (0x1) /* db0 */ 22 | #define DR_TRAP1 (0x2) /* db1 */ 23 | #define DR_TRAP2 (0x4) /* db2 */ 24 | #define DR_TRAP3 (0x8) /* db3 */ 25 | #define DR_TRAP_BITS (DR_TRAP0|DR_TRAP1|DR_TRAP2|DR_TRAP3) 26 | 27 | #define DR_BUS_LOCK (0x800) /* bus_lock */ 28 | #define DR_STEP (0x4000) /* single-step */ 29 | #define DR_SWITCH (0x8000) /* task switch */ 30 | 31 | /* Now define a bunch of things for manipulating the control register. 32 | The top two bytes of the control register consist of 4 fields of 4 33 | bits - each field corresponds to one of the four debug registers, 34 | and indicates what types of access we trap on, and how large the data 35 | field is that we are looking at */ 36 | 37 | #define DR_CONTROL_SHIFT 16 /* Skip this many bits in ctl register */ 38 | #define DR_CONTROL_SIZE 4 /* 4 control bits per register */ 39 | 40 | #define DR_RW_EXECUTE (0x0) /* Settings for the access types to trap on */ 41 | #define DR_RW_WRITE (0x1) 42 | #define DR_RW_READ (0x3) 43 | 44 | #define DR_LEN_1 (0x0) /* Settings for data length to trap on */ 45 | #define DR_LEN_2 (0x4) 46 | #define DR_LEN_4 (0xC) 47 | #define DR_LEN_8 (0x8) 48 | 49 | /* The low byte to the control register determine which registers are 50 | enabled. There are 4 fields of two bits. One bit is "local", meaning 51 | that the processor will reset the bit after a task switch and the other 52 | is global meaning that we have to explicitly reset the bit. With linux, 53 | you can use either one, since we explicitly zero the register when we enter 54 | kernel mode. */ 55 | 56 | #define DR_LOCAL_ENABLE_SHIFT 0 /* Extra shift to the local enable bit */ 57 | #define DR_GLOBAL_ENABLE_SHIFT 1 /* Extra shift to the global enable bit */ 58 | #define DR_LOCAL_ENABLE (0x1) /* Local enable for reg 0 */ 59 | #define DR_GLOBAL_ENABLE (0x2) /* Global enable for reg 0 */ 60 | #define DR_ENABLE_SIZE 2 /* 2 enable bits per register */ 61 | 62 | #define DR_LOCAL_ENABLE_MASK (0x55) /* Set local bits for all 4 regs */ 63 | #define DR_GLOBAL_ENABLE_MASK (0xAA) /* Set global bits for all 4 regs */ 64 | 65 | /* The second byte to the control register has a few special things. 66 | We can slow the instruction pipeline for instructions coming via the 67 | gdt or the ldt if we want to. I am not sure why this is an advantage */ 68 | 69 | #ifdef __i386__ 70 | #define DR_CONTROL_RESERVED (0xFC00) /* Reserved by Intel */ 71 | #else 72 | #define DR_CONTROL_RESERVED (0xFFFFFFFF0000FC00UL) /* Reserved */ 73 | #endif 74 | 75 | #define DR_LOCAL_SLOWDOWN (0x100) /* Local slow the pipeline */ 76 | #define DR_GLOBAL_SLOWDOWN (0x200) /* Global slow the pipeline */ 77 | 78 | /* 79 | * HW breakpoint additions 80 | */ 81 | 82 | #endif /* _ASM_X86_DEBUGREG_H */ 83 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm/e820.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 | #ifndef _ASM_X86_E820_H 3 | #define _ASM_X86_E820_H 4 | #define E820MAP 0x2d0 /* our map */ 5 | #define E820MAX 128 /* number of entries in E820MAP */ 6 | 7 | /* 8 | * Legacy E820 BIOS limits us to 128 (E820MAX) nodes due to the 9 | * constrained space in the zeropage. If we have more nodes than 10 | * that, and if we've booted off EFI firmware, then the EFI tables 11 | * passed us from the EFI firmware can list more nodes. Size our 12 | * internal memory map tables to have room for these additional 13 | * nodes, based on up to three entries per node for which the 14 | * kernel was built: MAX_NUMNODES == (1 << CONFIG_NODES_SHIFT), 15 | * plus E820MAX, allowing space for the possible duplicate E820 16 | * entries that might need room in the same arrays, prior to the 17 | * call to sanitize_e820_map() to remove duplicates. The allowance 18 | * of three memory map entries per node is "enough" entries for 19 | * the initial hardware platform motivating this mechanism to make 20 | * use of additional EFI map entries. Future platforms may want 21 | * to allow more than three entries per node or otherwise refine 22 | * this size. 23 | */ 24 | 25 | #define E820_X_MAX E820MAX 26 | 27 | #define E820NR 0x1e8 /* # entries in E820MAP */ 28 | 29 | #define E820_RAM 1 30 | #define E820_RESERVED 2 31 | #define E820_ACPI 3 32 | #define E820_NVS 4 33 | #define E820_UNUSABLE 5 34 | #define E820_PMEM 7 35 | 36 | /* 37 | * This is a non-standardized way to represent ADR or NVDIMM regions that 38 | * persist over a reboot. The kernel will ignore their special capabilities 39 | * unless the CONFIG_X86_PMEM_LEGACY option is set. 40 | * 41 | * ( Note that older platforms also used 6 for the same type of memory, 42 | * but newer versions switched to 12 as 6 was assigned differently. Some 43 | * time they will learn... ) 44 | */ 45 | #define E820_PRAM 12 46 | 47 | /* 48 | * reserved RAM used by kernel itself 49 | * if CONFIG_INTEL_TXT is enabled, memory of this type will be 50 | * included in the S3 integrity calculation and so should not include 51 | * any memory that BIOS might alter over the S3 transition 52 | */ 53 | #define E820_RESERVED_KERN 128 54 | 55 | #ifndef __ASSEMBLY__ 56 | #include 57 | struct e820entry { 58 | __u64 addr; /* start of memory segment */ 59 | __u64 size; /* size of memory segment */ 60 | __u32 type; /* type of memory segment */ 61 | } __attribute__((packed)); 62 | 63 | struct e820map { 64 | __u32 nr_map; 65 | struct e820entry map[E820_X_MAX]; 66 | }; 67 | 68 | #define ISA_START_ADDRESS 0xa0000 69 | #define ISA_END_ADDRESS 0x100000 70 | 71 | #define BIOS_BEGIN 0x000a0000 72 | #define BIOS_END 0x00100000 73 | 74 | #define BIOS_ROM_BASE 0xffe00000 75 | #define BIOS_ROM_END 0xffffffff 76 | 77 | #endif /* __ASSEMBLY__ */ 78 | 79 | 80 | #endif /* _ASM_X86_E820_H */ 81 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm/errno.h: -------------------------------------------------------------------------------- 1 | #include 2 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm/fcntl.h: -------------------------------------------------------------------------------- 1 | #include 2 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm/hw_breakpoint.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 | /* */ 3 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm/hwcap2.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 | #ifndef _ASM_X86_HWCAP2_H 3 | #define _ASM_X86_HWCAP2_H 4 | 5 | #include 6 | 7 | /* MONITOR/MWAIT enabled in Ring 3 */ 8 | #define HWCAP2_RING3MWAIT _BITUL(0) 9 | 10 | /* Kernel allows FSGSBASE instructions available in Ring 3 */ 11 | #define HWCAP2_FSGSBASE _BITUL(1) 12 | 13 | #endif 14 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm/ioctl.h: -------------------------------------------------------------------------------- 1 | #include 2 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm/ioctls.h: -------------------------------------------------------------------------------- 1 | #include 2 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm/ipcbuf.h: -------------------------------------------------------------------------------- 1 | #include 2 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm/ist.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */ 2 | /* 3 | * Include file for the interface to IST BIOS 4 | * Copyright 2002 Andy Grover 5 | * 6 | * This program is free software; you can redistribute it and/or modify it 7 | * under the terms of the GNU General Public License as published by the 8 | * Free Software Foundation; either version 2, or (at your option) any 9 | * later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, but 12 | * WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * General Public License for more details. 15 | */ 16 | #ifndef _ASM_X86_IST_H 17 | #define _ASM_X86_IST_H 18 | 19 | 20 | 21 | #include 22 | 23 | struct ist_info { 24 | __u32 signature; 25 | __u32 command; 26 | __u32 event; 27 | __u32 perf_level; 28 | }; 29 | 30 | #endif /* _ASM_X86_IST_H */ 31 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm/kvm_para.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 | #ifndef _ASM_X86_KVM_PARA_H 3 | #define _ASM_X86_KVM_PARA_H 4 | 5 | #include 6 | 7 | /* This CPUID returns the signature 'KVMKVMKVM' in ebx, ecx, and edx. It 8 | * should be used to determine that a VM is running under KVM. 9 | */ 10 | #define KVM_CPUID_SIGNATURE 0x40000000 11 | #define KVM_SIGNATURE "KVMKVMKVM\0\0\0" 12 | 13 | /* This CPUID returns two feature bitmaps in eax, edx. Before enabling 14 | * a particular paravirtualization, the appropriate feature bit should 15 | * be checked in eax. The performance hint feature bit should be checked 16 | * in edx. 17 | */ 18 | #define KVM_CPUID_FEATURES 0x40000001 19 | #define KVM_FEATURE_CLOCKSOURCE 0 20 | #define KVM_FEATURE_NOP_IO_DELAY 1 21 | #define KVM_FEATURE_MMU_OP 2 22 | /* This indicates that the new set of kvmclock msrs 23 | * are available. The use of 0x11 and 0x12 is deprecated 24 | */ 25 | #define KVM_FEATURE_CLOCKSOURCE2 3 26 | #define KVM_FEATURE_ASYNC_PF 4 27 | #define KVM_FEATURE_STEAL_TIME 5 28 | #define KVM_FEATURE_PV_EOI 6 29 | #define KVM_FEATURE_PV_UNHALT 7 30 | #define KVM_FEATURE_PV_TLB_FLUSH 9 31 | #define KVM_FEATURE_ASYNC_PF_VMEXIT 10 32 | #define KVM_FEATURE_PV_SEND_IPI 11 33 | #define KVM_FEATURE_POLL_CONTROL 12 34 | #define KVM_FEATURE_PV_SCHED_YIELD 13 35 | #define KVM_FEATURE_ASYNC_PF_INT 14 36 | #define KVM_FEATURE_MSI_EXT_DEST_ID 15 37 | #define KVM_FEATURE_HC_MAP_GPA_RANGE 16 38 | #define KVM_FEATURE_MIGRATION_CONTROL 17 39 | 40 | #define KVM_HINTS_REALTIME 0 41 | 42 | /* The last 8 bits are used to indicate how to interpret the flags field 43 | * in pvclock structure. If no bits are set, all flags are ignored. 44 | */ 45 | #define KVM_FEATURE_CLOCKSOURCE_STABLE_BIT 24 46 | 47 | #define MSR_KVM_WALL_CLOCK 0x11 48 | #define MSR_KVM_SYSTEM_TIME 0x12 49 | 50 | #define KVM_MSR_ENABLED 1 51 | /* Custom MSRs falls in the range 0x4b564d00-0x4b564dff */ 52 | #define MSR_KVM_WALL_CLOCK_NEW 0x4b564d00 53 | #define MSR_KVM_SYSTEM_TIME_NEW 0x4b564d01 54 | #define MSR_KVM_ASYNC_PF_EN 0x4b564d02 55 | #define MSR_KVM_STEAL_TIME 0x4b564d03 56 | #define MSR_KVM_PV_EOI_EN 0x4b564d04 57 | #define MSR_KVM_POLL_CONTROL 0x4b564d05 58 | #define MSR_KVM_ASYNC_PF_INT 0x4b564d06 59 | #define MSR_KVM_ASYNC_PF_ACK 0x4b564d07 60 | #define MSR_KVM_MIGRATION_CONTROL 0x4b564d08 61 | 62 | struct kvm_steal_time { 63 | __u64 steal; 64 | __u32 version; 65 | __u32 flags; 66 | __u8 preempted; 67 | __u8 u8_pad[3]; 68 | __u32 pad[11]; 69 | }; 70 | 71 | #define KVM_VCPU_PREEMPTED (1 << 0) 72 | #define KVM_VCPU_FLUSH_TLB (1 << 1) 73 | 74 | #define KVM_CLOCK_PAIRING_WALLCLOCK 0 75 | struct kvm_clock_pairing { 76 | __s64 sec; 77 | __s64 nsec; 78 | __u64 tsc; 79 | __u32 flags; 80 | __u32 pad[9]; 81 | }; 82 | 83 | #define KVM_STEAL_ALIGNMENT_BITS 5 84 | #define KVM_STEAL_VALID_BITS ((-1ULL << (KVM_STEAL_ALIGNMENT_BITS + 1))) 85 | #define KVM_STEAL_RESERVED_MASK (((1 << KVM_STEAL_ALIGNMENT_BITS) - 1 ) << 1) 86 | 87 | #define KVM_MAX_MMU_OP_BATCH 32 88 | 89 | #define KVM_ASYNC_PF_ENABLED (1 << 0) 90 | #define KVM_ASYNC_PF_SEND_ALWAYS (1 << 1) 91 | #define KVM_ASYNC_PF_DELIVERY_AS_PF_VMEXIT (1 << 2) 92 | #define KVM_ASYNC_PF_DELIVERY_AS_INT (1 << 3) 93 | 94 | /* MSR_KVM_ASYNC_PF_INT */ 95 | #define KVM_ASYNC_PF_VEC_MASK GENMASK(7, 0) 96 | 97 | /* MSR_KVM_MIGRATION_CONTROL */ 98 | #define KVM_MIGRATION_READY (1 << 0) 99 | 100 | /* KVM_HC_MAP_GPA_RANGE */ 101 | #define KVM_MAP_GPA_RANGE_PAGE_SZ_4K 0 102 | #define KVM_MAP_GPA_RANGE_PAGE_SZ_2M (1 << 0) 103 | #define KVM_MAP_GPA_RANGE_PAGE_SZ_1G (1 << 1) 104 | #define KVM_MAP_GPA_RANGE_ENC_STAT(n) (n << 4) 105 | #define KVM_MAP_GPA_RANGE_ENCRYPTED KVM_MAP_GPA_RANGE_ENC_STAT(1) 106 | #define KVM_MAP_GPA_RANGE_DECRYPTED KVM_MAP_GPA_RANGE_ENC_STAT(0) 107 | 108 | /* Operations for KVM_HC_MMU_OP */ 109 | #define KVM_MMU_OP_WRITE_PTE 1 110 | #define KVM_MMU_OP_FLUSH_TLB 2 111 | #define KVM_MMU_OP_RELEASE_PT 3 112 | 113 | /* Payload for KVM_HC_MMU_OP */ 114 | struct kvm_mmu_op_header { 115 | __u32 op; 116 | __u32 pad; 117 | }; 118 | 119 | struct kvm_mmu_op_write_pte { 120 | struct kvm_mmu_op_header header; 121 | __u64 pte_phys; 122 | __u64 pte_val; 123 | }; 124 | 125 | struct kvm_mmu_op_flush_tlb { 126 | struct kvm_mmu_op_header header; 127 | }; 128 | 129 | struct kvm_mmu_op_release_pt { 130 | struct kvm_mmu_op_header header; 131 | __u64 pt_phys; 132 | }; 133 | 134 | #define KVM_PV_REASON_PAGE_NOT_PRESENT 1 135 | #define KVM_PV_REASON_PAGE_READY 2 136 | 137 | struct kvm_vcpu_pv_apf_data { 138 | /* Used for 'page not present' events delivered via #PF */ 139 | __u32 flags; 140 | 141 | /* Used for 'page ready' events delivered via interrupt notification */ 142 | __u32 token; 143 | 144 | __u8 pad[56]; 145 | __u32 enabled; 146 | }; 147 | 148 | #define KVM_PV_EOI_BIT 0 149 | #define KVM_PV_EOI_MASK (0x1 << KVM_PV_EOI_BIT) 150 | #define KVM_PV_EOI_ENABLED KVM_PV_EOI_MASK 151 | #define KVM_PV_EOI_DISABLED 0x0 152 | 153 | #endif /* _ASM_X86_KVM_PARA_H */ 154 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm/kvm_perf.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 | #ifndef _ASM_X86_KVM_PERF_H 3 | #define _ASM_X86_KVM_PERF_H 4 | 5 | #include 6 | #include 7 | #include 8 | 9 | #define DECODE_STR_LEN 20 10 | 11 | #define VCPU_ID "vcpu_id" 12 | 13 | #define KVM_ENTRY_TRACE "kvm:kvm_entry" 14 | #define KVM_EXIT_TRACE "kvm:kvm_exit" 15 | #define KVM_EXIT_REASON "exit_reason" 16 | 17 | #endif /* _ASM_X86_KVM_PERF_H */ 18 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm/ldt.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 | /* 3 | * ldt.h 4 | * 5 | * Definitions of structures used with the modify_ldt system call. 6 | */ 7 | #ifndef _ASM_X86_LDT_H 8 | #define _ASM_X86_LDT_H 9 | 10 | /* Maximum number of LDT entries supported. */ 11 | #define LDT_ENTRIES 8192 12 | /* The size of each LDT entry. */ 13 | #define LDT_ENTRY_SIZE 8 14 | 15 | #ifndef __ASSEMBLY__ 16 | /* 17 | * Note on 64bit base and limit is ignored and you cannot set DS/ES/CS 18 | * not to the default values if you still want to do syscalls. This 19 | * call is more for 32bit mode therefore. 20 | */ 21 | struct user_desc { 22 | unsigned int entry_number; 23 | unsigned int base_addr; 24 | unsigned int limit; 25 | unsigned int seg_32bit:1; 26 | unsigned int contents:2; 27 | unsigned int read_exec_only:1; 28 | unsigned int limit_in_pages:1; 29 | unsigned int seg_not_present:1; 30 | unsigned int useable:1; 31 | #ifdef __x86_64__ 32 | /* 33 | * Because this bit is not present in 32-bit user code, user 34 | * programs can pass uninitialized values here. Therefore, in 35 | * any context in which a user_desc comes from a 32-bit program, 36 | * the kernel must act as though lm == 0, regardless of the 37 | * actual value. 38 | */ 39 | unsigned int lm:1; 40 | #endif 41 | }; 42 | 43 | #define MODIFY_LDT_CONTENTS_DATA 0 44 | #define MODIFY_LDT_CONTENTS_STACK 1 45 | #define MODIFY_LDT_CONTENTS_CODE 2 46 | 47 | #endif /* !__ASSEMBLY__ */ 48 | #endif /* _ASM_X86_LDT_H */ 49 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm/mce.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 | #ifndef _ASM_X86_MCE_H 3 | #define _ASM_X86_MCE_H 4 | 5 | #include 6 | #include 7 | 8 | /* 9 | * Fields are zero when not available. Also, this struct is shared with 10 | * userspace mcelog and thus must keep existing fields at current offsets. 11 | * Only add new fields to the end of the structure 12 | */ 13 | struct mce { 14 | __u64 status; /* Bank's MCi_STATUS MSR */ 15 | __u64 misc; /* Bank's MCi_MISC MSR */ 16 | __u64 addr; /* Bank's MCi_ADDR MSR */ 17 | __u64 mcgstatus; /* Machine Check Global Status MSR */ 18 | __u64 ip; /* Instruction Pointer when the error happened */ 19 | __u64 tsc; /* CPU time stamp counter */ 20 | __u64 time; /* Wall time_t when error was detected */ 21 | __u8 cpuvendor; /* Kernel's X86_VENDOR enum */ 22 | __u8 inject_flags; /* Software inject flags */ 23 | __u8 severity; /* Error severity */ 24 | __u8 pad; 25 | __u32 cpuid; /* CPUID 1 EAX */ 26 | __u8 cs; /* Code segment */ 27 | __u8 bank; /* Machine check bank reporting the error */ 28 | __u8 cpu; /* CPU number; obsoleted by extcpu */ 29 | __u8 finished; /* Entry is valid */ 30 | __u32 extcpu; /* Linux CPU number that detected the error */ 31 | __u32 socketid; /* CPU socket ID */ 32 | __u32 apicid; /* CPU initial APIC ID */ 33 | __u64 mcgcap; /* MCGCAP MSR: machine check capabilities of CPU */ 34 | __u64 synd; /* MCA_SYND MSR: only valid on SMCA systems */ 35 | __u64 ipid; /* MCA_IPID MSR: only valid on SMCA systems */ 36 | __u64 ppin; /* Protected Processor Inventory Number */ 37 | __u32 microcode; /* Microcode revision */ 38 | __u64 kflags; /* Internal kernel use */ 39 | }; 40 | 41 | #define MCE_GET_RECORD_LEN _IOR('M', 1, int) 42 | #define MCE_GET_LOG_LEN _IOR('M', 2, int) 43 | #define MCE_GETCLEAR_FLAGS _IOR('M', 3, int) 44 | 45 | #endif /* _ASM_X86_MCE_H */ 46 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm/mman.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 | #ifndef _ASM_X86_MMAN_H 3 | #define _ASM_X86_MMAN_H 4 | 5 | #define MAP_32BIT 0x40 /* only give out 32bit addresses */ 6 | 7 | #ifdef CONFIG_X86_INTEL_MEMORY_PROTECTION_KEYS 8 | /* 9 | * Take the 4 protection key bits out of the vma->vm_flags 10 | * value and turn them in to the bits that we can put in 11 | * to a pte. 12 | * 13 | * Only override these if Protection Keys are available 14 | * (which is only on 64-bit). 15 | */ 16 | #define arch_vm_get_page_prot(vm_flags) __pgprot( \ 17 | ((vm_flags) & VM_PKEY_BIT0 ? _PAGE_PKEY_BIT0 : 0) | \ 18 | ((vm_flags) & VM_PKEY_BIT1 ? _PAGE_PKEY_BIT1 : 0) | \ 19 | ((vm_flags) & VM_PKEY_BIT2 ? _PAGE_PKEY_BIT2 : 0) | \ 20 | ((vm_flags) & VM_PKEY_BIT3 ? _PAGE_PKEY_BIT3 : 0)) 21 | 22 | #define arch_calc_vm_prot_bits(prot, key) ( \ 23 | ((key) & 0x1 ? VM_PKEY_BIT0 : 0) | \ 24 | ((key) & 0x2 ? VM_PKEY_BIT1 : 0) | \ 25 | ((key) & 0x4 ? VM_PKEY_BIT2 : 0) | \ 26 | ((key) & 0x8 ? VM_PKEY_BIT3 : 0)) 27 | #endif 28 | 29 | #include 30 | 31 | #endif /* _ASM_X86_MMAN_H */ 32 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm/msgbuf.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 | #ifndef __ASM_X64_MSGBUF_H 3 | #define __ASM_X64_MSGBUF_H 4 | 5 | #if !defined(__x86_64__) || !defined(__ILP32__) 6 | #include 7 | #else 8 | 9 | #include 10 | 11 | /* 12 | * The msqid64_ds structure for x86 architecture with x32 ABI. 13 | * 14 | * On x86-32 and x86-64 we can just use the generic definition, but 15 | * x32 uses the same binary layout as x86_64, which is different 16 | * from other 32-bit architectures. 17 | */ 18 | 19 | struct msqid64_ds { 20 | struct ipc64_perm msg_perm; 21 | __kernel_long_t msg_stime; /* last msgsnd time */ 22 | __kernel_long_t msg_rtime; /* last msgrcv time */ 23 | __kernel_long_t msg_ctime; /* last change time */ 24 | __kernel_ulong_t msg_cbytes; /* current number of bytes on queue */ 25 | __kernel_ulong_t msg_qnum; /* number of messages in queue */ 26 | __kernel_ulong_t msg_qbytes; /* max number of bytes on queue */ 27 | __kernel_pid_t msg_lspid; /* pid of last msgsnd */ 28 | __kernel_pid_t msg_lrpid; /* last receive pid */ 29 | __kernel_ulong_t __unused4; 30 | __kernel_ulong_t __unused5; 31 | }; 32 | 33 | #endif 34 | 35 | #endif /* __ASM_GENERIC_MSGBUF_H */ 36 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm/msr.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 | #ifndef _ASM_X86_MSR_H 3 | #define _ASM_X86_MSR_H 4 | 5 | #ifndef __ASSEMBLY__ 6 | 7 | #include 8 | #include 9 | 10 | #define X86_IOC_RDMSR_REGS _IOWR('c', 0xA0, __u32[8]) 11 | #define X86_IOC_WRMSR_REGS _IOWR('c', 0xA1, __u32[8]) 12 | 13 | #endif /* __ASSEMBLY__ */ 14 | #endif /* _ASM_X86_MSR_H */ 15 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm/mtrr.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: LGPL-2.0+ WITH Linux-syscall-note */ 2 | /* Generic MTRR (Memory Type Range Register) ioctls. 3 | 4 | Copyright (C) 1997-1999 Richard Gooch 5 | 6 | This library is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU Library General Public 8 | License as published by the Free Software Foundation; either 9 | version 2 of the License, or (at your option) any later version. 10 | 11 | This library is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | Library General Public License for more details. 15 | 16 | You should have received a copy of the GNU Library General Public 17 | License along with this library; if not, write to the Free 18 | Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 | 20 | Richard Gooch may be reached by email at rgooch@atnf.csiro.au 21 | The postal address is: 22 | Richard Gooch, c/o ATNF, P. O. Box 76, Epping, N.S.W., 2121, Australia. 23 | */ 24 | #ifndef _ASM_X86_MTRR_H 25 | #define _ASM_X86_MTRR_H 26 | 27 | #include 28 | #include 29 | #include 30 | 31 | #define MTRR_IOCTL_BASE 'M' 32 | 33 | /* Warning: this structure has a different order from i386 34 | on x86-64. The 32bit emulation code takes care of that. 35 | But you need to use this for 64bit, otherwise your X server 36 | will break. */ 37 | 38 | #ifdef __i386__ 39 | struct mtrr_sentry { 40 | unsigned long base; /* Base address */ 41 | unsigned int size; /* Size of region */ 42 | unsigned int type; /* Type of region */ 43 | }; 44 | 45 | struct mtrr_gentry { 46 | unsigned int regnum; /* Register number */ 47 | unsigned long base; /* Base address */ 48 | unsigned int size; /* Size of region */ 49 | unsigned int type; /* Type of region */ 50 | }; 51 | 52 | #else /* __i386__ */ 53 | 54 | struct mtrr_sentry { 55 | __u64 base; /* Base address */ 56 | __u32 size; /* Size of region */ 57 | __u32 type; /* Type of region */ 58 | }; 59 | 60 | struct mtrr_gentry { 61 | __u64 base; /* Base address */ 62 | __u32 size; /* Size of region */ 63 | __u32 regnum; /* Register number */ 64 | __u32 type; /* Type of region */ 65 | __u32 _pad; /* Unused */ 66 | }; 67 | 68 | #endif /* !__i386__ */ 69 | 70 | struct mtrr_var_range { 71 | __u32 base_lo; 72 | __u32 base_hi; 73 | __u32 mask_lo; 74 | __u32 mask_hi; 75 | }; 76 | 77 | /* In the Intel processor's MTRR interface, the MTRR type is always held in 78 | an 8 bit field: */ 79 | typedef __u8 mtrr_type; 80 | 81 | #define MTRR_NUM_FIXED_RANGES 88 82 | #define MTRR_MAX_VAR_RANGES 256 83 | 84 | struct mtrr_state_type { 85 | struct mtrr_var_range var_ranges[MTRR_MAX_VAR_RANGES]; 86 | mtrr_type fixed_ranges[MTRR_NUM_FIXED_RANGES]; 87 | unsigned char enabled; 88 | unsigned char have_fixed; 89 | mtrr_type def_type; 90 | }; 91 | 92 | #define MTRRphysBase_MSR(reg) (0x200 + 2 * (reg)) 93 | #define MTRRphysMask_MSR(reg) (0x200 + 2 * (reg) + 1) 94 | 95 | /* These are the various ioctls */ 96 | #define MTRRIOC_ADD_ENTRY _IOW(MTRR_IOCTL_BASE, 0, struct mtrr_sentry) 97 | #define MTRRIOC_SET_ENTRY _IOW(MTRR_IOCTL_BASE, 1, struct mtrr_sentry) 98 | #define MTRRIOC_DEL_ENTRY _IOW(MTRR_IOCTL_BASE, 2, struct mtrr_sentry) 99 | #define MTRRIOC_GET_ENTRY _IOWR(MTRR_IOCTL_BASE, 3, struct mtrr_gentry) 100 | #define MTRRIOC_KILL_ENTRY _IOW(MTRR_IOCTL_BASE, 4, struct mtrr_sentry) 101 | #define MTRRIOC_ADD_PAGE_ENTRY _IOW(MTRR_IOCTL_BASE, 5, struct mtrr_sentry) 102 | #define MTRRIOC_SET_PAGE_ENTRY _IOW(MTRR_IOCTL_BASE, 6, struct mtrr_sentry) 103 | #define MTRRIOC_DEL_PAGE_ENTRY _IOW(MTRR_IOCTL_BASE, 7, struct mtrr_sentry) 104 | #define MTRRIOC_GET_PAGE_ENTRY _IOWR(MTRR_IOCTL_BASE, 8, struct mtrr_gentry) 105 | #define MTRRIOC_KILL_PAGE_ENTRY _IOW(MTRR_IOCTL_BASE, 9, struct mtrr_sentry) 106 | 107 | /* MTRR memory types, which are defined in SDM */ 108 | #define MTRR_TYPE_UNCACHABLE 0 109 | #define MTRR_TYPE_WRCOMB 1 110 | /*#define MTRR_TYPE_ 2*/ 111 | /*#define MTRR_TYPE_ 3*/ 112 | #define MTRR_TYPE_WRTHROUGH 4 113 | #define MTRR_TYPE_WRPROT 5 114 | #define MTRR_TYPE_WRBACK 6 115 | #define MTRR_NUM_TYPES 7 116 | 117 | /* 118 | * Invalid MTRR memory type. mtrr_type_lookup() returns this value when 119 | * MTRRs are disabled. Note, this value is allocated from the reserved 120 | * values (0x7-0xff) of the MTRR memory types. 121 | */ 122 | #define MTRR_TYPE_INVALID 0xff 123 | 124 | #endif /* _ASM_X86_MTRR_H */ 125 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm/param.h: -------------------------------------------------------------------------------- 1 | #include 2 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm/perf_regs.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 | #ifndef _ASM_X86_PERF_REGS_H 3 | #define _ASM_X86_PERF_REGS_H 4 | 5 | enum perf_event_x86_regs { 6 | PERF_REG_X86_AX, 7 | PERF_REG_X86_BX, 8 | PERF_REG_X86_CX, 9 | PERF_REG_X86_DX, 10 | PERF_REG_X86_SI, 11 | PERF_REG_X86_DI, 12 | PERF_REG_X86_BP, 13 | PERF_REG_X86_SP, 14 | PERF_REG_X86_IP, 15 | PERF_REG_X86_FLAGS, 16 | PERF_REG_X86_CS, 17 | PERF_REG_X86_SS, 18 | PERF_REG_X86_DS, 19 | PERF_REG_X86_ES, 20 | PERF_REG_X86_FS, 21 | PERF_REG_X86_GS, 22 | PERF_REG_X86_R8, 23 | PERF_REG_X86_R9, 24 | PERF_REG_X86_R10, 25 | PERF_REG_X86_R11, 26 | PERF_REG_X86_R12, 27 | PERF_REG_X86_R13, 28 | PERF_REG_X86_R14, 29 | PERF_REG_X86_R15, 30 | /* These are the limits for the GPRs. */ 31 | PERF_REG_X86_32_MAX = PERF_REG_X86_GS + 1, 32 | PERF_REG_X86_64_MAX = PERF_REG_X86_R15 + 1, 33 | 34 | /* These all need two bits set because they are 128bit */ 35 | PERF_REG_X86_XMM0 = 32, 36 | PERF_REG_X86_XMM1 = 34, 37 | PERF_REG_X86_XMM2 = 36, 38 | PERF_REG_X86_XMM3 = 38, 39 | PERF_REG_X86_XMM4 = 40, 40 | PERF_REG_X86_XMM5 = 42, 41 | PERF_REG_X86_XMM6 = 44, 42 | PERF_REG_X86_XMM7 = 46, 43 | PERF_REG_X86_XMM8 = 48, 44 | PERF_REG_X86_XMM9 = 50, 45 | PERF_REG_X86_XMM10 = 52, 46 | PERF_REG_X86_XMM11 = 54, 47 | PERF_REG_X86_XMM12 = 56, 48 | PERF_REG_X86_XMM13 = 58, 49 | PERF_REG_X86_XMM14 = 60, 50 | PERF_REG_X86_XMM15 = 62, 51 | 52 | /* These include both GPRs and XMMX registers */ 53 | PERF_REG_X86_XMM_MAX = PERF_REG_X86_XMM15 + 2, 54 | }; 55 | 56 | #define PERF_REG_EXTENDED_MASK (~((1ULL << PERF_REG_X86_XMM0) - 1)) 57 | 58 | #endif /* _ASM_X86_PERF_REGS_H */ 59 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm/poll.h: -------------------------------------------------------------------------------- 1 | #include 2 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm/posix_types.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 | # ifdef __i386__ 3 | # include 4 | # elif defined(__ILP32__) 5 | # include 6 | # else 7 | # include 8 | # endif 9 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm/posix_types_32.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 | #ifndef _ASM_X86_POSIX_TYPES_32_H 3 | #define _ASM_X86_POSIX_TYPES_32_H 4 | 5 | /* 6 | * This file is generally used by user-level software, so you need to 7 | * be a little careful about namespace pollution etc. Also, we cannot 8 | * assume GCC is being used. 9 | */ 10 | 11 | typedef unsigned short __kernel_mode_t; 12 | #define __kernel_mode_t __kernel_mode_t 13 | 14 | typedef unsigned short __kernel_ipc_pid_t; 15 | #define __kernel_ipc_pid_t __kernel_ipc_pid_t 16 | 17 | typedef unsigned short __kernel_uid_t; 18 | typedef unsigned short __kernel_gid_t; 19 | #define __kernel_uid_t __kernel_uid_t 20 | 21 | typedef unsigned short __kernel_old_dev_t; 22 | #define __kernel_old_dev_t __kernel_old_dev_t 23 | 24 | #include 25 | 26 | #endif /* _ASM_X86_POSIX_TYPES_32_H */ 27 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm/posix_types_64.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 | #ifndef _ASM_X86_POSIX_TYPES_64_H 3 | #define _ASM_X86_POSIX_TYPES_64_H 4 | 5 | /* 6 | * This file is generally used by user-level software, so you need to 7 | * be a little careful about namespace pollution etc. Also, we cannot 8 | * assume GCC is being used. 9 | */ 10 | 11 | typedef unsigned short __kernel_old_uid_t; 12 | typedef unsigned short __kernel_old_gid_t; 13 | #define __kernel_old_uid_t __kernel_old_uid_t 14 | 15 | typedef unsigned long __kernel_old_dev_t; 16 | #define __kernel_old_dev_t __kernel_old_dev_t 17 | 18 | #include 19 | 20 | #endif /* _ASM_X86_POSIX_TYPES_64_H */ 21 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm/posix_types_x32.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 | #ifndef _ASM_X86_POSIX_TYPES_X32_H 3 | #define _ASM_X86_POSIX_TYPES_X32_H 4 | 5 | /* 6 | * This file is only used by user-level software, so you need to 7 | * be a little careful about namespace pollution etc. Also, we cannot 8 | * assume GCC is being used. 9 | * 10 | * These types should generally match the ones used by the 64-bit kernel, 11 | * 12 | */ 13 | 14 | typedef long long __kernel_long_t; 15 | typedef unsigned long long __kernel_ulong_t; 16 | #define __kernel_long_t __kernel_long_t 17 | 18 | #include 19 | 20 | #endif /* _ASM_X86_POSIX_TYPES_X32_H */ 21 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm/prctl.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 | #ifndef _ASM_X86_PRCTL_H 3 | #define _ASM_X86_PRCTL_H 4 | 5 | #define ARCH_SET_GS 0x1001 6 | #define ARCH_SET_FS 0x1002 7 | #define ARCH_GET_FS 0x1003 8 | #define ARCH_GET_GS 0x1004 9 | 10 | #define ARCH_GET_CPUID 0x1011 11 | #define ARCH_SET_CPUID 0x1012 12 | 13 | #define ARCH_GET_XCOMP_SUPP 0x1021 14 | #define ARCH_GET_XCOMP_PERM 0x1022 15 | #define ARCH_REQ_XCOMP_PERM 0x1023 16 | #define ARCH_GET_XCOMP_GUEST_PERM 0x1024 17 | #define ARCH_REQ_XCOMP_GUEST_PERM 0x1025 18 | 19 | #define ARCH_MAP_VDSO_X32 0x2001 20 | #define ARCH_MAP_VDSO_32 0x2002 21 | #define ARCH_MAP_VDSO_64 0x2003 22 | 23 | #endif /* _ASM_X86_PRCTL_H */ 24 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm/processor-flags.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 | #ifndef _ASM_X86_PROCESSOR_FLAGS_H 3 | #define _ASM_X86_PROCESSOR_FLAGS_H 4 | /* Various flags defined: can be included from assembler. */ 5 | 6 | #include 7 | 8 | /* 9 | * EFLAGS bits 10 | */ 11 | #define X86_EFLAGS_CF_BIT 0 /* Carry Flag */ 12 | #define X86_EFLAGS_CF _BITUL(X86_EFLAGS_CF_BIT) 13 | #define X86_EFLAGS_FIXED_BIT 1 /* Bit 1 - always on */ 14 | #define X86_EFLAGS_FIXED _BITUL(X86_EFLAGS_FIXED_BIT) 15 | #define X86_EFLAGS_PF_BIT 2 /* Parity Flag */ 16 | #define X86_EFLAGS_PF _BITUL(X86_EFLAGS_PF_BIT) 17 | #define X86_EFLAGS_AF_BIT 4 /* Auxiliary carry Flag */ 18 | #define X86_EFLAGS_AF _BITUL(X86_EFLAGS_AF_BIT) 19 | #define X86_EFLAGS_ZF_BIT 6 /* Zero Flag */ 20 | #define X86_EFLAGS_ZF _BITUL(X86_EFLAGS_ZF_BIT) 21 | #define X86_EFLAGS_SF_BIT 7 /* Sign Flag */ 22 | #define X86_EFLAGS_SF _BITUL(X86_EFLAGS_SF_BIT) 23 | #define X86_EFLAGS_TF_BIT 8 /* Trap Flag */ 24 | #define X86_EFLAGS_TF _BITUL(X86_EFLAGS_TF_BIT) 25 | #define X86_EFLAGS_IF_BIT 9 /* Interrupt Flag */ 26 | #define X86_EFLAGS_IF _BITUL(X86_EFLAGS_IF_BIT) 27 | #define X86_EFLAGS_DF_BIT 10 /* Direction Flag */ 28 | #define X86_EFLAGS_DF _BITUL(X86_EFLAGS_DF_BIT) 29 | #define X86_EFLAGS_OF_BIT 11 /* Overflow Flag */ 30 | #define X86_EFLAGS_OF _BITUL(X86_EFLAGS_OF_BIT) 31 | #define X86_EFLAGS_IOPL_BIT 12 /* I/O Privilege Level (2 bits) */ 32 | #define X86_EFLAGS_IOPL (_AC(3,UL) << X86_EFLAGS_IOPL_BIT) 33 | #define X86_EFLAGS_NT_BIT 14 /* Nested Task */ 34 | #define X86_EFLAGS_NT _BITUL(X86_EFLAGS_NT_BIT) 35 | #define X86_EFLAGS_RF_BIT 16 /* Resume Flag */ 36 | #define X86_EFLAGS_RF _BITUL(X86_EFLAGS_RF_BIT) 37 | #define X86_EFLAGS_VM_BIT 17 /* Virtual Mode */ 38 | #define X86_EFLAGS_VM _BITUL(X86_EFLAGS_VM_BIT) 39 | #define X86_EFLAGS_AC_BIT 18 /* Alignment Check/Access Control */ 40 | #define X86_EFLAGS_AC _BITUL(X86_EFLAGS_AC_BIT) 41 | #define X86_EFLAGS_VIF_BIT 19 /* Virtual Interrupt Flag */ 42 | #define X86_EFLAGS_VIF _BITUL(X86_EFLAGS_VIF_BIT) 43 | #define X86_EFLAGS_VIP_BIT 20 /* Virtual Interrupt Pending */ 44 | #define X86_EFLAGS_VIP _BITUL(X86_EFLAGS_VIP_BIT) 45 | #define X86_EFLAGS_ID_BIT 21 /* CPUID detection */ 46 | #define X86_EFLAGS_ID _BITUL(X86_EFLAGS_ID_BIT) 47 | 48 | /* 49 | * Basic CPU control in CR0 50 | */ 51 | #define X86_CR0_PE_BIT 0 /* Protection Enable */ 52 | #define X86_CR0_PE _BITUL(X86_CR0_PE_BIT) 53 | #define X86_CR0_MP_BIT 1 /* Monitor Coprocessor */ 54 | #define X86_CR0_MP _BITUL(X86_CR0_MP_BIT) 55 | #define X86_CR0_EM_BIT 2 /* Emulation */ 56 | #define X86_CR0_EM _BITUL(X86_CR0_EM_BIT) 57 | #define X86_CR0_TS_BIT 3 /* Task Switched */ 58 | #define X86_CR0_TS _BITUL(X86_CR0_TS_BIT) 59 | #define X86_CR0_ET_BIT 4 /* Extension Type */ 60 | #define X86_CR0_ET _BITUL(X86_CR0_ET_BIT) 61 | #define X86_CR0_NE_BIT 5 /* Numeric Error */ 62 | #define X86_CR0_NE _BITUL(X86_CR0_NE_BIT) 63 | #define X86_CR0_WP_BIT 16 /* Write Protect */ 64 | #define X86_CR0_WP _BITUL(X86_CR0_WP_BIT) 65 | #define X86_CR0_AM_BIT 18 /* Alignment Mask */ 66 | #define X86_CR0_AM _BITUL(X86_CR0_AM_BIT) 67 | #define X86_CR0_NW_BIT 29 /* Not Write-through */ 68 | #define X86_CR0_NW _BITUL(X86_CR0_NW_BIT) 69 | #define X86_CR0_CD_BIT 30 /* Cache Disable */ 70 | #define X86_CR0_CD _BITUL(X86_CR0_CD_BIT) 71 | #define X86_CR0_PG_BIT 31 /* Paging */ 72 | #define X86_CR0_PG _BITUL(X86_CR0_PG_BIT) 73 | 74 | /* 75 | * Paging options in CR3 76 | */ 77 | #define X86_CR3_PWT_BIT 3 /* Page Write Through */ 78 | #define X86_CR3_PWT _BITUL(X86_CR3_PWT_BIT) 79 | #define X86_CR3_PCD_BIT 4 /* Page Cache Disable */ 80 | #define X86_CR3_PCD _BITUL(X86_CR3_PCD_BIT) 81 | 82 | #define X86_CR3_PCID_BITS 12 83 | #define X86_CR3_PCID_MASK (_AC((1UL << X86_CR3_PCID_BITS) - 1, UL)) 84 | 85 | #define X86_CR3_PCID_NOFLUSH_BIT 63 /* Preserve old PCID */ 86 | #define X86_CR3_PCID_NOFLUSH _BITULL(X86_CR3_PCID_NOFLUSH_BIT) 87 | 88 | /* 89 | * Intel CPU features in CR4 90 | */ 91 | #define X86_CR4_VME_BIT 0 /* enable vm86 extensions */ 92 | #define X86_CR4_VME _BITUL(X86_CR4_VME_BIT) 93 | #define X86_CR4_PVI_BIT 1 /* virtual interrupts flag enable */ 94 | #define X86_CR4_PVI _BITUL(X86_CR4_PVI_BIT) 95 | #define X86_CR4_TSD_BIT 2 /* disable time stamp at ipl 3 */ 96 | #define X86_CR4_TSD _BITUL(X86_CR4_TSD_BIT) 97 | #define X86_CR4_DE_BIT 3 /* enable debugging extensions */ 98 | #define X86_CR4_DE _BITUL(X86_CR4_DE_BIT) 99 | #define X86_CR4_PSE_BIT 4 /* enable page size extensions */ 100 | #define X86_CR4_PSE _BITUL(X86_CR4_PSE_BIT) 101 | #define X86_CR4_PAE_BIT 5 /* enable physical address extensions */ 102 | #define X86_CR4_PAE _BITUL(X86_CR4_PAE_BIT) 103 | #define X86_CR4_MCE_BIT 6 /* Machine check enable */ 104 | #define X86_CR4_MCE _BITUL(X86_CR4_MCE_BIT) 105 | #define X86_CR4_PGE_BIT 7 /* enable global pages */ 106 | #define X86_CR4_PGE _BITUL(X86_CR4_PGE_BIT) 107 | #define X86_CR4_PCE_BIT 8 /* enable performance counters at ipl 3 */ 108 | #define X86_CR4_PCE _BITUL(X86_CR4_PCE_BIT) 109 | #define X86_CR4_OSFXSR_BIT 9 /* enable fast FPU save and restore */ 110 | #define X86_CR4_OSFXSR _BITUL(X86_CR4_OSFXSR_BIT) 111 | #define X86_CR4_OSXMMEXCPT_BIT 10 /* enable unmasked SSE exceptions */ 112 | #define X86_CR4_OSXMMEXCPT _BITUL(X86_CR4_OSXMMEXCPT_BIT) 113 | #define X86_CR4_UMIP_BIT 11 /* enable UMIP support */ 114 | #define X86_CR4_UMIP _BITUL(X86_CR4_UMIP_BIT) 115 | #define X86_CR4_LA57_BIT 12 /* enable 5-level page tables */ 116 | #define X86_CR4_LA57 _BITUL(X86_CR4_LA57_BIT) 117 | #define X86_CR4_VMXE_BIT 13 /* enable VMX virtualization */ 118 | #define X86_CR4_VMXE _BITUL(X86_CR4_VMXE_BIT) 119 | #define X86_CR4_SMXE_BIT 14 /* enable safer mode (TXT) */ 120 | #define X86_CR4_SMXE _BITUL(X86_CR4_SMXE_BIT) 121 | #define X86_CR4_FSGSBASE_BIT 16 /* enable RDWRFSGS support */ 122 | #define X86_CR4_FSGSBASE _BITUL(X86_CR4_FSGSBASE_BIT) 123 | #define X86_CR4_PCIDE_BIT 17 /* enable PCID support */ 124 | #define X86_CR4_PCIDE _BITUL(X86_CR4_PCIDE_BIT) 125 | #define X86_CR4_OSXSAVE_BIT 18 /* enable xsave and xrestore */ 126 | #define X86_CR4_OSXSAVE _BITUL(X86_CR4_OSXSAVE_BIT) 127 | #define X86_CR4_SMEP_BIT 20 /* enable SMEP support */ 128 | #define X86_CR4_SMEP _BITUL(X86_CR4_SMEP_BIT) 129 | #define X86_CR4_SMAP_BIT 21 /* enable SMAP support */ 130 | #define X86_CR4_SMAP _BITUL(X86_CR4_SMAP_BIT) 131 | #define X86_CR4_PKE_BIT 22 /* enable Protection Keys support */ 132 | #define X86_CR4_PKE _BITUL(X86_CR4_PKE_BIT) 133 | 134 | /* 135 | * x86-64 Task Priority Register, CR8 136 | */ 137 | #define X86_CR8_TPR _AC(0x0000000f,UL) /* task priority register */ 138 | 139 | /* 140 | * AMD and Transmeta use MSRs for configuration; see 141 | */ 142 | 143 | /* 144 | * NSC/Cyrix CPU configuration register indexes 145 | */ 146 | #define CX86_PCR0 0x20 147 | #define CX86_GCR 0xb8 148 | #define CX86_CCR0 0xc0 149 | #define CX86_CCR1 0xc1 150 | #define CX86_CCR2 0xc2 151 | #define CX86_CCR3 0xc3 152 | #define CX86_CCR4 0xe8 153 | #define CX86_CCR5 0xe9 154 | #define CX86_CCR6 0xea 155 | #define CX86_CCR7 0xeb 156 | #define CX86_PCR1 0xf0 157 | #define CX86_DIR0 0xfe 158 | #define CX86_DIR1 0xff 159 | #define CX86_ARR_BASE 0xc4 160 | #define CX86_RCR_BASE 0xdc 161 | 162 | #define CR0_STATE (X86_CR0_PE | X86_CR0_MP | X86_CR0_ET | \ 163 | X86_CR0_NE | X86_CR0_WP | X86_CR0_AM | \ 164 | X86_CR0_PG) 165 | 166 | #endif /* _ASM_X86_PROCESSOR_FLAGS_H */ 167 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm/ptrace-abi.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 | #ifndef _ASM_X86_PTRACE_ABI_H 3 | #define _ASM_X86_PTRACE_ABI_H 4 | 5 | #ifdef __i386__ 6 | 7 | #define EBX 0 8 | #define ECX 1 9 | #define EDX 2 10 | #define ESI 3 11 | #define EDI 4 12 | #define EBP 5 13 | #define EAX 6 14 | #define DS 7 15 | #define ES 8 16 | #define FS 9 17 | #define GS 10 18 | #define ORIG_EAX 11 19 | #define EIP 12 20 | #define CS 13 21 | #define EFL 14 22 | #define UESP 15 23 | #define SS 16 24 | #define FRAME_SIZE 17 25 | 26 | #else /* __i386__ */ 27 | 28 | #if defined(__ASSEMBLY__) || defined(__FRAME_OFFSETS) 29 | /* 30 | * C ABI says these regs are callee-preserved. They aren't saved on kernel entry 31 | * unless syscall needs a complete, fully filled "struct pt_regs". 32 | */ 33 | #define R15 0 34 | #define R14 8 35 | #define R13 16 36 | #define R12 24 37 | #define RBP 32 38 | #define RBX 40 39 | /* These regs are callee-clobbered. Always saved on kernel entry. */ 40 | #define R11 48 41 | #define R10 56 42 | #define R9 64 43 | #define R8 72 44 | #define RAX 80 45 | #define RCX 88 46 | #define RDX 96 47 | #define RSI 104 48 | #define RDI 112 49 | /* 50 | * On syscall entry, this is syscall#. On CPU exception, this is error code. 51 | * On hw interrupt, it's IRQ number: 52 | */ 53 | #define ORIG_RAX 120 54 | /* Return frame for iretq */ 55 | #define RIP 128 56 | #define CS 136 57 | #define EFLAGS 144 58 | #define RSP 152 59 | #define SS 160 60 | #endif /* __ASSEMBLY__ */ 61 | 62 | /* top of stack page */ 63 | #define FRAME_SIZE 168 64 | 65 | #endif /* !__i386__ */ 66 | 67 | /* Arbitrarily choose the same ptrace numbers as used by the Sparc code. */ 68 | #define PTRACE_GETREGS 12 69 | #define PTRACE_SETREGS 13 70 | #define PTRACE_GETFPREGS 14 71 | #define PTRACE_SETFPREGS 15 72 | #define PTRACE_GETFPXREGS 18 73 | #define PTRACE_SETFPXREGS 19 74 | 75 | #define PTRACE_OLDSETOPTIONS 21 76 | 77 | /* only useful for access 32bit programs / kernels */ 78 | #define PTRACE_GET_THREAD_AREA 25 79 | #define PTRACE_SET_THREAD_AREA 26 80 | 81 | #ifdef __x86_64__ 82 | # define PTRACE_ARCH_PRCTL 30 83 | #endif 84 | 85 | #define PTRACE_SYSEMU 31 86 | #define PTRACE_SYSEMU_SINGLESTEP 32 87 | 88 | #define PTRACE_SINGLEBLOCK 33 /* resume execution until next branch */ 89 | 90 | #ifndef __ASSEMBLY__ 91 | #include 92 | #endif 93 | 94 | #endif /* _ASM_X86_PTRACE_ABI_H */ 95 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm/ptrace.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 | #ifndef _ASM_X86_PTRACE_H 3 | #define _ASM_X86_PTRACE_H 4 | 5 | /* For */ 6 | #include 7 | #include 8 | 9 | 10 | #ifndef __ASSEMBLY__ 11 | 12 | #ifdef __i386__ 13 | /* this struct defines the way the registers are stored on the 14 | stack during a system call. */ 15 | 16 | 17 | struct pt_regs { 18 | long ebx; 19 | long ecx; 20 | long edx; 21 | long esi; 22 | long edi; 23 | long ebp; 24 | long eax; 25 | int xds; 26 | int xes; 27 | int xfs; 28 | int xgs; 29 | long orig_eax; 30 | long eip; 31 | int xcs; 32 | long eflags; 33 | long esp; 34 | int xss; 35 | }; 36 | 37 | 38 | #else /* __i386__ */ 39 | 40 | 41 | struct pt_regs { 42 | /* 43 | * C ABI says these regs are callee-preserved. They aren't saved on kernel entry 44 | * unless syscall needs a complete, fully filled "struct pt_regs". 45 | */ 46 | unsigned long r15; 47 | unsigned long r14; 48 | unsigned long r13; 49 | unsigned long r12; 50 | unsigned long rbp; 51 | unsigned long rbx; 52 | /* These regs are callee-clobbered. Always saved on kernel entry. */ 53 | unsigned long r11; 54 | unsigned long r10; 55 | unsigned long r9; 56 | unsigned long r8; 57 | unsigned long rax; 58 | unsigned long rcx; 59 | unsigned long rdx; 60 | unsigned long rsi; 61 | unsigned long rdi; 62 | /* 63 | * On syscall entry, this is syscall#. On CPU exception, this is error code. 64 | * On hw interrupt, it's IRQ number: 65 | */ 66 | unsigned long orig_rax; 67 | /* Return frame for iretq */ 68 | unsigned long rip; 69 | unsigned long cs; 70 | unsigned long eflags; 71 | unsigned long rsp; 72 | unsigned long ss; 73 | /* top of stack page */ 74 | }; 75 | 76 | #endif /* !__i386__ */ 77 | 78 | 79 | 80 | #endif /* !__ASSEMBLY__ */ 81 | 82 | #endif /* _ASM_X86_PTRACE_H */ 83 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm/resource.h: -------------------------------------------------------------------------------- 1 | #include 2 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm/sembuf.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 | #ifndef _ASM_X86_SEMBUF_H 3 | #define _ASM_X86_SEMBUF_H 4 | 5 | #include 6 | 7 | /* 8 | * The semid64_ds structure for x86 architecture. 9 | * Note extra padding because this structure is passed back and forth 10 | * between kernel and user space. 11 | * 12 | * Pad space is left for: 13 | * - 2 miscellaneous 32-bit values 14 | * 15 | * x86_64 and x32 incorrectly added padding here, so the structures 16 | * are still incompatible with the padding on x86. 17 | */ 18 | struct semid64_ds { 19 | struct ipc64_perm sem_perm; /* permissions .. see ipc.h */ 20 | #ifdef __i386__ 21 | unsigned long sem_otime; /* last semop time */ 22 | unsigned long sem_otime_high; 23 | unsigned long sem_ctime; /* last change time */ 24 | unsigned long sem_ctime_high; 25 | #else 26 | __kernel_long_t sem_otime; /* last semop time */ 27 | __kernel_ulong_t __unused1; 28 | __kernel_long_t sem_ctime; /* last change time */ 29 | __kernel_ulong_t __unused2; 30 | #endif 31 | __kernel_ulong_t sem_nsems; /* no. of semaphores in array */ 32 | __kernel_ulong_t __unused3; 33 | __kernel_ulong_t __unused4; 34 | }; 35 | 36 | #endif /* _ASM_X86_SEMBUF_H */ 37 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm/setup.h: -------------------------------------------------------------------------------- 1 | /* */ 2 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm/sgx.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 | /* 3 | * Copyright(c) 2016-20 Intel Corporation. 4 | */ 5 | #ifndef _ASM_X86_SGX_H 6 | #define _ASM_X86_SGX_H 7 | 8 | #include 9 | #include 10 | 11 | /** 12 | * enum sgx_page_flags - page control flags 13 | * %SGX_PAGE_MEASURE: Measure the page contents with a sequence of 14 | * ENCLS[EEXTEND] operations. 15 | */ 16 | enum sgx_page_flags { 17 | SGX_PAGE_MEASURE = 0x01, 18 | }; 19 | 20 | #define SGX_MAGIC 0xA4 21 | 22 | #define SGX_IOC_ENCLAVE_CREATE \ 23 | _IOW(SGX_MAGIC, 0x00, struct sgx_enclave_create) 24 | #define SGX_IOC_ENCLAVE_ADD_PAGES \ 25 | _IOWR(SGX_MAGIC, 0x01, struct sgx_enclave_add_pages) 26 | #define SGX_IOC_ENCLAVE_INIT \ 27 | _IOW(SGX_MAGIC, 0x02, struct sgx_enclave_init) 28 | #define SGX_IOC_ENCLAVE_PROVISION \ 29 | _IOW(SGX_MAGIC, 0x03, struct sgx_enclave_provision) 30 | #define SGX_IOC_VEPC_REMOVE_ALL \ 31 | _IO(SGX_MAGIC, 0x04) 32 | 33 | /** 34 | * struct sgx_enclave_create - parameter structure for the 35 | * %SGX_IOC_ENCLAVE_CREATE ioctl 36 | * @src: address for the SECS page data 37 | */ 38 | struct sgx_enclave_create { 39 | __u64 src; 40 | }; 41 | 42 | /** 43 | * struct sgx_enclave_add_pages - parameter structure for the 44 | * %SGX_IOC_ENCLAVE_ADD_PAGE ioctl 45 | * @src: start address for the page data 46 | * @offset: starting page offset 47 | * @length: length of the data (multiple of the page size) 48 | * @secinfo: address for the SECINFO data 49 | * @flags: page control flags 50 | * @count: number of bytes added (multiple of the page size) 51 | */ 52 | struct sgx_enclave_add_pages { 53 | __u64 src; 54 | __u64 offset; 55 | __u64 length; 56 | __u64 secinfo; 57 | __u64 flags; 58 | __u64 count; 59 | }; 60 | 61 | /** 62 | * struct sgx_enclave_init - parameter structure for the 63 | * %SGX_IOC_ENCLAVE_INIT ioctl 64 | * @sigstruct: address for the SIGSTRUCT data 65 | */ 66 | struct sgx_enclave_init { 67 | __u64 sigstruct; 68 | }; 69 | 70 | /** 71 | * struct sgx_enclave_provision - parameter structure for the 72 | * %SGX_IOC_ENCLAVE_PROVISION ioctl 73 | * @fd: file handle of /dev/sgx_provision 74 | */ 75 | struct sgx_enclave_provision { 76 | __u64 fd; 77 | }; 78 | 79 | struct sgx_enclave_run; 80 | 81 | /** 82 | * typedef sgx_enclave_user_handler_t - Exit handler function accepted by 83 | * __vdso_sgx_enter_enclave() 84 | * @run: The run instance given by the caller 85 | * 86 | * The register parameters contain the snapshot of their values at enclave 87 | * exit. An invalid ENCLU function number will cause -EINVAL to be returned 88 | * to the caller. 89 | * 90 | * Return: 91 | * - <= 0: The given value is returned back to the caller. 92 | * - > 0: ENCLU function to invoke, either EENTER or ERESUME. 93 | */ 94 | typedef int (*sgx_enclave_user_handler_t)(long rdi, long rsi, long rdx, 95 | long rsp, long r8, long r9, 96 | struct sgx_enclave_run *run); 97 | 98 | /** 99 | * struct sgx_enclave_run - the execution context of __vdso_sgx_enter_enclave() 100 | * @tcs: TCS used to enter the enclave 101 | * @function: The last seen ENCLU function (EENTER, ERESUME or EEXIT) 102 | * @exception_vector: The interrupt vector of the exception 103 | * @exception_error_code: The exception error code pulled out of the stack 104 | * @exception_addr: The address that triggered the exception 105 | * @user_handler: User provided callback run on exception 106 | * @user_data: Data passed to the user handler 107 | * @reserved Reserved for future extensions 108 | * 109 | * If @user_handler is provided, the handler will be invoked on all return paths 110 | * of the normal flow. The user handler may transfer control, e.g. via a 111 | * longjmp() call or a C++ exception, without returning to 112 | * __vdso_sgx_enter_enclave(). 113 | */ 114 | struct sgx_enclave_run { 115 | __u64 tcs; 116 | __u32 function; 117 | __u16 exception_vector; 118 | __u16 exception_error_code; 119 | __u64 exception_addr; 120 | __u64 user_handler; 121 | __u64 user_data; 122 | __u8 reserved[216]; 123 | }; 124 | 125 | /** 126 | * typedef vdso_sgx_enter_enclave_t - Prototype for __vdso_sgx_enter_enclave(), 127 | * a vDSO function to enter an SGX enclave. 128 | * @rdi: Pass-through value for RDI 129 | * @rsi: Pass-through value for RSI 130 | * @rdx: Pass-through value for RDX 131 | * @function: ENCLU function, must be EENTER or ERESUME 132 | * @r8: Pass-through value for R8 133 | * @r9: Pass-through value for R9 134 | * @run: struct sgx_enclave_run, must be non-NULL 135 | * 136 | * NOTE: __vdso_sgx_enter_enclave() does not ensure full compliance with the 137 | * x86-64 ABI, e.g. doesn't handle XSAVE state. Except for non-volatile 138 | * general purpose registers, EFLAGS.DF, and RSP alignment, preserving/setting 139 | * state in accordance with the x86-64 ABI is the responsibility of the enclave 140 | * and its runtime, i.e. __vdso_sgx_enter_enclave() cannot be called from C 141 | * code without careful consideration by both the enclave and its runtime. 142 | * 143 | * All general purpose registers except RAX, RBX and RCX are passed as-is to the 144 | * enclave. RAX, RBX and RCX are consumed by EENTER and ERESUME and are loaded 145 | * with @function, asynchronous exit pointer, and @run.tcs respectively. 146 | * 147 | * RBP and the stack are used to anchor __vdso_sgx_enter_enclave() to the 148 | * pre-enclave state, e.g. to retrieve @run.exception and @run.user_handler 149 | * after an enclave exit. All other registers are available for use by the 150 | * enclave and its runtime, e.g. an enclave can push additional data onto the 151 | * stack (and modify RSP) to pass information to the optional user handler (see 152 | * below). 153 | * 154 | * Most exceptions reported on ENCLU, including those that occur within the 155 | * enclave, are fixed up and reported synchronously instead of being delivered 156 | * via a standard signal. Debug Exceptions (#DB) and Breakpoints (#BP) are 157 | * never fixed up and are always delivered via standard signals. On synchronously 158 | * reported exceptions, -EFAULT is returned and details about the exception are 159 | * recorded in @run.exception, the optional sgx_enclave_exception struct. 160 | * 161 | * Return: 162 | * - 0: ENCLU function was successfully executed. 163 | * - -EINVAL: Invalid ENCL number (neither EENTER nor ERESUME). 164 | */ 165 | typedef int (*vdso_sgx_enter_enclave_t)(unsigned long rdi, unsigned long rsi, 166 | unsigned long rdx, unsigned int function, 167 | unsigned long r8, unsigned long r9, 168 | struct sgx_enclave_run *run); 169 | 170 | #endif /* _ASM_X86_SGX_H */ 171 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm/shmbuf.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 | #ifndef __ASM_X86_SHMBUF_H 3 | #define __ASM_X86_SHMBUF_H 4 | 5 | #if !defined(__x86_64__) || !defined(__ILP32__) 6 | #include 7 | #else 8 | /* 9 | * The shmid64_ds structure for x86 architecture with x32 ABI. 10 | * 11 | * On x86-32 and x86-64 we can just use the generic definition, but 12 | * x32 uses the same binary layout as x86_64, which is different 13 | * from other 32-bit architectures. 14 | */ 15 | 16 | struct shmid64_ds { 17 | struct ipc64_perm shm_perm; /* operation perms */ 18 | size_t shm_segsz; /* size of segment (bytes) */ 19 | __kernel_long_t shm_atime; /* last attach time */ 20 | __kernel_long_t shm_dtime; /* last detach time */ 21 | __kernel_long_t shm_ctime; /* last change time */ 22 | __kernel_pid_t shm_cpid; /* pid of creator */ 23 | __kernel_pid_t shm_lpid; /* pid of last operator */ 24 | __kernel_ulong_t shm_nattch; /* no. of current attaches */ 25 | __kernel_ulong_t __unused4; 26 | __kernel_ulong_t __unused5; 27 | }; 28 | 29 | struct shminfo64 { 30 | __kernel_ulong_t shmmax; 31 | __kernel_ulong_t shmmin; 32 | __kernel_ulong_t shmmni; 33 | __kernel_ulong_t shmseg; 34 | __kernel_ulong_t shmall; 35 | __kernel_ulong_t __unused1; 36 | __kernel_ulong_t __unused2; 37 | __kernel_ulong_t __unused3; 38 | __kernel_ulong_t __unused4; 39 | }; 40 | 41 | #endif 42 | 43 | #endif /* __ASM_X86_SHMBUF_H */ 44 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm/sigcontext32.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 | #ifndef _ASM_X86_SIGCONTEXT32_H 3 | #define _ASM_X86_SIGCONTEXT32_H 4 | 5 | /* This is a legacy file - all the type definitions are in sigcontext.h: */ 6 | 7 | #include 8 | 9 | #endif /* _ASM_X86_SIGCONTEXT32_H */ 10 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm/siginfo.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 | #ifndef _ASM_X86_SIGINFO_H 3 | #define _ASM_X86_SIGINFO_H 4 | 5 | #ifdef __x86_64__ 6 | # ifdef __ILP32__ /* x32 */ 7 | typedef long long __kernel_si_clock_t __attribute__((aligned(4))); 8 | # define __ARCH_SI_CLOCK_T __kernel_si_clock_t 9 | # define __ARCH_SI_ATTRIBUTES __attribute__((aligned(8))) 10 | # endif 11 | #endif 12 | 13 | #include 14 | 15 | #endif /* _ASM_X86_SIGINFO_H */ 16 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm/signal.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 | #ifndef _ASM_X86_SIGNAL_H 3 | #define _ASM_X86_SIGNAL_H 4 | 5 | #ifndef __ASSEMBLY__ 6 | #include 7 | #include 8 | 9 | 10 | /* Avoid too many header ordering problems. */ 11 | struct siginfo; 12 | 13 | /* Here we must cater to libcs that poke about in kernel headers. */ 14 | 15 | #define NSIG 32 16 | typedef unsigned long sigset_t; 17 | 18 | #endif /* __ASSEMBLY__ */ 19 | 20 | 21 | #define SIGHUP 1 22 | #define SIGINT 2 23 | #define SIGQUIT 3 24 | #define SIGILL 4 25 | #define SIGTRAP 5 26 | #define SIGABRT 6 27 | #define SIGIOT 6 28 | #define SIGBUS 7 29 | #define SIGFPE 8 30 | #define SIGKILL 9 31 | #define SIGUSR1 10 32 | #define SIGSEGV 11 33 | #define SIGUSR2 12 34 | #define SIGPIPE 13 35 | #define SIGALRM 14 36 | #define SIGTERM 15 37 | #define SIGSTKFLT 16 38 | #define SIGCHLD 17 39 | #define SIGCONT 18 40 | #define SIGSTOP 19 41 | #define SIGTSTP 20 42 | #define SIGTTIN 21 43 | #define SIGTTOU 22 44 | #define SIGURG 23 45 | #define SIGXCPU 24 46 | #define SIGXFSZ 25 47 | #define SIGVTALRM 26 48 | #define SIGPROF 27 49 | #define SIGWINCH 28 50 | #define SIGIO 29 51 | #define SIGPOLL SIGIO 52 | /* 53 | #define SIGLOST 29 54 | */ 55 | #define SIGPWR 30 56 | #define SIGSYS 31 57 | #define SIGUNUSED 31 58 | 59 | /* These should not be considered constants from userland. */ 60 | #define SIGRTMIN 32 61 | #define SIGRTMAX _NSIG 62 | 63 | #define SA_RESTORER 0x04000000 64 | 65 | #define MINSIGSTKSZ 2048 66 | #define SIGSTKSZ 8192 67 | 68 | #include 69 | 70 | #ifndef __ASSEMBLY__ 71 | 72 | 73 | /* Here we must cater to libcs that poke about in kernel headers. */ 74 | #ifdef __i386__ 75 | 76 | struct sigaction { 77 | union { 78 | __sighandler_t _sa_handler; 79 | void (*_sa_sigaction)(int, struct siginfo *, void *); 80 | } _u; 81 | sigset_t sa_mask; 82 | unsigned long sa_flags; 83 | void (*sa_restorer)(void); 84 | }; 85 | 86 | #define sa_handler _u._sa_handler 87 | #define sa_sigaction _u._sa_sigaction 88 | 89 | #else /* __i386__ */ 90 | 91 | struct sigaction { 92 | __sighandler_t sa_handler; 93 | unsigned long sa_flags; 94 | __sigrestore_t sa_restorer; 95 | sigset_t sa_mask; /* mask last for extensibility */ 96 | }; 97 | 98 | #endif /* !__i386__ */ 99 | 100 | typedef struct sigaltstack { 101 | void *ss_sp; 102 | int ss_flags; 103 | size_t ss_size; 104 | } stack_t; 105 | 106 | #endif /* __ASSEMBLY__ */ 107 | 108 | #endif /* _ASM_X86_SIGNAL_H */ 109 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm/socket.h: -------------------------------------------------------------------------------- 1 | #include 2 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm/sockios.h: -------------------------------------------------------------------------------- 1 | #include 2 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm/stat.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 | #ifndef _ASM_X86_STAT_H 3 | #define _ASM_X86_STAT_H 4 | 5 | #include 6 | 7 | #define STAT_HAVE_NSEC 1 8 | 9 | #ifdef __i386__ 10 | struct stat { 11 | unsigned long st_dev; 12 | unsigned long st_ino; 13 | unsigned short st_mode; 14 | unsigned short st_nlink; 15 | unsigned short st_uid; 16 | unsigned short st_gid; 17 | unsigned long st_rdev; 18 | unsigned long st_size; 19 | unsigned long st_blksize; 20 | unsigned long st_blocks; 21 | unsigned long st_atime; 22 | unsigned long st_atime_nsec; 23 | unsigned long st_mtime; 24 | unsigned long st_mtime_nsec; 25 | unsigned long st_ctime; 26 | unsigned long st_ctime_nsec; 27 | unsigned long __unused4; 28 | unsigned long __unused5; 29 | }; 30 | 31 | /* We don't need to memset the whole thing just to initialize the padding */ 32 | #define INIT_STRUCT_STAT_PADDING(st) do { \ 33 | st.__unused4 = 0; \ 34 | st.__unused5 = 0; \ 35 | } while (0) 36 | 37 | #define STAT64_HAS_BROKEN_ST_INO 1 38 | 39 | /* This matches struct stat64 in glibc2.1, hence the absolutely 40 | * insane amounts of padding around dev_t's. 41 | */ 42 | struct stat64 { 43 | unsigned long long st_dev; 44 | unsigned char __pad0[4]; 45 | 46 | unsigned long __st_ino; 47 | 48 | unsigned int st_mode; 49 | unsigned int st_nlink; 50 | 51 | unsigned long st_uid; 52 | unsigned long st_gid; 53 | 54 | unsigned long long st_rdev; 55 | unsigned char __pad3[4]; 56 | 57 | long long st_size; 58 | unsigned long st_blksize; 59 | 60 | /* Number 512-byte blocks allocated. */ 61 | unsigned long long st_blocks; 62 | 63 | unsigned long st_atime; 64 | unsigned long st_atime_nsec; 65 | 66 | unsigned long st_mtime; 67 | unsigned int st_mtime_nsec; 68 | 69 | unsigned long st_ctime; 70 | unsigned long st_ctime_nsec; 71 | 72 | unsigned long long st_ino; 73 | }; 74 | 75 | /* We don't need to memset the whole thing just to initialize the padding */ 76 | #define INIT_STRUCT_STAT64_PADDING(st) do { \ 77 | memset(&st.__pad0, 0, sizeof(st.__pad0)); \ 78 | memset(&st.__pad3, 0, sizeof(st.__pad3)); \ 79 | } while (0) 80 | 81 | #else /* __i386__ */ 82 | 83 | struct stat { 84 | __kernel_ulong_t st_dev; 85 | __kernel_ulong_t st_ino; 86 | __kernel_ulong_t st_nlink; 87 | 88 | unsigned int st_mode; 89 | unsigned int st_uid; 90 | unsigned int st_gid; 91 | unsigned int __pad0; 92 | __kernel_ulong_t st_rdev; 93 | __kernel_long_t st_size; 94 | __kernel_long_t st_blksize; 95 | __kernel_long_t st_blocks; /* Number 512-byte blocks allocated. */ 96 | 97 | __kernel_ulong_t st_atime; 98 | __kernel_ulong_t st_atime_nsec; 99 | __kernel_ulong_t st_mtime; 100 | __kernel_ulong_t st_mtime_nsec; 101 | __kernel_ulong_t st_ctime; 102 | __kernel_ulong_t st_ctime_nsec; 103 | __kernel_long_t __unused[3]; 104 | }; 105 | 106 | /* We don't need to memset the whole thing just to initialize the padding */ 107 | #define INIT_STRUCT_STAT_PADDING(st) do { \ 108 | st.__pad0 = 0; \ 109 | st.__unused[0] = 0; \ 110 | st.__unused[1] = 0; \ 111 | st.__unused[2] = 0; \ 112 | } while (0) 113 | 114 | #endif 115 | 116 | /* for 32bit emulation and 32 bit kernels */ 117 | struct __old_kernel_stat { 118 | unsigned short st_dev; 119 | unsigned short st_ino; 120 | unsigned short st_mode; 121 | unsigned short st_nlink; 122 | unsigned short st_uid; 123 | unsigned short st_gid; 124 | unsigned short st_rdev; 125 | #ifdef __i386__ 126 | unsigned long st_size; 127 | unsigned long st_atime; 128 | unsigned long st_mtime; 129 | unsigned long st_ctime; 130 | #else 131 | unsigned int st_size; 132 | unsigned int st_atime; 133 | unsigned int st_mtime; 134 | unsigned int st_ctime; 135 | #endif 136 | }; 137 | 138 | #endif /* _ASM_X86_STAT_H */ 139 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm/statfs.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 | #ifndef _ASM_X86_STATFS_H 3 | #define _ASM_X86_STATFS_H 4 | 5 | /* 6 | * We need compat_statfs64 to be packed, because the i386 ABI won't 7 | * add padding at the end to bring it to a multiple of 8 bytes, but 8 | * the x86_64 ABI will. 9 | */ 10 | #define ARCH_PACK_COMPAT_STATFS64 __attribute__((packed,aligned(4))) 11 | 12 | #include 13 | #endif /* _ASM_X86_STATFS_H */ 14 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm/swab.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 | #ifndef _ASM_X86_SWAB_H 3 | #define _ASM_X86_SWAB_H 4 | 5 | #include 6 | 7 | 8 | static __inline__ __u32 __arch_swab32(__u32 val) 9 | { 10 | __asm__("bswapl %0" : "=r" (val) : "0" (val)); 11 | return val; 12 | } 13 | #define __arch_swab32 __arch_swab32 14 | 15 | static __inline__ __u64 __arch_swab64(__u64 val) 16 | { 17 | #ifdef __i386__ 18 | union { 19 | struct { 20 | __u32 a; 21 | __u32 b; 22 | } s; 23 | __u64 u; 24 | } v; 25 | v.u = val; 26 | __asm__("bswapl %0 ; bswapl %1 ; xchgl %0,%1" 27 | : "=r" (v.s.a), "=r" (v.s.b) 28 | : "0" (v.s.a), "1" (v.s.b)); 29 | return v.u; 30 | #else /* __i386__ */ 31 | __asm__("bswapq %0" : "=r" (val) : "0" (val)); 32 | return val; 33 | #endif 34 | } 35 | #define __arch_swab64 __arch_swab64 36 | 37 | #endif /* _ASM_X86_SWAB_H */ 38 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm/termbits.h: -------------------------------------------------------------------------------- 1 | #include 2 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm/termios.h: -------------------------------------------------------------------------------- 1 | #include 2 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm/types.h: -------------------------------------------------------------------------------- 1 | #include 2 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm/ucontext.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 | #ifndef _ASM_X86_UCONTEXT_H 3 | #define _ASM_X86_UCONTEXT_H 4 | 5 | /* 6 | * Indicates the presence of extended state information in the memory 7 | * layout pointed by the fpstate pointer in the ucontext's sigcontext 8 | * struct (uc_mcontext). 9 | */ 10 | #define UC_FP_XSTATE 0x1 11 | 12 | #ifdef __x86_64__ 13 | /* 14 | * UC_SIGCONTEXT_SS will be set when delivering 64-bit or x32 signals on 15 | * kernels that save SS in the sigcontext. All kernels that set 16 | * UC_SIGCONTEXT_SS will correctly restore at least the low 32 bits of esp 17 | * regardless of SS (i.e. they implement espfix). 18 | * 19 | * Kernels that set UC_SIGCONTEXT_SS will also set UC_STRICT_RESTORE_SS 20 | * when delivering a signal that came from 64-bit code. 21 | * 22 | * Sigreturn restores SS as follows: 23 | * 24 | * if (saved SS is valid || UC_STRICT_RESTORE_SS is set || 25 | * saved CS is not 64-bit) 26 | * new SS = saved SS (will fail IRET and signal if invalid) 27 | * else 28 | * new SS = a flat 32-bit data segment 29 | * 30 | * This behavior serves three purposes: 31 | * 32 | * - Legacy programs that construct a 64-bit sigcontext from scratch 33 | * with zero or garbage in the SS slot (e.g. old CRIU) and call 34 | * sigreturn will still work. 35 | * 36 | * - Old DOSEMU versions sometimes catch a signal from a segmented 37 | * context, delete the old SS segment (with modify_ldt), and change 38 | * the saved CS to a 64-bit segment. These DOSEMU versions expect 39 | * sigreturn to send them back to 64-bit mode without killing them, 40 | * despite the fact that the SS selector when the signal was raised is 41 | * no longer valid. UC_STRICT_RESTORE_SS will be clear, so the kernel 42 | * will fix up SS for these DOSEMU versions. 43 | * 44 | * - Old and new programs that catch a signal and return without 45 | * modifying the saved context will end up in exactly the state they 46 | * started in, even if they were running in a segmented context when 47 | * the signal was raised.. Old kernels would lose track of the 48 | * previous SS value. 49 | */ 50 | #define UC_SIGCONTEXT_SS 0x2 51 | #define UC_STRICT_RESTORE_SS 0x4 52 | #endif 53 | 54 | #include 55 | 56 | #endif /* _ASM_X86_UCONTEXT_H */ 57 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm/unistd.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 | #ifndef _ASM_X86_UNISTD_H 3 | #define _ASM_X86_UNISTD_H 4 | 5 | /* 6 | * x32 syscall flag bit. Some user programs expect syscall NR macros 7 | * and __X32_SYSCALL_BIT to have type int, even though syscall numbers 8 | * are, for practical purposes, unsigned long. 9 | * 10 | * Fortunately, expressions like (nr & ~__X32_SYSCALL_BIT) do the right 11 | * thing regardless. 12 | */ 13 | #define __X32_SYSCALL_BIT 0x40000000 14 | 15 | # ifdef __i386__ 16 | # include 17 | # elif defined(__ILP32__) 18 | # include 19 | # else 20 | # include 21 | # endif 22 | 23 | #endif /* _ASM_X86_UNISTD_H */ 24 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm/vm86.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 | #ifndef _ASM_X86_VM86_H 3 | #define _ASM_X86_VM86_H 4 | 5 | /* 6 | * I'm guessing at the VIF/VIP flag usage, but hope that this is how 7 | * the Pentium uses them. Linux will return from vm86 mode when both 8 | * VIF and VIP is set. 9 | * 10 | * On a Pentium, we could probably optimize the virtual flags directly 11 | * in the eflags register instead of doing it "by hand" in vflags... 12 | * 13 | * Linus 14 | */ 15 | 16 | #include 17 | 18 | #define BIOSSEG 0x0f000 19 | 20 | #define CPU_086 0 21 | #define CPU_186 1 22 | #define CPU_286 2 23 | #define CPU_386 3 24 | #define CPU_486 4 25 | #define CPU_586 5 26 | 27 | /* 28 | * Return values for the 'vm86()' system call 29 | */ 30 | #define VM86_TYPE(retval) ((retval) & 0xff) 31 | #define VM86_ARG(retval) ((retval) >> 8) 32 | 33 | #define VM86_SIGNAL 0 /* return due to signal */ 34 | #define VM86_UNKNOWN 1 /* unhandled GP fault 35 | - IO-instruction or similar */ 36 | #define VM86_INTx 2 /* int3/int x instruction (ARG = x) */ 37 | #define VM86_STI 3 /* sti/popf/iret instruction enabled 38 | virtual interrupts */ 39 | 40 | /* 41 | * Additional return values when invoking new vm86() 42 | */ 43 | #define VM86_PICRETURN 4 /* return due to pending PIC request */ 44 | #define VM86_TRAP 6 /* return due to DOS-debugger request */ 45 | 46 | /* 47 | * function codes when invoking new vm86() 48 | */ 49 | #define VM86_PLUS_INSTALL_CHECK 0 50 | #define VM86_ENTER 1 51 | #define VM86_ENTER_NO_BYPASS 2 52 | #define VM86_REQUEST_IRQ 3 53 | #define VM86_FREE_IRQ 4 54 | #define VM86_GET_IRQ_BITS 5 55 | #define VM86_GET_AND_RESET_IRQ 6 56 | 57 | /* 58 | * This is the stack-layout seen by the user space program when we have 59 | * done a translation of "SAVE_ALL" from vm86 mode. The real kernel layout 60 | * is 'kernel_vm86_regs' (see below). 61 | */ 62 | 63 | struct vm86_regs { 64 | /* 65 | * normal regs, with special meaning for the segment descriptors.. 66 | */ 67 | long ebx; 68 | long ecx; 69 | long edx; 70 | long esi; 71 | long edi; 72 | long ebp; 73 | long eax; 74 | long __null_ds; 75 | long __null_es; 76 | long __null_fs; 77 | long __null_gs; 78 | long orig_eax; 79 | long eip; 80 | unsigned short cs, __csh; 81 | long eflags; 82 | long esp; 83 | unsigned short ss, __ssh; 84 | /* 85 | * these are specific to v86 mode: 86 | */ 87 | unsigned short es, __esh; 88 | unsigned short ds, __dsh; 89 | unsigned short fs, __fsh; 90 | unsigned short gs, __gsh; 91 | }; 92 | 93 | struct revectored_struct { 94 | unsigned long __map[8]; /* 256 bits */ 95 | }; 96 | 97 | struct vm86_struct { 98 | struct vm86_regs regs; 99 | unsigned long flags; 100 | unsigned long screen_bitmap; /* unused, preserved by vm86() */ 101 | unsigned long cpu_type; 102 | struct revectored_struct int_revectored; 103 | struct revectored_struct int21_revectored; 104 | }; 105 | 106 | /* 107 | * flags masks 108 | */ 109 | #define VM86_SCREEN_BITMAP 0x0001 /* no longer supported */ 110 | 111 | struct vm86plus_info_struct { 112 | unsigned long force_return_for_pic:1; 113 | unsigned long vm86dbg_active:1; /* for debugger */ 114 | unsigned long vm86dbg_TFpendig:1; /* for debugger */ 115 | unsigned long unused:28; 116 | unsigned long is_vm86pus:1; /* for vm86 internal use */ 117 | unsigned char vm86dbg_intxxtab[32]; /* for debugger */ 118 | }; 119 | struct vm86plus_struct { 120 | struct vm86_regs regs; 121 | unsigned long flags; 122 | unsigned long screen_bitmap; 123 | unsigned long cpu_type; 124 | struct revectored_struct int_revectored; 125 | struct revectored_struct int21_revectored; 126 | struct vm86plus_info_struct vm86plus; 127 | }; 128 | 129 | 130 | #endif /* _ASM_X86_VM86_H */ 131 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm/vmx.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 | /* 3 | * vmx.h: VMX Architecture related definitions 4 | * Copyright (c) 2004, Intel Corporation. 5 | * 6 | * This program is free software; you can redistribute it and/or modify it 7 | * under the terms and conditions of the GNU General Public License, 8 | * version 2, as published by the Free Software Foundation. 9 | * 10 | * This program is distributed in the hope it will be useful, but WITHOUT 11 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 12 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 13 | * more details. 14 | * 15 | * You should have received a copy of the GNU General Public License along with 16 | * this program; if not, write to the Free Software Foundation, Inc., 59 Temple 17 | * Place - Suite 330, Boston, MA 02111-1307 USA. 18 | * 19 | * A few random additions are: 20 | * Copyright (C) 2006 Qumranet 21 | * Avi Kivity 22 | * Yaniv Kamay 23 | * 24 | */ 25 | #ifndef VMX_H 26 | #define VMX_H 27 | 28 | 29 | #define VMX_EXIT_REASONS_FAILED_VMENTRY 0x80000000 30 | #define VMX_EXIT_REASONS_SGX_ENCLAVE_MODE 0x08000000 31 | 32 | #define EXIT_REASON_EXCEPTION_NMI 0 33 | #define EXIT_REASON_EXTERNAL_INTERRUPT 1 34 | #define EXIT_REASON_TRIPLE_FAULT 2 35 | #define EXIT_REASON_INIT_SIGNAL 3 36 | #define EXIT_REASON_SIPI_SIGNAL 4 37 | 38 | #define EXIT_REASON_INTERRUPT_WINDOW 7 39 | #define EXIT_REASON_NMI_WINDOW 8 40 | #define EXIT_REASON_TASK_SWITCH 9 41 | #define EXIT_REASON_CPUID 10 42 | #define EXIT_REASON_HLT 12 43 | #define EXIT_REASON_INVD 13 44 | #define EXIT_REASON_INVLPG 14 45 | #define EXIT_REASON_RDPMC 15 46 | #define EXIT_REASON_RDTSC 16 47 | #define EXIT_REASON_VMCALL 18 48 | #define EXIT_REASON_VMCLEAR 19 49 | #define EXIT_REASON_VMLAUNCH 20 50 | #define EXIT_REASON_VMPTRLD 21 51 | #define EXIT_REASON_VMPTRST 22 52 | #define EXIT_REASON_VMREAD 23 53 | #define EXIT_REASON_VMRESUME 24 54 | #define EXIT_REASON_VMWRITE 25 55 | #define EXIT_REASON_VMOFF 26 56 | #define EXIT_REASON_VMON 27 57 | #define EXIT_REASON_CR_ACCESS 28 58 | #define EXIT_REASON_DR_ACCESS 29 59 | #define EXIT_REASON_IO_INSTRUCTION 30 60 | #define EXIT_REASON_MSR_READ 31 61 | #define EXIT_REASON_MSR_WRITE 32 62 | #define EXIT_REASON_INVALID_STATE 33 63 | #define EXIT_REASON_MSR_LOAD_FAIL 34 64 | #define EXIT_REASON_MWAIT_INSTRUCTION 36 65 | #define EXIT_REASON_MONITOR_TRAP_FLAG 37 66 | #define EXIT_REASON_MONITOR_INSTRUCTION 39 67 | #define EXIT_REASON_PAUSE_INSTRUCTION 40 68 | #define EXIT_REASON_MCE_DURING_VMENTRY 41 69 | #define EXIT_REASON_TPR_BELOW_THRESHOLD 43 70 | #define EXIT_REASON_APIC_ACCESS 44 71 | #define EXIT_REASON_EOI_INDUCED 45 72 | #define EXIT_REASON_GDTR_IDTR 46 73 | #define EXIT_REASON_LDTR_TR 47 74 | #define EXIT_REASON_EPT_VIOLATION 48 75 | #define EXIT_REASON_EPT_MISCONFIG 49 76 | #define EXIT_REASON_INVEPT 50 77 | #define EXIT_REASON_RDTSCP 51 78 | #define EXIT_REASON_PREEMPTION_TIMER 52 79 | #define EXIT_REASON_INVVPID 53 80 | #define EXIT_REASON_WBINVD 54 81 | #define EXIT_REASON_XSETBV 55 82 | #define EXIT_REASON_APIC_WRITE 56 83 | #define EXIT_REASON_RDRAND 57 84 | #define EXIT_REASON_INVPCID 58 85 | #define EXIT_REASON_VMFUNC 59 86 | #define EXIT_REASON_ENCLS 60 87 | #define EXIT_REASON_RDSEED 61 88 | #define EXIT_REASON_PML_FULL 62 89 | #define EXIT_REASON_XSAVES 63 90 | #define EXIT_REASON_XRSTORS 64 91 | #define EXIT_REASON_UMWAIT 67 92 | #define EXIT_REASON_TPAUSE 68 93 | #define EXIT_REASON_BUS_LOCK 74 94 | 95 | #define VMX_EXIT_REASONS \ 96 | { EXIT_REASON_EXCEPTION_NMI, "EXCEPTION_NMI" }, \ 97 | { EXIT_REASON_EXTERNAL_INTERRUPT, "EXTERNAL_INTERRUPT" }, \ 98 | { EXIT_REASON_TRIPLE_FAULT, "TRIPLE_FAULT" }, \ 99 | { EXIT_REASON_INIT_SIGNAL, "INIT_SIGNAL" }, \ 100 | { EXIT_REASON_SIPI_SIGNAL, "SIPI_SIGNAL" }, \ 101 | { EXIT_REASON_INTERRUPT_WINDOW, "INTERRUPT_WINDOW" }, \ 102 | { EXIT_REASON_NMI_WINDOW, "NMI_WINDOW" }, \ 103 | { EXIT_REASON_TASK_SWITCH, "TASK_SWITCH" }, \ 104 | { EXIT_REASON_CPUID, "CPUID" }, \ 105 | { EXIT_REASON_HLT, "HLT" }, \ 106 | { EXIT_REASON_INVD, "INVD" }, \ 107 | { EXIT_REASON_INVLPG, "INVLPG" }, \ 108 | { EXIT_REASON_RDPMC, "RDPMC" }, \ 109 | { EXIT_REASON_RDTSC, "RDTSC" }, \ 110 | { EXIT_REASON_VMCALL, "VMCALL" }, \ 111 | { EXIT_REASON_VMCLEAR, "VMCLEAR" }, \ 112 | { EXIT_REASON_VMLAUNCH, "VMLAUNCH" }, \ 113 | { EXIT_REASON_VMPTRLD, "VMPTRLD" }, \ 114 | { EXIT_REASON_VMPTRST, "VMPTRST" }, \ 115 | { EXIT_REASON_VMREAD, "VMREAD" }, \ 116 | { EXIT_REASON_VMRESUME, "VMRESUME" }, \ 117 | { EXIT_REASON_VMWRITE, "VMWRITE" }, \ 118 | { EXIT_REASON_VMOFF, "VMOFF" }, \ 119 | { EXIT_REASON_VMON, "VMON" }, \ 120 | { EXIT_REASON_CR_ACCESS, "CR_ACCESS" }, \ 121 | { EXIT_REASON_DR_ACCESS, "DR_ACCESS" }, \ 122 | { EXIT_REASON_IO_INSTRUCTION, "IO_INSTRUCTION" }, \ 123 | { EXIT_REASON_MSR_READ, "MSR_READ" }, \ 124 | { EXIT_REASON_MSR_WRITE, "MSR_WRITE" }, \ 125 | { EXIT_REASON_INVALID_STATE, "INVALID_STATE" }, \ 126 | { EXIT_REASON_MSR_LOAD_FAIL, "MSR_LOAD_FAIL" }, \ 127 | { EXIT_REASON_MWAIT_INSTRUCTION, "MWAIT_INSTRUCTION" }, \ 128 | { EXIT_REASON_MONITOR_TRAP_FLAG, "MONITOR_TRAP_FLAG" }, \ 129 | { EXIT_REASON_MONITOR_INSTRUCTION, "MONITOR_INSTRUCTION" }, \ 130 | { EXIT_REASON_PAUSE_INSTRUCTION, "PAUSE_INSTRUCTION" }, \ 131 | { EXIT_REASON_MCE_DURING_VMENTRY, "MCE_DURING_VMENTRY" }, \ 132 | { EXIT_REASON_TPR_BELOW_THRESHOLD, "TPR_BELOW_THRESHOLD" }, \ 133 | { EXIT_REASON_APIC_ACCESS, "APIC_ACCESS" }, \ 134 | { EXIT_REASON_EOI_INDUCED, "EOI_INDUCED" }, \ 135 | { EXIT_REASON_GDTR_IDTR, "GDTR_IDTR" }, \ 136 | { EXIT_REASON_LDTR_TR, "LDTR_TR" }, \ 137 | { EXIT_REASON_EPT_VIOLATION, "EPT_VIOLATION" }, \ 138 | { EXIT_REASON_EPT_MISCONFIG, "EPT_MISCONFIG" }, \ 139 | { EXIT_REASON_INVEPT, "INVEPT" }, \ 140 | { EXIT_REASON_RDTSCP, "RDTSCP" }, \ 141 | { EXIT_REASON_PREEMPTION_TIMER, "PREEMPTION_TIMER" }, \ 142 | { EXIT_REASON_INVVPID, "INVVPID" }, \ 143 | { EXIT_REASON_WBINVD, "WBINVD" }, \ 144 | { EXIT_REASON_XSETBV, "XSETBV" }, \ 145 | { EXIT_REASON_APIC_WRITE, "APIC_WRITE" }, \ 146 | { EXIT_REASON_RDRAND, "RDRAND" }, \ 147 | { EXIT_REASON_INVPCID, "INVPCID" }, \ 148 | { EXIT_REASON_VMFUNC, "VMFUNC" }, \ 149 | { EXIT_REASON_ENCLS, "ENCLS" }, \ 150 | { EXIT_REASON_RDSEED, "RDSEED" }, \ 151 | { EXIT_REASON_PML_FULL, "PML_FULL" }, \ 152 | { EXIT_REASON_XSAVES, "XSAVES" }, \ 153 | { EXIT_REASON_XRSTORS, "XRSTORS" }, \ 154 | { EXIT_REASON_UMWAIT, "UMWAIT" }, \ 155 | { EXIT_REASON_TPAUSE, "TPAUSE" }, \ 156 | { EXIT_REASON_BUS_LOCK, "BUS_LOCK" } 157 | 158 | #define VMX_EXIT_REASON_FLAGS \ 159 | { VMX_EXIT_REASONS_FAILED_VMENTRY, "FAILED_VMENTRY" } 160 | 161 | #define VMX_ABORT_SAVE_GUEST_MSR_FAIL 1 162 | #define VMX_ABORT_LOAD_HOST_PDPTE_FAIL 2 163 | #define VMX_ABORT_LOAD_HOST_MSR_FAIL 4 164 | 165 | #endif /* VMX_H */ 166 | -------------------------------------------------------------------------------- /preinit/linux-headers/asm/vsyscall.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 | #ifndef _ASM_X86_VSYSCALL_H 3 | #define _ASM_X86_VSYSCALL_H 4 | 5 | enum vsyscall_num { 6 | __NR_vgettimeofday, 7 | __NR_vtime, 8 | __NR_vgetcpu, 9 | }; 10 | 11 | #define VSYSCALL_ADDR (-10UL << 20) 12 | 13 | #endif /* _ASM_X86_VSYSCALL_H */ 14 | --------------------------------------------------------------------------------