XGETBV/XSETBV require CR4 bit 18 (OSXSAVE) to be set before execution,
otherwise the CPU raises #UD (invalid opcode). Hyper-V enforces this
strictly; VirtualBox was silently tolerating it.
- Check both AVX and XSAVE CPUID flags before attempting AVX enable
- Set CR4.OSXSAVE (bit 18) before issuing XGETBV/XSETBV
- If XSAVE is not exposed by the hypervisor, AVX enable is skipped
gracefully instead of faulting
- Add mouse_wait_long() with 100,000 iteration timeout for init-time
i8042 controller commands (mouse_write/mouse_read/load). The original
mouse_wait() stays at 100 iterations for ISR-safe use in main().
- In load(): use mouse_wait_long() for all direct port I/O ($64/$60)
and clear CCB bit 5 (AND NOT $20) to ensure the mouse clock is not
disabled — required for Hyper-V which enforces this strictly.
- Replace Console.getConsoleProperties^.Width/Height with
video.frontBufferWidth/Height for mouse bounds clamping. The old
console properties are zero when console.init() is not called,
which locked the cursor to (0,0). Add 'video' to uses clause.
The LVGL flush callback assumed 32bpp (4-byte stride, direct pixel
copy), causing corrupted output on hypervisors that fall back to
16bpp modes (e.g. HyperV at 1600x1200x16).
- lvgl.pas: Make lvgl_flush_cb BPP-aware; add ARGB8888->RGB565
conversion path for 16bpp, keep direct copy for 32bpp. Replace
static lv_buf1 array (hardcoded 1600px wide) with kalloc'd buffer
sized to actual screen width.
- doublebuffer.pas: Fix allocateBackBuffer size from (W*H*BPP) to
(W*H*BPP) div 8 to get correct byte count.
- vesa.pas: Account for BPP in allocateVESAFrameBuffer page range
calculation to avoid under-mapping at higher BPP/resolutions.
- Removed the initialization of console in kernel.pas as this will
cause issues on some systems that don't expect to need to allocate the
textmode buffer.
- Fixed a bug within `dhcp.pas` - `processPacket_OFFER` in which the client was responding with the client IP value within the DHCP header was incorrectly being filled out with the IP being requested & this value was then being used within the REQUESTED_IP_ADDRESS option. Corrected this to fill out the client IP with the currently configured IP, which will be NULL (0.0.0.0) on boot, and whatever is issued thereafter.
- Cascaded the change to use the currently configured IP as opposed to a NULL IP to any other functions that were calling `copyIPv4(@NULL_IP[0], @packetCtx^.IP.Source[0])`.
- Allowed `processPacket_OFFER` to process packets addressed to the BROADCAST MAC (WHY COULDN'T IT DO THIS ALREADY?!).
Started outlining how the modular driver set will look for video drawing routines. Currently supports Drawing pixels to the screen & Flushing backbuffer -> frontbuffer.
Still very much test code, tracer is used everywhere for debugging, NOT DEVELOP READY.
Many more draw routines need implementing - such as, but not limited to; drawRect, drawBitmap, drawLine, drawCurve, drawCircle.
TODO: Implement the aforementioned routines in all VESA modes + WindowManager.
Modified the linker script + Added an init function to System.pas to be called at system boot, this allows tracking of the Kernel start & end addresses, and thus, allows us to calculate the kernel size.
Added a klalloc and a klfree (not yet implemented) to lmemorymanager.
Added a page_mappable method to vmemorymanager to check if a page is mappable before trying to map, this supports klalloc.
Added the apache license to all source files, accounting for authors. Also added a license.md containing the apache license + contributors.md listing all contributors.