Re: [PATCH glibc] Define PC, SP and SYSRETURN for hurd x86_64

2023-02-19 Thread Samuel Thibault
Applied, thanks! Flavio Cruz, le mer. 15 févr. 2023 01:16:38 -0500, a ecrit: > Moved thread_state.h to x86 directory since we only need to customize > those 3 definitions. > --- > sysdeps/mach/{i386 => x86}/thread_state.h | 12 +--- > 1 file changed, 9 insertions(+), 3 deletions(-) > ren

Re: [RFC PATCH 9/9] hurd, htl: Add some more x86_64-specific code

2023-02-19 Thread Samuel Thibault
Sergey Bugaev, le sam. 18 févr. 2023 23:37:17 +0300, a ecrit: > diff --git a/sysdeps/mach/hurd/x86_64/tls.h b/sysdeps/mach/hurd/x86_64/tls.h > new file mode 100644 > index ..644dcb1a > --- /dev/null > +++ b/sysdeps/mach/hurd/x86_64/tls.h > @@ -0,0 +1,257 @@ > +# define TCB_ALIGNMENT 6

Re: [RFC PATCH 8/9 gnumach] Add i386_fsgs_base_state

2023-02-19 Thread Samuel Thibault
Hello, Sergey Bugaev, le dim. 19 févr. 2023 00:55:54 +0300, a ecrit: > Should the same i386_fsgs_base_state API be made available on i386? I'd say no, it would be confusing. > And again, I don't really know anything about this, mabe what I'm > saying makes no sense. It's completely alright. >

Re: [RFC PATCH 7/9] hurd: Generalize init-first.c to support x86_64

2023-02-19 Thread Samuel Thibault
Sergey Bugaev, le sam. 18 févr. 2023 23:37:15 +0300, a ecrit: > Signed-off-by: Sergey Bugaev > --- > sysdeps/mach/hurd/{i386 => x86}/init-first.c | 17 ++--- > 1 file changed, 14 insertions(+), 3 deletions(-) > rename sysdeps/mach/hurd/{i386 => x86}/init-first.c (96%) > > diff --git

[PATCH gnumach] Delete include/mach/msg_type.h

2023-02-19 Thread Flavio Cruz
File is not included anywhere. --- Makefrag.am | 1 - include/mach/msg_type.h | 42 - 2 files changed, 43 deletions(-) delete mode 100644 include/mach/msg_type.h diff --git a/Makefrag.am b/Makefrag.am index 9ad3c27a..358f8db3 100644 --- a/Make

[PATCH mig] Stop including mach/msg_type.h in generated code.

2023-02-19 Thread Flavio Cruz
File is not needed. --- user.c | 1 - 1 file changed, 1 deletion(-) diff --git a/user.c b/user.c index de3f58c..dc9e21f 100644 --- a/user.c +++ b/user.c @@ -89,7 +89,6 @@ WriteIncludes(FILE *file) fprintf(file, "#include \n"); fprintf(file, "#include \n"); fprintf(file, "#include \

Re: [RFC PATCH 6/9] mach: Use PAGE_SIZE

2023-02-19 Thread Samuel Thibault
Applied, thanks! Sergey Bugaev, le sam. 18 févr. 2023 23:37:14 +0300, a ecrit: > The PAGE_SIZE from the Mach headers statically defines the machine's > page size. There's no need to query it dynamically; furthermore, the > implementation of the vm_statistics () RPC unconditionally fills in > > pa

Re: [RFC PATCH 5/9] hurd: Simplify init-first.c a bit

2023-02-19 Thread Samuel Thibault
Applied, thanks! Sergey Bugaev, le sam. 18 févr. 2023 23:37:13 +0300, a ecrit: > And make it a bit more 64-bit ready. This is in preparation to moving this > file into x86/ > > Signed-off-by: Sergey Bugaev > --- > sysdeps/mach/hurd/i386/init-first.c | 23 +++ > 1 file change

Re: [RFC PATCH 4/9] hurd: Make timer_t pointer-sized

2023-02-19 Thread Samuel Thibault
Applied, thanks! Sergey Bugaev, le sam. 18 févr. 2023 23:37:12 +0300, a ecrit: > This ensures that a timer_t value can be cast to struct timer_node * > and back. > > Signed-off-by: Sergey Bugaev > --- > sysdeps/mach/hurd/bits/typesizes.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >

Re: [RFC PATCH 3/9] hurd: Fix xattr function return type

2023-02-19 Thread Samuel Thibault
Applied, thanks! Sergey Bugaev, le sam. 18 févr. 2023 23:37:11 +0300, a ecrit: > They all return int, not size_t. > > Signed-off-by: Sergey Bugaev > --- > sysdeps/mach/hurd/fsetxattr.c| 2 +- > sysdeps/mach/hurd/lremovexattr.c | 2 +- > sysdeps/mach/hurd/lsetxattr.c| 2 +- > sysdeps/mac

Re: [RFC PATCH 2/9] hurd: Use proper integer types

2023-02-19 Thread Samuel Thibault
Applied, thanks! Sergey Bugaev, le sam. 18 févr. 2023 23:37:10 +0300, a ecrit: > Fix a few more cases of build errors caused by mismatched types. This is a > continuation of f4315054b46d5e58b44a709a51943fb73f846afb. > > Signed-off-by: Sergey Bugaev > --- > hurd/hurdsig.c | 6 ++

Re: [RFC PATCH 1/9] hurd: Move thread state manipulation into _hurd_tls_new ()

2023-02-19 Thread Samuel Thibault
Applied, thanks! Sergey Bugaev, le sam. 18 févr. 2023 23:37:09 +0300, a ecrit: > This is going to be done differently on x86_64. > > Signed-off-by: Sergey Bugaev > --- > mach/setup-thread.c | 18 ++ > sysdeps/mach/hurd/i386/tls.h | 25 - > 2 file

Re: checking whether mig supports the retcode keyword... no

2023-02-19 Thread Flávio Cruz
On Fri, Feb 17, 2023 at 6:26 AM Sergey Bugaev wrote: > On Fri, Feb 17, 2023 at 9:02 AM Flávio Cruz wrote: > > Thanks for the instructions. I discovered that mach_msg_type_long_t does > not align to 8 bytes so it also needs a bit of padding just like > mach_msg_type_t. See my last patch. I was ab

[PATCH mig] Change complex_align_of to be sizeof(uintptr_t)

2023-02-19 Thread Flavio Cruz
By using uintptr_t, we ensure that all 64 bit stubs are free of undefined behavior since we support up to 8-byte alignment. This works fine given that Mig will type check types that have higher alignment requirements through the use of _Static_assert. This even works for a 64 bit kernel / 32 bit u

[PATCH gnumach] Support alignment requirements for a 64 bit kernel.

2023-02-19 Thread Flavio Cruz
We introduce both a user alignment and a kernel alignment. These are separate requirements since for 64 bit with a 32 bit kernel we need to ensure the kernel can consume messages that are 8-byte aligned. This change removes any possibility of undefined behavior and also allows the kernel to support

Re: [PATCH gnumach] Unmask irq 12 - fixes stuck console with apic

2023-02-19 Thread Samuel Thibault
Hello, Damien Zammit, le dim. 19 févr. 2023 02:24:12 +, a ecrit: > --- > i386/i386at/model_dep.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/i386/i386at/model_dep.c b/i386/i386at/model_dep.c > index baff8da1..73b99f94 100644 > --- a/i386/i386at/model_dep.c > +++ b/i386/i386at/

Re: [PATCH gnumach] model_dep: Call acpi_apic_init if APIC defined

2023-02-19 Thread Samuel Thibault
Applied, thanks! Damien Zammit, le dim. 19 févr. 2023 02:24:03 +, a ecrit: > Fixes boot --enable-ncpus=1 with --enable-apic configuration > albeit the keyboard is stuck and network cannot be accessed. > > Error messages: > > Timeout reached while wating for return value > /bin/console: Could