Age | Commit message (Collapse) | Author |
|
On certain embedded controllers (ECs) like the EC present on the
Thinkpad T420s, writes to the i8042 controller configuration byte
are not very liked by the EC internal logic and thus result in them
asserting an NMI as a certain host bus error. To workaround this, Hyra
falls back to polling on these specific devices. Previously, Hyra did not
have DMI/SMBIOS capabilities and therefore had to rely on assuming *all*
Lenovo devices were "hostile". As of now since we are capable grabbing
the product version from DMI, we can target specific devices like the
T420s and this commit provides that logic.
This commit additionally implements logic to enable interrupts on PS/2
port 0 (aka the keyboard).
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Before the Hyra kernel starts up, the Limine bootloader creates a
mapping of the first 4 GiB of memory (identity mapped for base revisions
of zero and mapped to the HDDM on higher base revisions). However, it
usually will create a huge mapping over this which would be problematic
during remaps of device MMIO base addresses as they typically reside at
the 4 GiB region of RAM and as of this commit, huge pages are not a
supported feature of the Hyra AMD64 pmap layer.
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
The function md_td_kick() is only used for user threads and there is no
need reference any kernel segments. Furthermore, the previous code would
introduce a bug where rpl would always be 0.
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Allow the intr_hand structure to carry driver specific and interrupt
related data so that it can be passed to an interrupt handler when it
is invoked.
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
- Implement pmap_map()
- Implement pmap_unmap()
- Implement pmap_read_vas()
- Implement pmap_switch_vas()
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
- Add handle_exception() as higher level logic to handle the exceptions
- Simplify frame.h
- Call C handler in vector.S
- Clean up stack after creating frame
- Add register dump on exception
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
This change improves flexibility and allows for easy future integration
of the PCI Express Enhanced Configuration Access Mechanism (ECAM)
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
- Use pmap_update_tbl() to ensure that the TLB is flushed when caching
attributes are updated.
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Add an `alloc' paramater to pmap_update_tbl() to ensure that functions
like pmap_map() and pmap_unmap() have control over, whether or not to
allocate new page table entries. This is useful as unmapping memory does
not require new page table entries to be allocated and doing so anyways
may result in undefined behaviour such as hangs.
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
- Add prot var to keep track of flags to map with
- OR prot flags with PROT_USER if rpl is 3
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Add support for managing the page table entry dirty bit. This will allow
vm(9) to know when to page-out data to backing store, among other
things.
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
- Add DRIVER_DEFER() macro to schedule initialization
for lower priority drivers
- Expose `proc0' to the rest of the kernel
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
- Add USER_KMSG option to configure if kernel messages
should be logged in user contexts
- Add syslog_silence() to silence kernel messages in user
contexts if USER_KMSG is "yes"
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
* Switched to using macros for the GDT entry bits, to improve clarity
and make the code easier to modify. Also got rid of some junk values
in a few of the entries.
* Shrunk the GDT data array from 256 entries to 7 (GDT_ENTRY_COUNT)
since the GDT will only ever use 7 of the entries for now.
* Aligned the GDT using __cacheline_aligned, because the GDT entries
will be read every time a segment selector is loaded.
* Modified code dealing with the GDTR to just use `g_gdtr`, since the
same GDT/GDTR is always used.
* In `gdt_load()`, changed `eax` -> `ax`, since segment registers are
only 16 bits. Also replaced the `gdtr` to just use `g_gdtr`.
Additionally, used the inline assembly formatting to supply segment
selectors with KERNEL_CS/DS macros.
Signed-off-by: Quinn Stephens <quinn@osmora.org>
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Replace intr_alloc_vector() with a cleaner and more machine independent
intr_register()
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|