2022-03-13 00:31:46 +08:00

34 lines
822 B
C
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#include "acpi.h"
#include "../../common/printk.h"
#include "../../common/kprint.h"
#include "../multiboot2/multiboot2.h"
static struct acpi_RSDP_t *rsdp;
/**
* @brief 迭代器用于迭代描述符头位于ACPI标准文件的Table 5-29
* @param _fun 迭代操作调用的函数
* @param _data 数据
*/
void acpi_iter_SDT(bool (*_fun)(const struct acpi_iter_SDT_header_t *, void *),
void *_data)
{
}
/**
* @brief 初始化acpi模块
*
*/
void acpi_init()
{
kinfo("Initializing ACPI...");
struct multiboot_tag_old_acpi_t* tmp1;
int reserved;
kdebug("yyyy");
multiboot2_iter(multiboot2_get_acpi_old_RSDP, tmp1, &reserved);
kdebug("1");
*rsdp = *(struct acpi_RSDP_t*)(tmp1->rsdp);
kdebug("RsdtAddress=%#018lx", rsdp->RsdtAddress);
}