x86_64: adjust formatting
This commit is contained in:
@@ -9,19 +9,19 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define NR_GDT_ENTRIES 5
|
||||
#define NR_GDT_ENTRIES 5
|
||||
|
||||
#define GDT_A_PRESENT (1 << 7)
|
||||
#define GDT_A_USER (3 << 5)
|
||||
#define GDT_A_CODE (3 << 3)
|
||||
#define GDT_A_DATA (8 << 1)
|
||||
#define GDT_A_RPLK (1 << 5)
|
||||
#define GDT_A_CODEREAD (1 << 1)
|
||||
#define GDT_A_DATAWRITE (1 << 1)
|
||||
#define GDT_A_GROWUP (1 << 5)
|
||||
#define GDT_F_64BIT (0x2F)
|
||||
#define GDT_F_32BIT (0x4F)
|
||||
#define GDT_F_16BIT (0xF)
|
||||
#define GDT_A_PRESENT (1 << 7)
|
||||
#define GDT_A_USER (3 << 5)
|
||||
#define GDT_A_CODE (3 << 3)
|
||||
#define GDT_A_DATA (8 << 1)
|
||||
#define GDT_A_RPLK (1 << 5)
|
||||
#define GDT_A_CODEREAD (1 << 1)
|
||||
#define GDT_A_DATAWRITE (1 << 1)
|
||||
#define GDT_A_GROWUP (1 << 5)
|
||||
#define GDT_F_64BIT (0x2F)
|
||||
#define GDT_F_32BIT (0x4F)
|
||||
#define GDT_F_16BIT (0xF)
|
||||
|
||||
struct gdt_entry {
|
||||
uint16_t ge_limit_low;
|
||||
|
||||
@@ -3,16 +3,24 @@
|
||||
|
||||
#include <arch/gdt.h>
|
||||
#include <arch/irq.h>
|
||||
#include <arch/tss.h>
|
||||
#include <mango/types.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define ML_BIG_ENDIAN 0
|
||||
#define ML_BIG_ENDIAN 0
|
||||
|
||||
#define ml_cpu_block_get_id(p) ((p)->c_cpu_id)
|
||||
#define ml_cpu_block_get_id(p) ((p)->c_cpu_id)
|
||||
#define ml_cpu_block_get_data(p) ((p)->c_data)
|
||||
|
||||
#if 0
|
||||
#define ml_read_sp(sp, bp) \
|
||||
asm volatile("mov %%rsp, %0" : "=r"(sp)); \
|
||||
asm volatile("mov %%rbp, %0" : "=r"(bp));
|
||||
#endif
|
||||
|
||||
struct cpu_data;
|
||||
|
||||
typedef struct ml_cpu_block {
|
||||
|
||||
@@ -9,11 +9,12 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
#define __X2(x) #x
|
||||
#define __X(x) __X2(x)
|
||||
#define __X(x) __X2(x)
|
||||
|
||||
#define __define_initcall(fn, id) \
|
||||
static initcall_t __initcall_##fn##id __used \
|
||||
__section(".initcall" __X(id) ".init") = (fn)
|
||||
#define __define_initcall(fn, id) \
|
||||
static initcall_t __initcall_##fn##id __used __section( \
|
||||
".initcall" __X(id) ".init") \
|
||||
= (fn)
|
||||
|
||||
extern int ml_init(uintptr_t arg);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user