-
Notifications
You must be signed in to change notification settings - Fork 13
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
[WIP] Arch independence #183
base: master
Are you sure you want to change the base?
Commits on Feb 21, 2019
-
Configuration menu - View commit details
-
Copy full SHA for dc46324 - Browse repository at this point
Copy the full SHA dc46324View commit details -
Makefile: support multiple targets, use profiles for debug/release
- Instead of duplicating rules for debug and release, we instead use profiles to determine whether we should build in Debug or Relase mode. We do this by adding two global env variables (TARGET_PATH and RELEASE_FLAG). TARGET_PATH should contain the PATH relative to target/ where we can find the compiled binaries. RELEASE_FLAG should contain --release in release mode, and a noop flag under debug mode. We use --message-format=human as a noop flag. - We also support building for different targets using the TARGET environment variable, which defaults to i386-unknown-none.
Configuration menu - View commit details
-
Copy full SHA for 56960dd - Browse repository at this point
Copy the full SHA 56960ddView commit details -
Kernel: move i386 module to arch::i386
Start refactoring the i386 module into an architecture abstraction module. The arch module should export functions abstracting common operations across multiple architectures, and expose a module containing the architecture-specific functionality. For now, the architecture abstraction API contains two functions: - enable_interrupts, which allow hardware to call event::dispatch_event - disable_interrupts, which tells hardware to queue interruptions.
Configuration menu - View commit details
-
Copy full SHA for bc9cba4 - Browse repository at this point
Copy the full SHA bc9cba4View commit details -
Add stub arch for documentation and tests.
The stub arch is a noop architecture where all the functions do nothing. It's mostly meant to be used as a centralized place for the documentation of the arch abstraction API, but can also be used for tests and easily bootstrapping a port to a new architecture.
Configuration menu - View commit details
-
Copy full SHA for f5be039 - Browse repository at this point
Copy the full SHA f5be039View commit details -
Kernel: arch abstraction API for cmdline and logs
Adds two new functions to the arch abstraction API: get_cmdline and get_logger. Those are used by the log implementation to find the serial device to log to, and the log configuration.
Configuration menu - View commit details
-
Copy full SHA for 37d1cc9 - Browse repository at this point
Copy the full SHA 37d1cc9View commit details -
Move interrupts to arch::i386 and syscalls to root
The syscall module is moved to the root, making documentation better (syscalls is right on kfs_kernel project page). Fixes sunriseos#54. The rest of the interrupts module is fully arch-specific, so it is moved under arch::i386.
Configuration menu - View commit details
-
Copy full SHA for 9d8c5f9 - Browse repository at this point
Copy the full SHA 9d8c5f9View commit details -
Kernel: Move startup functions to arch::i386
start and common_start are both architecture-specific, so move them under arch::i386. Furthermore, init the multiboot2 global as early as possible, and make frame_allocator take the multiboot2 information with `get_boot_information` function.
Configuration menu - View commit details
-
Copy full SHA for c6ad3a4 - Browse repository at this point
Copy the full SHA c6ad3a4View commit details -
Kernel: Use arch abstraction API in panic handling.
Adds a new function: force_logger_unlock, which force-unlocks any Mutex that might be protecting the logger. This is only used in the panic implementation, in order to avoid deadlocking. Panic now uses get_logger in order to stay arch-generic.
Configuration menu - View commit details
-
Copy full SHA for 515bff1 - Browse repository at this point
Copy the full SHA 515bff1View commit details -
Kernel: Use arch abstraction API for process switching
Adds two new function and one structure to the arch abstraction API: - ThreadHardwareContext, contains some support fields for the process switching code. - process_switch: Executes another process. - prepare_for_first_schedule: Prepare a new thread to get scheduled/switched to.
Configuration menu - View commit details
-
Copy full SHA for 4348c14 - Browse repository at this point
Copy the full SHA 4348c14View commit details -
Kernel: Get kernel builtins through arch abstraction API
Adds a new trait: `elf_loader::Module`, representing a kernel builtin that will be loaded when booting the kernel. Adds a new function to arch abstraction API: get_modules(). This function returns an iterator of `Module`s. All of those modules are to be started on kernel boot.
Configuration menu - View commit details
-
Copy full SHA for 4a07c7f - Browse repository at this point
Copy the full SHA 4a07c7fView commit details -
Kernel: Move stack allocation/dumping in arch-generic API
Adds a new type in arch-generic API, KernelStack, and a new function, dump_stack. KernelStack represents the Kernel Stack used to handle interruptions associated with a ThreadStruct. Having KernelStack in the arch-generic API is a bit weird. The concept is inherently arch-dependent...
Configuration menu - View commit details
-
Copy full SHA for 2fe3fdd - Browse repository at this point
Copy the full SHA 2fe3fddView commit details -
A few simple improvements to set_bits_area: - It is now available to both BitField and BitArray - It now uses RangeBounds, allowing the use of inclusive ranges, partial ranges, and full ranges. - It now has tests.
Configuration menu - View commit details
-
Copy full SHA for 6b56161 - Browse repository at this point
Copy the full SHA 6b56161View commit details -
Kernel: new PageTable for_each_region function
for_each_region is similar to for_each_entry, but runs for each contiguous region in the same "state". It is effectively the logic used by dump_kernelland_state, ripped in a generic function.
Configuration menu - View commit details
-
Copy full SHA for be937df - Browse repository at this point
Copy the full SHA be937dfView commit details -
Kernel: Atomic frame allocator
Make the frame allocator atomic. This allows allocating frames from multiple CPU cores without having to go through a global lock.
Configuration menu - View commit details
-
Copy full SHA for 0fc6147 - Browse repository at this point
Copy the full SHA 0fc6147View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1e1c481 - Browse repository at this point
Copy the full SHA 1e1c481View commit details