summaryrefslogtreecommitdiff
path: root/arch/x86/machine/cpu.h
diff options
context:
space:
mode:
authorRichard Braun <rbraun@sceen.net>2017-06-24 21:57:57 +0200
committerRichard Braun <rbraun@sceen.net>2017-06-24 21:58:32 +0200
commit5127024f429da92ffdb93ba3cc0af367bc26f703 (patch)
treeb36a1e695d39eb49216e1ecf879208a782822f0e /arch/x86/machine/cpu.h
parent50dc3017b08158f5a808b4817627bd6d8f957df3 (diff)
Move the DATA_ALIGN and TEXT_ALIGN macros to the x86/cpu module
Diffstat (limited to 'arch/x86/machine/cpu.h')
-rw-r--r--arch/x86/machine/cpu.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/arch/x86/machine/cpu.h b/arch/x86/machine/cpu.h
index 44d339cf..0061e136 100644
--- a/arch/x86/machine/cpu.h
+++ b/arch/x86/machine/cpu.h
@@ -18,6 +18,8 @@
#ifndef _X86_CPU_H
#define _X86_CPU_H
+#include <limits.h>
+
/*
* L1 cache line size.
*
@@ -26,6 +28,22 @@
#define CPU_L1_SIZE 64
/*
+ * Data alignment, normally the word size.
+ */
+#define CPU_DATA_ALIGN (LONG_BIT / 8)
+
+/*
+ * Function alignment.
+ *
+ * Aligning functions improves instruction fetching.
+ *
+ * Used for assembly functions only.
+ *
+ * XXX Use this value until processor selection is available.
+ */
+#define CPU_TEXT_ALIGN 16
+
+/*
* Processor privilege levels.
*/
#define CPU_PL_KERNEL 0