yeah
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
menu "Device Drivers"
|
||||
|
||||
config OF
|
||||
bool "Support for OpenFirmware"
|
||||
default y
|
||||
help
|
||||
Adds support for flattened device trees and OF platform drivers.
|
||||
|
||||
config ACPI
|
||||
bool "Support for ACPI firmware"
|
||||
default y
|
||||
help
|
||||
Adds support for ACPI firmware, tables and devices.
|
||||
|
||||
endmenu
|
||||
@@ -1,10 +1,15 @@
|
||||
# uACPI
|
||||
uacpi = subproject('uacpi')
|
||||
uacpi_sources = uacpi.get_variable('sources')
|
||||
uacpi_includes = uacpi.get_variable('includes')
|
||||
|
||||
kernel_sources += uacpi.get_variable('sources')
|
||||
kernel_includes += uacpi.get_variable('includes')
|
||||
kernel_c_args += [
|
||||
'-DUACPI_FORMATTED_LOGGING',
|
||||
'-DUACPI_BAREBONES_MODE',
|
||||
'-DUACPI_BAREBONES_MODE', # TODO
|
||||
'-DUACPI_OVERRIDE_TYPES',
|
||||
]
|
||||
# For uacpi_types.h
|
||||
kernel_includes += include_directories('include')
|
||||
|
||||
kernel_sources += files(
|
||||
'uacpi_glue.c',
|
||||
)
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
#include <zinnia/init.h>
|
||||
#include <zinnia/mmio.h>
|
||||
#include <zinnia/print.h>
|
||||
#include <zinnia/utils.h>
|
||||
#include <stdarg.h>
|
||||
#include <uacpi/kernel_api.h>
|
||||
#include <uacpi/status.h>
|
||||
#include <uacpi/types.h>
|
||||
|
||||
uacpi_status uacpi_kernel_get_rsdp(uacpi_phys_addr* out_rsdp_address) {
|
||||
*out_rsdp_address = (uacpi_phys_addr)rsdp_addr;
|
||||
return UACPI_STATUS_OK;
|
||||
}
|
||||
|
||||
void* uacpi_kernel_map(uacpi_phys_addr addr, uacpi_size len) {
|
||||
return (void*)mmio_new(addr, len).base;
|
||||
}
|
||||
|
||||
void uacpi_kernel_unmap(void* addr, uacpi_size len) {
|
||||
// TODO
|
||||
}
|
||||
|
||||
void uacpi_kernel_log(uacpi_log_level lvl, const uacpi_char* msg, ...) {
|
||||
va_list args;
|
||||
va_start(args, msg);
|
||||
|
||||
kvprintf(msg, args);
|
||||
|
||||
va_end(args);
|
||||
}
|
||||
|
||||
void uacpi_kernel_vlog(uacpi_log_level lvl, const uacpi_char* msg, uacpi_va_list args) {
|
||||
kvprintf(msg, args);
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
kernel_sources += files(
|
||||
'memfiles.c',
|
||||
)
|
||||
+7
-1
@@ -1,3 +1,9 @@
|
||||
if get_option('acpi')
|
||||
subdir('common')
|
||||
|
||||
if cfg.get('CONFIG_ACPI', 0) == 1
|
||||
subdir('acpi')
|
||||
endif
|
||||
|
||||
if cfg.get('CONFIG_DT', 0) == 1
|
||||
subdir('dt')
|
||||
endif
|
||||
|
||||
Reference in New Issue
Block a user