NOVA
Stripped down NOVA kernel for the OSY course
include
regs.h
1
/*
2
* Register File
3
*
4
* Copyright (C) 2009-2011 Udo Steinberg <udo@hypervisor.org>
5
* Economic rights: Technische Universitaet Dresden (Germany)
6
*
7
* This file is part of the NOVA microhypervisor.
8
*
9
* NOVA is free software: you can redistribute it and/or modify it
10
* under the terms of the GNU General Public License version 2 as
11
* published by the Free Software Foundation.
12
*
13
* NOVA is distributed in the hope that it will be useful,
14
* but WITHOUT ANY WARRANTY; without even the implied warranty of
15
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
* GNU General Public License version 2 for more details.
17
*/
18
19
#pragma once
20
21
#include "atomic.h"
22
#include "compiler.h"
23
#include "types.h"
24
25
class
Sys_regs
26
{
27
public
:
28
union
{
29
struct
{
30
mword edi;
31
mword esi;
32
mword ebp;
33
mword cr2;
34
mword ebx;
35
mword edx;
36
mword ecx;
37
mword eax;
38
};
39
mword gpr[8];
40
};
41
};
42
43
class
Exc_regs
:
public
Sys_regs
44
{
45
public
:
46
union
{
47
struct
{
48
mword gs;
49
mword fs;
50
mword es;
51
mword ds;
52
mword err;
53
mword vec;
54
mword eip;
55
mword cs;
56
mword efl;
57
mword esp;
58
mword ss;
59
};
60
};
61
62
public
:
63
ALWAYS_INLINE
64
inline
bool
user()
const
{
return
cs & 3; }
65
};
Exc_regs
Definition:
regs.h:44
Sys_regs
Definition:
regs.h:26
Generated by
1.9.1