summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
10 daysinterrupt: simplify offsetting with irq numberHEADmasterSamuel Thibault
10 daysx86_64: Fix interrupt buildSamuel Thibault
Otherwise we get (.text+0x4014c): relocation truncated to fit: R_X86_64_32 against symbol `irqinfo' defined in .bss section in gnumach.o
10 daysinterrupt.S: Change interrupt EOI strategyDamien Zammit
We now have a different strategy for EOI depending on trigger mode: For edge triggered, the behaviour is unchanged; the eoi comes before the handler so we don't miss interrupts. For level triggered, the eoi comes after the handler since the high interrupt line will trigger the interrupt again and stack up, before we mask it in queue_intr (and we don't risk missing interrupts). Message-ID: <20250719074547.288203-1-damien@zamaudio.com>
10 daysioapic: Introduce irqinfo helper structDamien Zammit
Avoid reading the ioapic registers for vector and trigger mode, by introducing an O(1) memory lookup for these properties. Message-ID: <20250719064116.285288-2-damien@zamaudio.com>
12 daysirq: Print process name on irq handler setupSamuel Thibault
2025-07-13i386/configfrag: Make --enable-apic the default when linux groups are not ↵Samuel Thibault
enabled In practice this enables APIC by default for x86_64.
2025-07-12ioapic: Add conditional TMR bit in EOI (no-op)Damien Zammit
This code may be needed in the future, so add it in now but keep it disabled. The special EOI handling for interrupts may only need to be done for one kind of trigger mode.
2025-07-12ioapic: Make it clear that multiple ioapics don't quite work yetDamien Zammit
Message-ID: <20250712123404.20826-1-damien@zamaudio.com>
2025-07-12irq: make it clear what irq_lock protectsSamuel Thibault
2025-07-12i386/irq.c: Make irq nesting smp safeDamien Zammit
This avoids race condition with multiple devices raising interrupts simultaneously on the same IRQ and causing mask to fail. TESTED: on SMP and UP+apic gnumach, boots to console and receives a large file over rumpnet on debian hurd-i386. Message-ID: <20250711065607.208734-1-damien@zamaudio.com>
2025-07-10i386/smp.c: Change order of waiting for pending ICRDamien Zammit
We need to wait first for pending to clear before sending the IPI assert signal. Likewise, if we always do it this way, we don't need to wait for pending to clear afterward because next time we will wait again anyway. Deassert does not seem necessary according to Intel SDM Vol 3, which says an IPI is sent when ICR low is written. NB: This is not the same code as for STARTUP or INIT IPIs. Message-ID: <20250710101341.178343-2-damien@zamaudio.com>
2025-06-30trap: Fix printf formatSamuel Thibault
2025-06-27i386 intel read fault fixMilos Nikic
include the missing header, fix the warning. Message-ID: <20250625014727.40695-1-nikic.milos@gmail.com>
2025-06-24i386 kern: fix overflow in vm_object_print_part callMilos Nikic
The call to vm_object_print_part was passing 0ULL and ~0ULL for offset and size, respectively. These values are 64-bit (unsigned long long), which causes compiler warnings when building for 32-bit platforms where vm_offset_t and vm_size_t are typedefs of uintptr_t (i.e., unsigned int). This patch replaces those constants with 0 and UINTPTR_MAX, which match the expected types and avoid implicit conversion or overflow warnings. No functional change. Message-ID: <20250623235844.763-1-nikic.milos@gmail.com>
2025-06-24kdb: Fix printf format warning for phys_addr_tMilos Nikic
When building without PAE support, phys_addr_t is defined as unsigned long, but the kdb printf call uses %llx, which expects an unsigned long long. This triggers a -Wformat warning due to a type mismatch. Fix this by explicitly casting the phys_addr_t value to unsigned long long, ensuring the format string and argument type always match. This avoids build warnings while preserving existing type definitions. Message-ID: <20250624013544.842-1-nikic.milos@gmail.com>
2025-06-23i386: trap.c add prototype for handle_double_faultMilos Nikic
The handle_double_fault function is defined in trap.c and called from x86_64/locore.S, but lacked a prototype, triggering a compiler warning: 'no previous prototype for handle_double_fault'. This change adds a forward declaration at the top of trap.c to satisfy the compiler and clarify the function's external linkage. No functional changes.
2025-06-23i386 ldt.c make ldt_fill staticMilos Nikic
Compiler warns about it, and its only invoked from this file. Message-ID: <20250623190708.742-1-nikic.milos@gmail.com>
2025-06-22ioapic.c: Fix default polarity and trigger mode for irqsDamien Zammit
0-13 are on rising edge (legacy) 14-N are active-low level triggered. This allows for PIIX3 chipset to have working IDE, if we patch hurd/acpi to ignore buggy irq 9 response. Message-ID: <20250622073329.188167-1-damien@zamaudio.com>
2025-06-22tests: also disable stack protectorSamuel Thibault
Similarly to Makefile.am, otherwise when the host compiler enables it by default, we get undefined reference to `__stack_chk_fail_local'
2025-06-22Fix syntaxSamuel Thibault
2025-06-22tests: Also try to use mig as USER_MIG when not cross-buildingSamuel Thibault
2025-06-21smp: fix warningMilos Nikic
Reading lapic->error_status.r may have side effects, and we must preserve it. To avoid a compiler warning about err being unused, cast it to (void). This keeps the behavior intact while eliminating the warning. Message-ID: <20250619155105.8940-1-nikic.milos@gmail.com>
2025-06-21ktss: fix compiler warningsMilos Nikic
Fixing compiler warnings on ktss c-file. Some that only appear when building on 32 bit arch, some that happen regardless of architecture. Changes tested on the 32 bit build. Message-ID: <20250620212343.9385-1-nikic.milos@gmail.com>
2025-06-21lock_mon: clean lip/lis functionsMilos Nikic
The function lock_info_sort was defined as static and aliased via a macro to lis, requiring a forward declaration to be callable from lip(). This indirection served no functional purpose and made the code less readable and emitting a compiler (declared 'static' but never defined) warning. This change: - Removes the macro aliasing lock_info_sort to lis - Moves lock_info_sort before lip() to eliminate the need for a forward declaration - Updates the call in lip() to refer to lock_info_sort directly The result is a cleaner and more straightforward structure without changing behavior which also fixes a compiler warning. Message-ID: <20250620171458.8394-1-nikic.milos@gmail.com>
2025-06-17tests: Fix missing file cleanSamuel Thibault
2025-06-17tests: Fix make cleanSamuel Thibault
It was dropping the .c file when building inside the source tree
2025-06-16vm_page: Make sure to inspect internal page listMichael Kelly
notably when the external page list is not empty but vm_page_can_move returns false.
2025-06-12Make the swapin thread vm-privileged tooMichael Kelly
So it can be swapped in.
2025-06-09user32: Extend userland address space to 4GSamuel Thibault
glibc and hurd servers cope fine, and this allows to have more userland memory for very large builds.
2025-06-09db: Discard unsupported ansi sequencesSamuel Thibault
Similarly to 360d54234f76 ("kd: Discard unsupported ansi sequences"), we should discard unsupported ansi sequences in db input, notably the bracketed paste sequences.
2025-06-09kd: Discard more ansi sequencesSamuel Thibault
The full range between @ and ~ is defined to be potential ANSI sequences, so ignore them all.
2025-06-09test-mach_host.c: Add time testsSamuel Thibault
2025-06-09vm_allocate_contiguous: Avoid 64bit addresses for 32bit userlandSamuel Thibault
2025-06-08vm_object_pmap_remove: Also remove in the shadow objectMichael Kelly
Otherwise, when e.g. terminating tasks with shared mappings, some references remain within the pv_head_table to pmap_t objects that had already been destroyed.
2025-06-03thread_create: Inherit vm_privilege between threads of the same taskSamuel Thibault
So that e.g. all rumpdisk threads get vm_privilege
2025-06-03ddb: Print vm_privilege in thread stateSamuel Thibault
2025-05-29vm_page_seg_evict: Fix creating a pager for internal objects with DMMSamuel Thibault
fd63a4bbf6f2 ("vm_page: Avoid creating a pager in DMM when not double-paging") avoided crashes when we do not have a DMM and wish to evict an internal opbject. But the double_paging condition was too restrictive and prevented normal internal objects from paging out when we do have a DMM. This re-enables creating a pager when we do have a DMM, so internal objects can be paged out.
2025-05-29vm_page_seg_evict: Fix object pointer on restartMichael Kelly
The code further down depends on object being NULL if we goto out.
2025-05-12vm_page: Explain which we clear modify on migration of a non-dirty pageSamuel Thibault
2025-05-07vm: Add missing lockSamuel Thibault
2025-05-05Fix IRC network nameSamuel Thibault
2025-05-01Fix commentZhaoming Luo
We can have better resolution now so this comment can be removed. Message-ID: <20250501101346.537447-1-zhmingluo@163.com>
2025-04-29typoSamuel Thibault
2025-04-28test-thread-state-fp: Print mxcsrSamuel Thibault
2025-04-28tests: Fix copying filesSamuel Thibault
2025-04-28tests: Also support test kernel not being called gnumachSamuel Thibault
2025-04-28tests: make test-multiboot.in also take GNUMACH into accountSamuel Thibault
2025-04-28tests: Let user specify a kernel to testSamuel Thibault
2025-04-27kd: Discard unsupported ansi sequencesSamuel Thibault
"modern" software seem to like spitting sequences without checking for their support in terminfo, leading to various spurious output, see e.g. https://github.com/takluyver/bash_kernel/issues/107 Just drop anything we don't support, to avoid getting hit.
2025-04-21xen: Add hpclockSamuel Thibault