:: commit b27e1bcb58cf7ed30bc05f43ffc3350fcd4df96d

Kacper Słomiński <kacper.slominski72@gmail.com> — 2024-07-12 02:58

parents: b56acdb07d

PROTOCOL: Get rid of unreliable gic_iface_no field on AArch64

diff --git a/PROTOCOL.md b/PROTOCOL.md
index 77f5fa87..60b34e0d 100644
--- a/PROTOCOL.md
+++ b/PROTOCOL.md
@@ -708,7 +708,7 @@ typedef void (*limine_goto_address)(struct limine_smp_info *);
 
 struct limine_smp_info {
     uint32_t processor_id;
-    uint32_t gic_iface_no;
+    uint32_t reserved1;
     uint64_t mpidr;
     uint64_t reserved;
     limine_goto_address goto_address;
@@ -716,8 +716,7 @@ struct limine_smp_info {
 };
 ```
 
-* `processor_id` - ACPI Processor UID as specified by the MADT
-* `gic_iface_no` - GIC CPU Interface number of the processor as specified by the MADT (possibly always 0)
+* `processor_id` - ACPI Processor UID as specified by the MADT (always 0 on non-ACPI systems)
 * `mpidr` - MPIDR of the processor as specified by the MADT or device tree
 * `goto_address` - An atomic write to this field causes the parked CPU to
 jump to the written address, on a 64KiB (or Stack Size Request size) stack. A pointer to the
diff --git a/common/sys/smp.c b/common/sys/smp.c
index 5fe06e4b..e1369308 100644
--- a/common/sys/smp.c
+++ b/common/sys/smp.c
@@ -483,7 +483,6 @@ static struct limine_smp_info *try_acpi_smp(size_t   *cpu_count,
                 struct limine_smp_info *info_struct = &ret[*cpu_count];
 
                 info_struct->processor_id = gicc->acpi_uid;
-                info_struct->gic_iface_no = gicc->iface_no;
                 info_struct->mpidr = gicc->mpidr;
 
                 // Do not try to restart the BSP
diff --git a/limine.h b/limine.h
index 04d96910..2e6bc337 100644
--- a/limine.h
+++ b/limine.h
@@ -334,7 +334,7 @@ struct limine_smp_response {
 
 struct limine_smp_info {
     uint32_t processor_id;
-    uint32_t gic_iface_no;
+    uint32_t reserved1;
     uint64_t mpidr;
     uint64_t reserved;
     LIMINE_PTR(limine_goto_address) goto_address;
diff --git a/test/limine.c b/test/limine.c
index 607a69f7..7806d3b9 100644
--- a/test/limine.c
+++ b/test/limine.c
@@ -206,7 +206,6 @@ void ap_entry(struct limine_smp_info *info) {
 #if defined (__x86_64__)
     e9_printf("My LAPIC ID: %x", info->lapic_id);
 #elif defined (__aarch64__)
-    e9_printf("My GIC CPU Interface no.: %x", info->gic_iface_no);
     e9_printf("My MPIDR: %x", info->mpidr);
 #elif defined (__riscv)
     e9_printf("My Hart ID: %x", info->hartid);
@@ -446,7 +445,6 @@ FEAT_START
 #if defined (__x86_64__)
         e9_printf("LAPIC ID: %x", cpu->lapic_id);
 #elif defined (__aarch64__)
-        e9_printf("GIC CPU Interface no.: %x", cpu->gic_iface_no);
         e9_printf("MPIDR: %x", cpu->mpidr);
 #elif defined (__riscv)
         e9_printf("Hart ID: %x", cpu->hartid);
tab: 248 wrap: offon