Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
CSEP551
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Krishna Vinnakota
CSEP551
Commits
3fd50978
Commit
3fd50978
authored
17 years ago
by
rsc
Browse files
Options
Downloads
Patches
Plain Diff
spacing
parent
5d0fe344
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
BUGS
+0
-3
0 additions, 3 deletions
BUGS
mmu.h
+17
-17
17 additions, 17 deletions
mmu.h
with
17 additions
and
20 deletions
BUGS
+
0
−
3
View file @
3fd50978
index:
SEG_NULL, SEG_ASM not in the index
mmu.h:
funny \ alignment in mmu.h
proc.c:
as a consequence of the implementation of proc_kill,
any loop calling sleep should check for p->killed
...
...
This diff is collapsed.
Click to expand it.
mmu.h
+
17
−
17
View file @
3fd50978
...
...
@@ -47,12 +47,12 @@ struct segdesc {
// Normal segment
#define SEG(type, base, lim, dpl) (struct segdesc) \
{ ((lim) >> 12) & 0xffff, (base) & 0xffff, ((base) >> 16) & 0xff, \
type, 1, dpl, 1, (uint) (lim) >> 28, 0, 0, 1, 1, \
type, 1, dpl, 1, (uint) (lim) >> 28, 0, 0, 1, 1,
\
(uint) (base) >> 24 }
#define SEG16(type, base, lim, dpl) (struct segdesc) \
{ (lim) & 0xffff, (base) & 0xffff, ((base) >> 16) & 0xff, \
type, 1, dpl, 1, (uint) (lim) >> 16, 0, 0, 1, 0, \
type, 1, dpl, 1, (uint) (lim) >> 16, 0, 0, 1, 0,
\
(uint) (base) >> 24 }
#define DPL_USER 0x3 // User DPL
...
...
@@ -81,9 +81,9 @@ struct segdesc {
// Task state segment format
struct
taskstate
{
uint
link
;
// Old ts selector
uint
esp0
;
// Stack pointers and segment selectors
ushort
ss0
;
// after an increase in privilege level
uint
link
;
// Old ts selector
uint
esp0
;
// Stack pointers and segment selectors
ushort
ss0
;
// after an increase in privilege level
ushort
padding1
;
uint
*
esp1
;
ushort
ss1
;
...
...
@@ -91,10 +91,10 @@ struct taskstate {
uint
*
esp2
;
ushort
ss2
;
ushort
padding3
;
void
*
cr3
;
// Page directory base
uint
*
eip
;
// Saved state from last task switch
void
*
cr3
;
// Page directory base
uint
*
eip
;
// Saved state from last task switch
uint
eflags
;
uint
eax
;
// More saved state (registers)
uint
eax
;
// More saved state (registers)
uint
ecx
;
uint
edx
;
uint
ebx
;
...
...
@@ -102,7 +102,7 @@ struct taskstate {
uint
*
ebp
;
uint
esi
;
uint
edi
;
ushort
es
;
// Even more saved state (segment selectors)
ushort
es
;
// Even more saved state (segment selectors)
ushort
padding4
;
ushort
cs
;
ushort
padding5
;
...
...
@@ -116,8 +116,8 @@ struct taskstate {
ushort
padding9
;
ushort
ldt
;
ushort
padding10
;
ushort
t
;
// Trap on task switch
ushort
iomb
;
// I/O map base address
ushort
t
;
// Trap on task switch
ushort
iomb
;
// I/O map base address
};
// Gate descriptors for interrupts and traps
...
...
@@ -141,16 +141,16 @@ struct gatedesc {
// - dpl: Descriptor Privilege Level -
// the privilege level required for software to invoke
// this interrupt/trap gate explicitly using an int instruction.
#define SETGATE(gate, istrap, sel, off, d)
\
{
\
#define SETGATE(gate, istrap, sel, off, d) \
{ \
(gate).off_15_0 = (uint) (off) & 0xffff; \
(gate).ss = (sel); \
(gate).args = 0; \
(gate).rsv1 = 0; \
(gate).type = (istrap) ? STS_TG32 : STS_IG32; \
(gate).s = 0; \
(gate).type = (istrap) ? STS_TG32 : STS_IG32;
\
(gate).s = 0;
\
(gate).dpl = (d); \
(gate).p = 1; \
(gate).off_31_16 = (uint) (off) >> 16; \
(gate).p = 1;
\
(gate).off_31_16 = (uint) (off) >> 16;
\
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment