Commit Graph

371 Commits

Author SHA1 Message Date
wash ff19915466 vm: mark memory holes as reserved under sparse memory model 2023-02-17 19:34:12 +00:00
wash 81ca98c952 x86_64: acpi: add minimal SMP core startup 2023-02-09 21:39:20 +00:00
wash d960909d1b x86_64: pmap: enable NX protection during bootstrap 2023-02-09 21:38:50 +00:00
wash ddb00acd31 x86_64: add a basic ACPI driver 2023-02-09 19:09:07 +00:00
wash a206b640e9 build: write VM serial output to log file 2023-02-09 19:08:24 +00:00
wash 5b9bdd4848 kernel: add definitions for a TTY device interface. 2023-02-09 11:35:35 +00:00
wash 943e9dc517 build: make tools makefile quiet 2023-02-09 09:16:48 +00:00
wash 8c4c224435 vm: fix get_or_create_page not allocating enough memory for sparse page map 2023-02-08 21:29:45 +00:00
wash 22eabbedbc vm: log per-zone free memory during init 2023-02-08 21:29:20 +00:00
wash 9792aa512d vm: use vm_memory_mode() to determine which model to initialise 2023-02-08 21:28:47 +00:00
wash b0b557d919 x86_64: add temporary serial driver for printk 2023-02-08 21:28:20 +00:00
wash 56578dda38 build: x86_64: write printk output to file via qemu serial port 2023-02-08 21:27:47 +00:00
wash 6c6ca6920b vm: handle null vm_pages and empty zones in zone init 2023-02-08 20:26:51 +00:00
wash b32791ade7 vm: zero sector array; perform overflow checks 2023-02-08 20:26:18 +00:00
wash a595b3040a vm: remove debug message from get_or_create_page 2023-02-08 20:25:52 +00:00
wash a9f8069aab vm: add sparse mm support to vm_page functions 2023-02-08 20:25:24 +00:00
wash cb6b400fae x86_64: build: add rule to debug using ncurses 2023-02-08 20:24:49 +00:00
wash 5e10f566a4 x86_64: add basic interrupt handling 2023-02-08 20:24:40 +00:00
wash 18c5b34923 build: create copy of kernel binary with debug symbols 2023-02-08 20:24:22 +00:00
wash e96da32cd5 x86_64: check for failure in alloc test 2023-02-08 18:48:01 +00:00
wash a7d4166c89 vm: implement a sparse memory model 2023-02-08 17:13:01 +00:00
wash 6690572bf3 kernel: add utility math functions 2023-02-08 17:12:34 +00:00
wash b8eb88627a vm: add huge page order size definitions 2023-02-08 17:11:08 +00:00
wash d56fc961fa kernel: print log messages directly to the console if log_buffer is full 2023-02-08 17:10:13 +00:00
wash 4c4178e170 build: stop make compile-db from having to call make clean 2023-02-08 16:46:59 +00:00
wash 4edc7e308e vm: refactor page_array and functions into a separate source file 2023-02-07 21:18:08 +00:00
wash b13907f3bc x86_64: initialise vm subsystem 2023-02-07 16:00:45 +00:00
wash 9879bbf646 vm: optimise page array size and initialisation.
* the page array now only extends up to the last non-reserved memory frame.
* rather than memset'ing the whole array to zero, we only initialise p_flags
  for each page in vm_page_array_init, and then leave it to group_pages_into_block
  to initialise the other parts of vm_page_t.
2023-02-07 16:00:28 +00:00
wash 51ad3d48fd memblock: mark bytes preceding an aligned allocation as reserved.
this prevents tiny holes of free memory appearing between
blocks of aligned allocations.
2023-02-07 15:57:18 +00:00
wash e9d4b60181 vm: print log messages during initialisation 2023-02-07 15:43:14 +00:00
wash bf0b4d412c vm: use direct page mapping to convert virt/phys addresses 2023-02-07 15:40:06 +00:00
wash ad63f0b251 x86_64: pmap: map all of physical memory starting at VM_PAGEMAP_BASE 2023-02-07 15:38:18 +00:00
wash e939aae775 x86_64: pmap: fix typos 2023-02-07 12:10:12 +00:00
wash 52c1ba89c4 x86_64: pmap: add null-pointer to check to delete_pdir 2023-02-07 12:10:05 +00:00
wash 3ea1a28e5a x86_64: pmap: fix make_pte not using PTE_NX for non-exec pages 2023-02-07 12:09:36 +00:00
wash 15ddd2fe0b x86_64: use e64patch to generate kernel binary for QEMU 2023-02-07 11:25:58 +00:00
wash 2f69bfd4f0 build: add support for building tools targeting host machine 2023-02-07 11:25:33 +00:00
wash 625eac9ca7 x86_64: implement bootstrap function for pmap interface 2023-02-06 20:50:38 +00:00
wash 52b3a5d6a5 x86_64: enable hugepage support in QEMU 2023-02-06 20:50:38 +00:00
wash 5e20bbe223 x86_64: use higher-half pointer for VGA framebuffer 2023-02-06 20:50:38 +00:00
wash 0516ef06a3 vm: explicitly initialise kmalloc in vm_bootstrap
if kmalloc is called with count=N before vm_bootstrap is finished,
the request will be fulfilled using memblock_alloc.

if N is a power of 2, the returned pointer will be aligned to
an N-byte boundary.
2023-02-06 20:50:38 +00:00
wash fe0b7e043f x86_64: move stack pointer to higher-half in start_64 2023-02-06 20:50:38 +00:00
wash 5c7bde4fdf vm: add alignment parameter to cache allocator
caches with object size N, where N is a power of two, will naturally
align their objects on N-byte boundaries.

all other caches will align to an 8-byte boundary by default.
2023-02-06 20:50:38 +00:00
wash 109616ec30 vm: add memblock support to vm_virt_to_phys, add vm_phys_to_virt 2023-02-06 20:50:38 +00:00
wash 998f05d337 memblock: add functions to convert allocated pointers between virt/phys 2023-02-06 20:50:38 +00:00
wash 6afb3bd10d memblock: add alignment parameter to alloc functions 2023-02-06 20:50:38 +00:00
wash a72117abcd x86_64: move start_64 to .boot.text 2023-02-06 10:41:06 +00:00
wash b7f872bf3b build: enable -Os flag 2023-02-05 11:08:22 +00:00
wash b9b3794aee x86_64: initialise memblock using e820 2023-02-05 10:50:13 +00:00
wash 21907010bd memblock: return NULL on virtual alloc failure 2023-02-05 10:49:59 +00:00