Commit Graph

401 Commits

Author SHA1 Message Date
065fdeec65 build: convert build system to CMake 2024-11-02 11:21:22 +00:00
8497962af6 kernel: show current task id, thread id, and cpu id in test messages 2024-09-17 17:49:34 +01:00
ef05233dcf sched: allocate and assign ids to each thread 2024-09-17 17:49:05 +01:00
d29b955ee8 x86_64: re-enable legacy PIC and PIT initialisation 2024-09-17 17:48:26 +01:00
3f992d84fb kernel: remove everything that is related to device/fs management
this is now a microkernel.
2024-09-17 17:47:50 +01:00
9b00f83ff1 build: set default qemu display to SDL 2024-01-07 20:04:55 +00:00
15c576a99d tools: delete legacy amldecode tool 2024-01-07 20:04:23 +00:00
149f49bd28 vm: limit sparse page init loop to last free page frame
when the sector coverage mode is set to free, the loop that initialises the vm_page structs for free and reserved pages is limited to the same upper bound that is used to calculate the sector size and count.
2023-12-30 15:29:48 +00:00
abfd97b924 memblock: fix bounds being ignored when iterating through total or reserved regions 2023-12-30 15:29:13 +00:00
b0c021d4e9 kernel: add kernel.early-console and kernel.console boot args
kernel.early-console is used to specify which output device the
kernel boot log should be written to. the first thing the kernel
does on boot after initialising the bootstrap processor is initialise
the early console, making it useful for debugging problems that
occur early in the boot process. this arg accepts a list of hard-coded
values for output devices, such as tty0 for the display or ttyS0
for the serial port. the exact values supported will depend on the
platform.

once all drivers are loaded, the kernel switches to the device specified
by kernel.console for output. unlike kernel.early-console, this arg
specifies the name of a tty device in /dev/tty. this means that, not
only are more devices supported (any device provided by a tty driver),
but the kernel can also get input from the user using this console too
(not used by the kernel itself, but will be used by the user to interact
with userspace programs, like the shell).
2023-12-30 09:09:18 +00:00
fc56f906d3 kexts: serialcon: implement writing to serial ports via tty interface 2023-12-30 09:06:47 +00:00
8af6670b0d x86_64: move serial port code to serialcon kext 2023-12-29 20:35:26 +00:00
1c5c256c89 vm: sparse sector map now extends to cover only all free pages by default
by default, the sector map created under the sparse model now only extends to the last non-reserved page frame, any reserved page frames afterwards are ignored.
2023-12-29 19:53:31 +00:00
36c7f3bbeb debug: auto-select gdb/lldb session pane when starting debug session 2023-12-27 17:35:27 +00:00
53e756eca0 kernel: add boot argument parsing 2023-12-27 17:34:59 +00:00
b8934d220c vm: increase the number of sparse memory sectors that can be created 2023-12-24 09:43:57 +00:00
8803c23f08 vm: improve memory usage under sparse with a high reserved memory ratio
previously, sparse would attempt to create a smaller number of larger sectors on systems with lots of reserved memory, often causing an out-of-memory condition. the reserved memory ratio calculation now compares reserved memory to free memory, rather than to the address of the last byte in physical memory. this improved heuristic means sparse is now better at choosing an appropriate sector size, allowing sparse to operate on systems with high amounts of reserved memory.
2023-12-24 09:39:28 +00:00
8b99158d66 vm: fix overflow in memblock do_alloc when allocating large aligned blocks
allocating a large power-of-2 block with memblock may cause the base pointer of a region to exceed the limit pointer after it has been aligned during the free region scan in do_alloc().
2023-12-24 09:37:52 +00:00
63b69d8d85 util: fix absdiff64() always over/underflowing 2023-12-24 09:36:41 +00:00
1cbab5f2f4 vm: optimise vm_zone_init by only making blocks from free regions during boot 2023-12-24 09:35:50 +00:00
67c0b6eba9 tools: amldecode: skip creation of unnamed objects 2023-07-27 19:06:06 +01:00
d66f0df2c2 tools: amldecode: add parsing support for more AML opcodes 2023-07-22 17:57:20 +01:00
d08612f7db tools: amldecode: add test files extracted from Lenovo ThinkStation machine 2023-07-22 17:56:47 +01:00
82dd8c7846 tools: amldecode: fix read_pkg_length reading multibyte lengths in the wrong order 2023-07-20 19:47:08 +01:00
af15eaa75b tools: amldecode: store table revision in parser 2023-07-20 19:46:00 +01:00
9a2ac25343 x86_64: don't call early_vgacon_init() if fbcon kext is not compiled in 2023-07-19 19:02:00 +01:00
ac15f18782 build: remove --no-print-directory from make call when building userspace tools 2023-07-19 19:01:02 +01:00
f8c1a52259 tools: add tool to decode AML files and build an ACPI namespace 2023-07-19 19:00:27 +01:00
42c6cfb697 kexts: ahci: remove generic log messages 2023-07-19 18:59:42 +01:00
b4ef018c5f build: support multiple source files and nested directories for userspace tools 2023-07-19 18:59:11 +01:00
e9e73bc027 dev: removed internal spinlock from bcache
bcaches must now have an explicit external lock to protect them from
concurrent access (i.e. a lock belonging to their parent block device)
2023-07-11 21:28:02 +01:00
c0f380ddca kernel: lock block device before reading from it 2023-07-11 21:26:22 +01:00
c696bdf122 kexts: ahci: implement read support for ATA devices 2023-07-09 22:02:30 +01:00
3233169f25 dev: implement reading from block devices
reading from block devices is done using the block cache (bcache).
This cache stores sectors from a block device in pages of memory
marked as 'cached', which will allow them to be reclaimed when
memory pressure is high (TODO).

while block device drivers implement callbacks allowing reading/writing
at block-granularity, the device subsystem uses the block cache to
implement reading/writing at byte-granularity in a driver-agnostic way.

block drivers can disable the block cache for their devices, but this
will require that any clients communicate with the devices at
block-granularity.

also added an offset parameter to device and object read/write functions/callbacks.
2023-07-09 21:58:40 +01:00
53440653f2 kernel: remove static qualifier from functions generated by btree convenience macros 2023-07-09 21:57:04 +01:00
cefbd3e8d6 kexts: ahci: refactor driver 2023-07-09 09:07:15 +01:00
7d51bcb7b8 kexts: pci: add function to get pci-specific device data 2023-07-09 09:07:02 +01:00
49f50859b5 dev: block device IO callbacks now use iovec 2023-07-09 09:06:36 +01:00
2ac75cd541 kexts: ahci: implement identification of ATAPI devices 2023-07-08 22:15:22 +01:00
8463423c10 kernel: add endian conversion functions 2023-07-08 22:14:31 +01:00
dd6e49e8a6 kernel: tweak thresholds for data size->string conversion 2023-07-08 22:13:49 +01:00
fa41e50f56 kexts: add AHCI block driver 2023-07-08 15:57:16 +01:00
2ea509c4dc build: add test AHCI drives to VM 2023-07-08 15:56:20 +01:00
db992a0994 kernel: add status codes for device IO 2023-07-08 15:55:56 +01:00
d9b9c0d4e7 dev: implement block device registration 2023-07-08 15:55:43 +01:00
ce40a4f57d kexts: fbcon: use ttyFBX name format for tty devices 2023-07-08 15:54:29 +01:00
71dbdf21a2 dev: allow devices to specify human-readable model names 2023-07-08 15:53:59 +01:00
d96c549f17 vm: allow pages to be mapped as no-cache 2023-07-08 15:53:06 +01:00
8ffbacb0cd dev: don't lock bus list when enumerating all buses 2023-07-08 15:52:31 +01:00
9d2644ffa7 kexts: pci: score driver matches, allow fallback class drivers 2023-07-08 15:51:12 +01:00