Hello!
Seeing that the patches to make binutils and GCC support --target=x86_64-gnu
have recently landed, I thought it would be interesting to try to configure
glibc with --host=x86_64-gnu and see what breaks.
To make things work at least somewhat, I've tried to put some basic directory
& Implies
..so that it can match the alignment of pthread_mutex_t on x86_64-gnu.
This likely breaks many other arches (if not all of them), though.
Signed-off-by: Sergey Bugaev
---
sysdeps/pthread/threads.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sysdeps/pthread/threads.h b/sys
When casting between a pointer and an integer of a different size, GCC
emits a warning (which is escalated to a build failure by -Werror).
Indeed, if what you start with is a pointer, which you then cast to a
shorter integer and then back again, you're going to cut off some bits
of the pointer.
Bu
tls.h in particular is very unfinished.
Signed-off-by: Sergey Bugaev
---
sysdeps/mach/hurd/x86_64/static-start.S | 27 +++
sysdeps/mach/hurd/x86_64/tls.h | 182
sysdeps/mach/hurd/x86_64/tlsdesc.sym| 22 +++
sysdeps/x86_64/htl/bits/pthreadtypes-arch
Since GNU Mach commit d30481122a5d24ad6b921062f93b9172ef922fc3,
i386/machine_types.defs defines types based on defined(__x86_64__).
Supressing the built-in macro definitions will now result in the wrong
type being silently selected.
-undef was initially introduced in commit
78b6a7665db7b2eae367e17
'sem' is the opaque 'sem_t', 'isem' is the actual 'struct new_sem'.
Signed-off-by: Sergey Bugaev
---
sysdeps/htl/sem-timedwait.c | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/sysdeps/htl/sem-timedwait.c b/sysdeps/htl/sem-timedwait.c
index 8f2df6e7..9974e9ae 10064
Make the code flow more linear using early returns where possible. This
makes it so much easier to reason about what runs on error / successful
code paths.
Signed-off-by: Sergey Bugaev
---
sysdeps/mach/hurd/readlinkat.c | 55 --
1 file changed, 32 insertions(+), 2
Signed-off-by: Sergey Bugaev
---
mach/Makefile | 3 ++-
sysdeps/mach/configure| 6 +++---
sysdeps/mach/configure.ac | 6 +++---
3 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/mach/Makefile b/mach/Makefile
index 39358fdb..f2fdd7da 100644
--- a/mach/Makefile
+++ b/ma
...not sizeof(int). This appears to be required on x86_64.
PLEASE NOTE: There is now a patch from Flavio Cruz ("Make MIG work for
pure 64 bit kernel and userland") that appears to tackle this same issue
(and more). Most likely this simplistic patch should be dropped in favor
of the one from Flavio
This does not seem like it is supposed to return negative error codes.
Signed-off-by: Sergey Bugaev
---
hurd/xattr.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hurd/xattr.c b/hurd/xattr.c
index 48914bcf..5a0fc263 100644
--- a/hurd/xattr.c
+++ b/hurd/xattr.c
@@ -68,7 +68,
And move pt-setup.c to the generic x86 tree.
Signed-off-by: Sergey Bugaev
---
sysdeps/mach/hurd/Implies | 1 +
sysdeps/mach/hurd/{i386 => x86}/htl/pt-setup.c | 4 ++--
sysdeps/mach/hurd/x86_64/Implies | 2 ++
sysdeps/mach/hurd/x86_64/htl/Implies | 3 +
It has been decided that on x86_64, mach_msg_type_number_t stays 32-bit.
Therefore, it's not possible to use mach_msg_type_number_t
interchangeably with size_t, in particular this breaks when a pointer to
a variable is passed to a MIG routine.
Signed-off-by: Sergey Bugaev
---
hurd/hurdioctl.c
---
hurd/tioctl.defs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/hurd/tioctl.defs b/hurd/tioctl.defs
index 905a4a38..a04f5ae4 100644
--- a/hurd/tioctl.defs
+++ b/hurd/tioctl.defs
@@ -34,9 +34,9 @@ import ; /* XXX */
/* These are the pieces of a struct termios as spec
Il 12/02/23 07:15, Flavio Cruz ha scritto:
Made changes to MIG so that generated stubs can be compiled when using
a 64 bit userland. The most important change here is to ensure
that data is always 8-byte aligned. Not doing that will lead to
undefined behavior since on 64 bits many structures can
Hello,
Flavio Cruz, le dim. 12 févr. 2023 01:15:05 -0500, a ecrit:
> diff --git a/configure.ac b/configure.ac
> index e4645bd..8d52d5f 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -55,6 +55,13 @@ AC_SUBST([MIGCOM])
> [MIG=`echo mig | sed "$program_transform_name"`]
> AC_SUBST([MIG])
>
Thanks for your work on the 64bit RPC part, that's tricky :)
Flavio Cruz, le dim. 12 févr. 2023 01:15:05 -0500, a ecrit:
> diff --git a/cpu.sym b/cpu.sym
> index 6bcb878..7858b47 100644
> --- a/cpu.sym
> +++ b/cpu.sym
> @@ -95,8 +95,8 @@ expr MACH_MSG_TYPE_POLYMORPHIC
>
>
> /* Types used in i
Applied, thanks!
Sergey Bugaev via Libc-alpha, le dim. 12 févr. 2023 14:10:32 +0300, a ecrit:
> Make the code flow more linear using early returns where possible. This
> makes it so much easier to reason about what runs on error / successful
> code paths.
>
> Signed-off-by: Sergey Bugaev
> ---
>
Applied, thanks!
Sergey Bugaev via Libc-alpha, le dim. 12 févr. 2023 14:10:33 +0300, a ecrit:
> It has been decided that on x86_64, mach_msg_type_number_t stays 32-bit.
> Therefore, it's not possible to use mach_msg_type_number_t
> interchangeably with size_t, in particular this breaks when a poin
Applied, thanks!
Sergey Bugaev, le dim. 12 févr. 2023 14:10:34 +0300, a ecrit:
> When casting between a pointer and an integer of a different size, GCC
> emits a warning (which is escalated to a build failure by -Werror).
> Indeed, if what you start with is a pointer, which you then cast to a
> sh
Applied, thanks!
Sergey Bugaev, le dim. 12 févr. 2023 14:10:35 +0300, a ecrit:
> This does not seem like it is supposed to return negative error codes.
>
> Signed-off-by: Sergey Bugaev
> ---
> hurd/xattr.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hurd/xattr.c b/
Applied, thanks!
Sergey Bugaev, le dim. 12 févr. 2023 14:10:36 +0300, a ecrit:
> 'sem' is the opaque 'sem_t', 'isem' is the actual 'struct new_sem'.
>
> Signed-off-by: Sergey Bugaev
> ---
> sysdeps/htl/sem-timedwait.c | 10 +-
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff
We don't need these to be 64bits, 32bit will be completely large enough.
Which issue did you actually encounter?
Samuel
Sergey Bugaev, le dim. 12 févr. 2023 14:10:37 +0300, a ecrit:
> ---
> hurd/tioctl.defs | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/hurd/tioct
Sergey Bugaev, le dim. 12 févr. 2023 14:10:38 +0300, a ecrit:
> Since GNU Mach commit d30481122a5d24ad6b921062f93b9172ef922fc3,
> i386/machine_types.defs defines types based on defined(__x86_64__).
> Supressing the built-in macro definitions will now result in the wrong
> type being silently select
Sergey Bugaev, le dim. 12 févr. 2023 14:10:40 +0300, a ecrit:
> Signed-off-by: Sergey Bugaev
> ---
> mach/Makefile | 3 ++-
> sysdeps/mach/configure| 6 +++---
> sysdeps/mach/configure.ac | 6 +++---
> 3 files changed, 8 insertions(+), 7 deletions(-)
>
> diff --git a/mach/Makefil
Sergey Bugaev, le dim. 12 févr. 2023 14:10:41 +0300, a ecrit:
> And move pt-setup.c to the generic x86 tree.
>
> Signed-off-by: Sergey Bugaev
> ---
> sysdeps/mach/hurd/Implies | 1 +
> sysdeps/mach/hurd/{i386 => x86}/htl/pt-setup.c | 4 ++--
> sysdeps/mach/hurd/x86_64/Implie
On Sun, Feb 12, 2023 at 6:00 PM Samuel Thibault wrote:
> We don't need these to be 64bits, 32bit will be completely large enough.
>
> Which issue did you actually encounter?
Well, these MIG definitions need to match the ones in C/glibc. In
hurd/ioctl_types.h (in the Hurd tree) there is
typedef t
Sergey Bugaev, le dim. 12 févr. 2023 14:10:43 +0300, a ecrit:
> ..so that it can match the alignment of pthread_mutex_t on x86_64-gnu.
I'd say rather make pthread_mutex_t aligned on long int, so we can
possibly in the future put some pointers in it without breaking the ABI.
> This likely breaks m
Sergey Bugaev, le dim. 12 févr. 2023 18:15:57 +0300, a ecrit:
> On Sun, Feb 12, 2023 at 6:00 PM Samuel Thibault
> wrote:
> > We don't need these to be 64bits, 32bit will be completely large enough.
> >
> > Which issue did you actually encounter?
>
> Well, these MIG definitions need to match the
> > # Translate GNU names for CPUs into the names used in Mach header files.
> > -mach-machine = $(patsubst powerpc,ppc,$(base-machine))
> > +mach-machine := $(patsubst powerpc,ppc,$(base-machine))
> > +mach-machine := $(patsubst x86_64,i386,$(mach-machine))
>
> Mmm, no, it's not actually a transl
Sergey Bugaev, le dim. 12 févr. 2023 18:38:03 +0300, a ecrit:
> Since mach/machine/syscall_sw.h is the i386 version on x86_64 (or --
> is it not supposed to be?)
Nobody yet decided that the system call interface would be the same on
i386 and on x86_64 :)
Most probably we'll need a different heade
On Sun, Feb 12, 2023 at 6:18 PM Samuel Thibault wrote:
> I'd say rather make pthread_mutex_t aligned on long int, so we can
> possibly in the future put some pointers in it without breaking the ABI.
I honestly have 0 idea how it is not 8-aligned right now (nor how its
size is 32 and not like 56),
On Sun, Feb 12, 2023 at 6:46 PM Samuel Thibault wrote:
>
> Sergey Bugaev, le dim. 12 févr. 2023 18:38:03 +0300, a ecrit:
> > Since mach/machine/syscall_sw.h is the i386 version on x86_64 (or --
> > is it not supposed to be?)
>
> Nobody yet decided that the system call interface would be the same o
Hi,
Il 12/02/23 14:37, Luca ha scritto:
Il 12/02/23 07:15, Flavio Cruz ha scritto:
For the 64 bit / 32 bit configuration, we can pass --enable-user32 when
targeting x86_64, and MIG will generate stubs as before. I am unsure
whether there exists undefined behavior in that particular configuratio
On Sun, Feb 12, 2023 at 7:01 PM Luca wrote:
> It seems XNU's mig [0] always sets the alignment to natural_t (=4) with
> a #pragma... I still have to understand how they handle these issues.
Please note that XNU uses "untyped messaging", and Apple's version of
MIG is "untyped MIG". They don't have
Sergey Bugaev, le dim. 12 févr. 2023 14:10:42 +0300, a ecrit:
> It seems that GCC expects TLS on x86_64 to be done relative to %fs, not %gs,
> so
> that's what I attempted to do in tls.h. The main thing missing there is the
> ability to actually set (and read) the %fs base address of a thread. It
Hello,
Sergey Bugaev via Libc-alpha, le dim. 12 févr. 2023 14:10:31 +0300, a ecrit:
> The main missing pieces seem to be, ordered by scariness increasing:
> - missing x86_64 thread state definition in the kernel headers;
> - TLS things;
> - INTR_MSG_TRAP.
INTR_MSG_TRAP shouldn't be hard. It's the
On Sun, Feb 12, 2023 at 6:22 PM Samuel Thibault wrote:
> I'd rather say drop the "long" part, to avoid having to pull the
> stdint.h header in.
That's what I meant, yes.
> Nowadays' BSD headers just use the int type,
> notably.
So given that the Linux port has its own bits/termios.h, is it fine
On Sun, Feb 12, 2023 at 7:11 PM Samuel Thibault wrote:
>
> Sergey Bugaev, le dim. 12 févr. 2023 14:10:42 +0300, a ecrit:
> > We should not need a getter routine, because one can simply inspect the
> > target
> > thread's state (unless, again, I misunderstand things horribly).
>
> For 16bit fs/gs
Sergey Bugaev, le dim. 12 févr. 2023 18:52:37 +0300, a ecrit:
> On Sun, Feb 12, 2023 at 6:18 PM Samuel Thibault
> wrote:
> > I'd say rather make pthread_mutex_t aligned on long int, so we can
> > possibly in the future put some pointers in it without breaking the ABI.
>
> I honestly have 0 idea
Sergey Bugaev, le dim. 12 févr. 2023 19:13:58 +0300, a ecrit:
> On Sun, Feb 12, 2023 at 6:22 PM Samuel Thibault
> wrote:
> > I'd rather say drop the "long" part, to avoid having to pull the
> > stdint.h header in.
>
> That's what I meant, yes.
>
> > Nowadays' BSD headers just use the int type,
Il 12/02/23 17:05, Sergey Bugaev ha scritto:
On Sun, Feb 12, 2023 at 7:01 PM Luca wrote:
It seems XNU's mig [0] always sets the alignment to natural_t (=4) with
a #pragma... I still have to understand how they handle these issues.
Please note that XNU uses "untyped messaging", and Apple's ver
Sergey Bugaev, le dim. 12 févr. 2023 19:25:11 +0300, a ecrit:
> On Sun, Feb 12, 2023 at 7:11 PM Samuel Thibault
> wrote:
> > Sergey Bugaev, le dim. 12 févr. 2023 14:10:42 +0300, a ecrit:
> > > We should not need a getter routine, because one can simply inspect the
> > > target
> > > thread's sta
* Samuel Thibault via Libc-alpha:
> Sergey Bugaev, le dim. 12 févr. 2023 19:25:11 +0300, a ecrit:
>> On Sun, Feb 12, 2023 at 7:11 PM Samuel Thibault
>> wrote:
>> > Sergey Bugaev, le dim. 12 févr. 2023 14:10:42 +0300, a ecrit:
>> > > We should not need a getter routine, because one can simply ins
Florian Weimer, le dim. 12 févr. 2023 17:40:58 +0100, a ecrit:
> * Samuel Thibault via Libc-alpha:
>
> > Sergey Bugaev, le dim. 12 févr. 2023 19:25:11 +0300, a ecrit:
> >> On Sun, Feb 12, 2023 at 7:11 PM Samuel Thibault
> >> wrote:
> >> > Sergey Bugaev, le dim. 12 févr. 2023 14:10:42 +0300, a ec
On Sun, Feb 12, 2023 at 7:36 PM Samuel Thibault wrote:
>
> Sergey Bugaev, le dim. 12 févr. 2023 19:25:11 +0300, a ecrit:
> > On Sun, Feb 12, 2023 at 7:11 PM Samuel Thibault
> > wrote:
> > > Sergey Bugaev, le dim. 12 févr. 2023 14:10:42 +0300, a ecrit:
> > > > We should not need a getter routine,
Sergey Bugaev, le dim. 12 févr. 2023 19:51:33 +0300, a ecrit:
> On Sun, Feb 12, 2023 at 7:36 PM Samuel Thibault
> wrote:
> >
> > Sergey Bugaev, le dim. 12 févr. 2023 19:25:11 +0300, a ecrit:
> > > On Sun, Feb 12, 2023 at 7:11 PM Samuel Thibault
> > > wrote:
> > > > Sergey Bugaev, le dim. 12 fév
* include/mach/task_info.h: use rpc variant of time_value_t
* include/mach/thread_info.h: Likewise
* kern/mach_clock.c: use rpc variant of time_value_t in
read_time_stamp()
* kern/mach_clock.h: Likewise
* kern/thread.c: use rpc variant of thread_read_times()
* kern/timer.h_ add thread_read_times_
* i386/intel/pmap.c: allocate the L4 page table from a dedicate kmem
cache instead of the generic kernel map.
Also improve readability of nested ifdef's.
---
i386/intel/pmap.c | 34 +++---
1 file changed, 19 insertions(+), 15 deletions(-)
diff --git a/i386/intel/pm
This series contains some minor fixes
set unused members of thread state to 0
fix hardcoded physical address
add L4 kmem cache for x86_64
and the last two rpc compatibility issues
fix rpc time value for 64 bit
fix port name size in notifications
then at this stage it seems fine to enable
Signed-off-by: Luca Dariz
---
x86_64/locore.S | 3 ---
1 file changed, 3 deletions(-)
diff --git a/x86_64/locore.S b/x86_64/locore.S
index 5b9c8ef4..95ece3cc 100644
--- a/x86_64/locore.S
+++ b/x86_64/locore.S
@@ -1075,9 +1075,6 @@ syscall_entry_2:
pushq %rax/* save
* i386/i386/pcb.c: always set esp to 0, it seems unused.
---
i386/i386/pcb.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/i386/i386/pcb.c b/i386/i386/pcb.c
index 9ac55a1c..924ed08b 100644
--- a/i386/i386/pcb.c
+++ b/i386/i386/pcb.c
@@ -706,6 +706,7 @@ kern_return_t thread_getstatus(
* i386/i386at/com.c use proper helper to convert physical to virtual
address.
---
i386/i386at/com.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/i386/i386at/com.c b/i386/i386at/com.c
index 000475db..de21206c 100644
--- a/i386/i386at/com.c
+++ b/i386/i386at/com.c
@@ -276,7
* ipc/ipc_machdep.h: define PORT_NAME_T_SIZE_IN_BITS
* ipc/ipc_notify.c: fix port name size in notification message
templates
---
ipc/ipc_machdep.h | 1 +
ipc/ipc_notify.c | 8
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/ipc/ipc_machdep.h b/ipc/ipc_machdep.h
index 29
On Sun, Feb 12, 2023 at 8:02 PM Samuel Thibault wrote:
> I'd rather make it a separate state content, like we have a separate
> i386_DEBUG_STATE content.
>
> (And thus no need for a new RPC).
Makes sense to me! 👍
Sergey
Better avoid uninitialized data indeed, applied, thanks!
Luca Dariz, le dim. 12 févr. 2023 18:03:08 +0100, a ecrit:
> * i386/i386/pcb.c: always set esp to 0, it seems unused.
> ---
> i386/i386/pcb.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/i386/i386/pcb.c b/i386/i386/pcb.c
> ind
Applied, thanks!
Luca Dariz, le dim. 12 févr. 2023 18:03:09 +0100, a ecrit:
> * i386/i386at/com.c use proper helper to convert physical to virtual
> address.
> ---
> i386/i386at/com.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/i386/i386at/com.c b/i386/i386at/com.c
Applied, thanks!
Luca Dariz, le dim. 12 févr. 2023 18:03:10 +0100, a ecrit:
> * i386/intel/pmap.c: allocate the L4 page table from a dedicate kmem
> cache instead of the generic kernel map.
> Also improve readability of nested ifdef's.
> ---
> i386/intel/pmap.c | 34 +++---
* i386/i386/vm_param.h: add VM_MAX/MIN_USER_ADDRESS to kernel headers.
* i386/i386/db_interface.c
* i386/i386/ldt.c
* i386/i386/pcb.c
* i386/intel/pmap.c
* kern/task.c: replace VM_MAX/MIN_ADDRESS with VM_MAX/MIN_USER_ADDRESS
---
i386/i386/db_interface.c | 4 ++--
i386/i386/ldt.c | 8 +++
* x86_64/interrupt.S: use 64-bit registers as variables could be
stored at high addresses
* x86_64/locore.S: Likewise
---
x86_64/interrupt.S | 4 ++--
x86_64/locore.S| 6 ++
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/x86_64/interrupt.S b/x86_64/interrupt.S
index fe2b3
* i386/i386/vm_param.h: adjust constants to the new kernel map
- the boothdr.S code already sets up a temporary map to higher
addresses, so we can use INIT_VM_MIN_KERNEL_ADDRESS as in xen
- increase the kernel map size to accomodate for bigger structures
and more memory
- adjust kerne
Applied, thanks!
Luca Dariz, le dim. 12 févr. 2023 18:03:11 +0100, a ecrit:
> * include/mach/task_info.h: use rpc variant of time_value_t
> * include/mach/thread_info.h: Likewise
> * kern/mach_clock.c: use rpc variant of time_value_t in
> read_time_stamp()
> * kern/mach_clock.h: Likewise
> * ker
This is a preparation to run the kernel on high addresses, where the
user vm region and the kernel vm region will use different L3 page
tables.
* i386/intel/pmap.c: on x86_64, retrieve the value of pdpbase from the
L4 table, and add the pmap_pdp() helper (useful also for PAE).
* i386/intel/pmap.
* i386/intel/pmap.c: move it to pmap_bootstrap_pae()
---
i386/intel/pmap.c | 72 ++-
1 file changed, 40 insertions(+), 32 deletions(-)
diff --git a/i386/intel/pmap.c b/i386/intel/pmap.c
index 15577a09..470be744 100644
--- a/i386/intel/pmap.c
+++ b/i386/
* i386/i386/vm_param.h: temporariliy fix kernel upper address
* i386/intel/pmap.c: split kernel and user L3 map initialization. For
simplicity in handling the different configurations, on 32-bit
(+PAE) the name PDPNUM_KERNEL is used in place of PDPNUM, while only
on x86_64 the PDPNUM_USER and
The kernel vm region is moved to the last 2GB of the 64-bit address
space. According to the -mcmodel=kernel, the code must be placed in
this range, but probably other addresses can be used for other data
structures, direct memory mapping and so on (as in Linux).
This is just the first step towards
* i386/intel/pmap.c: move it to pmap_bootstrap_xen()
---
i386/intel/pmap.c | 107 --
1 file changed, 56 insertions(+), 51 deletions(-)
diff --git a/i386/intel/pmap.c b/i386/intel/pmap.c
index 9fe16368..15577a09 100644
--- a/i386/intel/pmap.c
+++ b/i386/
* i386/i386/trap.c: change from int to a proper type to hold a
register value
* x86_64/locore.S: use 64-bit register to avoid address truncation
---
i386/i386/trap.c | 12 ++--
x86_64/locore.S | 4 ++--
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/i386/i386/trap.c b/i
* i386/intel/pmap.c: start walking the page table tree from the L4
table instead of the PDP table in pmap_pte() and pmap_pde(),
preparing for the kernel to run on high addresses.
---
i386/intel/pmap.c | 28 +++-
1 file changed, 23 insertions(+), 5 deletions(-)
diff --g
On Sun, Feb 12, 2023 at 11:34 AM Luca wrote:
> Il 12/02/23 17:05, Sergey Bugaev ha scritto:
> > On Sun, Feb 12, 2023 at 7:01 PM Luca wrote:
> >> It seems XNU's mig [0] always sets the alignment to natural_t (=4) with
> >> a #pragma... I still have to understand how they handle these issues.
> >
Applied, thanks!
Luca Dariz, le dim. 12 févr. 2023 18:03:12 +0100, a ecrit:
> * ipc/ipc_machdep.h: define PORT_NAME_T_SIZE_IN_BITS
> * ipc/ipc_notify.c: fix port name size in notification message
> templates
> ---
> ipc/ipc_machdep.h | 1 +
> ipc/ipc_notify.c | 8
> 2 files changed, 5
Applied, thanks
Luca Dariz, le dim. 12 févr. 2023 18:03:13 +0100, a ecrit:
> Signed-off-by: Luca Dariz
> ---
> x86_64/locore.S | 3 ---
> 1 file changed, 3 deletions(-)
>
> diff --git a/x86_64/locore.S b/x86_64/locore.S
> index 5b9c8ef4..95ece3cc 100644
> --- a/x86_64/locore.S
> +++ b/x86_
Il 12/02/23 18:28, Luca Dariz ha scritto:
The kernel vm region is moved to the last 2GB of the 64-bit address
space. According to the -mcmodel=kernel, the code must be placed in
this range, but probably other addresses can be used for other data
structures, direct memory mapping and so on (as in
Applied, thanks!
Luca Dariz, le dim. 12 févr. 2023 18:28:10 +0100, a ecrit:
> * i386/intel/pmap.c: start walking the page table tree from the L4
> table instead of the PDP table in pmap_pte() and pmap_pde(),
> preparing for the kernel to run on high addresses.
> ---
> i386/intel/pmap.c | 28 +
Applied, thanks!
Luca Dariz, le dim. 12 févr. 2023 18:28:11 +0100, a ecrit:
> * x86_64/interrupt.S: use 64-bit registers as variables could be
> stored at high addresses
> * x86_64/locore.S: Likewise
> ---
> x86_64/interrupt.S | 4 ++--
> x86_64/locore.S| 6 ++
> 2 files changed, 4 inse
Applied, thanks!
Luca Dariz, le dim. 12 févr. 2023 18:28:12 +0100, a ecrit:
> * i386/intel/pmap.c: move it to pmap_bootstrap_xen()
> ---
> i386/intel/pmap.c | 107 --
> 1 file changed, 56 insertions(+), 51 deletions(-)
>
> diff --git a/i386/intel/pmap.
Applied, thanks!
Luca Dariz, le dim. 12 févr. 2023 18:28:13 +0100, a ecrit:
> * i386/intel/pmap.c: move it to pmap_bootstrap_pae()
> ---
> i386/intel/pmap.c | 72 ++-
> 1 file changed, 40 insertions(+), 32 deletions(-)
>
> diff --git a/i386/intel/pmap.
Made changes to MIG so that generated stubs can be compiled when using
a 64 bit userland. The most important change here is to ensure
that data is always 8-byte aligned. Not doing that will lead to
undefined behavior since on 64 bits many structures can contain 64 bit
scalars which require 8-byte a
On Sun, Feb 12, 2023 at 9:44 AM Samuel Thibault
wrote:
> Thanks for your work on the 64bit RPC part, that's tricky :)
>
> Flavio Cruz, le dim. 12 févr. 2023 01:15:05 -0500, a ecrit:
> > diff --git a/cpu.sym b/cpu.sym
> > index 6bcb878..7858b47 100644
> > --- a/cpu.sym
> > +++ b/cpu.sym
> > @@ -95
Applied, thanks!
Luca Dariz, le dim. 12 févr. 2023 18:28:14 +0100, a ecrit:
> This is a preparation to run the kernel on high addresses, where the
> user vm region and the kernel vm region will use different L3 page
> tables.
>
> * i386/intel/pmap.c: on x86_64, retrieve the value of pdpbase from
Applied, thanks!
Luca Dariz, le dim. 12 févr. 2023 18:28:15 +0100, a ecrit:
> * i386/i386/vm_param.h: add VM_MAX/MIN_USER_ADDRESS to kernel headers.
> * i386/i386/db_interface.c
> * i386/i386/ldt.c
> * i386/i386/pcb.c
> * i386/intel/pmap.c
> * kern/task.c: replace VM_MAX/MIN_ADDRESS with VM_MAX/MI
Applied, thanks!
Luca Dariz, le dim. 12 févr. 2023 18:28:16 +0100, a ecrit:
> * i386/i386/trap.c: change from int to a proper type to hold a
> register value
> * x86_64/locore.S: use 64-bit register to avoid address truncation
> ---
> i386/i386/trap.c | 12 ++--
> x86_64/locore.S | 4
Protected payloads will be 8-byte longs which are the same size as
kernel ports.
Also aligned all the structures to be 4-byte aligned since it makes it
easier to parse them as padding won't be added to mach_msg_user_header_t
before the protected payload.
---
include/mach/message.h | 9 -
Applied, thanks!
Luca Dariz, le dim. 12 févr. 2023 18:28:17 +0100, a ecrit:
> * i386/i386/vm_param.h: temporariliy fix kernel upper address
> * i386/intel/pmap.c: split kernel and user L3 map initialization. For
> simplicity in handling the different configurations, on 32-bit
> (+PAE) the name
Applied, thanks!!
Luca Dariz, le dim. 12 févr. 2023 18:28:18 +0100, a ecrit:
> * i386/i386/vm_param.h: adjust constants to the new kernel map
> - the boothdr.S code already sets up a temporary map to higher
> addresses, so we can use INIT_VM_MIN_KERNEL_ADDRESS as in xen
> - increase the ke
This is required to implement ptrace.
---
i386/i386/pcb.c| 42 +-
i386/include/mach/i386/thread_status.h | 28 +
2 files changed, 69 insertions(+), 1 deletion(-)
diff --git a/i386/i386/pcb.c b/i386/i386/pcb.c
index 9ac55a1c..ba856523
Flavio Cruz, le dim. 12 févr. 2023 12:49:44 -0500, a ecrit:
> For the 64 bit / 32 bit configuration, we can pass --enable-user32 when
> targeting x86_64, and MIG will generate stubs as before. I am unsure
> whether there exists undefined behavior in that particular configuration
> since most of the
Applied, thanks!
Flavio Cruz, le dim. 12 févr. 2023 13:11:13 -0500, a ecrit:
> Protected payloads will be 8-byte longs which are the same size as
> kernel ports.
>
> Also aligned all the structures to be 4-byte aligned since it makes it
> easier to parse them as padding won't be added to mach_msg
On Sun, Feb 12, 2023 at 10:02 AM Samuel Thibault
wrote:
> Sergey Bugaev, le dim. 12 févr. 2023 14:10:38 +0300, a ecrit:
> > Since GNU Mach commit d30481122a5d24ad6b921062f93b9172ef922fc3,
> > i386/machine_types.defs defines types based on defined(__x86_64__).
> > Supressing the built-in macro def
Applied, thanks!
Sergey Bugaev, le dim. 12 févr. 2023 14:10:38 +0300, a ecrit:
> Since GNU Mach commit d30481122a5d24ad6b921062f93b9172ef922fc3,
> i386/machine_types.defs defines types based on defined(__x86_64__).
> Supressing the built-in macro definitions will now result in the wrong
> type bei
Applied, thanks!
Flavio Cruz, le dim. 12 févr. 2023 13:26:29 -0500, a ecrit:
> This is required to implement ptrace.
> ---
> i386/i386/pcb.c| 42 +-
> i386/include/mach/i386/thread_status.h | 28 +
> 2 files changed, 69 insertions(+)
Applied, thanks!
Sergey Bugaev, le dim. 12 févr. 2023 19:13:58 +0300, a ecrit:
> On Sun, Feb 12, 2023 at 6:22 PM Samuel Thibault
> wrote:
> > I'd rather say drop the "long" part, to avoid having to pull the
> > stdint.h header in.
>
> That's what I meant, yes.
>
> > Nowadays' BSD headers just u
* Samuel Thibault:
> Florian Weimer, le dim. 12 févr. 2023 17:40:58 +0100, a ecrit:
>> * Samuel Thibault via Libc-alpha:
>>
>> > Sergey Bugaev, le dim. 12 févr. 2023 19:25:11 +0300, a ecrit:
>> >> On Sun, Feb 12, 2023 at 7:11 PM Samuel Thibault
>> >> wrote:
>> >> > Sergey Bugaev, le dim. 12 fév
Florian Weimer, le dim. 12 févr. 2023 20:29:43 +0100, a ecrit:
> * Samuel Thibault:
>
> > Florian Weimer, le dim. 12 févr. 2023 17:40:58 +0100, a ecrit:
> >> * Samuel Thibault via Libc-alpha:
> >>
> >> > Sergey Bugaev, le dim. 12 févr. 2023 19:25:11 +0300, a ecrit:
> >> >> On Sun, Feb 12, 2023 at
rpc_time_value_t was introduced in
https://git.savannah.gnu.org/cgit/hurd/gnumach.git/commit/?id=5fdc928d3d29fdc93ad00cea5f5c877a19013d44
but it breaks the build. This change fixes it.
---
libps/spec.c | 8
procfs/process.c | 2 +-
2 files changed, 5 insertions(+), 5 deletions(-)
di
Flavio Cruz, le dim. 12 févr. 2023 16:54:52 -0500, a ecrit:
> rpc_time_value_t was introduced in
> https://git.savannah.gnu.org/cgit/hurd/gnumach.git/commit/?id=5fdc928d3d29fdc93ad00cea5f5c877a19013d44
> but it breaks the build.
Argl, I was wondering a bit about whether exposing rpc_ names could
Remove the concept of word_size since it is meaningless in some
architectures. This is also done in preparation to possibly introduce
8-byte aligned messages.
---
cpu.sym | 3 +-
global.c | 5 +--
global.h | 5 +--
parser.y | 8 ++---
routine.c | 5 ++-
server.c | 20 ++--
type.
Renamed to complex_alignof and commited, thanks!
Flavio Cruz, le dim. 12 févr. 2023 17:14:23 -0500, a ecrit:
> Remove the concept of word_size since it is meaningless in some
> architectures. This is also done in preparation to possibly introduce
> 8-byte aligned messages.
> ---
> cpu.sym | 3
This has several advantages:
1) We don't need to resize mach_msg_header_t, it is just a copy.
2) Mig won't require any changes because it statically computes the size
of mach_msg_header_t, otherwise we would need two sizes (28 vs 32 bytes).
---
include/mach/message.h | 15 +--
x86_6
Applied, thanks!
Flavio Cruz, le dim. 12 févr. 2023 18:54:58 -0500, a ecrit:
> This has several advantages:
> 1) We don't need to resize mach_msg_header_t, it is just a copy.
> 2) Mig won't require any changes because it statically computes the size
> +#else
> + if (copyout(&kmsg, &umsg, sizeof(
Applied and fixed for PAE, thanks!
Damien Zammit, le sam. 04 févr. 2023 01:15:06 +, a ecrit:
> This also serialises the AP bringup, so paging can be enabled per cpu
> one by one.
>
> Also-by: Almudena Garcia
> ---
> i386/i386/mp_desc.c | 230
> i
1 - 100 of 103 matches
Mail list logo