Subversion Repositories shark

Rev

Rev 42 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
42 pj 1
/* Project:     OSLib
2
 * Description: The OS Construction Kit
3
 * Date:                1.6.2000
4
 * Idea by:             Luca Abeni & Gerardo Lamastra
5
 *
6
 * OSLib is an SO project aimed at developing a common, easy-to-use
7
 * low-level infrastructure for developing OS kernels and Embedded
8
 * Applications; it partially derives from the HARTIK project but it
9
 * currently is independently developed.
10
 *
11
 * OSLib is distributed under GPL License, and some of its code has
12
 * been derived from the Linux kernel source; also some important
13
 * ideas come from studying the DJGPP go32 extender.
14
 *
15
 * We acknowledge the Linux Community, Free Software Foundation,
16
 * D.J. Delorie and all the other developers who believe in the
17
 * freedom of software and ideas.
18
 *
19
 * For legalese, check out the included GPL license.
20
 */
21
 
22
/*      Address spaces code & data      */
23
 
24
#ifndef __LL_SYS_LL_ASPACE_H__
25
#define __LL_SYS_LL_ASPACE_H__
26
 
27
#include <ll/i386/defs.h>
28
 
29
/* I dont't know if we really need all these things... */
30
#include <ll/i386/hw-data.h>
31
#include <ll/i386/hw-instr.h>
32
#include <ll/i386/hw-func.h>
33
#include <ll/i386/tss-ctx.h>
34
 
83 pj 35
BEGIN_DEF
36
 
42 pj 37
struct as {
38
        DWORD base;
39
        DWORD limit;
40
        WORD status;
41
};
42
/* An Address Space descriptor is a Segment descriptor... so it is a WORD... */
43
#define AS WORD
44
 
45
#define AS_FREE 0
46
#define AS_BUSY 1
47
 
48
#define ASMax 60
49
 
50
#if 0
51
#define ASBase                 0x300    /* Is it correct? TSSBase + 64 *8... */
52
#endif
53
 
54
#define ASBase                 (TSSBase + TSSMax * 8)
55
#define ASsel2index(sel)       ((sel-ASBase) / 16)
56
#define ASindex2sel(i)         (ASBase + i * 16)
57
 
58
 
59
void as_init(void);
60
AS as_create(void);
61
int as_bind(AS as, DWORD ph_addr, DWORD l_addr, DWORD size);
62
 
63
 
64
END_DEF
65
 
66
#endif /* __LL_SYS_LL_ASPACE_H__ */