blob: bb3172ff91a447e5103d066c825495914b788d2d [file] [log] [blame]
wdenkb2184c32002-11-19 23:01:07 +00001/*
2 * (C) Copyright 2002
Albert ARIBAUDfa82f872011-08-04 18:45:45 +02003 * Daniel Engström, Omicron Ceti AB, daniel@omicron.se
wdenk8bde7f72003-06-27 21:31:46 +00004 *
Wolfgang Denk1a459662013-07-08 09:37:19 +02005 * SPDX-License-Identifier: GPL-2.0+
wdenkb2184c32002-11-19 23:01:07 +00006 */
7
8#ifndef __ASM_PROCESSOR_H_
9#define __ASM_PROCESSOR_H_ 1
Graeme Russc53fd2b2011-02-12 15:11:30 +110010
Graeme Russ109ad142011-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 Russ9e6c5722011-12-31 22:58:15 +110020 X86_GDT_ENTRY_32BIT_FS,
Graeme Russ109ad142011-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 Russ8d616252012-11-27 15:38:36 +000028#define X86_GDT_NUM_ENTRIES 7
Graeme Russ109ad142011-12-31 10:24:36 +110029#endif
30
31#define X86_GDT_SIZE (X86_GDT_NUM_ENTRIES * X86_GDT_ENTRY_SIZE)
Graeme Russc53fd2b2011-02-12 15:11:30 +110032
wdenkb2184c32002-11-19 23:01:07 +000033#endif