[PATCH 6/6] ioapic support switchable back to pic

2021-03-27 Thread Damien Zammit
Use --enable-ncpus=x where x > 1 for SMP+APIC support. Use --enable-apic=no for no SMP and old PIC support. --- i386/Makefrag.am | 13 +- i386/configfrag.ac | 12 + i386/i386/apic.h | 4 +- i386/i386/fpu.c | 2 +- i386/i386/irq.

[PATCH v3: gnumach] - IOAPIC and LAPIC support

2021-03-29 Thread Damien Zammit
Hi Samuel, I have addressed most of your reviewed comments except: > Do you think we will be able to use lapic along the Linux glue? Untested so far. > Also, it'd be good to also modify & test x86_64/interrupt.S, otherwise > the poor people trying to finish 64bit support will see yet another > o

[PATCH 1/2] Add user interrupt handling code for mach pathway

2021-03-29 Thread Damien Zammit
--- device/intr.c | 80 +++ 1 file changed, 80 insertions(+) diff --git a/device/intr.c b/device/intr.c index fbb9f495..dfe07ddc 100644 --- a/device/intr.c +++ b/device/intr.c @@ -12,6 +12,7 @@ * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE O

[PATCH 2/2] ioapic support switchable back to pic

2021-03-29 Thread Damien Zammit
Use --enable-ncpus=x where x > 1 for SMP+APIC support. Use --enable-apic=no for no SMP and old PIC support. --- i386/Makefrag.am | 13 +- i386/configfrag.ac | 12 + i386/i386/apic.h | 4 +- i386/i386/fpu.c | 2 +- i386/i386/irq.

[PATCH 1/2] Add user interrupt handling code for mach pathway

2021-03-29 Thread Damien Zammit
--- device/intr.c | 80 +++ 1 file changed, 80 insertions(+) diff --git a/device/intr.c b/device/intr.c index fbb9f495..ac213ecf 100644 --- a/device/intr.c +++ b/device/intr.c @@ -12,6 +12,7 @@ * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE O

[PATCH v4: gnumach] - IOAPIC and LAPIC support

2021-03-29 Thread Damien Zammit
Hi, Here are revised patches, fourth iteration including pit macros. Damien

[PATCH 2/2] ioapic support switchable back to pic

2021-03-29 Thread Damien Zammit
Use --enable-ncpus=x where x > 1 for SMP+APIC support. Use --enable-apic=no for no SMP and old PIC support. --- i386/Makefrag.am | 13 +- i386/configfrag.ac | 12 + i386/i386/apic.h | 4 +- i386/i386/fpu.c | 2 +- i386/i386/irq.

[hurd - ACPICA]: glue code for libacpica

2021-03-31 Thread Damien Zammit
ACPICA is the upstream ACPI implementation. The upstream code is hosted on https://github.com/acpica/acpica It has filtering that reprocesses the upstream reference implementation into something they call "linuxized" (more readable code). I have implemented the following glue to snarf this linuxiz

[PATCH 1/5] acpica: Add makefile

2021-03-31 Thread Damien Zammit
--- Makefile | 1 + libacpica/Makefile | 189 + 2 files changed, 190 insertions(+) create mode 100644 libacpica/Makefile diff --git a/Makefile b/Makefile index 0e2ee1ec..fd8cef4d 100644 --- a/Makefile +++ b/Makefile @@ -32,6 +32,7 @@ lib-su

[PATCH 2/5] acpica: Add config for GNU

2021-03-31 Thread Damien Zammit
--- libacpica/acpi/platform/acenv.h | 3 + libacpica/acpi/platform/acenvex.h | 3 + libacpica/acpi/platform/acgnu.h | 167 ++ libacpica/acpi/platform/acgnuex.h | 69 4 files changed, 242 insertions(+) create mode 100644 libacpica/acpi/platform/acg

[PATCH 3/5] acpica: Add acpi_init

2021-03-31 Thread Damien Zammit
--- libacpica/acpi_init.c | 478 ++ libacpica/acpi_init.h | 8 + 2 files changed, 486 insertions(+) create mode 100644 libacpica/acpi_init.c create mode 100644 libacpica/acpi_init.h diff --git a/libacpica/acpi_init.c b/libacpica/acpi_init.c new file mod

[PATCH 4/5] acpi_init: Add enter_sleep method based on ACPI server

2021-03-31 Thread Damien Zammit
--- libacpica/acpi_init.c| 43 shutdown/acpi_shutdown.h | 1 + 2 files changed, 44 insertions(+) diff --git a/libacpica/acpi_init.c b/libacpica/acpi_init.c index 754da4be..405ad4e9 100644 --- a/libacpica/acpi_init.c +++ b/libacpica/acpi_init.c @@ -13,

[PATCH 5/5] acpi: Add ACPICA as a library to this server

2021-03-31 Thread Damien Zammit
--- acpi/Makefile | 2 +- acpi/main.c | 4 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/acpi/Makefile b/acpi/Makefile index f84f4b35..49c8ba9a 100644 --- a/acpi/Makefile +++ b/acpi/Makefile @@ -25,7 +25,7 @@ SRCS = main.c netfs_impl.c acpi.c \ MIGSRCS= O

[hurd - ACPICA]: v2

2021-04-03 Thread Damien Zammit
I am trying to refactor the acpi server to use acpica as a library. I have written some new RPCs for the acpi server for enabling acpi, sleeping, and requesting irq for a pci device. The latter still needs work for LNK -> _CRS and _SRS methods. Currently, we only need to enable acpi mode when shu

[PATCH 1/5] libacpica: Add makefile

2021-04-03 Thread Damien Zammit
--- Makefile | 1 + libacpica/Makefile | 189 + 2 files changed, 190 insertions(+) create mode 100644 libacpica/Makefile diff --git a/Makefile b/Makefile index 0e2ee1ec..fd8cef4d 100644 --- a/Makefile +++ b/Makefile @@ -32,6 +32,7 @@ lib-su

[PATCH 5/5] acpi: Add new RPCs

2021-04-03 Thread Damien Zammit
--- acpi/Makefile| 15 - acpi/acpi-ops.c | 146 +++ acpi/acpi.h | 6 ++ acpi/main.c | 4 +- acpi/mig-mutate.h| 28 + hurd/acpi.defs | 60 ++ hurd/hurd_types.defs | 18 ++ hurd/h

[PATCH 2/5] libacpica: Add config for GNU

2021-04-03 Thread Damien Zammit
--- libacpica/acpi/platform/acenv.h | 3 + libacpica/acpi/platform/acenvex.h | 3 + libacpica/acpi/platform/acgnu.h | 159 ++ libacpica/acpi/platform/acgnuex.h | 52 ++ 4 files changed, 217 insertions(+) create mode 100644 libacpica/acpi/platform/acgnu

[PATCH 3/5] libacpica: Add acpi_init

2021-04-03 Thread Damien Zammit
--- libacpica/acpi_init.c | 612 ++ libacpica/acpi_init.h | 10 + 2 files changed, 622 insertions(+) create mode 100644 libacpica/acpi_init.c create mode 100644 libacpica/acpi_init.h diff --git a/libacpica/acpi_init.c b/libacpica/acpi_init.c new file mod

[PATCH 4/5] acpi: Add acpi_init to server to initialize ACPI

2021-04-03 Thread Damien Zammit
--- acpi/Makefile | 2 +- acpi/main.c | 4 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/acpi/Makefile b/acpi/Makefile index f84f4b35..49c8ba9a 100644 --- a/acpi/Makefile +++ b/acpi/Makefile @@ -25,7 +25,7 @@ SRCS = main.c netfs_impl.c acpi.c \ MIGSRCS= O

Re: [PATCH 3/5] libacpica: Add acpi_init

2021-04-03 Thread Damien Zammit
On 3/4/21 11:49 pm, Samuel Thibault wrote: > Damien Zammit, le sam. 03 avril 2021 23:16:33 +1100, a ecrit: >> +acpi_status >> +acpi_os_create_lock(acpi_spinlock *lockp) >> +{ >> +acpi_semaphore sema = NULL; >> +if (acpi_os_create_semaphore(1, 0, &sem

[PATCH] machdev: Pass argv through to _hurd_init

2021-04-03 Thread Damien Zammit
--- libmachdev/machdev.h | 2 +- libmachdev/trivfs_server.c | 11 +++ pci-arbiter/main.c | 2 +- rumpdisk/main.c| 2 +- 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/libmachdev/machdev.h b/libmachdev/machdev.h index 8f613b35..5d0eed02 100644 -

Re: [PATCH 2/2] machdev: Pass argv through to _hurd_init

2021-04-03 Thread Damien Zammit
On 4/4/21 8:49 am, Samuel Thibault wrote: > Samuel Thibault, le sam. 27 mars 2021 23:27:20 +0100, a ecrit: >> Samuel Thibault, le sam. 20 mars 2021 00:03:21 +0100, a ecrit: >>> Damien Zammit, le ven. 19 mars 2021 13:15:12 +1100, a ecrit: >>>> +

[PATCH] Add ioapic support disabled by default

2021-04-03 Thread Damien Zammit
Use --enable-ncpus=x --enable-apic where x > 1 for SMP+APIC support. Use neither for no SMP and old PIC support. --- i386/Makefrag.am | 13 +- i386/configfrag.ac | 8 + i386/i386/fpu.c | 2 +- i386/i386/irq.c | 9 +- i386/i386

[PATCH x4 gnumach: IOAPIC fixes]

2021-04-04 Thread Damien Zammit
[PATCH 1/4] ioapic: Enable processor focus to BSP [PATCH 2/4] ioapic: target first processor for interrupts [PATCH 3/4] Don't call EOI on spurious interrupts These three patches are pretty much no-brainers following the Intel datasheet regarding 82489DX. [PATCH 4/4] ioapic: Use irq specific EOI p

[PATCH 2/4] ioapic: target first processor for interrupts

2021-04-04 Thread Damien Zammit
--- i386/i386at/ioapic.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/i386/i386at/ioapic.c b/i386/i386at/ioapic.c index 16836016..38d1b43c 100644 --- a/i386/i386at/ioapic.c +++ b/i386/i386at/ioapic.c @@ -368,8 +368,9 @@ ioapic_configure(void) } /* Start the IO

[PATCH 1/4] ioapic: Enable processor focus to BSP

2021-04-04 Thread Damien Zammit
--- i386/i386/apic.h | 1 + i386/i386at/ioapic.c | 3 +++ 2 files changed, 4 insertions(+) diff --git a/i386/i386/apic.h b/i386/i386/apic.h index 83f7776c..d63dbfcc 100644 --- a/i386/i386/apic.h +++ b/i386/i386/apic.h @@ -173,6 +173,7 @@ extern inline void unmask_irq (unsigned int irq_nr); #

[PATCH 4/4] ioapic: Use irq specific EOI properly when detected

2021-04-04 Thread Damien Zammit
--- i386/i386/apic.h | 4 i386/i386at/ioapic.c | 30 ++ 2 files changed, 26 insertions(+), 8 deletions(-) diff --git a/i386/i386/apic.h b/i386/i386/apic.h index d63dbfcc..add1b8cf 100644 --- a/i386/i386/apic.h +++ b/i386/i386/apic.h @@ -35,6 +35,8 @@ typedef

[PATCH 3/4] Don't call EOI on spurious interrupts

2021-04-04 Thread Damien Zammit
--- i386/i386at/interrupt.S | 9 +++-- x86_64/interrupt.S | 9 +++-- 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/i386/i386at/interrupt.S b/i386/i386at/interrupt.S index da0eb044..cb314d32 100644 --- a/i386/i386at/interrupt.S +++ b/i386/i386at/interrupt.S @@ -33,7 +

[PATCH x2: gnumach] - More IOAPIC fixes

2021-04-05 Thread Damien Zammit
Here are two more patches, one fixes a bug where a return value was from the stack and missing the top half of the value! The other patch refactors the EOI to simplify the asm code in interrupt.S

[PATCH 1/2] ioapic: Refactor EOI

2021-04-05 Thread Damien Zammit
--- i386/i386/irq.c | 1 - i386/i386at/interrupt.S | 1 - i386/i386at/ioapic.c| 2 ++ x86_64/interrupt.S | 1 - 4 files changed, 2 insertions(+), 3 deletions(-) diff --git a/i386/i386/irq.c b/i386/i386/irq.c index 42921617..a7c98890 100644 --- a/i386/i386/irq.c +++ b/i386/i386/ir

[PATCH 2/2] ioapic: Fix arg passing of redirection entry

2021-04-05 Thread Damien Zammit
--- i386/i386at/ioapic.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/i386/i386at/ioapic.c b/i386/i386at/ioapic.c index 4d0f4fca..18a9bec6 100644 --- a/i386/i386at/ioapic.c +++ b/i386/i386at/ioapic.c @@ -114,15 +114,15 @@ ioapic_write(uint8_t id, uint8_t reg, u

Segfault building netbsd tools from upstream

2021-04-10 Thread Damien Zammit
Hi, When cross-building netbsd tools on hurd, I get this error during the build of gcc.old: (The file match.pd exists) ./build.sh -m i386 -E -D ../dest -T ../dest/tools -u tools ... demo@zamhurd:/part3/demo/git/netbsd/src/tools/gcc/obj/build/gcc$ gdb --args buil d/genmatch --gimple /part3/demo

[PATCH 3/4] proc: Follow p_parent to root for checking startup process

2021-04-17 Thread Damien Zammit
Since the bootstrap filesystem is no longer a single process, but can be spread among eg, pci-arbiter and rumpdisk, we cannot just check the p_parent of the process but need to follow to the root of the process namespace to check if it belongs to startup. --- proc/mgt.c | 12 +++- 1 file c

[PATCH 4/4] procfs: Add debug for failing EIO

2021-04-17 Thread Damien Zammit
--- procfs/process.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/procfs/process.c b/procfs/process.c index 6e4c1515..61e7cde4 100644 --- a/procfs/process.c +++ b/procfs/process.c @@ -387,9 +387,12 @@ process_file_get_contents (void *hook, char **contents, ssize_t *c

[PATCH 1/4] startup: Mark all essential tasks as our children

2021-04-17 Thread Damien Zammit
--- startup/startup.c | 49 +++ 1 file changed, 49 insertions(+) diff --git a/startup/startup.c b/startup/startup.c index 9faeb462..4278954a 100644 --- a/startup/startup.c +++ b/startup/startup.c @@ -831,6 +831,52 @@ main (int argc, char **argv, char **

[PATCH x4: hurd] - Almost fixing the rumpdisk stat issue

2021-04-17 Thread Damien Zammit
Hi, [PATCH 1/4] startup: Mark all essential tasks as our children This patch loops through the processes and determines which ones are important, and then marks them as child processes of startup. [PATCH 2/4] libmachdev: Add proc_set_arg_locations I'm not sure if this patch is needed. [PATCH 3/4

[PATCH 2/4] libmachdev: Add proc_set_arg_locations

2021-04-17 Thread Damien Zammit
--- libmachdev/trivfs_server.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libmachdev/trivfs_server.c b/libmachdev/trivfs_server.c index bbd73555..05dc7279 100644 --- a/libmachdev/trivfs_server.c +++ b/libmachdev/trivfs_server.c @@ -332,6 +332,8 @@ trivfs_S_fsys_init (struct trivfs_contr

Re: pci arbiter being killed

2021-04-17 Thread Damien Zammit
Hi, On 17/4/21 8:12 pm, Joan Lledó wrote: > I spent too much time on this and still haven't found the problem, need > some help. I suspect the problem is in the kernel b/c it's the part I'm > less competent. I'm attaching a patch with the changes I made on the > memory object proxy logic. Could

Re: [PATCH 3/4] proc: Follow p_parent to root for checking startup process

2021-04-17 Thread Damien Zammit
Hi, On 17/4/21 7:40 pm, Samuel Thibault wrote: > Damien Zammit, le sam. 17 avril 2021 19:12:11 +1000, a ecrit: >> Since the bootstrap filesystem is no longer a single process, >> but can be spread among eg, pci-arbiter and rumpdisk, we cannot >> just check the p_

[PATCH 1/2] startup: Mark all essential tasks as our children

2021-05-07 Thread Damien Zammit
This marks all essential tasks as children of startup (or proc?) With this patch, rumpdisk appears as an essential task but cat /proc/6/stat still fails with EIO, and the next patch catches the error by printing a warning. --- startup/startup.c | 8 1 file changed, 8 insertion

[PATCH 2/2] procfs: Add debug for failing EIO

2021-05-07 Thread Damien Zammit
--- procfs/process.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/procfs/process.c b/procfs/process.c index 6e4c1515..61e7cde4 100644 --- a/procfs/process.c +++ b/procfs/process.c @@ -387,9 +387,12 @@ process_file_get_contents (void *hook, char **contents, ssize_t *c

[PATCH 1/2] startup: Mark essential tasks as our children

2021-06-05 Thread Damien Zammit
--- startup/startup.c | 4 1 file changed, 4 insertions(+) diff --git a/startup/startup.c b/startup/startup.c index 9faeb462..78d69103 100644 --- a/startup/startup.c +++ b/startup/startup.c @@ -368,6 +368,10 @@ record_essential_task (const char *name, task_t task) /* Dead-name notificatio

[PATCH 2/2] proc/info: Fix EIO with /proc/6/stat

2021-06-05 Thread Damien Zammit
--- proc/info.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/proc/info.c b/proc/info.c index 6c2567d2..9c5d3543 100644 --- a/proc/info.c +++ b/proc/info.c @@ -316,7 +316,10 @@ get_string_array (task_t t, err = get_vector (t, loc, &vector); if (err) -return er

[PATCH v2] startup: Mark essential tasks as our children

2021-06-05 Thread Damien Zammit
This boots, but proc_child(fs) is needed in launch_core_servers otherwise it hangs at " auth" --- startup/startup.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/startup/startup.c b/startup/startup.c index 9faeb462..2499f81d 100644 --- a/startup/startup.c

Re: PCI arbiter memory mapping

2021-06-19 Thread Damien Zammit
Hi Joan, On 19/6/21 7:50 pm, Joan Lledó wrote: > I finally got memory mapping working in the pci arbiter. That means any > user with the proper permissions can map the device region files > generated by an arbiter. This is also working for nested arbiters. How does that interact with existing p

[PATCH] Fix /proc/?/exe values for bootstrap processes

2021-07-10 Thread Damien Zammit
TODO: fix rumpdisk's /proc/6/stat --- libmachdev/trivfs_server.c | 15 +-- startup/startup.c | 24 ++-- 2 files changed, 23 insertions(+), 16 deletions(-) diff --git a/libmachdev/trivfs_server.c b/libmachdev/trivfs_server.c index bbd73555..9c604595 100644

[PATCH v2] Fix /proc/?/exe values for bootstrap processes

2021-07-10 Thread Damien Zammit
TESTED: normal boot and pci+rump TODO: fix rumpdisk's /proc/6/stat --- libmachdev/trivfs_server.c | 15 +-- startup/startup.c | 16 ++-- 2 files changed, 15 insertions(+), 16 deletions(-) diff --git a/libmachdev/trivfs_server.c b/libmachdev/trivfs_server.c index

Regarding copyright assignment to FSF

2021-08-11 Thread Damien Zammit
Hi Ludo, On 11/8/21 11:01 pm, Ludovic Courtès wrote: > It would be interesting to consider dropping the copyright assignment > requirement for Hurd/Mach/MiG. For what remains primarily a hobby > project, this looks to me like a hindrance more than anything else. I imagine it is slightly inconven

Re: Problems trying to install Debian GNU/Hurd 2021 in SATA AHCI mode, over Thinkpad T410

2021-08-16 Thread Damien Zammit
Hi Almu, You need to select "AHCI" in bios - not "Compatibility"! "lspci -nn" on my w520 with coreboot shows: 00:1f.2 SATA controller [0106]: Intel Corporation 6 Series/C200 Series Chipset Family 6 port Mobile SATA AHCI Controller [8086:1c03] (rev 05) I think the compatibility mode makes it ap

[PATCH] rumpkernel: Add -D_FILE_OFFSET_BITS=64 for large off_t

2021-08-24 Thread Damien Zammit
This enables large disks to work in librump. --- debian/patches/Wno-error.diff | 9 + 1 file changed, 9 insertions(+) diff --git a/debian/patches/Wno-error.diff b/debian/patches/Wno-error.diff index 1b54758e..d8cef536 100644 --- a/debian/patches/Wno-error.diff +++ b/debian/patches/Wno-er

[PATCH] rumpdisk: Use raw uncached character device rwdXd

2021-08-24 Thread Damien Zammit
Needs an explicit memset to ensure allocation is done before DMA read --- rumpdisk/block-rump.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/rumpdisk/block-rump.c b/rumpdisk/block-rump.c index 80cdc350..f51c1adb 100644 --- a/rumpdisk/block-rump.c +++ b/rumpdisk/block-

Re: Fwd: FOSDEM 2022

2021-12-12 Thread Damien Zammit
Hi Samuel, On 12/12/21 8:15 am, Samuel Thibault wrote: > Anybody interested in giving a talk? > > Damien perhaps? ;) I am interested in giving a pre-prepared talk, I'd like to gain experience creating screencast videos using free software. However, I'm not sure what the content of the talk sho

[PATCH 0/3] hurd: Changes for new rumpkernel/librump version

2021-12-17 Thread Damien Zammit
Hi, Please see: http://git.zammit.org/rumpkernel-debian.git/log/?h=develop for the latest version of working librump (based on NetBSD 9.99.?). NB: There is a new "upstream" tag to generate the tarball of NetBSD. This patch series goes with new version of librump for hurd's rumpdisk transla

[PATCH 3/3] rumpdisk: Use raw uncached character device rwdXd

2021-12-17 Thread Damien Zammit
This disables the rump buffer cache and avoids any magic translation that rump would do. * rumpdisk/block-rump.c (translate_name): Use `/dev/r%sd' format instead of `/dev/%sd'. --- rumpdisk/block-rump.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rumpdisk/block-rump.c

[PATCH 2/3] rumpdisk: Link with rumpvfs_nofifofs

2021-12-17 Thread Damien Zammit
--- rumpdisk/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rumpdisk/Makefile b/rumpdisk/Makefile index cf7c9df0..0bfebfe6 100644 --- a/rumpdisk/Makefile +++ b/rumpdisk/Makefile @@ -16,7 +16,7 @@ # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. RUMPPA

[PATCH 1/3] rumpdisk: define RUMP_REGISTER_T

2021-12-17 Thread Damien Zammit
--- rumpdisk/block-rump.c | 1 + 1 file changed, 1 insertion(+) diff --git a/rumpdisk/block-rump.c b/rumpdisk/block-rump.c index 398289fb..8c29dc01 100644 --- a/rumpdisk/block-rump.c +++ b/rumpdisk/block-rump.c @@ -31,6 +31,7 @@ #include #define MACH_INCLUDE +#define RUMP_REGISTER_T #incl

Re: [PATCH 1/3] rumpdisk: define RUMP_REGISTER_T

2021-12-20 Thread Damien Zammit
Hi Samuel, On 20/12/21 4:05 am, Samuel Thibault wrote: > A commit log message needs to include the "why" of the commit. Sorry, this is somewhat of a hack to work around a conflicting "register_t" definition. We need to fix it in the librump configuration at compile time but I couldn't quite fig

Re: [PATCH 2/3] rumpdisk: Link with rumpvfs_nofifofs

2021-12-20 Thread Damien Zammit
Hi, On 20/12/21 4:05 am, Samuel Thibault wrote: > Again, why is this needed? This is needed because the newer librump broke out some of the symbols to a different library, so I think we need to link with it, (or possibly an alternative). > Damien Zammit, le sam. 18 déc. 2021 17:08:46 +1

Re: [PATCH 3/3] rumpdisk: Use raw uncached character device rwdXd

2021-12-20 Thread Damien Zammit
Hi Samuel, On 20/12/21 4:06 am, Samuel Thibault wrote: > Damien Zammit, le sam. 18 déc. 2021 17:08:47 +1100, a ecrit: >> This disables the rump buffer cache and avoids any magic translation that >> rump would do. >> >> * rumpdisk/block-rump.c (translate_name): Use `/

[PATCH 1/5] rumpdisk: define _STANDALONE to avoid register_t

2021-12-26 Thread Damien Zammit
This works around a faulty HAVE_REGISTER_T in rump so the rump.h header can be included without errors. --- rumpdisk/block-rump.c | 1 + 1 file changed, 1 insertion(+) diff --git a/rumpdisk/block-rump.c b/rumpdisk/block-rump.c index 398289fb..a586a6e0 100644 --- a/rumpdisk/block-rump.c +++ b/rum

[PATCH 0/5] hurd: Patches for new librump

2021-12-26 Thread Damien Zammit
These patches are needed for newer librump (>= 9.99). See my previous thread for details on how to configure grub. Cheers, Damien

[PATCH 2/5] rumpdisk: Link with rumpvfs_nofifofs if present

2021-12-26 Thread Damien Zammit
This is needed because some symbols have moved to another library. --- config.make.in| 1 + configure.ac | 35 --- rumpdisk/Makefile | 10 ++ 3 files changed, 43 insertions(+), 3 deletions(-) diff --git a/config.make.in b/config.make.in index e4f

[PATCH 4/5] pci-arbiter,rumpdisk: Lock all memory for swapping

2021-12-26 Thread Damien Zammit
This locks all memory in bootstrap processes so that disk driver dependencies don't get swapped out. --- pci-arbiter/main.c | 9 + rumpdisk/main.c| 8 2 files changed, 17 insertions(+) diff --git a/pci-arbiter/main.c b/pci-arbiter/main.c index 510e7dbc..602a545c 100644 --- a

[PATCH 5/5] rumpdisk: Fault-in the memory pages

2021-12-26 Thread Damien Zammit
This ensures memory pages are allocated before written to. --- rumpdisk/block-rump.c | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/rumpdisk/block-rump.c b/rumpdisk/block-rump.c index 7a4a167e..fe97bf85 100644 --- a/rumpdisk/block-rump.c +++ b/rumpdisk/block-r

[PATCH 3/5] rumpdisk: Use raw uncached character device rwdXd

2021-12-26 Thread Damien Zammit
This disables the rump buffer cache and avoids any magic translation that rump would do. * rumpdisk/block-rump.c (translate_name): Use `/dev/r%sd' format instead of `/dev/%sd'. --- rumpdisk/block-rump.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rumpdisk/block-rump.c

[PATCH 2/5 v2] rumpdisk: Link with rumpvfs_nofifofs if present

2021-12-26 Thread Damien Zammit
--- config.make.in| 1 + configure.ac | 26 +++--- rumpdisk/Makefile | 10 ++ 3 files changed, 34 insertions(+), 3 deletions(-) diff --git a/config.make.in b/config.make.in index e4f856f2..7c113c37 100644 --- a/config.make.in +++ b/config.make.in @@ -108,6 +1

Re: Fwd: FOSDEM 2022

2021-12-26 Thread Damien Zammit
Hi all, On 14/12/21 8:09 am, Samuel Thibault wrote: > Almudena Garcia, le lun. 13 déc. 2021 17:04:06 +0100, a ecrit: >>> However, I'm not sure what the content of the talk should be.  Can you help >> suggest what I can talk about? >> Maybe could be interesting talk about the Rumpkernel implementat

[PATCH 2/5 v3] rumpdisk: Link with rumpvfs_nofifofs if present

2021-12-27 Thread Damien Zammit
--- config.make.in| 1 + configure.ac | 29 ++--- rumpdisk/Makefile | 10 ++ 3 files changed, 37 insertions(+), 3 deletions(-) diff --git a/config.make.in b/config.make.in index e4f856f2..7c113c37 100644 --- a/config.make.in +++ b/config.make.in @@ -108,6

Recent libpciaccess changes

2022-02-07 Thread Damien Zammit
Hi folks, I upgraded my hurd system and got the following error trying to boot with rumpdisk: ext2fs: part:2:device:wd0: No such device or address libpciaccess: I have not been able to prove it yet, but I think the function call pci_device_hurd_map_range() attempts to look up _SERVERS_BUS_PCI d

Re: Three Cheers for Damien Zammit OFF TOPIC PRAISE

2022-02-11 Thread Damien Zammit
On 11/2/22 3:42 pm, jbra...@dismail.de wrote: > Way to go Damien for his 1st Fosdem GNU/Hurd presentation, which he nailed by > the way! It was an > awesome presentation! If you haven't seen it yet, then you should check it > out here: > > https://fosdem.org/2022/schedule/event/dzammit/ > > Tha

[PATCH] acpi: Remove erroneous MAP_FIXED

2022-02-12 Thread Damien Zammit
Reading the man page for mmap, MAP_FIXED needs to be removed, because we do not want the mapping to be placed at 0. --- acpi/acpi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/acpi/acpi.c b/acpi/acpi.c index 63066aaf..395bf56f 100644 --- a/acpi/acpi.c +++ b/acpi/acpi

[PATCH] biosmem: Round down to nearest page memory map entries

2022-02-12 Thread Damien Zammit
This fixes incorrect handling of page 0x9f000, for example, when the end offset in the e820 memory map is set to 0x9fc00. --- i386/i386at/biosmem.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/i386/i386at/biosmem.c b/i386/i386at/biosmem.c index 4f0914ca..44983ead 100644

Re: Updating the hurd in Guix

2022-02-12 Thread Damien Zammit
Hi Ricardo, On 11/2/22 11:58 pm, Ricardo Wurmus wrote: > I still haven’t been able to upgrade the Hurd packages in Guix because > it is not clear to me what commits and additional patches we need — and > I don’t have enough time to figure this out by myself. Yes I think we need an upstream for ru

[PATCH] biosmem: Narrow or widen e820 memory regions as appropriate

2022-02-13 Thread Damien Zammit
This is needed because the e820 memory regions are not necessarily page aligned. This fixes ACPICA probing of root table mapping. TESTED with experimental acpi. --- i386/i386at/biosmem.c | 38 +++--- 1 file changed, 31 insertions(+), 7 deletions(-) diff --git a/i

[PATCH v2] biosmem: Narrow or widen e820 memory regions as appropriate

2022-02-13 Thread Damien Zammit
--- i386/i386at/biosmem.c | 40 +--- 1 file changed, 33 insertions(+), 7 deletions(-) diff --git a/i386/i386at/biosmem.c b/i386/i386at/biosmem.c index 4f0914ca..354d0529 100644 --- a/i386/i386at/biosmem.c +++ b/i386/i386at/biosmem.c @@ -73,14 +73,22 @@ static u

[PATCH libpciaccess] hurd: Don't read from _SERVERS_BUS_PCI necessarily

2022-02-14 Thread Damien Zammit
This allows the fallback mechanism in the hurd create method to be used in the map range method by reusing the mach port that corresponds to the root of the pci filesystem. Also, the offset parameter to vm_map was not needed as the whole range is always mapped from the beginning. --- src/hurd_pc

Re: Updating the hurd in Guix

2022-02-14 Thread Damien Zammit
Hi Olaf, On 15/2/22 9:26 am, Olaf Buddenhagen wrote: >> I could create a github repo that contains everything for rump in one repo, >> but it would take time and would be easier to do once the netbsd src patches >> are upstreamed, so we would not need to maintain separate patches. > > Admittedly w

[PATCH v3] biosmem: Narrow e820 regions as required

2022-02-14 Thread Damien Zammit
--- i386/i386at/biosmem.c | 28 1 file changed, 28 insertions(+) diff --git a/i386/i386at/biosmem.c b/i386/i386at/biosmem.c index 4f0914ca..78e7bb21 100644 --- a/i386/i386at/biosmem.c +++ b/i386/i386at/biosmem.c @@ -82,6 +82,19 @@ static unsigned int biosmem_nr_boot_d

[PATCH v2 libpciaccess] hurd: Don't necessarily look up _SERVERS_BUS_PCI

2022-02-14 Thread Damien Zammit
This allows the fallback mechanism in the hurd create method to be used in the map range method by reusing the mach port that corresponds to the root of the pci filesystem. --- src/hurd_pci.c | 23 +-- 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/src/hurd_pci

Backtraces from rumpdisk.static and fdisk when fdisk is called on wd0

2022-02-15 Thread Damien Zammit
gdb in rumpdisk.static after rumpns_sys_open was called already: Thread 31 hit Breakpoint 1, 0x08152e40 in rumpns_sys_pread () (gdb) bt #0 0x08152e40 in rumpns_sys_pread () #1 0x0810297c in rump_syscall () #2 0x080f5ed4 in rump___sysimpl_pread () #3 0x08048bed in rumpdisk_device_read (d=0x2008

rump on hurd fixed

2022-02-18 Thread Damien Zammit
Hi all, It seems that with the following two commits on gnumach and hurd: http://git.savannah.gnu.org/cgit/hurd/gnumach.git/commit/?id=6951d552749fe24d0c9514ac6efec2c09e567b8d http://git.savannah.gnu.org/cgit/hurd/hurd.git/commit/?id=258b45cde4d48149e410012b06bf2071dbba21b4 rumpdisk is now worki

[PATCH] rumpdisk: Protect device_open/close and r/w with a mutex for threading

2022-02-25 Thread Damien Zammit
Prepare for multithreading of rumpdisk by protecting critical paths from concurrent access. TESTED to still boot via rump with this change even though multithread is not yet enabled. --- rumpdisk/block-rump.c | 63 --- 1 file changed, 53 insertions(+), 10

[PATCH] rumpdisk: Protect open/close/read/write with a rwlock

2022-02-26 Thread Damien Zammit
TESTED to boot off a rump based disk --- rumpdisk/block-rump.c | 77 --- 1 file changed, 66 insertions(+), 11 deletions(-) diff --git a/rumpdisk/block-rump.c b/rumpdisk/block-rump.c index 10fa66ad..464c5cdd 100644 --- a/rumpdisk/block-rump.c +++ b/rumpdisk

[PATCH] libmachdev: Switch machdev_server to multithreaded (rumpdisk)

2022-02-26 Thread Damien Zammit
TESTED via booting a rump disk --- libmachdev/ds_routines.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libmachdev/ds_routines.c b/libmachdev/ds_routines.c index 139551f6..6c150c8f 100644 --- a/libmachdev/ds_routines.c +++ b/libmachdev/ds_routines.c @@ -351,7 +351,11

[PATCH] pci-arbiter: Remove invalid pci_device_close

2022-02-26 Thread Damien Zammit
pci_control_port is not a port info so calling deref on it is invalid. There seems no reason to have a device_close for the pci device currently so remove it. Perhaps some logic needs to be added to prevent concurrent pci accesses by multiple clients since some pci commands are non-atomic (?) TES

[PATCH 2/3] libmachdev: Export demuxer as machdev_demuxer and bucket pointer

2022-02-27 Thread Damien Zammit
--- libmachdev/ds_routines.c | 6 +++--- libmachdev/machdev.h | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/libmachdev/ds_routines.c b/libmachdev/ds_routines.c index e89ceee0..0f8db7ed 100644 --- a/libmachdev/ds_routines.c +++ b/libmachdev/ds_routines.c @@ -328,8 +328

[PATCH 3/3] rumpdisk: Override machdev_server with multithread port management

2022-02-27 Thread Damien Zammit
--- rumpdisk/main.c | 17 - 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/rumpdisk/main.c b/rumpdisk/main.c index 8dbe505a..9a353541 100644 --- a/rumpdisk/main.c +++ b/rumpdisk/main.c @@ -93,6 +93,21 @@ static struct argp_child empty_argp_children[] = {{0}}; static

Multithreaded rumpdisk

2022-02-27 Thread Damien Zammit
These three patches are sequential and all three were applied and the final result tested to boot via rumpdisk.

[PATCH 1/3] libmachdev: No-op fix styling of functions

2022-02-27 Thread Damien Zammit
--- libmachdev/ds_routines.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/libmachdev/ds_routines.c b/libmachdev/ds_routines.c index 139551f6..e89ceee0 100644 --- a/libmachdev/ds_routines.c +++ b/libmachdev/ds_routines.c @@ -302,7 +302,8 @@ machdev_create_device_

[PATCH] gnumach: vm_allocate_contiguous: Allow small power 2 alignments

2022-08-20 Thread Damien Zammit
This allows contiguous allocations aligned to values smaller than one page, but still a power of 2, by forcing the alignment to be to the nearest page. This works because PAGE_SIZE is a power of two. --- vm/vm_user.c | 4 1 file changed, 4 insertions(+) diff --git a/vm/vm_user.c b/vm/vm_us

[PATCH] rumpkernel: piixide: Compile missing source files for rump lib

2022-08-21 Thread Damien Zammit
Add missing ata_subr.c and ata_recovery.c to PIIXIDE driver --- debian/patches/piixide-rump.diff | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/patches/piixide-rump.diff b/debian/patches/piixide-rump.diff index 716fe19f1..fd605b70a 100644 --- a/debian/patches/piixide-r

[PATCH] rumpkernel: pci-userspace: Ask for permission to use PCI CONF2 registers

2022-08-21 Thread Damien Zammit
Rationale: QEMU allocates actual io ports in the 0xc000 - 0xcfff range, therefore we still need to allow rump to access these ports, in case they are allocated to real pci hardware. --- debian/patches/machirqdev.diff | 21 - 1 file changed, 20 insertions(+), 1 deletion(-) diff

[PATCH] rumpkernel: rules: Add -DNUSB_DMA=1 to build with DMA in usb

2022-08-21 Thread Damien Zammit
This allows DMA in rump kernel usb drivers, stops an assert() crashing the rump kernel. --- debian/rules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/rules b/debian/rules index 3f2b637ad..2c8fc0648 100755 --- a/debian/rules +++ b/debian/rules @@ -40,7 +40,7 @@ overri

Re: [PATCH] rumpkernel: pci-userspace: Ask for permission to use PCI CONF2 registers

2022-08-21 Thread Damien Zammit
allocating and using PCI_CONF2 I/O port range as regular I/O. (Maybe it would require a second lock that takes effect when PCI_CONF1 is used?) [1] https://wiki.osdev.org/Pci#Configuration_Space_Access_Mechanism_.232 Damien On 21/8/22 7:54 pm, Samuel Thibault wrote: > Damien Zammit, le dim. 21 août 2

[PATCH] gnumach: Remove PCI_CFG2_* as a reserved ioport range

2022-08-22 Thread Damien Zammit
PCI CONF2 access method was deprecated in PCI v2.0 Also, the conf2 ioport range is only activated for use as pci configuration space when conf1 registers are accessed in a particular sequence. Since the pci-arbiter does not access the conf1 forwarding register, we are safe to remove this complete

[PATCH libpciaccess] hurd: Clients or nested arbiters don't touch ioports

2022-08-23 Thread Damien Zammit
I tested this patch and linked it to both pci-arbiter.static and rumpdisk.static, everything still works. I/O ports are not needed at all by nested arbiters/clients of master because we are not reserving them per device. This design may need to change if we want to be more fine-grained over i/o p

Re: [PATCH libpciaccess] hurd: Clients or nested arbiters don't touch ioports

2022-08-23 Thread Damien Zammit
Hi, On 23/8/22 10:23 pm, Joan Lledó wrote: > El 23/8/22 a les 10:36, Damien Zammit ha escrit: >> @@ -600,14 +599,14 @@ static const struct pci_system_methods >> hurd_pci_methods = { >> .read = pci_device_hurd_read, >> .write = pci_device_hurd_write,

[PATCH] pfinet: Add SIOCADDRT and SIOCDELRT equivalent iioctls

2022-08-26 Thread Damien Zammit
This adds support for ioctls for adding and removing routes in pfinet. Tested to still access network, but there seems to be a mismatch between and , I can only make it compile using the linux header. --- hurd/iioctl.defs| 17 ++- hurd/ioctl_types.h | 2 + pfinet/iioctl-ops.c | 266

Re: [PATCH libpciaccess] hurd: Clients or nested arbiters don't touch ioports

2022-08-26 Thread Damien Zammit
tting rejected the second time by the kernel. So any subsequent pci_io_* calls would all be failing anyway via hurdish access method? Damien On 25/8/22 6:58 am, Samuel Thibault wrote: > Damien Zammit, le mar. 23 août 2022 08:36:56 +, a ecrit: >> I tested this patch and linked

[PATCH libpciaccess] hurd: Fix clients/nested arbiters' access to i/o ports

2022-08-26 Thread Damien Zammit
When we fail to enable io ports via x86 method, this means we are a client/nested arbiter. But we still need to enable io ports that are not in PCI CONF1 range. --- src/hurd_pci.c | 57 ++ 1 file changed, 53 insertions(+), 4 deletions(-) diff --git

<    1   2   3   4   5   6   7   >