[PATCH v3 gnumach] ACPI: Support XSDT (ACPI >= v2.0)

2024-01-30 Thread Damien Zammit
This enables gnumach to additionally parse the XSDT table if the revision of ACPI is 2. TESTED: Still works on qemu (ACPI v1.0) TESTED: Works on a x86 board with XSDT (ACPI v2.0) --- i386/i386at/acpi_parse_apic.c | 258 ++ i386/i386at/acpi_parse_apic.h | 18 ++- i

Re: [PATCH gnumach] Add vm_pages_phys

2024-01-30 Thread Samuel Thibault
Sergey Bugaev, le mar. 30 janv. 2024 09:38:39 +0300, a ecrit: > 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 v2 gnumach] ACPI: Support XSDT (ACPI >= v2.0)

2024-01-30 Thread Samuel Thibault
Damien Zammit, le mar. 30 janv. 2024 08:04:38 +, a ecrit: > This enables gnumach to additionally parse the XSDT table > if the revision of ACPI is 2. > > NB: I removed a few checksum checks in acpi tables where > there is no checksum present in the table. > > TESTED: Still works on qemu (ACPI

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

2024-01-30 Thread Samuel Thibault
Applied, thanks! Damien Zammit, le mar. 30 janv. 2024 08:04:15 +, a ecrit: > Clear flag in msr for xAPIC mode. > > --- > i386/i386/apic.h | 3 ++- > i386/i386/cpuboot.S | 4 ++-- > i386/i386at/boothdr.S | 3 ++- > 3 files changed, 6 insertions(+), 4 deletions(-) > > diff --git a/i386

Re: [PATCH gnumach] smp: Remove hardcoded AP_BOOT_ADDR

2024-01-30 Thread Samuel Thibault
Damien Zammit, le mar. 30 janv. 2024 01:55:32 +, a ecrit: > 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

Re: [PATCH gnumach] smp: Remove hardcoded AP_BOOT_ADDR

2024-01-30 Thread Samuel Thibault
Hello, Jessica Clarke, le mar. 30 janv. 2024 16:07:29 +, a ecrit: > On 30 Jan 2024, at 09:02, Samuel Thibault wrote: > > > > Jessica Clarke, le mar. 30 janv. 2024 02:32:07 +, a ecrit: > >> On 29 Jan 2024, at 10:20, Samuel Thibault wrote: > >>> > >>> Damien Zammit, le lun. 29 janv. 2024

Re: [PATCH gnumach] smp: Remove hardcoded AP_BOOT_ADDR

2024-01-30 Thread Jessica Clarke
On 30 Jan 2024, at 09:02, Samuel Thibault wrote: > > Jessica Clarke, le mar. 30 janv. 2024 02:32:07 +, a ecrit: >> 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

Re: CI

2024-01-30 Thread Samuel Thibault
Hello, Flávio Cruz, le lun. 29 janv. 2024 23:03:43 -0500, a ecrit: > On Sun, Jan 14, 2024 at 7:13 PM Samuel Thibault <[1]samuel.thiba...@gnu.org> > wrote: > > Flávio Cruz, le mar. 05 déc. 2023 01:27:30 -0500, a ecrit: > > I have sent quite a few patches throughout the last year or so >

Re: [PATCH gnumach] smp: Remove hardcoded AP_BOOT_ADDR

2024-01-30 Thread Samuel Thibault
Jessica Clarke, le mar. 30 janv. 2024 02:32:07 +, a ecrit: > 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),

[PATCH v2 gnumach] smp: Remove hardcoded AP_BOOT_ADDR

2024-01-30 Thread Damien Zammit
This took some time to figure out. Involves a hand-crafted 16 bit assembly instruction [1] because it requires an immediate for the memory address of far jump. This required self-modifying code to inject the next instruction, therefore I added a near jump to clear the instruction cache queue in ca

[PATCH v2 gnumach] ACPI: Support XSDT (ACPI >= v2.0)

2024-01-30 Thread Damien Zammit
This enables gnumach to additionally parse the XSDT table if the revision of ACPI is 2. NB: I removed a few checksum checks in acpi tables where there is no checksum present in the table. TESTED: Still works on qemu (ACPI v1.0) TESTED: Works on a x86 board with XSDT (ACPI v2.0) --- i386/i386at/

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

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