created /kernel/isr subdir, moved isr.asm from boot to isr module, added interrupts.cc for isr() main function and isr_bootstrap() routine

git-svn-id: svn://anubis/hos/trunk@66 5b3e749e-e535-0410-8002-a9bb6afbdfca
This commit is contained in:
josh 2009-07-24 14:19:31 +00:00
parent d352afd079
commit d7be0159c9
5 changed files with 39 additions and 1 deletions

View File

@ -15,7 +15,7 @@ export CXXFLAGS := -Wall -O2 -fno-rtti -fno-exceptions
export LDFLAGS := -T $(LDSCRIPT) -Map $(KERNEL).map export LDFLAGS := -T $(LDSCRIPT) -Map $(KERNEL).map
export LDLIBS := `$(CC) -print-libgcc-file-name` export LDLIBS := `$(CC) -print-libgcc-file-name`
SUBDIRS := boot mm lang SUBDIRS := boot mm lang isr
SUBDIRS_clean := $(SUBDIRS:%=%.clean) SUBDIRS_clean := $(SUBDIRS:%=%.clean)
.PHONY: all .PHONY: all

2
kernel/isr/Makefile Executable file
View File

@ -0,0 +1,2 @@
include $(HOS_TOPLEVEL)/subdir.mak

19
kernel/isr/interrupts.cc Executable file
View File

@ -0,0 +1,19 @@
#include "hos_types.h"
#include "interrupts.h"
extern "C" {
void isr(u8_t int_num, int_stack_t * int_stack)
{
switch (int_num)
{
}
}
} /* extern "C" */
void interrupts_bootstrap()
{
/* TODO: set up IDTR, IDT */
}

17
kernel/isr/interrupts.h Normal file
View File

@ -0,0 +1,17 @@
#ifndef INTERRUPTS_H
#define INTERRUPTS_H
#ifdef __cplusplus
extern "C" {
#endif
void isr(u8_t int_num, int_stack_t * int_stack);
#ifdef __cplusplus
}
#endif
void interrupts_bootstrap();
#endif