[kernel] Move 'table' includes to j6/tables
Move all table-style include files that are part of the public kernel interface to the j6/tables include path
This commit is contained in:
@@ -1,13 +0,0 @@
|
||||
#include "guids.h"
|
||||
|
||||
#define GUID(dw, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8, name) \
|
||||
EFI_GUID name __attribute__((section(".rodata"))) = {dw, w1, w2, {b1, b2, b3, b4, b5, b6, b7, b8}}
|
||||
#include "guids.inc"
|
||||
#undef GUID
|
||||
|
||||
int is_guid(EFI_GUID *a, EFI_GUID *b)
|
||||
{
|
||||
uint64_t *ai = (uint64_t *)a;
|
||||
uint64_t *bi = (uint64_t *)b;
|
||||
return ai[0] == bi[0] && ai[1] == bi[1];
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
#pragma once
|
||||
#include <efi/efi.h>
|
||||
|
||||
int is_guid(EFI_GUID *a, EFI_GUID *b);
|
||||
|
||||
#define GUID(dw, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8, name) extern EFI_GUID name
|
||||
#include "guids.inc"
|
||||
#undef GUID
|
||||
@@ -1,11 +0,0 @@
|
||||
GUID(0xeb9d2d30,0x2d88,0x11d3,0x9a,0x16,0x00,0x90,0x27,0x3f,0xc1,0x4d, guid_acpi1);
|
||||
GUID(0x8868e871,0xe4f1,0x11d3,0xbc,0x22,0x00,0x80,0xc7,0x3c,0x88,0x81, guid_acpi2);
|
||||
GUID(0x09576e92,0x6d3f,0x11d2,0x8e,0x39,0x00,0xa0,0xc9,0x69,0x72,0x3b, guid_file_info);
|
||||
GUID(0x9042a9de,0x23dc,0x4a38,0x96,0xfb,0x7a,0xde,0xd0,0x80,0x51,0x6a, guid_gfx_out);
|
||||
GUID(0x964e5b22,0x6459,0x11d2,0x8e,0x39,0x00,0xa0,0xc9,0x69,0x72,0x3b, guid_simple_filesystem);
|
||||
GUID(0x09576e91,0x6d3f,0x11d2,0x8e,0x39,0x00,0xa0,0xc9,0x69,0x72,0x3b, guid_device_path);
|
||||
GUID(0x8b843e20,0x8132,0x4852,0x90,0xcc,0x55,0x1a,0x4e,0x4a,0x7f,0x1c, guid_device_path_to_text);
|
||||
|
||||
GUID(0x10d0669c,0x9ec6,0x4268,0xbc,0x48,0xff,0x74,0x75,0x21,0xfe,0x07, guid_jsix_vendor);
|
||||
|
||||
// vim: ft=c
|
||||
@@ -38,7 +38,7 @@ typedef uint64_t j6_handle_t;
|
||||
|
||||
enum j6_object_type {
|
||||
#define OBJECT_TYPE( name, val ) j6_object_type_ ## name = val,
|
||||
#include "j6/object_types.inc"
|
||||
#include "j6/tables/object_types.inc"
|
||||
#undef OBJECT_TYPE
|
||||
|
||||
j6_object_type_max
|
||||
|
||||
@@ -17,7 +17,7 @@ public:
|
||||
enum class type : uint16_t
|
||||
{
|
||||
#define OBJECT_TYPE( name, val ) name = val,
|
||||
#include "j6/object_types.inc"
|
||||
#include "j6/tables/object_types.inc"
|
||||
#undef OBJECT_TYPE
|
||||
|
||||
max
|
||||
|
||||
@@ -69,7 +69,7 @@ syscall_enable()
|
||||
syscall_names[id] = #name; \
|
||||
static_assert( id <= num_calls, "Syscall " #name " has id > syscall::MAX" ); \
|
||||
log::debug(logs::syscall, "Enabling syscall 0x%02x as " #name , id);
|
||||
#include "syscalls.inc"
|
||||
#include "j6/tables/syscalls.inc"
|
||||
#undef SYSCALL
|
||||
}
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ struct cpu_state;
|
||||
enum class syscall : uint64_t
|
||||
{
|
||||
#define SYSCALL(id, name, ...) name = id,
|
||||
#include "syscalls.inc"
|
||||
#include "j6/tables/syscalls.inc"
|
||||
#undef SYSCALL
|
||||
|
||||
// Maximum syscall id. If you change this, also change
|
||||
@@ -21,6 +21,6 @@ void syscall_enable();
|
||||
namespace syscalls
|
||||
{
|
||||
#define SYSCALL(id, name, ...) j6_status_t name (__VA_ARGS__);
|
||||
#include "syscalls.inc"
|
||||
#include "j6/tables/syscalls.inc"
|
||||
#undef SYSCALL
|
||||
}
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
%include "push_all.inc"
|
||||
%include "tasking.inc"
|
||||
|
||||
; Make sure to keep MAX_SYSCALLS in sync with
|
||||
|
||||
@@ -126,7 +126,7 @@ void fatal(area_t area, const char *fmt, ...);
|
||||
|
||||
namespace logs {
|
||||
#define LOG(name, lvl) extern const log::area_t name;
|
||||
#include "log_areas.inc"
|
||||
#include "j6/tables/log_areas.inc"
|
||||
#undef LOG
|
||||
} // namespace logs
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace logs {
|
||||
#define LOG(name, lvl) \
|
||||
const log::area_t name = #name ## _h; \
|
||||
const char * name ## _name = #name;
|
||||
#include "log_areas.inc"
|
||||
#include "j6/tables/log_areas.inc"
|
||||
#undef LOG
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ logger::logger(uint8_t *buffer, size_t size, logger::immediate_cb output) :
|
||||
|
||||
#define LOG(name, lvl) \
|
||||
register_area(logs::name, logs::name ## _name, log::level::lvl);
|
||||
#include "log_areas.inc"
|
||||
#include "j6/tables/log_areas.inc"
|
||||
#undef LOG
|
||||
}
|
||||
|
||||
|
||||
@@ -25,4 +25,4 @@
|
||||
%define SYSCALL(n, name, a, b, c, d) SYSCALL name, n
|
||||
%define SYSCALL(n, name, a, b, c, d, e) SYSCALL name, n
|
||||
|
||||
%include "syscalls.inc"
|
||||
%include "j6/tables/syscalls.inc"
|
||||
|
||||
@@ -7,7 +7,7 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
#define SYSCALL(n, name, ...) j6_status_t _syscall_ ## name (__VA_ARGS__);
|
||||
#include "syscalls.inc"
|
||||
#include "j6/tables/syscalls.inc"
|
||||
#undef SYSCALL
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
Reference in New Issue
Block a user