Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | com/lpr: Handle masking of interrupts in the driver | Damien Zammit | 2023-10-01 | 2 | -8/+6 |
| | | | | Message-Id: <20231001045755.95707-1-damien@zamaudio.com> | ||||
* | kd: Handle masking of keyboard interrupt in the driver | Damien Zammit | 2023-10-01 | 3 | -2/+8 |
| | | | | Message-Id: <20231001045731.95682-1-damien@zamaudio.com> | ||||
* | pmap: Factorize l4 base access | Samuel Thibault | 2023-10-01 | 1 | -2/+5 |
| | | | | This also makes the code more coherent with other levels. | ||||
* | ddb: Add whatis command | Samuel Thibault | 2023-10-01 | 1 | -0/+100 |
| | | | | This is convenient when tracking buffer overflows | ||||
* | ioapic: Add simple locking for non-atomic accesses | Damien Zammit | 2023-09-30 | 1 | -0/+9 |
| | | | | Message-Id: <20230930063032.75232-3-damien@zamaudio.com> | ||||
* | ioapic: Detect version of IOAPIC for correct EOI handling | Damien Zammit | 2023-09-30 | 1 | -1/+14 |
| | | | | Message-Id: <20230930063032.75232-2-damien@zamaudio.com> | ||||
* | x86_64: Drop segments from thread status | Samuel Thibault | 2023-09-28 | 1 | -5/+5 |
| | | | | They are useless on x86_64. | ||||
* | x86_64: remove more unneeded segment selectors handling on full 64bit | Samuel Thibault | 2023-09-28 | 1 | -0/+2 |
| | | | | This follows aaa33bd1ef300380279d9e2875b61a7abaf2c88d | ||||
* | percpu: simplify access in NCPUS==1 case | Samuel Thibault | 2023-09-27 | 2 | -2/+19 |
| | |||||
* | percpu: active_stack with gs | Damien Zammit | 2023-09-25 | 4 | -8/+9 |
| | | | | Message-Id: <20230925002417.467022-1-damien@zamaudio.com> | ||||
* | SMP: Fix setting up initial gdt | Samuel Thibault | 2023-09-24 | 2 | -23/+28 |
| | | | | | We cannot access cpu_id_lut from the initial AP state, so update the percpu segment after loading gdt. | ||||
* | boothdr: Fix initial gdt | Samuel Thibault | 2023-09-24 | 1 | -1/+2 |
| | |||||
* | cpuboot: Also set up %gs for AP | Samuel Thibault | 2023-09-24 | 2 | -10/+73 |
| | | | | So they can use it very early. | ||||
* | boothdr: Do not bother computing precise limit | Samuel Thibault | 2023-09-24 | 2 | -4/+2 |
| | | | | | Computing it would be complex, and this is a temporary descriptor anyway. | ||||
* | boothdr: Drop spurious limit field | Samuel Thibault | 2023-09-24 | 1 | -1/+1 |
| | |||||
* | Use fewer cpu_number_slow calls | Samuel Thibault | 2023-09-24 | 2 | -2/+2 |
| | | | | Now that gs is initialized early. | ||||
* | percpu active_thread using gs segment | Damien Zammit | 2023-09-24 | 5 | -4/+5 |
| | | | | | TESTED: As per previous commit Message-Id: <20230924052824.449219-4-damien@zamaudio.com> | ||||
* | spl: Use gs to access CPU number | Samuel Thibault | 2023-09-24 | 1 | -8/+8 |
| | | | | Now that it can be used early. | ||||
* | boothdr: Also set up %gs for percpu access | Samuel Thibault | 2023-09-24 | 2 | -10/+61 |
| | | | | So we can use it very early. | ||||
* | start/switch_timer: Use CPU_NUMBER | Samuel Thibault | 2023-09-24 | 1 | -2/+2 |
| | | | | They are called from context that has gs initialized. | ||||
* | percpu area using gs segment | Damien Zammit | 2023-09-24 | 13 | -31/+177 |
| | | | | | | | | | | | | | | | This speeds up smp again, by storing the struct processor in a percpu area and avoiding an expensive cpu_number every call of current_processor(), as well as getting the cpu_number by an offset into the percpu area. Untested on 64 bit and work remains to use other percpu arrays. TESTED: (NCPUS=8) -smp 1 boots to login shell ~2x slower than uniprocessor TESTED: (NCPUS=8) -smp 2 boots to INIT but hangs there TESTED: (NCPUS=8) -smp 4 gets stuck seemingly within rumpdisk and hangs TESTED: (NCPUS=1) uniprocessor is a bit faster than normal Message-Id: <20230924103428.455966-3-damien@zamaudio.com> | ||||
* | cpu_number: Inline widely used simple function | Damien Zammit | 2023-09-24 | 3 | -33/+8 |
| | | | | | | TESTED: on uniprocessor and smp, both behaved as normal. Message-Id: <20230924103428.455966-2-damien@zamaudio.com> | ||||
* | gdt: Cleanup gdt.h included in asm | Damien Zammit | 2023-09-24 | 7 | -9/+8 |
| | | | | Message-Id: <20230924052824.449219-2-damien@zamaudio.com> | ||||
* | cpuboot: Use CPU_NUMBER_NO_STACK before stack is set up | Damien Zammit | 2023-09-23 | 1 | -1/+1 |
| | | | | Message-Id: <20230923105449.425849-1-damien@zamaudio.com> | ||||
* | i386_btop/ptob/trunc/round_page: Fix PAE case | Samuel Thibault | 2023-08-28 | 1 | -4/+4 |
| | | | | We need to extend to 64bit (or keep the 64bits) before shifting. | ||||
* | pmap_phys_address: Fix casting | Samuel Thibault | 2023-08-28 | 1 | -1/+1 |
| | | | | | We need to extend the frame number to 64bit before converting to address. | ||||
* | Fix crash at boot | Samuel Thibault | 2023-08-28 | 4 | -0/+4 |
| | | | | spl cannot be called before the clock is set up. | ||||
* | pmap: Fix spurious pte release on 64bit and PAE | Samuel Thibault | 2023-08-28 | 1 | -2/+2 |
| | |||||
* | Fix non-SMP build | Samuel Thibault | 2023-08-22 | 1 | -0/+1 |
| | |||||
* | apic: Use cpuid to read the apic id for speed | Damien Zammit | 2023-08-22 | 3 | -9/+25 |
| | | | | Message-Id: <20230816014440.2322705-1-damien@zamaudio.com> | ||||
* | kernel traps: Also print code and cr2 | Samuel Thibault | 2023-08-21 | 1 | -1/+1 |
| | |||||
* | page segments: Fix more dma32/directmap inversions | Samuel Thibault | 2023-08-21 | 2 | -12/+22 |
| | | | | | We need to make sure segments are in addresses order, and avoid returning dma32 memory when it's not actually within directmap memory. | ||||
* | pmap: Add missing declaration | Samuel Thibault | 2023-08-14 | 1 | -0/+3 |
| | |||||
* | pmap+slab: Add more smoketests | Samuel Thibault | 2023-08-14 | 1 | -4/+8 |
| | | | | | Checking the range of addresses for operations on the kernel_pmap is quite cheap, and allows to catch oddities quite early enough. | ||||
* | pmap: Fix mayhem when releasing near the end of virtual memory | Samuel Thibault | 2023-08-14 | 1 | -2/+2 |
| | | | | | | l is used to skip over the area mapped by a whole pde. It was clipped to e, but if e is already near the end of virtual memory, l will wrap-around to 0, and mayhem entails. | ||||
* | pmap: Add MAPWINDOW_SIZE macro | Samuel Thibault | 2023-08-14 | 1 | -3/+4 |
| | |||||
* | pmap: reserve last virtual page | Samuel Thibault | 2023-08-14 | 1 | -2/+2 |
| | | | | So as to catch trying to dereference -1 | ||||
* | pmap: Add more debugging information when getting a null pv_list | Samuel Thibault | 2023-08-14 | 1 | -1/+1 |
| | |||||
* | pmap: Fix x32 PAE builds | Samuel Thibault | 2023-08-14 | 1 | -1/+2 |
| | |||||
* | pmap: Fix coping with VM_MAX_USER_ADDRESS not being aligned on l4 limit | Samuel Thibault | 2023-08-14 | 1 | -2/+4 |
| | | | | It is however usually aligned on l3 limit. | ||||
* | x86_64: Fix memory leak on pmap destruction | Samuel Thibault | 2023-08-14 | 1 | -4/+7 |
| | | | | | | We do need to go through the whole page table, to release the pdpt-s and pdet-s that map the kernel. Only the ptpt-s that map the kernel are shared between tasks. | ||||
* | immc: Add support for \r and \t | Samuel Thibault | 2023-08-13 | 1 | -0/+8 |
| | |||||
* | x86_64: Do not disassemble instructions | Samuel Thibault | 2023-08-13 | 1 | -0/+6 |
| | | | | The instruction set decoding needs an update, avoid showing bogus output. | ||||
* | IPI: Do not include support when NCPUS=1 | Samuel Thibault | 2023-08-13 | 3 | -0/+8 |
| | |||||
* | IPI: Rework irq names and fix x86_64 build | Samuel Thibault | 2023-08-13 | 6 | -14/+13 |
| | |||||
* | i386/x86_64: Add remote AST via IPI mechanism | Damien Zammit | 2023-08-13 | 8 | -3/+35 |
| | |||||
* | simple lock: check that the non-_irq variants are not called from IRQ | Samuel Thibault | 2023-08-12 | 2 | -3/+19 |
| | |||||
* | tty: Convert t_lock to using simple_lock_irq | Samuel Thibault | 2023-08-12 | 1 | -10/+7 |
| | |||||
* | pmap: Make pmap_protect sparse-pde aware | Samuel Thibault | 2023-08-12 | 1 | -4/+3 |
| | | | | | | 222020cff440 ("pmap: dynamically allocate the whole user page tree map") made the pde array sparse, but missed updating pmap_protect accordingly: we have to re-lookup for the pde on each PDE_MAPPED_SIZE section. | ||||
* | x86_64: don't bother printing function arguments | Samuel Thibault | 2023-08-12 | 1 | -0/+5 |
| | | | | They are in registers, and most probably very quickly overwritten. |