:: commit 0ba9919ed318067013516224283293049c3a59b9

mintsuki <mintsuki@protonmail.com> — 2024-11-30 01:19

parents: 466f72d4a4

protos/limine: Rename SMP feature to MP feature

diff --git a/PROTOCOL.md b/PROTOCOL.md
index 06cf5cb9..df7e2b7d 100644
--- a/PROTOCOL.md
+++ b/PROTOCOL.md
@@ -500,7 +500,7 @@ struct limine_stack_size_request {
 };
 ```
 
-* `stack_size` - The requested stack size in bytes (also used for SMP processors).
+* `stack_size` - The requested stack size in bytes (also used for MP processors).
 
 Response:
 ```c
@@ -715,19 +715,19 @@ Values assignable to `mode`, `max_mode`, and `min_mode`:
 #define LIMINE_PAGING_MODE_MIN LIMINE_PAGING_MODE_LOONGARCH64_4LVL
 ```
 
-### SMP (multiprocessor) Feature
+### MP (multiprocessor) Feature
 
 ID:
 ```c
-#define LIMINE_SMP_REQUEST { LIMINE_COMMON_MAGIC, 0x95a67b819a1b857e, 0xa0b61b723b6a73e0 }
+#define LIMINE_MP_REQUEST { LIMINE_COMMON_MAGIC, 0x95a67b819a1b857e, 0xa0b61b723b6a73e0 }
 ```
 
 Request:
 ```c
-struct limine_smp_request {
+struct limine_mp_request {
     uint64_t id[4];
     uint64_t revision;
-    struct limine_smp_response *response;
+    struct limine_mp_response *response;
     uint64_t flags;
 };
 ```
@@ -739,12 +739,12 @@ struct limine_smp_request {
 Response:
 
 ```c
-struct limine_smp_response {
+struct limine_mp_response {
     uint64_t revision;
     uint32_t flags;
     uint32_t bsp_lapic_id;
     uint64_t cpu_count;
-    struct limine_smp_info **cpus;
+    struct limine_mp_info **cpus;
 };
 ```
 
@@ -752,7 +752,7 @@ struct limine_smp_response {
 * `bsp_lapic_id` - The Local APIC ID of the bootstrap processor.
 * `cpu_count` - How many CPUs are present. It includes the bootstrap processor.
 * `cpus` - Pointer to an array of `cpu_count` pointers to
-`struct limine_smp_info` structures.
+`struct limine_mp_info` structures.
 
 Note: The presence of this request will prompt the bootloader to bootstrap
 the secondary processors. This will not be done if this request is not present.
@@ -761,11 +761,11 @@ Note: The MTRRs of APs will be synchronised by the bootloader to match
 the BSP, as Intel SDM requires (Vol. 3A, 12.11.5).
 
 ```c
-struct limine_smp_info;
+struct limine_mp_info;
 
-typedef void (*limine_goto_address)(struct limine_smp_info *);
+typedef void (*limine_goto_address)(struct limine_mp_info *);
 
-struct limine_smp_info {
+struct limine_mp_info {
     uint32_t processor_id;
     uint32_t lapic_id;
     uint64_t reserved;
@@ -778,7 +778,7 @@ struct limine_smp_info {
 * `lapic_id` - Local APIC ID of the processor as specified by the MADT
 * `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
-`struct limine_smp_info` structure of the CPU is passed in `RDI`. Other than
+`struct limine_mp_info` structure of the CPU is passed in `RDI`. Other than
 that, the CPU state will be the same as described for the bootstrap
 processor. This field is unused for the structure describing the bootstrap
 processor. For all CPUs, this field is guaranteed to be NULL when control is first passed
@@ -790,12 +790,12 @@ to the bootstrap processor.
 Response:
 
 ```c
-struct limine_smp_response {
+struct limine_mp_response {
     uint64_t revision;
     uint64_t flags;
     uint64_t bsp_mpidr;
     uint64_t cpu_count;
-    struct limine_smp_info **cpus;
+    struct limine_mp_info **cpus;
 };
 ```
 
@@ -803,17 +803,17 @@ struct limine_smp_response {
 * `bsp_mpidr` - MPIDR of the bootstrap processor (as read from `MPIDR_EL1`, with Res1 masked off).
 * `cpu_count` - How many CPUs are present. It includes the bootstrap processor.
 * `cpus` - Pointer to an array of `cpu_count` pointers to
-`struct limine_smp_info` structures.
+`struct limine_mp_info` structures.
 
 Note: The presence of this request will prompt the bootloader to bootstrap
 the secondary processors. This will not be done if this request is not present.
 
 ```c
-struct limine_smp_info;
+struct limine_mp_info;
 
-typedef void (*limine_goto_address)(struct limine_smp_info *);
+typedef void (*limine_goto_address)(struct limine_mp_info *);
 
-struct limine_smp_info {
+struct limine_mp_info {
     uint32_t processor_id;
     uint32_t reserved1;
     uint64_t mpidr;
@@ -827,7 +827,7 @@ struct limine_smp_info {
 * `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
-`struct limine_smp_info` structure of the CPU is passed in `X0`. Other than
+`struct limine_mp_info` structure of the CPU is passed in `X0`. Other than
 that, the CPU state will be the same as described for the bootstrap
 processor. This field is unused for the structure describing the bootstrap
 processor.
@@ -838,12 +838,12 @@ processor.
 Response:
 
 ```c
-struct limine_smp_response {
+struct limine_mp_response {
     uint64_t revision;
     uint64_t flags;
     uint64_t bsp_hartid;
     uint64_t cpu_count;
-    struct limine_smp_info **cpus;
+    struct limine_mp_info **cpus;
 };
 ```
 
@@ -851,17 +851,17 @@ struct limine_smp_response {
 * `bsp_hartid` - Hart ID of the bootstrap processor as reported by the UEFI RISC-V Boot Protocol or the SBI.
 * `cpu_count` - How many CPUs are present. It includes the bootstrap processor.
 * `cpus` - Pointer to an array of `cpu_count` pointers to
-`struct limine_smp_info` structures.
+`struct limine_mp_info` structures.
 
 Note: The presence of this request will prompt the bootloader to bootstrap
 the secondary processors. This will not be done if this request is not present.
 
 ```c
-struct limine_smp_info;
+struct limine_mp_info;
 
-typedef void (*limine_goto_address)(struct limine_smp_info *);
+typedef void (*limine_goto_address)(struct limine_mp_info *);
 
-struct limine_smp_info {
+struct limine_mp_info {
     uint64_t processor_id;
     uint64_t hartid;
     uint64_t reserved;
@@ -874,7 +874,7 @@ struct limine_smp_info {
 * `hartid` - Hart ID 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
-`struct limine_smp_info` structure of the CPU is passed in `x10`(`a0`). Other than
+`struct limine_mp_info` structure of the CPU is passed in `x10`(`a0`). Other than
 that, the CPU state will be the same as described for the bootstrap
 processor. This field is unused for the structure describing the bootstrap
 processor.
diff --git a/common/protos/limine.c b/common/protos/limine.c
index b43bb334..8d81f522 100644
--- a/common/protos/limine.c
+++ b/common/protos/limine.c
@@ -1393,51 +1393,51 @@ FEAT_END
     pagemap = build_pagemap(base_revision, nx_available, ranges, ranges_count,
                             physical_base, virtual_base, direct_map_offset);
 
-    // SMP
+    // MP
 FEAT_START
-    struct limine_smp_request *smp_request = get_request(LIMINE_SMP_REQUEST);
-    if (smp_request == NULL) {
+    struct limine_mp_request *mp_request = get_request(LIMINE_MP_REQUEST);
+    if (mp_request == NULL) {
         break; // next feature
     }
 
-    struct limine_smp_info *smp_info;
+    struct limine_mp_info *mp_info;
     size_t cpu_count;
 #if defined (__x86_64__) || defined (__i386__)
     uint32_t bsp_lapic_id;
-    smp_info = init_smp(&cpu_count, &bsp_lapic_id,
+    mp_info = init_smp(&cpu_count, &bsp_lapic_id,
                         paging_mode,
-                        pagemap, smp_request->flags & LIMINE_SMP_X2APIC, nx_available,
+                        pagemap, mp_request->flags & LIMINE_MP_X2APIC, nx_available,
                         direct_map_offset, true);
 #elif defined (__aarch64__)
     uint64_t bsp_mpidr;
 
-    smp_info = init_smp(&cpu_count, &bsp_mpidr,
+    mp_info = init_smp(&cpu_count, &bsp_mpidr,
                         pagemap, LIMINE_MAIR(fb_attr), LIMINE_TCR(tsz, pa), LIMINE_SCTLR,
                         direct_map_offset);
 #elif defined (__riscv)
-    smp_info = init_smp(&cpu_count, pagemap, direct_map_offset);
+    mp_info = init_smp(&cpu_count, pagemap, direct_map_offset);
 #elif defined (__loongarch64)
     cpu_count = 0;
-    smp_info = NULL; // TODO: LoongArch SMP
+    mp_info = NULL; // TODO: LoongArch MP
 #else
 #error Unknown architecture
 #endif
 
-    if (smp_info == NULL) {
+    if (mp_info == NULL) {
         break;
     }
 
     for (size_t i = 0; i < cpu_count; i++) {
 #if defined (__x86_64__) || defined (__i386__)
-        if (smp_info[i].lapic_id == bsp_lapic_id) {
+        if (mp_info[i].lapic_id == bsp_lapic_id) {
             continue;
         }
 #elif defined (__aarch64__)
-        if (smp_info[i].mpidr == bsp_mpidr) {
+        if (mp_info[i].mpidr == bsp_mpidr) {
             continue;
         }
 #elif defined (__riscv)
-        if (smp_info[i].hartid == bsp_hartid) {
+        if (mp_info[i].hartid == bsp_hartid) {
             continue;
         }
 #elif defined (__loongarch64)
@@ -1446,33 +1446,33 @@ FEAT_START
 #endif
 
         void *cpu_stack = ext_mem_alloc(stack_size) + stack_size;
-        smp_info[i].reserved = reported_addr(cpu_stack);
+        mp_info[i].reserved = reported_addr(cpu_stack);
     }
 
-    struct limine_smp_response *smp_response =
-        ext_mem_alloc(sizeof(struct limine_smp_response));
+    struct limine_mp_response *mp_response =
+        ext_mem_alloc(sizeof(struct limine_mp_response));
 
 #if defined (__x86_64__) || defined (__i386__)
-    smp_response->flags |= (smp_request->flags & LIMINE_SMP_X2APIC) && x2apic_check();
-    smp_response->bsp_lapic_id = bsp_lapic_id;
+    mp_response->flags |= (mp_request->flags & LIMINE_MP_X2APIC) && x2apic_check();
+    mp_response->bsp_lapic_id = bsp_lapic_id;
 #elif defined (__aarch64__)
-    smp_response->bsp_mpidr = bsp_mpidr;
+    mp_response->bsp_mpidr = bsp_mpidr;
 #elif defined (__riscv)
-    smp_response->bsp_hartid = bsp_hartid;
+    mp_response->bsp_hartid = bsp_hartid;
 #elif defined (__loongarch64)
 #else
 #error Unknown architecture
 #endif
 
-    uint64_t *smp_list = ext_mem_alloc(cpu_count * sizeof(uint64_t));
+    uint64_t *mp_list = ext_mem_alloc(cpu_count * sizeof(uint64_t));
     for (size_t i = 0; i < cpu_count; i++) {
-        smp_list[i] = reported_addr(&smp_info[i]);
+        mp_list[i] = reported_addr(&mp_info[i]);
     }
 
-    smp_response->cpu_count = cpu_count;
-    smp_response->cpus = reported_addr(smp_list);
+    mp_response->cpu_count = cpu_count;
+    mp_response->cpus = reported_addr(mp_list);
 
-    smp_request->response = reported_addr(smp_response);
+    mp_request->response = reported_addr(mp_response);
 FEAT_END
 
     // Memmap
diff --git a/common/sys/smp.c b/common/sys/smp.c
index 73acc3a0..150a818b 100644
--- a/common/sys/smp.c
+++ b/common/sys/smp.c
@@ -38,7 +38,7 @@ struct trampoline_passed_info {
 } __attribute__((packed));
 
 static bool smp_start_ap(uint32_t lapic_id, struct gdtr *gdtr,
-                         struct limine_smp_info *info_struct,
+                         struct limine_mp_info *info_struct,
                          int paging_mode, uint32_t pagemap,
                          bool x2apic, bool nx, uint64_t hhdm, bool wp) {
     // Prepare the trampoline
@@ -102,7 +102,7 @@ static bool smp_start_ap(uint32_t lapic_id, struct gdtr *gdtr,
     return false;
 }
 
-struct limine_smp_info *init_smp(size_t   *cpu_count,
+struct limine_mp_info *init_smp(size_t   *cpu_count,
                                  uint32_t *_bsp_lapic_id,
                                  int       paging_mode,
                                  pagemap_t pagemap,
@@ -182,7 +182,7 @@ struct limine_smp_info *init_smp(size_t   *cpu_count,
         return NULL;
     }
 
-    struct limine_smp_info *ret = ext_mem_alloc(max_cpus * sizeof(struct limine_smp_info));
+    struct limine_mp_info *ret = ext_mem_alloc(max_cpus * sizeof(struct limine_mp_info));
     *cpu_count = 0;
 
     // Try to start all APs
@@ -200,7 +200,7 @@ struct limine_smp_info *init_smp(size_t   *cpu_count,
                 if (!((lapic->flags & 1) ^ ((lapic->flags >> 1) & 1)))
                     continue;
 
-                struct limine_smp_info *info_struct = &ret[*cpu_count];
+                struct limine_mp_info *info_struct = &ret[*cpu_count];
 
                 info_struct->processor_id = lapic->acpi_processor_uid;
                 info_struct->lapic_id = lapic->lapic_id;
@@ -237,7 +237,7 @@ struct limine_smp_info *init_smp(size_t   *cpu_count,
                 if (!((x2lapic->flags & 1) ^ ((x2lapic->flags >> 1) & 1)))
                     continue;
 
-                struct limine_smp_info *info_struct = &ret[*cpu_count];
+                struct limine_mp_info *info_struct = &ret[*cpu_count];
 
                 info_struct->processor_id = x2lapic->acpi_processor_uid;
                 info_struct->lapic_id = x2lapic->x2apic_id;
@@ -267,7 +267,7 @@ struct limine_smp_info *init_smp(size_t   *cpu_count,
     }
 
     if (*cpu_count == 0) {
-        pmm_free(ret, max_cpus * sizeof(struct limine_smp_info));
+        pmm_free(ret, max_cpus * sizeof(struct limine_mp_info));
         return NULL;
     }
 
@@ -301,7 +301,7 @@ enum {
 static uint32_t psci_cpu_on = 0xC4000003;
 
 static bool try_start_ap(int boot_method, uint64_t method_ptr,
-                         struct limine_smp_info *info_struct,
+                         struct limine_mp_info *info_struct,
                          uint64_t ttbr0, uint64_t ttbr1, uint64_t mair,
                          uint64_t tcr, uint64_t sctlr,
                          uint64_t hhdm_offset) {
@@ -405,7 +405,7 @@ static bool try_start_ap(int boot_method, uint64_t method_ptr,
     return false;
 }
 
-static struct limine_smp_info *try_acpi_smp(size_t   *cpu_count,
+static struct limine_mp_info *try_acpi_smp(size_t   *cpu_count,
                                             uint64_t *_bsp_mpidr,
                                             pagemap_t pagemap,
                                             uint64_t  mair,
@@ -465,7 +465,7 @@ static struct limine_smp_info *try_acpi_smp(size_t   *cpu_count,
         }
     }
 
-    struct limine_smp_info *ret = ext_mem_alloc(max_cpus * sizeof(struct limine_smp_info));
+    struct limine_mp_info *ret = ext_mem_alloc(max_cpus * sizeof(struct limine_mp_info));
     *cpu_count = 0;
 
     // Try to start all APs
@@ -481,7 +481,7 @@ static struct limine_smp_info *try_acpi_smp(size_t   *cpu_count,
                 if (!(gicc->flags & 1))
                     continue;
 
-                struct limine_smp_info *info_struct = &ret[*cpu_count];
+                struct limine_mp_info *info_struct = &ret[*cpu_count];
 
                 info_struct->processor_id = gicc->acpi_uid;
                 info_struct->mpidr = gicc->mpidr;
@@ -514,7 +514,7 @@ static struct limine_smp_info *try_acpi_smp(size_t   *cpu_count,
     return ret;
 }
 
-static struct limine_smp_info *try_dtb_smp(size_t   *cpu_count,
+static struct limine_mp_info *try_dtb_smp(size_t   *cpu_count,
                                            uint64_t *_bsp_mpidr,
                                            pagemap_t pagemap,
                                            uint64_t  mair,
@@ -584,7 +584,7 @@ static struct limine_smp_info *try_dtb_smp(size_t   *cpu_count,
         max_cpus++;
     }
 
-    struct limine_smp_info *ret = ext_mem_alloc(max_cpus * sizeof(struct limine_smp_info));
+    struct limine_mp_info *ret = ext_mem_alloc(max_cpus * sizeof(struct limine_mp_info));
 
     fdt_for_each_subnode(node, dtb, cpus) {
         const void *prop;
@@ -617,7 +617,7 @@ static struct limine_smp_info *try_dtb_smp(size_t   *cpu_count,
         }
 
 
-        struct limine_smp_info *info_struct = &ret[*cpu_count];
+        struct limine_mp_info *info_struct = &ret[*cpu_count];
 
         info_struct->processor_id = 0;
         info_struct->mpidr = mpidr;
@@ -695,14 +695,14 @@ static struct limine_smp_info *try_dtb_smp(size_t   *cpu_count,
 }
 
 
-struct limine_smp_info *init_smp(size_t   *cpu_count,
+struct limine_mp_info *init_smp(size_t   *cpu_count,
                                  uint64_t *bsp_mpidr,
                                  pagemap_t pagemap,
                                  uint64_t  mair,
                                  uint64_t  tcr,
                                  uint64_t  sctlr,
                                  uint64_t  hhdm_offset) {
-    struct limine_smp_info *info = NULL;
+    struct limine_mp_info *info = NULL;
 
     if (acpi_get_rsdp() && (info = try_acpi_smp(
                                     cpu_count, bsp_mpidr, pagemap,
@@ -729,7 +729,7 @@ struct trampoline_passed_info {
     uint64_t smp_tpl_hhdm_offset;
 };
 
-static bool smp_start_ap(size_t hartid, size_t satp, struct limine_smp_info *info_struct,
+static bool smp_start_ap(size_t hartid, size_t satp, struct limine_mp_info *info_struct,
                          uint64_t hhdm_offset) {
     static struct trampoline_passed_info passed_info;
 
@@ -754,7 +754,7 @@ static bool smp_start_ap(size_t hartid, size_t satp, struct limine_smp_info *inf
     return false;
 }
 
-struct limine_smp_info *init_smp(size_t *cpu_count, pagemap_t pagemap, uint64_t hhdm_offset) {
+struct limine_mp_info *init_smp(size_t *cpu_count, pagemap_t pagemap, uint64_t hhdm_offset) {
     size_t num_cpus = 0;
     for (struct riscv_hart *hart = hart_list; hart != NULL; hart = hart->next) {
         if (!(hart->flags & RISCV_HART_COPROC)) {
@@ -762,14 +762,14 @@ struct limine_smp_info *init_smp(size_t *cpu_count, pagemap_t pagemap, uint64_t
         }
     }
 
-    struct limine_smp_info *ret = ext_mem_alloc(num_cpus * sizeof(struct limine_smp_info));
+    struct limine_mp_info *ret = ext_mem_alloc(num_cpus * sizeof(struct limine_mp_info));
 
     *cpu_count = 0;
     for (struct riscv_hart *hart = hart_list; hart != NULL; hart = hart->next) {
         if (hart->flags & RISCV_HART_COPROC) {
             continue;
         }
-        struct limine_smp_info *info_struct = &ret[*cpu_count];
+        struct limine_mp_info *info_struct = &ret[*cpu_count];
 
         info_struct->hartid = hart->hartid;
         info_struct->processor_id = hart->acpi_uid;
diff --git a/common/sys/smp.h b/common/sys/smp.h
index 11883135..fa05bb8c 100644
--- a/common/sys/smp.h
+++ b/common/sys/smp.h
@@ -10,7 +10,7 @@
 
 #if defined (__x86_64__) || defined (__i386__)
 
-struct limine_smp_info *init_smp(size_t   *cpu_count,
+struct limine_mp_info *init_smp(size_t   *cpu_count,
                                  uint32_t *_bsp_lapic_id,
                                  int       paging_mode,
                                  pagemap_t pagemap,
@@ -21,7 +21,7 @@ struct limine_smp_info *init_smp(size_t   *cpu_count,
 
 #elif defined (__aarch64__)
 
-struct limine_smp_info *init_smp(size_t   *cpu_count,
+struct limine_mp_info *init_smp(size_t   *cpu_count,
                                  uint64_t *bsp_mpidr,
                                  pagemap_t pagemap,
                                  uint64_t  mair,
@@ -31,7 +31,7 @@ struct limine_smp_info *init_smp(size_t   *cpu_count,
 
 #elif defined (__riscv)
 
-struct limine_smp_info *init_smp(size_t   *cpu_count,
+struct limine_mp_info *init_smp(size_t   *cpu_count,
                                  pagemap_t pagemap,
                                  uint64_t  hhdm_offset);
 
diff --git a/limine.h b/limine.h
index 47fe8901..68c1c935 100644
--- a/limine.h
+++ b/limine.h
@@ -328,19 +328,19 @@ struct LIMINE_DEPRECATED limine_5_level_paging_request {
 
 LIMINE_DEPRECATED_IGNORE_END
 
-/* SMP */
+/* MP */
 
-#define LIMINE_SMP_REQUEST { LIMINE_COMMON_MAGIC, 0x95a67b819a1b857e, 0xa0b61b723b6a73e0 }
+#define LIMINE_MP_REQUEST { LIMINE_COMMON_MAGIC, 0x95a67b819a1b857e, 0xa0b61b723b6a73e0 }
 
-struct limine_smp_info;
+struct limine_mp_info;
 
-typedef void (*limine_goto_address)(struct limine_smp_info *);
+typedef void (*limine_goto_address)(struct limine_mp_info *);
 
 #if defined (__x86_64__) || defined (__i386__)
 
-#define LIMINE_SMP_X2APIC (1 << 0)
+#define LIMINE_MP_X2APIC (1 << 0)
 
-struct limine_smp_info {
+struct limine_mp_info {
     uint32_t processor_id;
     uint32_t lapic_id;
     uint64_t reserved;
@@ -348,17 +348,17 @@ struct limine_smp_info {
     uint64_t extra_argument;
 };
 
-struct limine_smp_response {
+struct limine_mp_response {
     uint64_t revision;
     uint32_t flags;
     uint32_t bsp_lapic_id;
     uint64_t cpu_count;
-    LIMINE_PTR(struct limine_smp_info **) cpus;
+    LIMINE_PTR(struct limine_mp_info **) cpus;
 };
 
 #elif defined (__aarch64__)
 
-struct limine_smp_info {
+struct limine_mp_info {
     uint32_t processor_id;
     uint32_t reserved1;
     uint64_t mpidr;
@@ -367,17 +367,17 @@ struct limine_smp_info {
     uint64_t extra_argument;
 };
 
-struct limine_smp_response {
+struct limine_mp_response {
     uint64_t revision;
     uint64_t flags;
     uint64_t bsp_mpidr;
     uint64_t cpu_count;
-    LIMINE_PTR(struct limine_smp_info **) cpus;
+    LIMINE_PTR(struct limine_mp_info **) cpus;
 };
 
 #elif defined (__riscv) && (__riscv_xlen == 64)
 
-struct limine_smp_info {
+struct limine_mp_info {
     uint64_t processor_id;
     uint64_t hartid;
     uint64_t reserved;
@@ -385,33 +385,33 @@ struct limine_smp_info {
     uint64_t extra_argument;
 };
 
-struct limine_smp_response {
+struct limine_mp_response {
     uint64_t revision;
     uint64_t flags;
     uint64_t bsp_hartid;
     uint64_t cpu_count;
-    LIMINE_PTR(struct limine_smp_info **) cpus;
+    LIMINE_PTR(struct limine_mp_info **) cpus;
 };
 
 #elif defined (__loongarch__) && (__loongarch_grlen == 64)
 
-struct limine_smp_info {
+struct limine_mp_info {
     uint64_t reserved;
 };
 
-struct limine_smp_response {
+struct limine_mp_response {
     uint64_t cpu_count;
-    LIMINE_PTR(struct limine_smp_info **) cpus;
+    LIMINE_PTR(struct limine_mp_info **) cpus;
 };
 
 #else
 #error Unknown architecture
 #endif
 
-struct limine_smp_request {
+struct limine_mp_request {
     uint64_t id[4];
     uint64_t revision;
-    LIMINE_PTR(struct limine_smp_response *) response;
+    LIMINE_PTR(struct limine_mp_response *) response;
     uint64_t flags;
 };
 
diff --git a/test/limine.c b/test/limine.c
index a9b7c848..ecb5b36c 100644
--- a/test/limine.c
+++ b/test/limine.c
@@ -126,8 +126,8 @@ static volatile struct limine_kernel_address_request kernel_address_request = {
 
 #ifndef __loongarch__
 __attribute__((section(".limine_requests")))
-static volatile struct limine_smp_request _smp_request = {
-    .id = LIMINE_SMP_REQUEST,
+static volatile struct limine_mp_request _mp_request = {
+    .id = LIMINE_MP_REQUEST,
     .revision = 0, .response = NULL
 };
 #endif
@@ -225,7 +225,7 @@ static void print_file(struct limine_file *file) {
 
 uint32_t ctr = 0;
 
-void ap_entry(struct limine_smp_info *info) {
+void ap_entry(struct limine_mp_info *info) {
     e9_printf("Hello from AP!");
 
 #if defined (__x86_64__)
@@ -466,27 +466,27 @@ FEAT_START
     e9_printf("Boot time: %d", boot_time_response->boot_time);
 FEAT_END
 
-// TODO: LoongArch SMP
+// TODO: LoongArch MP
 #ifndef __loongarch__
 FEAT_START
     e9_printf("");
-    if (_smp_request.response == NULL) {
-        e9_printf("SMP info not passed");
+    if (_mp_request.response == NULL) {
+        e9_printf("MP info not passed");
         break;
     }
-    struct limine_smp_response *smp_response = _smp_request.response;
-    e9_printf("SMP feature, revision %d", smp_response->revision);
-    e9_printf("Flags: %x", smp_response->flags);
+    struct limine_mp_response *mp_response = _mp_request.response;
+    e9_printf("MP feature, revision %d", mp_response->revision);
+    e9_printf("Flags: %x", mp_response->flags);
 #if defined (__x86_64__)
-    e9_printf("BSP LAPIC ID: %x", smp_response->bsp_lapic_id);
+    e9_printf("BSP LAPIC ID: %x", mp_response->bsp_lapic_id);
 #elif defined (__aarch64__)
-    e9_printf("BSP MPIDR: %x", smp_response->bsp_mpidr);
+    e9_printf("BSP MPIDR: %x", mp_response->bsp_mpidr);
 #elif defined (__riscv)
-    e9_printf("BSP Hart ID: %x", smp_response->bsp_hartid);
+    e9_printf("BSP Hart ID: %x", mp_response->bsp_hartid);
 #endif
-    e9_printf("CPU count: %d", smp_response->cpu_count);
-    for (size_t i = 0; i < smp_response->cpu_count; i++) {
-        struct limine_smp_info *cpu = smp_response->cpus[i];
+    e9_printf("CPU count: %d", mp_response->cpu_count);
+    for (size_t i = 0; i < mp_response->cpu_count; i++) {
+        struct limine_mp_info *cpu = mp_response->cpus[i];
         e9_printf("Processor ID: %x", cpu->processor_id);
 #if defined (__x86_64__)
         e9_printf("LAPIC ID: %x", cpu->lapic_id);
@@ -498,11 +498,11 @@ FEAT_START
 
 
 #if defined (__x86_64__)
-        if (cpu->lapic_id != smp_response->bsp_lapic_id) {
+        if (cpu->lapic_id != mp_response->bsp_lapic_id) {
 #elif defined (__aarch64__)
-        if (cpu->mpidr != smp_response->bsp_mpidr) {
+        if (cpu->mpidr != mp_response->bsp_mpidr) {
 #elif defined (__riscv)
-        if (cpu->hartid != smp_response->bsp_hartid) {
+        if (cpu->hartid != mp_response->bsp_hartid) {
 #endif
             uint32_t old_ctr = __atomic_load_n(&ctr, __ATOMIC_SEQ_CST);
 
tab: 248 wrap: offon