Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port to x86_64 #45

Open
wants to merge 203 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
203 commits
Select commit Hold shift + click to select a range
ca9c20c
[UEFI] Add posix-uefi as a Git submodule
codyd51 Oct 13, 2021
01d049b
[UEFI] Check in initial UEFI application
codyd51 Oct 13, 2021
a0ef83b
[UEFI] Remove errant submodule
codyd51 Oct 13, 2021
2ca5723
Merge branch 'master' into uefi-bootloader
codyd51 Oct 13, 2021
6fed45b
Merge branch 'uefi-bootloader' of https://github.com/codyd51/axle int…
codyd51 Oct 14, 2021
d4427d0
[UEFI] Check in test code
codyd51 Oct 15, 2021
24c492e
[UEFI] Check in test script
codyd51 Oct 15, 2021
a8997c3
[UEFI] Update flash script for macOS host
codyd51 Oct 16, 2021
70e92cd
[UEFI] Flesh out bootloader
codyd51 Oct 16, 2021
6c321ae
[UEFI] Flesh out dummy kernel
codyd51 Oct 16, 2021
8a5dfe3
[x86_64] Check-in GDT work
codyd51 Oct 20, 2021
6c11c94
[x86_64] Check in 64b sysroot
codyd51 Oct 21, 2021
8bbf75a
[UEFI] Check in bootloader
codyd51 Oct 21, 2021
333b327
[UEFI] Boot info header is copied to sysroot
codyd51 Oct 21, 2021
7f9caab
[x86_64] build_kernel_headers supports 64b
codyd51 Oct 21, 2021
5369bd6
[x86_64] Add script to select arch-specific files and compile kernel
codyd51 Oct 21, 2021
2a428ff
[Kernel] Drop text-mode output code
codyd51 Oct 21, 2021
0c8ff4c
[Kernel] Drop old int_notifier module
codyd51 Oct 21, 2021
57d7d95
[Kernel] Drop old paging utilities
codyd51 Oct 21, 2021
393de9f
[x86_64] Clean up some types
codyd51 Oct 21, 2021
9a7105f
[x86_64] Check in arch-dependent files
codyd51 Oct 21, 2021
b421cad
[UEFI] Drop dummy kernel for testing bootloader
codyd51 Oct 21, 2021
c0ff515
[x86_64] .gitignore arch-specific staged files
codyd51 Oct 21, 2021
55d9984
[x86_64] Drop unused code
codyd51 Oct 21, 2021
7ceb421
[x86_64] Makefile is a bit more arch-independent
codyd51 Oct 21, 2021
ba7b13f
[x86_64] Check in GDT
codyd51 Oct 21, 2021
b7b699f
[x86_64] Check in IDT handling
codyd51 Oct 21, 2021
d669834
[UEFI] Bootloader provides memory map to kernel
codyd51 Oct 23, 2021
68c054b
[UEFI] Check in boot_info.h
codyd51 Oct 23, 2021
5c5cb7f
[x86_64] Disable some code that's not x86_64 ready
codyd51 Oct 23, 2021
c3605ab
[x86_64] Rework x86_64 interrupt trampolines
codyd51 Oct 23, 2021
c2a4142
[x86_64] Compile kernel with -mno-red-zone and other x86_64 specific …
codyd51 Oct 23, 2021
d879c93
[x86_64] Update entry point for x86_64
codyd51 Oct 23, 2021
32cd692
[x86_64] Drop lots of kernel-mode graphics & floating point code
codyd51 Oct 23, 2021
fb46c30
[x86_64] Check in bootloader paging support
codyd51 Oct 26, 2021
33d2c03
[Kernel] printf supports %p
codyd51 Oct 26, 2021
0bb4cf3
[Kernel] printf supports zero-padding >= 10 and <= 20
codyd51 Oct 26, 2021
69e57e6
[x86_64] Kernel is loaded in the top -2G of the 64-bit address space
codyd51 Oct 26, 2021
bd7acc1
[UEFI] Refactor bootloader paging code into its own file
codyd51 Nov 3, 2021
ba03702
[UEFI] Kernel/initrd use dedicated EFI memory map types
codyd51 Nov 3, 2021
a29a1e8
[Toolchain] sysroot_copy_needs_update -> copied_file_is_outdated
codyd51 Nov 3, 2021
1e84682
[x86_64] Staging arch-specific files works for any file extension
codyd51 Nov 3, 2021
8d32935
[x86_64] Newlib build script is arch-agnostic
codyd51 Nov 3, 2021
1e5ca22
[UEFI] Add build script to flash a live USB
codyd51 Nov 3, 2021
d74f98d
[Toolchain] hopper.py has a --kernel option
codyd51 Nov 3, 2021
d54baea
[x86_64] Stage arch-specific files
codyd51 Nov 3, 2021
d319c1f
[x86_64] Set default link address to 4MB
codyd51 Nov 3, 2021
7dc4eaa
[x86_64] libamc provides uptr-sized convenience functions
codyd51 Nov 3, 2021
321c09e
[x86_64] Meson cross-compile template is arch-agnostic
codyd51 Nov 3, 2021
550f505
[x86_64] libgui doesn't assume framebuffer pointer size
codyd51 Nov 3, 2021
c5a127f
[x86_64] file_manager doesn't assume initrd pointer size
codyd51 Nov 3, 2021
2edfc10
[x86_64] Newlib port can configure for x86_64-axle
codyd51 Nov 3, 2021
12d3b53
[x86_64] Check in x86_64 VAS implementation
codyd51 Nov 3, 2021
43b53dc
[x86_64] Check in x86_64 walk_stack
codyd51 Nov 3, 2021
ef00aed
[Kernel] Drop old kernel code
codyd51 Nov 3, 2021
ec8c5e6
[x86_64] Update assert() for x86_64
codyd51 Nov 3, 2021
3d5da43
[UEFI] Interpreting memory map handles axle EFI memory types
codyd51 Nov 3, 2021
0df2988
[x86_64] Re-enable tick callback kickoffs
codyd51 Nov 3, 2021
936b10a
[x86_64] Drop more old kernel code
codyd51 Nov 4, 2021
9b641e1
[x86_64] Add axle-sysroot/ to .gitignore
codyd51 Nov 4, 2021
b50c81a
[x86_64] Untrack axle-sysroot files
codyd51 Nov 4, 2021
d0845fb
[x86_64] Drop source files that are now generated per-arch
codyd51 Nov 4, 2021
d964156
[x86_64] Implement jump to user mode
codyd51 Nov 4, 2021
e72d22a
[x86_64] Implement multitasking
codyd51 Nov 4, 2021
1052dbb
[x86_64] Implement PMM
codyd51 Nov 4, 2021
7626509
[x86_64] Implement GDT
codyd51 Nov 4, 2021
4e4629c
[x86_64] Update ELF loader for x86_64 support
codyd51 Nov 4, 2021
23aaba6
[x86_64] Add memory map documentation
codyd51 Nov 4, 2021
08a8769
[x86_64] Update syscall vectors in Newlib port
codyd51 Nov 4, 2021
9f6dd13
[x86_64] Shared memory is now created through an amc message instead …
codyd51 Nov 4, 2021
cc65eed
[x86_64] Mapping initrd is 64-bit aware
codyd51 Nov 4, 2021
109da9b
[x86_64] Update kernel heap for x86_64
codyd51 Nov 4, 2021
98b4bf1
[awm] Fix bug in staging awm headers to sysroot
codyd51 Nov 4, 2021
41ac537
[x86_64] awm uses new shared memory request mechanism
codyd51 Nov 4, 2021
9b118da
[x86_64] Kernel VFS is aware of initrd slide
codyd51 Nov 4, 2021
91e1865
[x86_64] amc places delivery pool in x86_64-specific location
codyd51 Nov 4, 2021
bda7c42
[x86_64] Kernel bootstrap handles jump to multitasking
codyd51 Nov 4, 2021
bd48ce4
[x86_64] pmm exposes arch-independent API
codyd51 Nov 4, 2021
d48ad94
[x86_64] IDT supports usermode-accessible vectors
codyd51 Nov 4, 2021
17b8f3d
[x86_64] Minor cleanups
codyd51 Nov 4, 2021
6510ccc
[x86_64] Rename amc_message_construct_and_send -> amc_message_send
codyd51 Nov 4, 2021
0405240
[Meta] initrd is built through Python build scripts
codyd51 Nov 4, 2021
f6f1441
[x86_64] Implement syscall trampoline
codyd51 Nov 4, 2021
655496f
[x86_64] Drop deprecated syscall vectors
codyd51 Nov 4, 2021
bc51a5e
[x86_64] tick_count is stored in platform word size
codyd51 Nov 5, 2021
d29ade6
[x86_64] Clean up multitasking code
codyd51 Nov 5, 2021
da74219
[x86_64] PMM tracks how many frames are allocated
codyd51 Nov 5, 2021
c4c7c6e
[Kernel] Logs are less noisy on boot
codyd51 Nov 5, 2021
d2bb4b0
[Meta] Move docs and scripts into subfolders
codyd51 Nov 8, 2021
39768e0
[Meta] Drop obsolete files
codyd51 Nov 8, 2021
eef3978
[UEFI] Bootloader maps kernel string and symbol table
codyd51 Nov 8, 2021
6d3f1b4
[x86_64] Fix 32-bit pointer usages
codyd51 Nov 8, 2021
bf90044
[x86_64] Kernel asserts print tracebacks
codyd51 Nov 8, 2021
1252f27
[libgui] Read screen resolution from awm
codyd51 Nov 8, 2021
13c22b4
[Userspace] assert() only calls into task_assert if its condition fails
codyd51 Nov 8, 2021
9af3659
[Scheduler] Hard-code queue quantums
codyd51 Nov 8, 2021
73660e3
[Kernel] Change ELF load type signature
codyd51 Nov 8, 2021
78425c9
[Kernel] ELF loading copies buffer to kernel space
codyd51 Nov 8, 2021
b113ee5
[VAS] Fix physical address translation in free_region
codyd51 Nov 8, 2021
9c4ef0a
[VAS] vas_add_range() merges contiguous ranges
codyd51 Nov 8, 2021
8b1d086
[VAS] vas_state_dump() includes size info
codyd51 Nov 8, 2021
42efa2d
[VAS] vas_clone() copies userspace pages
codyd51 Nov 8, 2021
a1ba882
[VAS] vas_free_region splits ranges if necessary
codyd51 Nov 8, 2021
852d1be
[VAS] Expose kernel memory base address
codyd51 Nov 8, 2021
5cf8b49
[Preferences] Render preview on resize
codyd51 Nov 12, 2021
747a6a1
[PCI] Map more devices
codyd51 Nov 12, 2021
c27d501
[Meta] build_kernel rebuilds user programs too
codyd51 Nov 12, 2021
7ef3b91
[awm] Support px/scanline
codyd51 Nov 12, 2021
0f31ed7
[awm] Support dynamic resolution from kernel
codyd51 Nov 12, 2021
c80f711
[x86_64] Define various kernel memory map boundaries
codyd51 Nov 12, 2021
2b20a3e
[UEFI] Support tracking resolution px/scanline
codyd51 Nov 12, 2021
839e565
[UEFI] Don't try to define custom UEFI memory types
codyd51 Nov 12, 2021
09ba76b
[UEFI] Draw pink background on bootloader entry
codyd51 Nov 12, 2021
9417986
[Serial] Always output \r\n on newline
codyd51 Nov 12, 2021
389b330
[Kernel] Ignore spurious INT 7
codyd51 Nov 12, 2021
07d448e
[amc] Add core message to query another service's state
codyd51 Nov 26, 2021
ab9ca96
[Meta] Add script to build OS-specific GCC/binutils
codyd51 Nov 26, 2021
a8662b9
[Term] Initial terminal draft
codyd51 Nov 26, 2021
1a31653
[Meta] build_kernel_headers will copy user headers to the sysroot to …
codyd51 Nov 26, 2021
e900919
[x86_64] Update APIs used in various programs
codyd51 Nov 26, 2021
3bdc4e4
[x86_64] Update install_linux.py to target x86_64
codyd51 Nov 26, 2021
fe08b46
[Kernel] Bugfix sbrk
codyd51 Nov 26, 2021
b9a6add
[Meta] Regenerate cross-compile config when the template has been mod…
codyd51 Nov 26, 2021
977f527
[Meta] Newlib build uses axle toolchain
codyd51 Nov 26, 2021
0c16067
[Meta] build_kernel.py builds an image based on the build OS
codyd51 Nov 26, 2021
1e8f6a4
[x86_64] Update API usages in user projects
codyd51 Nov 26, 2021
f90be5f
Merge branch 'uefi-bootloader' of https://github.com/codyd51/axle int…
codyd51 Nov 26, 2021
c22227e
[Meta] Build newlib as a patch instead of embedding the source tree
codyd51 Dec 8, 2021
9222512
[Meta] Build newlib + OS toolchain
codyd51 Dec 8, 2021
9dd136b
[Meta] Cache downloaded toolchain files
codyd51 Dec 8, 2021
64cba47
[Meta] _is_macos() returns a real answer
codyd51 Dec 8, 2021
1010645
[Meta] Check in newlib patch
codyd51 Dec 8, 2021
743dd1b
[Meta] Move stdlibadd into a dedicated libutils library
codyd51 Dec 8, 2021
df5aa9b
[CI] Initial Github Actions CI script
codyd51 Dec 10, 2021
4313589
[CI] Use Python >= 3.9
codyd51 Dec 11, 2021
4336aa8
[CI] Install Python dependencies
codyd51 Dec 11, 2021
776bd46
[CI] Install Python dependencies in CI
codyd51 Dec 11, 2021
522a12d
[CI] Debug
codyd51 Dec 11, 2021
352a0c2
[CI] Install dependencies via apt
codyd51 Dec 11, 2021
f2328f1
[CI] Upload build artifacts
codyd51 Dec 11, 2021
d75dcf9
[CI] Try building kernel
codyd51 Dec 11, 2021
6435c98
[CI] Fix duplicate job name
codyd51 Dec 11, 2021
8498481
[CI] Install script allows only installing dependencies
codyd51 Dec 11, 2021
dcf99ea
[CI] Debug install scripts
codyd51 Dec 11, 2021
8caeb87
[CI] Check in dependencies script
codyd51 Dec 11, 2021
e008767
[CI] Debug dependency install
codyd51 Dec 11, 2021
fd62161
[CI] Build kernel job needs toolchain job
codyd51 Dec 11, 2021
fca02ac
[CI] Cache Python dependencies
codyd51 Dec 11, 2021
0b5b500
[CI] Tweak Actions script
codyd51 Dec 11, 2021
ba54912
[CI] Tweak Actions steps
codyd51 Dec 12, 2021
cda2761
[CI] Tweak Actions script
codyd51 Dec 12, 2021
507eaa7
[CI] Fiddle with bootloader build
codyd51 Dec 12, 2021
851fcec
[CI] Tweak bootloader build
codyd51 Dec 12, 2021
de408d7
[CI] Tweak bootloader build
codyd51 Dec 12, 2021
00946a8
[CI] Tweak bootloader build
codyd51 Dec 13, 2021
d2521b3
[CI] Disable building OS so cache is successfully saved
codyd51 Dec 13, 2021
232afac
[CI] Re-enable OS build
codyd51 Dec 13, 2021
d07de4a
[CI] Include nasm in dependencies
codyd51 Dec 13, 2021
9fb1bd9
[CI] Temporarily install deps in OS build step
codyd51 Dec 13, 2021
779aaf9
[CI] Add ninja to Python dependencies
codyd51 Dec 13, 2021
e96beb6
[Userspace] Migrate to using meson subprojects
codyd51 Dec 16, 2021
c11f1e6
[Newlib] Split libfiles sycall stubs into their own object file
codyd51 Dec 16, 2021
eef5821
[CI] Re-enable staging some kernel headers
codyd51 Dec 16, 2021
cc97c17
[Meta] Auto-discover headers for sysroot by parsing meson build files
codyd51 Dec 16, 2021
85eb789
[CI] Stage userspace headers when building image
codyd51 Dec 16, 2021
cb7e68a
[CI] Generate cross_axle_generated.ini when staging headers
codyd51 Dec 16, 2021
6d1e6d9
[CI] Fix import path
codyd51 Dec 16, 2021
feee18d
[CI] Bugfix cross file path
codyd51 Dec 17, 2021
afcab07
[Meta] Rename agx include path -> libagx
codyd51 Dec 17, 2021
2052513
[Meta] Re-enable building user programs
codyd51 Dec 17, 2021
320c8cc
[CI] Add mtools to dependencies
codyd51 Dec 17, 2021
ebbc797
[CI] Add mtools dependency
codyd51 Dec 17, 2021
d9e2be8
[CI] Debug meson script
codyd51 Dec 17, 2021
35a070b
[CI] Debug building user programs
codyd51 Dec 17, 2021
11576cf
[Meta] Tweak libagx header install path
codyd51 Dec 17, 2021
d3f26f0
[CI] Change cache key to force a Newlib rebuild
codyd51 Dec 17, 2021
145815a
[CI] Fix import path
codyd51 Dec 17, 2021
355b172
[CI] Temporarily disable OS build so cache gets built
codyd51 Dec 17, 2021
689a2bb
[CI] Update import path
codyd51 Dec 17, 2021
cffe282
[CI] Reenable OS build
codyd51 Dec 17, 2021
aa16768
[CI] Don't run axle if a CLI flag is passed
codyd51 Dec 17, 2021
e9b5b80
[CI] Upload nightly release at the end of the CI build
codyd51 Dec 17, 2021
f3ce509
[CI] Install nasm in CI
codyd51 Dec 17, 2021
835594f
[CI] Debug nightly upload
codyd51 Dec 17, 2021
0e2d215
[CI] Try a different action to upload release
codyd51 Dec 17, 2021
0e88724
[CI] Tweak release upload
codyd51 Dec 17, 2021
3cbec5b
[CI] Tweak release upload
codyd51 Dec 17, 2021
198e371
[CI] Release is associated with the commit SHA
codyd51 Dec 17, 2021
79efd28
[CI] Don't compress ISO image
codyd51 Dec 17, 2021
6330a42
[CI] Dummy commit to trigger build
codyd51 Dec 17, 2021
af038f6
[CI] Second dummy commit to trigger CI build
codyd51 Dec 17, 2021
5a621fe
[CI] Include git SHA in nightly tag
codyd51 Dec 17, 2021
85a3142
Merge pull request #46 from codyd51/build-in-ci
codyd51 Dec 17, 2021
28829d7
[awm] Randomize background gradient each boot
codyd51 Dec 18, 2021
58c9102
[Preferences] Read initial background gradient from awm
codyd51 Dec 18, 2021
f8d220c
[PS2 Mouse] Use standard messages file
codyd51 Dec 18, 2021
61f788d
[Meta] Only rebuild user headers when necessary using a cache
codyd51 Dec 18, 2021
6ce3876
[Preferences] 'Randomize' button to set new desktop gradient
codyd51 Dec 18, 2021
1a17f69
[Kernel] Fix UAF in reaper task
codyd51 Dec 18, 2021
e24f4dd
[PMM] Fix int underflow
codyd51 Dec 19, 2021
6ab67da
[ELF] Allow loading segment on non-page-boundary
codyd51 Dec 19, 2021
5eac2ef
[VMM] Page fault only tries to print amc info if necessary
codyd51 Dec 19, 2021
c1e6ced
[Meta] Add dedicated script to run ISO
codyd51 Dec 19, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
68 changes: 68 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: axle CI

# Configure when the workflow runs
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ master, uefi-bootloader, build-in-ci ]
pull_request:
branches: [ master, uefi-bootloader, build-in-ci ]

# Allows running the workflow manually from the Actions tab
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest

steps:
# Checks out repo at $GITHUB_WORKSPACE
- uses: actions/checkout@v2

- uses: actions/setup-python@v2
with:
# Requires Python >= 3.9 for str.removesuffix()
python-version: '3.9'
# https://github.com/actions/setup-python#caching-packages-dependencies
# cache: 'pip'
# cache-dependency-path: 'python-dependencies.txt'
- run: pip install -r python-dependencies.txt

- name: Cache libc and toolchain
# https://github.com/nektos/act/issues/285
if: ${{ !env.ACT }}
id: build-libc-and-toolchain
uses: actions/cache@v2
with:
path: |
x86_64-toolchain
axle-sysroot
# TODO(PT): Change the cache key once the old cache is evicted
key: libc-and-toolchain-2

- name: Build libc and toolchain
shell: bash
if: steps.build-libc-and-toolchain.outputs.cache-hit != 'true'
run: |
python3 scripts/install_dependencies.py
python3 scripts/build_os_toolchain.py
echo "Toolchain built successfully"

- name: Build OS image
shell: bash
run: |
git submodule update --init --recursive
# PT: For nasm in CI
python3 scripts/install_dependencies.py
python3 scripts/build_kernel.py --no_run

- name: Update nightly release
uses: meeDamian/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
tag: nightly-${{ github.sha }}
files: axle.iso
allow_override: true
prerelease: false
commitish: ${{ github.sha }}
gzip: false
16 changes: 16 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ isodir/
*.a
.DS_Store
i686-toolchain/
x86_64-toolchain/
initrd/

.vscode/
Expand All @@ -18,3 +19,18 @@ __pycache__/
i686-toolchain-attempt1/
/axle-sysroot/usr/i686-axle/lib/
programs/cross_axle_generated.ini

# Arch specific files that are staged based on the current architecture
kernel/boot/boot.s
kernel/kernel/util/walk_stack.s
kernel/kernel/multitasking/tasks/process_small.s
kernel/kernel/segmentation/gdt_activate.s
kernel/kernel/interrupts/idt_activate.s
kernel/kernel/interrupts/int_handler_stubs.s
kernel/kernel/pmm/pmm_int.h
kernel/kernel/pmm/pmm.c
kernel/kernel/vmm/vmm.h
kernel/kernel/vmm/vmm.c

# Sysroot generated as part of OS build
axle-sysroot
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "bootloader/posix-uefi"]
path = bootloader/posix-uefi
url = https://gitlab.com/bztsrc/posix-uefi
Loading