|
Voxia OS v0.0.1
Hobby Project Operating System Targeting x86-64
|
#include "hal/apic/apic.h"#include "hal/apic/ioapic.h"#include "hal/cpu/paging.h"#include "hal/pci/pcie.h"#include "init/init.h"#include "libk/debug/debug.h"#include "libk/io.h"#include "libk/serial.h"#include "memory/memory_utils.h"#include "memory/phys_base_allocator.h"#include "memory/vm_manager.h"#include "type.h"#include <hal/acpi/acpi.h>#include <hal/acpi/hpet.h>#include <str.h>Go to the source code of this file.
Macros | |
| #define | APIC_SIGNATURE 0x43495041 |
| #define | HPET_SIGNATURE 0x54455048 |
| #define | MCFG_SIGNATURE 0x4746434D |
| #define | WAET_SIGNATURE 0x54454157 |
| #define | FACP_SIGNATURE 0x50434146 |
| #define | TPM2_SIGNATURE 0x324D5054 |
| #define | DSDT_SIGNATURE 0x54445344 |
Functions | |
| struct cpu_core * | vxGetCpuInfo (uint8_t apicid) |
| void | apicSetBaseAddr (uintptr_t addr) |
| static void | vxACPIRegisterNewCore (uint8_t apicid, uint8_t cpuid, uint32_t flag) |
| uint8_t | vxGetNumberOfCores () |
| uintptr_t | acpi_map_phys_page (uintptr_t phys_addr, size_t len) |
| void | acpi_phys_page_unmap (uintptr_t addr) |
| static void | parsing_fadt (uintptr_t fadt_addr) |
| static void | parsing_madt (struct MADT *madt) |
| void | initacpi (__attribute__((unused)) init_context_t *ctx) |
| static initcall_t __init_acpi | __attribute__ ((used, section(".init_early." "acpi"))) |
Variables | |
| static struct cpu_core * | cpu_list = 0 |
| #define APIC_SIGNATURE 0x43495041 |
Definition at line 223 of file acpi.c.
Referenced by __attribute__().
| #define FACP_SIGNATURE 0x50434146 |
Definition at line 227 of file acpi.c.
Referenced by __attribute__().
| #define HPET_SIGNATURE 0x54455048 |
Definition at line 224 of file acpi.c.
Referenced by __attribute__().
| #define MCFG_SIGNATURE 0x4746434D |
Definition at line 225 of file acpi.c.
Referenced by __attribute__().
| #define TPM2_SIGNATURE 0x324D5054 |
Definition at line 228 of file acpi.c.
Referenced by __attribute__().
| #define WAET_SIGNATURE 0x54454157 |
Definition at line 226 of file acpi.c.
Referenced by __attribute__().
|
static |
References acpi_map_phys_page(), addr, APIC_SIGNATURE, FACP_SIGNATURE, RSDT::h, HPET_SIGNATURE, SDT::Length, LOG_INFO, mcfg_parse(), MCFG_SIGNATURE, parsing_fadt(), parsing_madt(), phys_addr, RSDT::PointerToOtherSDT, RSDP_t::RsdtAddress, serial_trace, RSDP_t::Signature, SDT::Signature, strncmp(), TPM2_SIGNATURE, VIRT2PHYS, vxHPETInitialize(), and WAET_SIGNATURE.
Definition at line 55 of file acpi.c.
References ALIGN_DOWN, BLOCK_SIZE, get_kernel_vmm_page(), len, offset, PAGE_CACHE_DISABLE, PAGE_NO_EXECUTE, PAGE_PRESENT, PAGE_WRITABLE, PAGE_WRITE_THROUGH, paging_get_highest_page_map(), paging_reload(), phys_addr, vma_lookup_free_vaddr(), VMA_REGION_A, vma_register(), and vxMultipleMmap().
Referenced by __attribute__(), parsing_madt(), and vxHPETInitialize().
| void acpi_phys_page_unmap | ( | uintptr_t | addr | ) |
Definition at line 76 of file acpi.c.
References addr, get_kernel_vmm_page(), paging_get_highest_page_map(), paging_reload(), paging_unmap_fill(), and vma_unregister().
|
extern |
Definition at line 58 of file apic.c.
References addr, and lapic_base_addr.
Referenced by parsing_madt().
| void initacpi | ( | __attribute__((unused)) init_context_t * | ctx | ) |
|
static |
|
static |
Definition at line 154 of file acpi.c.
References ACPI_IO_INT_OVERRIDE, acpi_map_phys_page(), ACPI_NMI, ACPI_PROCESSOR_LAPIC, apicInitialize(), apicSetBaseAddr(), flags, gsi, MADT::header, ioapic_add_irq_gsi_map(), ioapic_setup(), SDT::Length, MADT::localApicAddress, LOG_DEBUG, LOG_INFO, madt_record_table_entry_t, ptr, MADT::table, and vxACPIRegisterNewCore().
Referenced by __attribute__().
Definition at line 33 of file acpi.c.
References cpu_core::apicid, core, cpu_list, cpuid(), cpu_core::flag, kalloc(), and Off.
Referenced by parsing_madt().
Definition at line 21 of file acpi.c.
References cpu_core::apicid, core, and cpu_list.
Referenced by __attribute__(), INIT(), INIT(), and vxAddWorkqueueTask().
| uint8_t vxGetNumberOfCores | ( | ) |
|
static |
Definition at line 19 of file acpi.c.
Referenced by vxACPIRegisterNewCore(), vxGetCpuInfo(), and vxGetNumberOfCores().