aboutsummaryrefslogtreecommitdiff
path: root/i386
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix non-PAE buildSamuel Thibault2023-10-021-1/+1
|
* copyinmsg: Check that we have not overflownSamuel Thibault2023-10-012-1/+2
| | | | | This if of course too late in case of a failure, but better assert than get awful bugs, and it's really not supposed to happen.
* com/lpr: Handle masking of interrupts in the driverDamien Zammit2023-10-012-8/+6
| | | | Message-Id: <20231001045755.95707-1-damien@zamaudio.com>
* kd: Handle masking of keyboard interrupt in the driverDamien Zammit2023-10-013-2/+8
| | | | Message-Id: <20231001045731.95682-1-damien@zamaudio.com>
* pmap: Factorize l4 base accessSamuel Thibault2023-10-011-2/+5
| | | | This also makes the code more coherent with other levels.
* ddb: Add whatis commandSamuel Thibault2023-10-011-0/+100
| | | | This is convenient when tracking buffer overflows
* ioapic: Add simple locking for non-atomic accessesDamien Zammit2023-09-301-0/+9
| | | | Message-Id: <20230930063032.75232-3-damien@zamaudio.com>
* ioapic: Detect version of IOAPIC for correct EOI handlingDamien Zammit2023-09-301-1/+14
| | | | Message-Id: <20230930063032.75232-2-damien@zamaudio.com>
* x86_64: Drop segments from thread statusSamuel Thibault2023-09-281-5/+5
| | | | They are useless on x86_64.
* x86_64: remove more unneeded segment selectors handling on full 64bitSamuel Thibault2023-09-281-0/+2
| | | | This follows aaa33bd1ef300380279d9e2875b61a7abaf2c88d
* percpu: simplify access in NCPUS==1 caseSamuel Thibault2023-09-272-2/+19
|
* percpu: active_stack with gsDamien Zammit2023-09-254-8/+9
| | | | Message-Id: <20230925002417.467022-1-damien@zamaudio.com>
* SMP: Fix setting up initial gdtSamuel Thibault2023-09-242-23/+28
| | | | | We cannot access cpu_id_lut from the initial AP state, so update the percpu segment after loading gdt.
* boothdr: Fix initial gdtSamuel Thibault2023-09-241-1/+2
|
* cpuboot: Also set up %gs for APSamuel Thibault2023-09-242-10/+73
| | | | So they can use it very early.
* boothdr: Do not bother computing precise limitSamuel Thibault2023-09-242-4/+2
| | | | | Computing it would be complex, and this is a temporary descriptor anyway.
* boothdr: Drop spurious limit fieldSamuel Thibault2023-09-241-1/+1
|
* Use fewer cpu_number_slow callsSamuel Thibault2023-09-242-2/+2
| | | | Now that gs is initialized early.
* percpu active_thread using gs segmentDamien Zammit2023-09-245-4/+5
| | | | | TESTED: As per previous commit Message-Id: <20230924052824.449219-4-damien@zamaudio.com>
* spl: Use gs to access CPU numberSamuel Thibault2023-09-241-8/+8
| | | | Now that it can be used early.
* boothdr: Also set up %gs for percpu accessSamuel Thibault2023-09-242-10/+61
| | | | So we can use it very early.
* start/switch_timer: Use CPU_NUMBERSamuel Thibault2023-09-241-2/+2
| | | | They are called from context that has gs initialized.
* percpu area using gs segmentDamien Zammit2023-09-2413-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 functionDamien Zammit2023-09-243-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 asmDamien Zammit2023-09-247-9/+8
| | | | Message-Id: <20230924052824.449219-2-damien@zamaudio.com>
* cpuboot: Use CPU_NUMBER_NO_STACK before stack is set upDamien Zammit2023-09-231-1/+1
| | | | Message-Id: <20230923105449.425849-1-damien@zamaudio.com>
* i386_btop/ptob/trunc/round_page: Fix PAE caseSamuel Thibault2023-08-281-4/+4
| | | | We need to extend to 64bit (or keep the 64bits) before shifting.
* pmap_phys_address: Fix castingSamuel Thibault2023-08-281-1/+1
| | | | | We need to extend the frame number to 64bit before converting to address.
* Fix crash at bootSamuel Thibault2023-08-284-0/+4
| | | | spl cannot be called before the clock is set up.
* pmap: Fix spurious pte release on 64bit and PAESamuel Thibault2023-08-281-2/+2
|
* Fix non-SMP buildSamuel Thibault2023-08-221-0/+1
|
* apic: Use cpuid to read the apic id for speedDamien Zammit2023-08-223-9/+25
| | | | Message-Id: <20230816014440.2322705-1-damien@zamaudio.com>
* kernel traps: Also print code and cr2Samuel Thibault2023-08-211-1/+1
|
* page segments: Fix more dma32/directmap inversionsSamuel Thibault2023-08-212-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 declarationSamuel Thibault2023-08-141-0/+3
|
* pmap+slab: Add more smoketestsSamuel Thibault2023-08-141-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 memorySamuel Thibault2023-08-141-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 macroSamuel Thibault2023-08-141-3/+4
|
* pmap: reserve last virtual pageSamuel Thibault2023-08-141-2/+2
| | | | So as to catch trying to dereference -1
* pmap: Add more debugging information when getting a null pv_listSamuel Thibault2023-08-141-1/+1
|
* pmap: Fix x32 PAE buildsSamuel Thibault2023-08-141-1/+2
|
* pmap: Fix coping with VM_MAX_USER_ADDRESS not being aligned on l4 limitSamuel Thibault2023-08-141-2/+4
| | | | It is however usually aligned on l3 limit.
* x86_64: Fix memory leak on pmap destructionSamuel Thibault2023-08-141-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 \tSamuel Thibault2023-08-131-0/+8
|
* x86_64: Do not disassemble instructionsSamuel Thibault2023-08-131-0/+6
| | | | The instruction set decoding needs an update, avoid showing bogus output.
* IPI: Do not include support when NCPUS=1Samuel Thibault2023-08-133-0/+8
|
* IPI: Rework irq names and fix x86_64 buildSamuel Thibault2023-08-136-14/+13
|
* i386/x86_64: Add remote AST via IPI mechanismDamien Zammit2023-08-138-3/+35
|
* simple lock: check that the non-_irq variants are not called from IRQSamuel Thibault2023-08-122-3/+19
|
* tty: Convert t_lock to using simple_lock_irqSamuel Thibault2023-08-121-10/+7
|