mirror of
https://github.com/wichtounet/thor-os.git
synced 2025-09-13 22:47:15 -04:00
Prepare the ACPICA OSL
This commit is contained in:
parent
0899b4dfd4
commit
f3c60de9c1
27
kernel/include/acpica.hpp
Normal file
27
kernel/include/acpica.hpp
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
//=======================================================================
|
||||||
|
// Copyright Baptiste Wicht 2013-2016.
|
||||||
|
// Distributed under the Boost Software License, Version 1.0.
|
||||||
|
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||||
|
// http://www.boost.org/LICENSE_1_0.txt)
|
||||||
|
//=======================================================================
|
||||||
|
|
||||||
|
#ifndef THOR_ACPICA_HPP
|
||||||
|
#define THOR_ACPICA_HPP
|
||||||
|
|
||||||
|
extern "C" {
|
||||||
|
|
||||||
|
#include "thor_acenv.hpp"
|
||||||
|
#include "thor_acenvex.hpp"
|
||||||
|
|
||||||
|
//ACPICA
|
||||||
|
#pragma GCC diagnostic push
|
||||||
|
#pragma GCC diagnostic ignored "-Wunused-parameter"
|
||||||
|
#pragma GCC diagnostic ignored "-Wunused-function" //TODO Does not work
|
||||||
|
#include "acpi.h"
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
|
|
||||||
|
} //end of extern "C"
|
||||||
|
|
||||||
|
#include <types.hpp>
|
||||||
|
|
||||||
|
#endif
|
@ -9,6 +9,7 @@
|
|||||||
#define THOR_ACPI_HPP
|
#define THOR_ACPI_HPP
|
||||||
|
|
||||||
// This file contains the OS specific layer for ACPICA for thor-os
|
// This file contains the OS specific layer for ACPICA for thor-os
|
||||||
|
// It is meant to only be included by thor_acenv
|
||||||
|
|
||||||
#define ACPI_MACHINE_WIDTH 64 //thor works in 64 bits
|
#define ACPI_MACHINE_WIDTH 64 //thor works in 64 bits
|
||||||
|
|
||||||
|
@ -5,17 +5,7 @@
|
|||||||
// http://www.boost.org/LICENSE_1_0.txt)
|
// http://www.boost.org/LICENSE_1_0.txt)
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
|
|
||||||
//ACPICA
|
#include "acpica.hpp"
|
||||||
#include "thor_acenv.hpp" //The OS Specific Layer
|
|
||||||
|
|
||||||
#pragma GCC diagnostic push
|
|
||||||
#pragma GCC diagnostic ignored "-Wunused-parameter"
|
|
||||||
#pragma GCC diagnostic ignored "-Wunused-function" //TODO Does not work
|
|
||||||
#include "acpi.h"
|
|
||||||
#pragma GCC diagnostic pop
|
|
||||||
|
|
||||||
#include <types.hpp>
|
|
||||||
|
|
||||||
#include "acpi.hpp"
|
#include "acpi.hpp"
|
||||||
#include "kernel_utils.hpp"
|
#include "kernel_utils.hpp"
|
||||||
#include "timer.hpp"
|
#include "timer.hpp"
|
||||||
|
26
kernel/src/thor_acpi.cpp
Normal file
26
kernel/src/thor_acpi.cpp
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
//=======================================================================
|
||||||
|
// Copyright Baptiste Wicht 2013-2016.
|
||||||
|
// Distributed under the Boost Software License, Version 1.0.
|
||||||
|
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||||
|
// http://www.boost.org/LICENSE_1_0.txt)
|
||||||
|
//=======================================================================
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file contains the OS specific layer
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "acpica.hpp"
|
||||||
|
|
||||||
|
#include "kalloc.hpp"
|
||||||
|
|
||||||
|
extern "C" {
|
||||||
|
|
||||||
|
void* AcpiOsAllocate(ACPI_SIZE size){
|
||||||
|
kalloc::k_malloc(size);
|
||||||
|
}
|
||||||
|
|
||||||
|
void AcpiOsFree(void* p){
|
||||||
|
kalloc::k_free(p);
|
||||||
|
}
|
||||||
|
|
||||||
|
} //end of extern "C"
|
Loading…
x
Reference in New Issue
Block a user