mirror of https://github.com/tailix/libkernaux.git
Add "src/arch/i386/paging.c"
This commit is contained in:
parent
c04365845a
commit
f659e2af97
|
@ -25,13 +25,18 @@ libkernaux_a_SOURCES = \
|
|||
src/libc.c \
|
||||
src/printf.c
|
||||
|
||||
if WITH_ARCH_I386
|
||||
if ARCH_I386
|
||||
libkernaux_a_SOURCES += src/arch/i386/asm.S
|
||||
endif
|
||||
libkernaux_a_SOURCES += src/arch/i386/paging.c
|
||||
endif
|
||||
|
||||
if WITH_ARCH_X86_64
|
||||
if ARCH_X86_64
|
||||
libkernaux_a_SOURCES += src/arch/x86_64/asm.S
|
||||
endif
|
||||
endif
|
||||
|
||||
if WITH_CMDLINE
|
||||
libkernaux_a_SOURCES += src/cmdline.c
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
#include <kernaux/arch/i386.h>
|
||||
|
||||
// TODO: There are some static asserts just for example.
|
||||
|
||||
__attribute__((unused))
|
||||
static const int assert0[
|
||||
sizeof(struct KernAux_Arch_I386_PDE) == sizeof(uint32_t) ? 1 : -1
|
||||
];
|
||||
|
||||
__attribute__((unused))
|
||||
static const int assert1[
|
||||
sizeof(struct KernAux_Arch_I386_PTE) == sizeof(uint32_t) ? 1 : -1
|
||||
];
|
||||
|
||||
__attribute__((unused))
|
||||
static const int assert1[
|
||||
sizeof(struct KernAux_Arch_I386_PageDir) == 1024 * sizeof(uint32_t) ? 1 : -1
|
||||
];
|
||||
|
||||
__attribute__((unused))
|
||||
static const int assert1[
|
||||
sizeof(struct KernAux_Arch_I386_PageTable) == 1024 * sizeof(uint32_t) ? 1 : -1
|
||||
];
|
Loading…
Reference in New Issue