3#define pr_fmt(fmt) "limine: " fmt
15#define limine_request __section(".limine.requests") __used static volatile
59static void ap_entry(
struct limine_smp_info *info)
61 u64 processor_id = info->processor_id;
62 pr_dinfo(limine,
"AP started: #%llu", processor_id);
74#if MOS_DEBUG_FEATURE(limine)
75 pr_cont(
"bootloader: %s, version %s", bootloader_info.response ? bootloader_info.response->name :
"unknown",
76 bootloader_info.response ? bootloader_info.response->version :
"unknown");
81 mos_panic(
"Unsupported Limine base revision");
87 if (paging_mode_response->
mode != LIMINE_PAGING_MODE_DEFAULT)
88 mos_panic(
"non-default paging mode not supported");
93 struct limine_smp_response *smp_response = smp.
response;
94 for (
size_t i = 0; i < smp_response->cpu_count; i++)
96 struct limine_smp_info *info = smp_response->cpus[i];
97 if (info->processor_id == 0)
100 __atomic_store_n(&info->goto_address,
ap_entry, __ATOMIC_SEQ_CST);
118 pfn_t last_end_pfn = 0;
121 for (
size_t i = 0; i < memmap_response->
entry_count; i++)
130 if (last_end_pfn != start_pfn)
132 last_end_pfn = start_pfn + npages;
134 const char *typestr =
NULL;
178 pr_dinfo2(limine,
"No RSDP found from limine");
183#if MOS_PLATFORM_HAS_FDT
190 pr_dinfo2(limine,
"No DTB found from limine");
void platform_ap_entry(u64 arg)
void console_register(console_t *con)
static void add_to_memmap(pfn_t start, size_t npages, bool reserved, u32 type, const char *typestr)
static void ap_entry(struct limine_smp_info *info)
#define LIMINE_MEMMAP_RESERVED
#define LIMINE_KERNEL_ADDRESS_REQUEST
#define LIMINE_STACK_SIZE_REQUEST
#define LIMINE_BASE_REVISION_SUPPORTED
#define LIMINE_EFI_SYSTEM_TABLE_REQUEST
#define LIMINE_MEMMAP_ACPI_NVS
#define LIMINE_BOOTLOADER_INFO_REQUEST
#define LIMINE_MEMMAP_KERNEL_AND_MODULES
#define LIMINE_REQUESTS_START_MARKER
#define LIMINE_HHDM_REQUEST
#define LIMINE_DTB_REQUEST
#define LIMINE_MODULE_REQUEST
#define LIMINE_REQUESTS_END_MARKER
#define LIMINE_RSDP_REQUEST
#define LIMINE_MEMMAP_FRAMEBUFFER
#define LIMINE_BASE_REVISION(N)
#define LIMINE_SMP_REQUEST
#define LIMINE_MEMMAP_ACPI_RECLAIMABLE
#define LIMINE_KERNEL_FILE_REQUEST
#define LIMINE_MEMMAP_REQUEST
#define LIMINE_MEMMAP_USABLE
#define LIMINE_FRAMEBUFFER_REQUEST
#define LIMINE_MEMMAP_BOOTLOADER_RECLAIMABLE
#define LIMINE_MEMMAP_BAD_MEMORY
#define LIMINE_PAGING_MODE_REQUEST
__BEGIN_DECLS void mos_cmdline_init(const char *bootloader_cmdline)
#define ALIGN_UP_TO_PAGE(addr)
#define MOS_WARNING_DISABLE(text)
#define mos_panic(fmt,...)
#define pr_info2(fmt,...)
#define pr_dinfo(feat, fmt,...)
#define pr_dinfo2(feat, fmt,...)
void startup_invoke_early_cmdline_hooks(void)
struct limine_dtb_response * response
struct limine_hhdm_response * response
struct limine_kernel_address_response * response
struct limine_kernel_file_response * response
struct limine_file * kernel_file
struct limine_memmap_response * response
struct limine_memmap_entry ** entries
struct limine_module_response * response
struct limine_file ** modules
struct limine_paging_mode_response * response
struct limine_rsdp_response * response
struct limine_smp_response * response
#define PFNADDR(pfn, end)