Re: [PATCH gnumach] Add vm_pages_phys

2024-01-29 Thread Flávio Cruz
On Tue, Jan 30, 2024 at 1:38 AM Sergey Bugaev wrote: > Hello, > > On Mon, Jan 29, 2024 at 11:59 PM Samuel Thibault > wrote: > > Please notably review the RPC part, I really don't know that much about > > mig. > > Some nitpicks inline. Flávio, does what I'm saying below make sense to you? > > > +

Re: [PATCH gnumach] Add vm_pages_phys

2024-01-29 Thread Sergey Bugaev
Hello, On Mon, Jan 29, 2024 at 11:59 PM Samuel Thibault wrote: > Please notably review the RPC part, I really don't know that much about > mig. Some nitpicks inline. Flávio, does what I'm saying below make sense to you? > +/* > + * vm_pages_phys returns information about a region of memory

Re: CI

2024-01-29 Thread Flávio Cruz
Hi On Sun, Jan 14, 2024 at 7:13 PM Samuel Thibault wrote: > Hello, > > Flávio Cruz, le mar. 05 déc. 2023 01:27:30 -0500, a ecrit: > > On Sat, Dec 2, 2023 at 8:30 PM Samuel Thibault <[1] > samuel.thiba...@gnu.org> > > wrote: > > > > > Yes, sure, anything will do. > > > > > > I essentially mean th

Re: [PATCH gnumach] Add vm_pages_phys

2024-01-29 Thread Flávio Cruz
Hello On Mon, Jan 29, 2024 at 3:59 PM Samuel Thibault wrote: > For rumpdisk to efficiently determine the physical address, both for > checking whether it is below 4GiB, and for giving it to the disk > driver, we need a gnumach primitive (and that is not conditioned by > MACH_VM_DEBUG like mach_v

Re: [PATCH gnumach] smp: Remove hardcoded AP_BOOT_ADDR

2024-01-29 Thread Jessica Clarke
On 29 Jan 2024, at 10:20, Samuel Thibault wrote: > > Damien Zammit, le lun. 29 janv. 2024 10:07:30 +, a ecrit: >> - ljmp $BOOT_CS, $M(0f) >> + xorl %eax, %eax >> + mov %cs, %ax >> + shll $4, %eax >> + addl $M(0f), %eax >> + movl %eax, M(ljmp_offset32) > > This won't work with pipelined proce

Re: [PATCH gnumach] smp: Remove hardcoded AP_BOOT_ADDR

2024-01-29 Thread Damien Zammit
Hi Samuel, On 1/29/24 9:20 PM, Samuel Thibault wrote: > Damien Zammit, le lun. 29 janv. 2024 10:07:30 +, a ecrit: >> -ljmp$BOOT_CS, $M(0f) >> +xorl%eax, %eax >> +mov %cs, %ax >> +shll$4, %eax >> +addl$M(0f), %eax >> +movl%eax, M(ljmp_offset32) >

[PATCH gnumach] Add vm_pages_phys

2024-01-29 Thread Samuel Thibault
For rumpdisk to efficiently determine the physical address, both for checking whether it is below 4GiB, and for giving it to the disk driver, we need a gnumach primitive (and that is not conditioned by MACH_VM_DEBUG like mach_vm_region_info and mach_vm_object_pages_phys are). --- Please notably re

Re: [PATCH] Support up to two IOAPICs with up to 32 GSIs on each

2024-01-29 Thread Samuel Thibault
Applied, thanks! Damien Zammit, le lun. 29 janv. 2024 10:06:57 +, a ecrit: > Previously, only IOAPIC[0] was supported. > Now this supports up to two IOAPICs. > > --- > i386/i386/apic.c | 13 + > i386/i386/apic.h | 6 ++- > i386/i386/locore.S| 43 +++

Re: [PATCH gnumach] smp: Remove hardcoded AP_BOOT_ADDR

2024-01-29 Thread Samuel Thibault
Damien Zammit, le lun. 29 janv. 2024 10:07:30 +, a ecrit: > - ljmp$BOOT_CS, $M(0f) > + xorl%eax, %eax > + mov %cs, %ax > + shll$4, %eax > + addl$M(0f), %eax > + movl%eax, M(ljmp_offset32) This won't work with pipelined processors, which assume a

Re: [PATCH gnumach] apic: Set up LAPICs in xAPIC mode

2024-01-29 Thread Samuel Thibault
Hello, Damien Zammit, le lun. 29 janv. 2024 10:06:38 +, a ecrit: > Clear flag in msr for xAPIC mode. > > --- > i386/i386/apic.h | 3 ++- > i386/i386/cpuboot.S | 3 ++- > i386/i386at/boothdr.S | 3 ++- > 3 files changed, 6 insertions(+), 3 deletions(-) > > diff --git a/i386/i386/apic.

[PATCH gnumach] smp: Remove hardcoded AP_BOOT_ADDR

2024-01-29 Thread Damien Zammit
This took some time to figure out. Involves hand-crafted 16 bit assembly instructions [1] because GNU AS does not fully understand real-mode x86. [1] Intel Architecture Software Developer's Manual, Volume 2: Instruction Set Reference Manual --- i386/i386/cpuboot.S | 32 ++

[PATCH gnumach] apic: Set up LAPICs in xAPIC mode

2024-01-29 Thread Damien Zammit
Clear flag in msr for xAPIC mode. --- i386/i386/apic.h | 3 ++- i386/i386/cpuboot.S | 3 ++- i386/i386at/boothdr.S | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/i386/i386/apic.h b/i386/i386/apic.h index e870dcf8..9f908159 100644 --- a/i386/i386/apic.h +++ b/i386/i

[PATCH] Support up to two IOAPICs with up to 32 GSIs on each

2024-01-29 Thread Damien Zammit
Previously, only IOAPIC[0] was supported. Now this supports up to two IOAPICs. --- i386/i386/apic.c | 13 + i386/i386/apic.h | 6 ++- i386/i386/locore.S| 43 + i386/i386at/acpi_parse_apic.c | 3 ++ i386/i386at/int_init.c| 6 ++-