Re: Upgrade rumpkernel package to rump 10.99.12

2025-02-03 Thread Damien Zammit via Bug reports for the GNU Hurd
droid Original Message On 4/2/25 11:01 am, Almudena Garcia wrote: > This is awesome!! How can I test rumpusbdisk? > > El lun, 3 feb 2025 a las 21:32, Samuel Thibault () > escribió: > >> Hello, >> >> Damien Zammit via Bug reports for the GNU Hurd, le

[PATCH hurd] rumpusbdisk: Link completely to scsipi library

2025-01-11 Thread Damien Zammit via Bug reports for the GNU Hurd
The usb stack also uses SCSI emulation for usb mass storage. --- rumpdisk/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rumpdisk/Makefile b/rumpdisk/Makefile index e7f53511..cbe93845 100644 --- a/rumpdisk/Makefile +++ b/rumpdisk/Makefile @@ -17,7 +17,7 @@ RUMPLIB

Upgrade rumpkernel package to rump 10.99.12

2025-01-10 Thread Damien Zammit via Bug reports for the GNU Hurd
Hi, I would like to suggest the following upgrade of rump to be on par with my "develop" branch[1]. The patches would need to be fetched from my branch directly because there is a very large changeset in the NetBSD upstream update commit. The main thing is upgrading rump from 9.99.x to 10.99.x

Re: [PATCH hurd] rumpdisk: Try to reduce memory usage

2024-12-28 Thread Damien Zammit via Bug reports for the GNU Hurd
On 12/29/24 8:56 AM, Samuel Thibault wrote: > Damien Zammit via Bug reports for the GNU Hurd, le sam. 28 déc. 2024 06:39:04 > +, a ecrit: >> + setenv ("RUMP_MEMLIMIT", "16m", 1); > Did you test this a lot? > > We'd probably want to disable rump-

[PATCH v2 hurd] pci-arbiter: Fix long standing bug with PCI access

2024-12-27 Thread Damien Zammit via Bug reports for the GNU Hurd
Proxied memory was not rounded up to page size, causing error with vm_map'ing the underlying memory. WARNING: Assumes pci memory resources are at least page aligned. If not, this will expose part of next resource to userspace. --- pci-arbiter/netfs_impl.c | 8 +++- 1 file changed, 7 inserti

[PATCH v2 hurd] acpi: Better error handling on S_acpi_get_pci_irq

2024-12-27 Thread Damien Zammit via Bug reports for the GNU Hurd
Return positive error code when return value indicates error. --- acpi/acpi-ops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/acpi/acpi-ops.c b/acpi/acpi-ops.c index 47f7e3d2..16d96e71 100644 --- a/acpi/acpi-ops.c +++ b/acpi/acpi-ops.c @@ -84,7 +84,7 @@ S_acpi_get_pci_irq

[PATCH hurd] rumpdisk: Try to reduce memory usage

2024-12-27 Thread Damien Zammit via Bug reports for the GNU Hurd
--- rumpdisk/main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/rumpdisk/main.c b/rumpdisk/main.c index ca166274..ca9deea1 100644 --- a/rumpdisk/main.c +++ b/rumpdisk/main.c @@ -123,6 +123,8 @@ main (int argc, char **argv) setenv ("RUMP_NCPU", "1", 1); setenv ("RUMP_VERBOSE", "1"

[PATCH hurd] rumpdisk: Deallocate buffers in write during failure paths

2024-12-27 Thread Damien Zammit via Bug reports for the GNU Hurd
--- rumpdisk/block-rump.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/rumpdisk/block-rump.c b/rumpdisk/block-rump.c index cd7af494..8a3a404a 100644 --- a/rumpdisk/block-rump.c +++ b/rumpdisk/block-rump.c @@ -373,6 +373,7 @@ rumpdisk_device_write (void *d, mach_port_t reply_port,

[PATCH hurd] pci-arbiter: Fix long standing bug with PCI access

2024-12-27 Thread Damien Zammit via Bug reports for the GNU Hurd
Proxied memory was not rounded up to page size, causing error with vm_map'ing the underlying memory. WARNING: Could be security risk if assumption is incorrect: Assumes start of all pci memory resources are at least page aligned. --- pci-arbiter/netfs_impl.c | 11 ++- 1 file changed, 10

[PATCH hurd] acpi: Better error handling on S_acpi_get_pci_irq

2024-12-27 Thread Damien Zammit via Bug reports for the GNU Hurd
This internal function acpi_get_irq_number() returns negative for error, otherwise returns valid IRQ. --- acpi/acpi-ops.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/acpi/acpi-ops.c b/acpi/acpi-ops.c index 1aaec10c..16d96e71 100644 --- a/acpi/acpi-ops.c +++ b/acpi

[PATCH gnumach] i386/irq: Add missing enumeration for high interrupts

2024-12-27 Thread Damien Zammit via Bug reports for the GNU Hurd
Because we support up to 64 irqs with 2 IOAPICs. --- i386/i386/irq.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/i386/i386/irq.c b/i386/i386/irq.c index 3c2f1748..91318f67 100644 --- a/i386/i386/irq.c +++ b/i386/i386/irq.c @@ -65,7 +65,9 @@ __enable_irq (irq_t irq_nr)

[PATCH v2 1/1 libacpica] acpi_init: Get pci root port handle \_SB.PCI0 directly

2024-12-27 Thread Damien Zammit via Bug reports for the GNU Hurd
This mostly fixes the numbering of IRQs when requested. This now works on an old AMD board with broken _CRS. It requests the possible irqs from _PRS and generates a valid _SRS request to set the one from the end of the list. v2: It also no longer errors on a valid _CRS. --- debian/patches/acpi-i

[PATCH 2/2 libacpica] acpi_init: Get pci root port handle \_SB.PCI0 directly

2024-12-27 Thread Damien Zammit via Bug reports for the GNU Hurd
This mostly fixes the numbering of IRQs when requested. This now works on an old AMD board with broken _CRS. It requests the possible irqs from _PRS and generates a valid _SRS request to set the one from the end of the list. Note that acpi translator can only be used with gnumach that has been com

[PATCH 1/2 libacpica] acpi_init: Match resources on function 0xffff

2024-12-27 Thread Damien Zammit via Bug reports for the GNU Hurd
This ensures the resources are correct when matching. Resources are always all ones in the function field as they apply to all functions of a device. --- debian/patches/acpi-init-files.diff | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/debian/patches/acpi-init-files

[PATCH 0/2 libacpica] Mostly fix acpi_get_irq_number()

2024-12-27 Thread Damien Zammit via Bug reports for the GNU Hurd
This allows rumpdisk to probe correctly on machines with broken LNKx._CRS methods by selecting a valid irq from _PRS possible resources and calling the _SRS method to set the irq. Somehow this fix is not working on some intel machines, but makes rump_init() get further than before during probe.

[PATCH v4 0/3 gnumach] SMP on AMD and qemu

2024-12-21 Thread Damien Zammit via Bug reports for the GNU Hurd
Hi, I addressed the comments in v3. This is v4. I was unable to locate documentation for correct STARTUP IPI mode, but I tested this series on both AMD fam15h and qemu and it boots. Damien

[PATCH v4 1/3 gnumach] smp: Parallel SMP init

2024-12-21 Thread Damien Zammit via Bug reports for the GNU Hurd
Now that things are in place, we switch to parallel init. The key to this change is that the INIT/STARTUP sequence is done in one step, and all cpus wake up at the same time. Synchronisation is done via waiting for individual flags stored in separate memory locations. --- i386/i386/apic.h| 4

[PATCH v4 3/3 gnumach] apic: Add extended feature registers for local apic unit

2024-12-21 Thread Damien Zammit via Bug reports for the GNU Hurd
Add workaround for broken systems that advertise 8 bit APIC ids but only match IPIs on 4 bits of the APIC id. --- i386/i386/apic.c | 28 +++- i386/i386/apic.h | 15 ++- i386/i386/cpu_number.h| 3 +++ i386/i386/cpuboot.S

[PATCH v4 2/3 gnumach] smp: Use deassert for startup IPI not assert

2024-12-21 Thread Damien Zammit via Bug reports for the GNU Hurd
Fixes ESR==0x8 error on AMD fam15h. Fixed timings. Cannot locate documentation on correct mode for STARTUP IPI, but this patch works on AMD hw and qemu. --- i386/i386/smp.c | 62 +++-- 1 file changed, 40 insertions(+), 22 deletions(-) diff --git a/i386

Re: [PATCH v3 1/4 gnumach] cpuboot: Fix percpu apboot_gdt for early gs

2024-12-21 Thread Damien Zammit via Bug reports for the GNU Hurd
On 12/22/24 11:35 AM, Samuel Thibault wrote: > This is quite verbose. Could you check that the attached patch on top of > it still works? > > Samuel Your patch works and is much more readable. Thanks, Damien

[PATCH v3 1/4 gnumach] cpuboot: Fix percpu apboot_gdt for early gs

2024-12-21 Thread Damien Zammit via Bug reports for the GNU Hurd
This allocates a constant space for percpu gdts and copies the first entry to the nth entry on each cpu, then patches its own copy of the gdt so it can function independently. --- i386/i386/cpuboot.S | 63 ++--- 1 file changed, 53 insertions(+), 10 deletions

[PATCH v3 4/4 gnumach] apic: Add extended feature registers for local apic unit

2024-12-21 Thread Damien Zammit via Bug reports for the GNU Hurd
Add workaround for broken systems that advertise 8 bit APIC ids but only match IPIs on 4 bits of the APIC id. --- i386/i386/apic.c | 28 +++- i386/i386/apic.h | 15 ++- i386/i386/cpu_number.h| 3 +++ i386/i386/cpuboot.S

[PATCH v3 0/4 gnumach] SMP now works on AMD processor

2024-12-21 Thread Damien Zammit via Bug reports for the GNU Hurd
Hi, The first two patches are exactly v2, but I have added two more that make SMP functional on my AMD fam15h processor. Thanks, Damien

[PATCH v3 3/4 gnumach] smp: Use deassert for startup IPI not assert

2024-12-21 Thread Damien Zammit via Bug reports for the GNU Hurd
Fixes ESR==0x8 error on AMD fam15h. Fixed timings. --- i386/i386/smp.c | 62 +++-- 1 file changed, 40 insertions(+), 22 deletions(-) diff --git a/i386/i386/smp.c b/i386/i386/smp.c index befa0510..e3e4cc82 100644 --- a/i386/i386/smp.c +++ b/i386/i386/smp

[PATCH v3 2/4 gnumach] smp: Parallel SMP init

2024-12-21 Thread Damien Zammit via Bug reports for the GNU Hurd
Now that things are in place, we switch to parallel init. The key to this change is that the INIT/STARTUP sequence is done in one step, and all cpus wake up at the same time. Synchronisation is done to complete each cpu setup individually. --- i386/i386/mp_desc.c | 51 +++--

Re: [PATCH v2 2/2 gnumach] smp: Parallel SMP init

2024-12-20 Thread Damien Zammit via Bug reports for the GNU Hurd
h not matching the width of the APIC id.  Does anyone know how this works? Thanks, Damien On 12/17/24 11:05 PM, Damien Zammit via Bug reports for the GNU Hurd wrote: > Now that things are in place, we switch to parallel init. > The key to this change is that the INIT/STARTUP sequence > is do

[PATCH gnumach] acpi_parse_apic: Check CAPABLE bit field on lapic MADT flag

2024-12-20 Thread Damien Zammit via Bug reports for the GNU Hurd
Previously, we were ignoring cpus that were not enabled but online-capable. --- i386/i386at/acpi_parse_apic.c | 2 +- i386/i386at/acpi_parse_apic.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/i386/i386at/acpi_parse_apic.c b/i386/i386at/acpi_parse_apic.c index 24470426..ae

[PATCH v2 2/2 gnumach] smp: Parallel SMP init

2024-12-17 Thread Damien Zammit via Bug reports for the GNU Hurd
Now that things are in place, we switch to parallel init. The key to this change is that the INIT/STARTUP sequence is done in one step, and all cpus wake up at the same time. Synchronisation is done to complete each cpu setup individually. --- i386/i386/mp_desc.c | 51 +++--

[PATCH v2 1/2 gnumach] cpuboot: Fix percpu apboot_gdt for early gs

2024-12-17 Thread Damien Zammit via Bug reports for the GNU Hurd
This allocates a constant space for percpu gdts and copies the first entry to the nth entry on each cpu, then patches its own copy of the gdt so it can function independently. --- i386/i386/cpuboot.S | 63 ++--- 1 file changed, 53 insertions(+), 10 deletions

[PATCH v2 0/2 gnumach] Parallel SMP init with early gs access

2024-12-17 Thread Damien Zammit via Bug reports for the GNU Hurd
Hi, These two patches complete smp parallel init by preserving early gs access, and makes the cpus all wake concurrently. Care has been taken so memory is not trampled on by other cpus during startup. Thanks, Damien

[PATCH 4/5 gnumach] smp: Make sure BSP is cpu 0 when starting other cpus

2024-12-09 Thread Damien Zammit via Bug reports for the GNU Hurd
This is basically a no-op but ensures we are doing smp bringup correctly. --- i386/i386/mp_desc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/i386/i386/mp_desc.c b/i386/i386/mp_desc.c index 7595eb1e..295fccc7 100644 --- a/i386/i386/mp_desc.c +++ b/i386/i386/mp_desc.c @@

[PATCH 3/5 gnumach] smp: Delay setting spl_init flag until after smp bringup

2024-12-09 Thread Damien Zammit via Bug reports for the GNU Hurd
If this is not done, the spl code is called by kmsg_putchar on APs during printing of bringup debug, causing the only unnecessary early access of GS. --- i386/i386/mp_desc.c | 3 ++- i386/i386at/model_dep.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/i386/i386/mp_de

[PATCH 5/5 gnumach] smp: Parallel SMP init

2024-12-09 Thread Damien Zammit via Bug reports for the GNU Hurd
Now that things are in place, we switch to parallel init. The key to this change is that the INIT/STARTUP sequence is done in one step, and all cpus wake up at the same time. Synchronisation is done to complete each cpu setup individually. --- i386/i386/mp_desc.c | 51 +++--

[PATCH 2/5 gnumach] smp: Remove early GS access

2024-12-09 Thread Damien Zammit via Bug reports for the GNU Hurd
Since the gdt for apboot is located at a shared location in memory, we cannot patch the gdt values per cpu during parallel smp init, or havoc entails. --- i386/i386/cpuboot.S | 75 + i386/i386/mp_desc.c | 6 ++-- 2 files changed, 11 insertions(+), 70 de

[PATCH 1/5 gnumach] i386/apic: Fix logical id numbering

2024-12-09 Thread Damien Zammit via Bug reports for the GNU Hurd
The number is actually a mask bit per cpu. --- i386/i386/apic.c | 2 +- i386/i386/apic.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/i386/i386/apic.c b/i386/i386/apic.c index 7ec8c49b..e0941c6a 100644 --- a/i386/i386/apic.c +++ b/i386/i386/apic.c @@ -337,7 +337,7 @@ lapi

[PATCH 0/5 gnumach] smp: Parallel SMP init

2024-12-09 Thread Damien Zammit via Bug reports for the GNU Hurd
Hi, I figured out what was broken in my previous attempt at this: The APs were calling splhigh() in the debug printing code, which caused an unnecessary GS segment access. This should now support all x86 cpus with any core counts. Every 8 processors are grouped into the same IPI group, so on oc

[PATCH 6/6 gnumach] i386/apic: Fix condition on non-BSP

2024-12-09 Thread Damien Zammit via Bug reports for the GNU Hurd
The condition was intended for non-BSP processors to disable timer, but apic_id != 0 means it could affect BSP if its apic id is non-zero. Fixes this bug. --- i386/i386/apic.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/i386/i386/apic.c b/i386/i386/apic.c index 41b335

[PATCH 5/6 gnumach] smp: Use logical destination not physical apic id

2024-12-09 Thread Damien Zammit via Bug reports for the GNU Hurd
Since modern x86 cpus only support 4 bits of destination field in ICR, we could only address up to 16 processors, assuming their physical APIC ID was < 0x10. Some processors eg AMD fam15h have physical apic ids starting at 0x10 but only support 4 bits. So these lapics are unaddressable using physi

[PATCH 2/6 gnumach] i386/cpuboot: Dont use CPU_NUMBER_NO_STACK() early

2024-12-09 Thread Damien Zammit via Bug reports for the GNU Hurd
Since we just set up the gs segment, we can use CPU_NUMBER instead of CPU_NUMBER_NO_STACK. --- i386/i386/cpuboot.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/i386/i386/cpuboot.S b/i386/i386/cpuboot.S index 9ac86845..09855864 100644 --- a/i386/i386/cpuboot.S +++ b/i386/i386

[PATCH 4/6 gnumach] pmap: Separate temporary_mapping from set_page_dir

2024-12-09 Thread Damien Zammit via Bug reports for the GNU Hurd
Prepare for smp parallel init where we want to call these two functions on different cpus at different times. --- i386/i386/mp_desc.c | 1 + i386/i386at/model_dep.c | 1 + i386/intel/pmap.c | 2 -- 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/i386/i386/mp_desc.c b/i386

[PATCH 0/6 gnumach] Preparation for parallel SMP init

2024-12-09 Thread Damien Zammit via Bug reports for the GNU Hurd
Hi, This patchset consists of 6 patches that have been tested **not** to break both smp and non-smp systems, but get us closer to having smp working fully. The rationale for going with parallel init for smp is that APICs are not individually addressible for more than 8 cpus (in logical mode) or

[PATCH 3/6 gnumach] i386/cpuboot: Write gs selector correctly

2024-12-09 Thread Damien Zammit via Bug reports for the GNU Hurd
To make selectors work reliably, we need to write zero to it before writing its final value. --- i386/i386/cpuboot.S | 2 ++ 1 file changed, 2 insertions(+) diff --git a/i386/i386/cpuboot.S b/i386/i386/cpuboot.S index 09855864..f549a2bc 100644 --- a/i386/i386/cpuboot.S +++ b/i386/i386/cpuboot.S @

[PATCH 1/6 gnumach] i386/cpuboot: Simplify for legibility

2024-12-09 Thread Damien Zammit via Bug reports for the GNU Hurd
The current segmentation already adds -KERNELBASE. But only when accessing the memory. Don't forget to reload gdt. --- i386/i386/cpuboot.S | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/i386/i386/cpuboot.S b/i386/i386/cpuboot.S index 7e6c4770..9ac86845 100644 --- a

[PATCH gnumach] mp_desc: Add assert for AP having non-zero cpu number

2024-12-07 Thread Damien Zammit via Bug reports for the GNU Hurd
Non-master processors cannot have cpu_number() == 0. The synchronisation fails hard if the cpu number is wrong. Alert the condition if this is the case. (On AMD fam15h, this assert currently fails, but I haven't been able to boot it with smp yet either). --- i386/i386/mp_desc.c | 3 +++ 1 file c

[PATCH v2 gnumach] fpu: Fix for cpus that have no fxsave instruction

2024-12-04 Thread Damien Zammit via Bug reports for the GNU Hurd
Fallthrough was incorrectly using fxsave() instead of xsave() or xsaveopt(). TESTED: on AMD fam15h: no longer throws "No coprocessor" exception. --- i386/i386/fpu.c | 18 +- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/i386/i386/fpu.c b/i386/i386/fpu.c index 3d146

[PATCH gnumach] fpu: Fix for cpus that have no fxsave instruction

2024-12-04 Thread Damien Zammit via Bug reports for the GNU Hurd
Fallthrough was incorrectly using fxsave() instead of xsave() or xsaveopt(). TESTED: on AMD fam15h: no longer throws "No coprocessor" exception. --- i386/i386/fpu.c | 4 1 file changed, 4 insertions(+) diff --git a/i386/i386/fpu.c b/i386/i386/fpu.c index 3d146f71..203de993 100644 --- a/i386

[PATCH v2 hurd] sutils: Add smp tool to run process on slave processors

2024-11-26 Thread Damien Zammit via Bug reports for the GNU Hurd
Until we make gnumach fully parallel, we need a way to execute on slave processor set on smp-enabled gnumach. For example: $ /sbin/smp /bin/bash $ will launch a shell that executes commands only within slave pset, consisting of all processors except processor 0. We can thus test

[PATCH hurd] sutils: Add smp tool for running a process on slave processors

2024-11-25 Thread Damien Zammit via Bug reports for the GNU Hurd
Until we make gnumach fully parallel, we need a way to execute on slave processor set on smp-enabled gnumach. For example: $ /sbin/smp /bin/bash $ will launch a shell that executes commands only within slave pset, consisting of all processors except processor 0. We can thus test

[PATCH hurd] acpi: Link with irqhelp

2024-11-25 Thread Damien Zammit via Bug reports for the GNU Hurd
--- acpi/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/acpi/Makefile b/acpi/Makefile index ceccb351e..6e91e980f 100644 --- a/acpi/Makefile +++ b/acpi/Makefile @@ -27,7 +27,7 @@ SRCS = main.c netfs_impl.c acpi.c \ MIGSRCS= OBJS = $(patsub

[PATCH gnumach] device/intr: Account for interrupts that could not be delivered

2024-11-23 Thread Damien Zammit via Bug reports for the GNU Hurd
When an irq handler dies, we are decrementing the n_unacked count and calling __enable_irq() the right number of times, but we need to decrement the total interrupt count by the number that were lost and also clear that number. This fixes a hang when a shared irq handler quits and leaves some unac

Re: T60 poweroff command hang at halting Hurd...

2024-11-10 Thread Damien Zammit via Bug reports for the GNU Hurd
Please read the mailing list. I just fixed this bug and it was merged. Thanks, Damien Sent from Proton Mail mobile Original Message On 11 Nov 2024, 1:13 pm, Zhaoming Luo < zhming...@163.com> wrote: On 11/10/24 11:29 PM, jbra...@dismail.de wrote: > November 9, 2024 at 10:10 PM,

[PATCH 0/2 hurd] Fix shutdown mechanism via ACPI

2024-11-10 Thread Damien Zammit via Bug reports for the GNU Hurd
Hi, This addresses the bug that shutdown does not work correctly since ACPI server was introduced: Firstly, the acpi server needs to not exit when notified of shutdown, so that it can serve the S_acpi_sleep() RPC to halt the machine. Second, a workaround for netfs not running on libmachdev path;

[PATCH 2/2 hurd] shutdown: Try mach device acpi before /servers/acpi

2024-11-10 Thread Damien Zammit via Bug reports for the GNU Hurd
Since libmachdev cannot currently serve netfs as well as trivfs on a path, we need to allow connecting to the bootstrapped acpi server to shut down the machine. --- shutdown/shutdown.c | 22 +- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/shutdown/shutdown.c b

[PATCH 1/2 hurd] acpi, libmachdev: Add _forever variant of trivfs server loop

2024-11-10 Thread Damien Zammit via Bug reports for the GNU Hurd
The acpi server needs to survive after the shutdown notification, so it can serve S_acpi_sleep() RPC to actually shut down the machine. Therefore we need to keep the server alive and not respond to the trivfs goaway request. --- acpi/main.c| 4 ++-- libmachdev/machdev.h | 1

Re: [RFC: drm server] limitations of MiG for ioctls

2024-11-04 Thread Damien Zammit via Bug reports for the GNU Hurd
Hi, On 11/5/24 6:16 PM, Yuqian Yang wrote: > In conclusion, there is no way to do things like using a pointer to pass > data pointed by it in Mach. I can understand this is rooted in Mach > design. This does create problems of mimicking API in Linux to reuse a > lot of high-level things. At least

[RFC: drm server] limitations of MiG for ioctls

2024-11-03 Thread Damien Zammit via Bug reports for the GNU Hurd
Hi, I am currently attempting to implement a drm server to provide a way to use libdrm with multiboot framebuffer exposed by new device(mbinfo). I am running into a problem that I am unable to implement a compatible ioctl api because of the layout of the structures. I would prefer to reuse the s

[PATCH v2 2/3 hurd] console-client: Add graphical console video passthrough

2024-10-28 Thread Damien Zammit
When bootloader sets a linear framebuffer mode and passes the required info to Hurd via multiboot info table, we can use this framebuffer as is. Otherwise, fall back to EGA text mode as before. This is just the new framebuffer code as a separate commit. --- console-client/fb.c | 638

[PATCH v2 1/3 hurd] xkb: Fix delete key in console

2024-10-28 Thread Damien Zammit
Adding the missing NULL sentinel pointer allows delete key to function without crashing pc_kbd driver. --- console-client/xkb/xkb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/console-client/xkb/xkb.c b/console-client/xkb/xkb.c index 31253f5c..8759c8bf 100644 --- a/console-

[PATCH v2 3/3 hurd] console-client: Enable switching to gfx console when available

2024-10-28 Thread Damien Zammit
This compiles in and enables the new framebuffer codepath in the vga driver, if detected. --- console-client/Makefile | 3 ++- console-client/vga.c| 48 +++-- 2 files changed, 39 insertions(+), 12 deletions(-) diff --git a/console-client/Makefile b/consol

[PATCH 1/2 hurd] console-client: Add graphical console video passthrough

2024-10-27 Thread Damien Zammit
When bootloader sets a linear framebuffer mode and passes the required info to Hurd via multiboot info table, we can use this framebuffer as is. Otherwise, fall back to EGA text mode as before. --- console-client/Makefile | 3 +- console-client/fb.c | 601 ++

[PATCH 2/2 hurd] xkb: Fix delete key in graphical console

2024-10-27 Thread Damien Zammit
Commenting out this block of code allows delete key to function without crashing pc_kbd driver. --- console-client/xkb/xkb.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/console-client/xkb/xkb.c b/console-client/xkb/xkb.c index 31253f5c..08b875c9 100644 --- a/console-client/xkb/xkb.c +++

[PATCH 0/2 hurd] VGA graphical console-client

2024-10-27 Thread Damien Zammit
This rather largish patch provides a graphical console mode of vga console-client driver. It can be enabled by default if we patch gnumach video preference to linear framebuffer mode in boothdr.S (multiboot header). Merging this patchset should not change default EGA text mode in QEMU, in case us

[PATCH v2 gnumach] Expose device(mbinfo) with read access to multiboot raw info

2024-10-27 Thread Damien Zammit
--- i386/Makefrag.am| 2 ++ i386/i386at/conf.c | 8 +++ i386/i386at/mbinfo.c| 49 + i386/i386at/mbinfo.h| 33 +++ i386/i386at/model_dep.c | 3 +++ 5 files changed, 95 insertions(+) create mode 100644 i386/

[PATCH 3/3] Expose device(mbinfo) with read access to multiboot info

2024-10-23 Thread Damien Zammit
This adds a new mach device called mbinfo that exposes the multiboot information to userspace. --- i386/Makefrag.am| 2 ++ i386/i386at/conf.c | 8 +++ i386/i386at/mbinfo.c| 53 + i386/i386at/mbinfo.h| 35 ++

[PATCH 2/3] multiboot: Support graphic mode preferences

2024-10-23 Thread Damien Zammit
This change forces multiboot loader to provide video mode info and also sets the preferred video mode to EGA text to ensure existing console behaviour still works. When support for graphical consoles is provided, we can change the preferred mode to linear framebuffer. --- i386/i386at/boothdr.S

[PATCH 1/3] multiboot v1: Add video framebuffer info

2024-10-23 Thread Damien Zammit
--- i386/include/mach/i386/multiboot.h | 72 ++ 1 file changed, 72 insertions(+) diff --git a/i386/include/mach/i386/multiboot.h b/i386/include/mach/i386/multiboot.h index c3538c1f..87bcd595 100644 --- a/i386/include/mach/i386/multiboot.h +++ b/i386/include/mach/i386/

[PATCH hurd] irqhelp: Add name of library to log_error messages

2024-10-22 Thread Damien Zammit
--- libirqhelp/irqhelp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libirqhelp/irqhelp.c b/libirqhelp/irqhelp.c index 814fd71c..903339a3 100644 --- a/libirqhelp/irqhelp.c +++ b/libirqhelp/irqhelp.c @@ -36,7 +36,7 @@ #include #define IRQ_THREAD_PRIORITY2 -#define l

[PATCH v2 hurd] irqhelp: Dont bail when cannot connect to acpi

2024-10-22 Thread Damien Zammit
As the acpi translator requires libirqhelp, we cannot fail when libirqhelp cannot connect to acpi translator, break the egg/chicken. acpi translator will only call the irqhelp api with fixed gsi during startup, so won't require itself to be started yet. --- libirqhelp/irqhelp.c | 17 -

[PATCH 2/2 hurd] acpi: Link to libirqhelp

2024-10-20 Thread Damien Zammit
This change is required when the libacpica library is updated to link with hurd library irqhelp. --- acpi/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/acpi/Makefile b/acpi/Makefile index ceccb351..6e91e980 100644 --- a/acpi/Makefile +++ b/acpi/Makefile @@ -27,7 +27,

[PATCH gnumach] ioapic: Initially mask all IRQs individually

2024-10-20 Thread Damien Zammit
This fixes a spurious intnull(9) from occurring on real hardware during ACPI startup when compiled with --enable-apic --- i386/i386at/ioapic.c | 9 + 1 file changed, 9 insertions(+) diff --git a/i386/i386at/ioapic.c b/i386/i386at/ioapic.c index 2553a2c9..845d1249 100644 --- a/i386/i386at

[PATCH 1/2 libacpica] irqhelp: Add interrupt handler registration support

2024-10-20 Thread Damien Zammit
--- debian/patches/acgnu.diff | 34 ++--- debian/patches/acpi-init-files.diff | 8 ++- debian/patches/add-makefile.diff| 2 +- 3 files changed, 39 insertions(+), 5 deletions(-) diff --git a/debian/patches/acgnu.diff b/debian/patches/acgnu.diff index e7f

[PATCH hurd] irqhelp: Dont bail when cannot connect to acpi

2024-10-20 Thread Damien Zammit
As the acpi translator requires libirqhelp, we cannot fail when libirqhelp cannot connect to acpi translator, break the egg/chicken. acpi translator will only call the irqhelp api with fixed gsi during startup, so won't require itself to be started yet. libacpica has a pending change to use libir

[PATCH python3-psutil] Add new platform for GNU/Hurd (based off Linux)

2024-10-15 Thread Damien Zammit
TODO: Fix NotImplementedError: /proc/diskstats nor /sys/block filesystem are available on this system Signed-off-by: Damien Zammit --- MANIFEST.in | 12 + psutil/__init__.py |7 + psutil/_common.py|3 +- psutil/_psgnu.py | 2361

Re: BSD Compatibility

2024-10-10 Thread Damien Zammit
I'm guessing its because of routes being defined as ioctls with slightly different header files in Hurd vs BSD (?) Likely Samuel's solution is correct to guard against incompatible headers being included in the Hurd path. Alternatively one could group the Hurd headers better so both APIs require

Re: Easy testing on real hardware with FSDG distributions?

2024-10-07 Thread Damien Zammit
Hi, Concerning X200/T400/T500, these will not boot into Xorg on HURD if any flavour of coreboot is installed. This is because VESA is not implemented in coreboot and there is no other working graphics driver yet. Text mode will still function, although at an embarrassingly low screen resolution u

[PATCH v12 2/2 hurd] ddekit: Use libirqhelp for interrupt registration

2024-03-25 Thread Damien Zammit
Use the new irqhelp library in ddekit and clean up. --- libddekit/Makefile| 2 +- libddekit/interrupt.c | 211 -- 2 files changed, 40 insertions(+), 173 deletions(-) diff --git a/libddekit/Makefile b/libddekit/Makefile index 88a0c8909..c74ec1128 1006

[PATCH v12 1/2 hurd] libirqhelp: Add library

2024-03-25 Thread Damien Zammit
Add a helper library for attaching interrupt handlers in userspace. --- Makefile | 1 + libirqhelp/Makefile | 28 libirqhelp/irqhelp.c | 358 +++ libirqhelp/irqhelp.h | 49 ++ 4 files changed, 436 insertions(+) create mode 100644

[PATCH v12 0/2 hurd] Add irqhelp library and clean up ddekit

2024-03-25 Thread Damien Zammit
Hi, This patchset adds a new library irqhelp for assisting the attachment of irq handlers in userspace. The previous problem was that calling a function with a local param from inside the wrapped_server_loop was crashing netdde due to a bogus stack offset. This is fixed by removing the nested fun

Re: [PATCH v11 0/2 hurd] Add irqhelp library and clean up ddekit

2024-03-24 Thread Damien Zammit
Hi, On 24 Mar 2024, 11:05 pm, Samuel Thibault < samuel.thiba...@gnu.org> wrote: > Ok, but there's not even a comment about it. If somebody else comes and > changes the code a bit, they'll very easily get to the unsafe side again. And > really, accessing local variables from nested functions is s

Re: [PATCH v11 0/2 hurd] Add irqhelp library and clean up ddekit

2024-03-24 Thread Damien Zammit
Hi Samuel, Original Message On 24 Mar 2024, 9:32 pm, Samuel Thibault >... Your version 11 is however still accessing the `irq` local parameter, so >it's still only by luck that it's working. You need to restore allocating the >params structure to store irq and priv, which was p

[PATCH v11 2/2 hurd] ddekit: Use libirqhelp for interrupt registration

2024-03-24 Thread Damien Zammit
Use the new irqhelp library in ddekit and clean up. --- libddekit/Makefile| 2 +- libddekit/interrupt.c | 214 ++ 2 files changed, 31 insertions(+), 185 deletions(-) diff --git a/libddekit/Makefile b/libddekit/Makefile index 88a0c8909..c74ec1128 1006

[PATCH v11 1/2 hurd] libirqhelp: Add library

2024-03-24 Thread Damien Zammit
Add a helper library for attaching interrupt handlers in userspace. --- Makefile | 1 + libirqhelp/Makefile | 28 libirqhelp/irqhelp.c | 358 +++ libirqhelp/irqhelp.h | 49 ++ 4 files changed, 436 insertions(+) create mode 100644

[PATCH v11 0/2 hurd] Add irqhelp library and clean up ddekit

2024-03-24 Thread Damien Zammit
Hi, This patchset adds a new library irqhelp for assisting the attachment of irq handlers in userspace. The previous problem was that calling a function with a global param from inside the wrapped_server_loop was crashing netdde due to a bogus stack offset. This is fixed. The mach_msg_server thr

[PATCH v10 2/2 hurd] ddekit: Use libirqhelp for interrupt registration

2024-03-16 Thread Damien Zammit
Use the new irqhelp library in ddekit and clean up. --- libddekit/Makefile| 2 +- libddekit/interrupt.c | 208 ++ 2 files changed, 27 insertions(+), 183 deletions(-) diff --git a/libddekit/Makefile b/libddekit/Makefile index 88a0c8909..c74ec1128 1006

[PATCH v10 1/2 hurd] libirqhelp: Add library

2024-03-16 Thread Damien Zammit
Add a helper library for attaching interrupt handlers in userspace. --- Makefile | 1 + libirqhelp/Makefile | 28 libirqhelp/irqhelp.c | 359 +++ libirqhelp/irqhelp.h | 49 ++ 4 files changed, 437 insertions(+) create mode 100644

[PATCH v10 0/2 hurd] Add irqhelp library and clean up ddekit

2024-03-16 Thread Damien Zammit
Hi, This patchset adds a new library irqhelp for assisting the attachment of irq handlers in userspace. The previous problem was that return(NULL) was crashing netdde while pthread_exit(NULL) works for exiting the irq thread cleanly. The mach_msg_server thread now shuts down cleanly by setting

Re: [PATCH v9 0/2 hurd] Add irqhelp and clean up ddekit

2024-03-09 Thread Damien Zammit
Hi, On 3/10/24 6:46 AM, Samuel Thibault wrote: > Damien Zammit, le sam. 09 mars 2024 01:18:37 +, a ecrit: >> So having discussed this, we allow the irq thread to be called one more time, >> but not actually call the user irq handler if the shutdown flag is set. >&g

[PATCH web] faq: Add doc about recent SMP support and how to test

2024-03-09 Thread Damien Zammit
--- faq/smp.mdwn | 31 ++- 1 file changed, 22 insertions(+), 9 deletions(-) diff --git a/faq/smp.mdwn b/faq/smp.mdwn index c0133b80..ee0bf53f 100644 --- a/faq/smp.mdwn +++ b/faq/smp.mdwn @@ -13,21 +13,34 @@ License|/fdl]]."]]"""]] [[!meta title="Does GNU/Hurd suppor

[PATCH v9 1/2 hurd] libirqhelp: Add library

2024-03-08 Thread Damien Zammit
Add a helper library for attaching interrupt handlers in userspace. --- Makefile | 1 + libirqhelp/Makefile | 28 libirqhelp/irqhelp.c | 360 +++ libirqhelp/irqhelp.h | 49 ++ 4 files changed, 438 insertions(+) create mode 100644

[PATCH v9 0/2 hurd] Add irqhelp and clean up ddekit

2024-03-08 Thread Damien Zammit
Hi, So having discussed this, we allow the irq thread to be called one more time, but not actually call the user irq handler if the shutdown flag is set. We acknowledge the interrupt has been handled, however. I tested this behaviour and it works on netdde.static to ifup and ifdown, and send a la

[PATCH v9 2/2 hurd] ddekit: Use libirqhelp for interrupt registration

2024-03-08 Thread Damien Zammit
Use the new irqhelp library in ddekit and clean up. --- libddekit/Makefile| 2 +- libddekit/interrupt.c | 208 ++ 2 files changed, 28 insertions(+), 182 deletions(-) diff --git a/libddekit/Makefile b/libddekit/Makefile index 88a0c8909..c74ec1128 1006

[PATCH v8 2/2 hurd] ddekit: Use libirqhelp for interrupt registration

2024-03-07 Thread Damien Zammit
Use the new irqhelp library in ddekit and clean up. --- libddekit/Makefile| 2 +- libddekit/interrupt.c | 208 ++ 2 files changed, 28 insertions(+), 182 deletions(-) diff --git a/libddekit/Makefile b/libddekit/Makefile index 88a0c8909..c74ec1128 1006

[PATCH v8 1/2 hurd] libirqhelp: Add library

2024-03-07 Thread Damien Zammit
Add a helper library for attaching interrupt handlers in userspace. --- Makefile | 1 + libirqhelp/Makefile | 28 libirqhelp/irqhelp.c | 359 +++ libirqhelp/irqhelp.h | 49 ++ 4 files changed, 437 insertions(+) create mode 100644

[PATCH v8 0/2 hurd] Add irqhelp and clean up ddekit

2024-03-07 Thread Damien Zammit
Hi, I think we need to allow the irq handler to be called one more time, because we don't know if there is a pending interrupt until we need to handle one. Once we enable the irq one more time, it is necessary to handle the last interrupt before quitting the handler. I tested this behaviour and

[PATCH 1/1 hurd] ext2fs: New default: use xattrs to store translator records

2024-03-02 Thread Damien Zammit
Replaces experimental option --x-xattr-translator-records with --no-xattr-translator-records to allow rolling back to previous behaviour. NB: - Legacy records still work with either setting. - Adding a new record removes a legacy one. --- ext2fs/ext2fs.c | 18 +- ext2fs/inode.

[PATCH 0/1 hurd] ext2fs - new translator entries in xattrs

2024-03-02 Thread Damien Zammit
Hi, I have prepared this patch for inclusion into hurd, however we may need to think of the best migration strategy: Do we allow a soft migration where translator entries are kept as is, but new ones are migrated only upon creation. Or do we write a script that will migrate all translator entrie

[PATCH v7 1/2 hurd] libirqhelp: Add library

2024-03-02 Thread Damien Zammit
Add a helper library for attaching interrupt handlers in userspace. --- Makefile | 1 + libirqhelp/Makefile | 28 libirqhelp/irqhelp.c | 362 +++ libirqhelp/irqhelp.h | 49 ++ 4 files changed, 440 insertions(+) create mode 100644

[PATCH v7 2/2 hurd] ddekit: Use libirqhelp for interrupt registration

2024-03-02 Thread Damien Zammit
Use the new irqhelp library in ddekit and clean up. --- libddekit/Makefile| 2 +- libddekit/interrupt.c | 208 ++ 2 files changed, 28 insertions(+), 182 deletions(-) diff --git a/libddekit/Makefile b/libddekit/Makefile index 88a0c8909..c74ec1128 1006

[PATCH v7 0/2 hurd] Add irqhelp and clean up ddekit

2024-03-02 Thread Damien Zammit
Hi, I figured out that a semaphore is needed in ddekit to wait until the thread_init(priv) is called. This was initially confusing because I thought a semaphore was needed in the irqhelp library, but it is not required there. TESTED: copying a large file from hurd to linux and ifup/ifdown a few

Re: [PATCH v3 gnumach] smp: Rearrange IPI sending mechanism

2024-02-23 Thread Damien Zammit
Hi Almu, On 2/24/24 12:24 AM, Almudena Garcia wrote: > I set the code as this way because it's the standard of Intel's guides. > > The guide explain that although most machines turn on the cpu with an unique > SIPI, some machines could require a second SIPI. Even some older machines > could nee

  1   2   3   4   5   6   7   >