Exemplo n.º 1
0
Arquivo: main.c Projeto: mios16/CPE159
void InitKernelControl() 
{ 				// learned from timer lab, remember to modify main.h
   	IDT_ptr = get_idt_base();	//locate IDT 1st
   	SetEntry(TIMER_INTR, TimerEntry);
   	//outportb(0x21, ~129);		
	outportb(0x21, ~137);	
	
	//Phase 2	
	SetEntry(GETPID_INTR, GetPidEntry);	//add 2 new IDT entries.
	SetEntry(SLEEP_INTR, SleepEntry);	//add 2 new IDT entries.

	//phase 3 fill out IDT with new entries
	SetEntry(STARTPROC_INTR, StartProcEntry);	
	SetEntry(SEMGET_INTR, SemGetEntry);
	SetEntry(SEMWAIT_INTR, SemWaitEntry);	
	SetEntry(SEMPOST_INTR, SemPostEntry);

	//phase 4
	SetEntry(MSGSND_INTR, MsgSndEntry);	
	SetEntry(MSGRCV_INTR, MsgRcvEntry);

	//phase 5
	SetEntry(IRQ7_INTR, IRQ7Entry);

	//phase 6
	SetEntry(IRQ3_INTR, IRQ3Entry);		//add new entry to IDT

	//phase 8
	SetEntry(FORK_INTR, ForkEntry);
	SetEntry(WAIT_INTR, WaitEntry);
	SetEntry(EXIT_INTR, ExitEntry);
	
					
}
Exemplo n.º 2
0
Arquivo: main.c Projeto: mios16/CPE159
void InitKernelControl() 
{ 				// learned from timer lab, remember to modify main.h
   	IDT_ptr = get_idt_base();	//locate IDT 1st
   	SetEntry(TIMER_INTR, TimerEntry);
   	outportb(0x21, ~129);		
	
	//Phase 2	
	SetEntry(GETPID_INTR, GetPidEntry);	//add 2 new IDT entries.
	SetEntry(SLEEP_INTR, SleepEntry);	//add 2 new IDT entries.

	//phase 3 fill out IDT with new entries
	SetEntry(STARTPROC_INTR, StartProcEntry);	
	SetEntry(SEMGET_INTR, SemGetEntry);
	SetEntry(SEMWAIT_INTR, SemWaitEntry);	
	SetEntry(SEMPOST_INTR, SemPostEntry);

	//phase 4
	SetEntry(MSGSND_INTR, MsgSndEntry);	
	SetEntry(MSGRCV_INTR, MsgRcvEntry);

	//phase 5
	SetEntry(IRQ7_INTR, IRQ7Entry);

	//phase 6
	SetEntry(IRQ3_INTR, IRQ3Entry);		//add new entry to IDT
						//include PIC mask IRQ3(port COM3 would need IRQ4, for extra credit)****
						// isr.c/.h: code IRQ3ISR as shown above?***************
}
Exemplo n.º 3
0
void InitControl()
{
   idt_table = get_idt_base();
   SetIDTEntry(0x20, TimerEntry);
   SetIDTEntry(0x31, SleepEntry);
   SetIDTEntry(0x30, GetPidEntry);
   outportb(0x21, ~0x11);

}
Exemplo n.º 4
0
Arquivo: main.c Projeto: mios16/CPE159
void InitKernelControl() 
{ 				// learned from timer lab, remember to modify main.h
   	IDT_ptr = get_idt_base();	//locate IDT 1st
   	SetEntry(32, TimerEntry);	//call SetEntry() to plant TimerEntry jump point
   	outportb(0x21, ~1);		//program the mask of PIC(PIC mask == 0x21 and ~1 == mask) (but NO "sti" which is built into the process trapframe)
	
	//Phase 2	
	SetEntry(48, GetPidEntry);	//add 2 new IDT entries.
	SetEntry(49, SleepEntry);	//add 2 new IDT entries.
}
void InitControl()
{
   idt_table = get_idt_base(); // get where IDT is in RAM
   SetIDTEntry(32, TimerEntry); // prime IDT with an entry
   outportb(0x21, ~1);
   SetIDTEntry(GETPID_INTR, GetPidEntry);
   SetIDTEntry(SLEEP_INTR, SleepEntry);
   SetIDTEntry(SPAWN_INTR, SpawnEntry);
   SetIDTEntry(SEMINIT_INTR, SemInitEntry);
   SetIDTEntry(SEMWAIT_INTR, SemWaitEntry);
   SetIDTEntry(SEMPOST_INTR, SemPostEntry); 
}
Exemplo n.º 6
0
Arquivo: main.c Projeto: suond/csc159
void InitKernelControl() {
	IDT_ptr = get_idt_base();
	SetEntry(32, TimerEntry);
	SetEntry(48, GetPidEntry);	
	SetEntry(49, SleepEntry);
        SetEntry(50, StartProcEntry);
	SetEntry(51, SemGetEntry);	
	SetEntry(52, SemWaitEntry);
	SetEntry(53, SemPostEntry);
	SetEntry(54, MsgSndEntry);
	SetEntry(55, MsgRcvEntry);
	outportb(0x21, ~0x01);  //masking the PIC
	
}
void InitControl()
{
   idt_table = get_idt_base(); // get where IDT is in RAM
   SetIDTEntry(32, TimerEntry); // prime IDT with an entry
   //outportb(0x21, ~1);
   SetIDTEntry(48, GetPidEntry);
   SetIDTEntry(49, SleepEntry);
   SetIDTEntry(50, SpawnEntry);
   SetIDTEntry(51, SemInitEntry);
   SetIDTEntry(52, SemWaitEntry);
   SetIDTEntry(53, SemPostEntry);
   SetIDTEntry(54, MsgSndEntry);
   SetIDTEntry(55, MsgRcvEntry);
   SetIDTEntry(IRQ7_INTR, IRQ7Entry);
   outportb(0x21, ~129);
}
Exemplo n.º 8
0
void InitControl()
{
	idt_table = get_idt_base();
	SetIDTEntry(TIMER_INTR, TimerEntry);
	SetIDTEntry(IRQ7_INTR, IRQ7Entry);
	SetIDTEntry(GETPID_INTR, GetPidEntry);
	SetIDTEntry(SLEEP_INTR, SleepEntry);
	SetIDTEntry(SPAWN_INTR, SpawnEntry);
	SetIDTEntry(SEMINIT_INTR, SemInitEntry);
	SetIDTEntry(SEMWAIT_INTR, SemWaitEntry);
	SetIDTEntry(SEMPOST_INTR, SemPostEntry);
	SetIDTEntry(MSGSND_INTR, MsgSndEntry);
	SetIDTEntry(MSGRCV_INTR, MsgRcvEntry);
	outportb(0x21, 0x7e);

}
Exemplo n.º 9
0
Arquivo: main.c Projeto: mios16/CPE159
void InitKernelControl() 
{ 				// learned from timer lab, remember to modify main.h
   	IDT_ptr = get_idt_base();	//locate IDT 1st
   	SetEntry(TIMER_INTR, TimerEntry);	//call SetEntry() to plant TimerEntry jump point
   	outportb(0x21, ~1);		//program the mask of PIC(PIC mask == 0x21 and ~1 == mask)
	
	//Phase 2	
	SetEntry(GETPID_INTR, GetPidEntry);	//add 2 new IDT entries.
	SetEntry(SLEEP_INTR, SleepEntry);	//add 2 new IDT entries.

	//phase 3 fill out IDT with new entries
	SetEntry(STARTPROC_INTR, StartProcEntry);	
	SetEntry(SEMGET_INTR, SemGetEntry);
	SetEntry(SEMWAIT_INTR, SemWaitEntry);	
	SetEntry(SEMPOST_INTR, SemPostEntry);

	//phase 4
	SetEntry(MSGSND_INTR, MsgSndEntry);	
	SetEntry(MSGRCV_INTR, MsgRcvEntry);

	
}
void InitControl()
{
   idt_table = get_idt_base(); // get where IDT is in RAM
   SetIDTEntry(32, TimerEntry); // prime IDT with an entry
//   outportb(0x21, ~1);

   SetIDTEntry(39, IRQ7Entry);
   outportb(0x21, ~129); // for both IRQ 0 and 7

   SetIDTEntry(48, GetPidEntry);
   SetIDTEntry(49, SleepEntry);
   SetIDTEntry(50, SpawnEntry);
   SetIDTEntry(51, SemInitEntry);
   SetIDTEntry(52, SemWaitEntry);
   SetIDTEntry(53, SemPostEntry);
   SetIDTEntry(54, MsgSndEntry);
   SetIDTEntry(55, MsgRcvEntry);
   SetIDTEntry(0x23, IRQ3Entry);
   SetIDTEntry(0x24, IRQ4Entry);
   SetIDTEntry(56, ForkEntry);
   SetIDTEntry(57, WaitEntry);
   SetIDTEntry(58, ExitEntry);
   outportb(0x21, ~0x99);
}
Exemplo n.º 11
0
void InitControl()
{
   idt_table = get_idt_base();
   SetIDTEntry(32, TimerEntry);
   outportb(0x21, ~0x01);
}