blob: bb3172ff91a447e5103d066c825495914b788d2d [file] [log] [blame]
wdenk67ff36c2002-11-19 23:01:07 +00001/*
2 * (C) Copyright 2002
Albert ARIBAUD60fbc8d2011-08-04 18:45:45 +02003 * Daniel Engström, Omicron Ceti AB, daniel@omicron.se
wdenk57b2d802003-06-27 21:31:46 +00004 *
Wolfgang Denkd79de1d2013-07-08 09:37:19 +02005 * SPDX-License-Identifier: GPL-2.0+
wdenk67ff36c2002-11-19 23:01:07 +00006 */
7
8#ifndef __ASM_PROCESSOR_H_
9#define __ASM_PROCESSOR_H_ 1
Graeme Russ25391d12011-02-12 15:11:30 +110010
Graeme Russ391bb952011-12-31 10:24:36 +110011#define X86_GDT_ENTRY_SIZE 8
12
13#ifndef __ASSEMBLY__
14
15enum {
16 X86_GDT_ENTRY_NULL = 0,
17 X86_GDT_ENTRY_UNUSED,
18 X86_GDT_ENTRY_32BIT_CS,
19 X86_GDT_ENTRY_32BIT_DS,
Graeme Russ35368962011-12-31 22:58:15 +110020 X86_GDT_ENTRY_32BIT_FS,
Graeme Russ391bb952011-12-31 10:24:36 +110021 X86_GDT_ENTRY_16BIT_CS,
22 X86_GDT_ENTRY_16BIT_DS,
23 X86_GDT_NUM_ENTRIES
24};
25#else
26/* NOTE: If the above enum is modified, this define must be checked */
27#define X86_GDT_ENTRY_32BIT_DS 3
Graeme Russ007818a2012-11-27 15:38:36 +000028#define X86_GDT_NUM_ENTRIES 7
Graeme Russ391bb952011-12-31 10:24:36 +110029#endif
30
31#define X86_GDT_SIZE (X86_GDT_NUM_ENTRIES * X86_GDT_ENTRY_SIZE)
Graeme Russ25391d12011-02-12 15:11:30 +110032
wdenk67ff36c2002-11-19 23:01:07 +000033#endif