ifeq ($(DEBUG_INTERRUPTS),1)
DEBUG_SECTIONS := $(DEBUG_SECTIONS) -DDEBUG_INTERRUPTS
else
-ifeq ($(DEBUG_DEBUG_INTERRUPTS),0)
+ifeq ($(DEBUG_INTERRUPTS),0)
DEBUG_SECTIONS := $(DEBUG_SECTIONS) -UDEBUG_INTERRUPTS
endif
endif
endif
endif
+ifeq ($(TRACE_RAMDISK),1)
+DEBUG_SECTIONS := $(DEBUG_SECTIONS -DTRACE_RAMDISK
+else
+ifeq ($(TRACE_RAMDSK),0)
+DEBUG_SECTIONS := $(DEBUG_SECTIONS) -UTRACE_RAMDISK
+endif
+endif
+
+
#DEBUG_SECTIONS := $(DEBUG_SECTIONS) -DTEST_NE2K
# Flags used for all C source files
#GENERAL_OPTS := -O -Wall $(EXTRA_C_OPTS) $(VMM_FLAGS) -fPIC #-fvisibility=hidden
-GENERAL_OPTS := -Wall $(EXTRA_C_OPTS) $(VMM_FLAGS) -fPIC #-fvisibility=hidden
+GENERAL_OPTS := -O -Wall $(EXTRA_C_OPTS) $(VMM_FLAGS) -fPIC #-fvisibility=hidden
CC_GENERAL_OPTS := $(GENERAL_OPTS) -Werror
# Flags used for VMM C source files
+++ /dev/null
-/* (c) 2008, Jack Lange <jarusl@cs.northwestern.edu> */
-/* (c) 2008, The V3VEE Project <http://www.v3vee.org> */
-
-#ifndef GEEKOS_SOCKET_H
-#define GEEKOS_SOCKET_H
-
-#include <geekos/ring_buffer.h>
-#include <geekos/kthread.h>
-
-#ifdef UIP
-#include <uip/uip.h>
-
-
-typedef enum {WAITING, CLOSED, LISTEN, ESTABLISHED} sock_state_t;
-
-struct socket {
- int in_use;
- struct Thread_Queue recv_wait_queue;
- struct ring_buffer *send_buf;
- struct ring_buffer *recv_buf;
- struct uip_conn *con;
-
- sock_state_t state;
-
-};
-
-
-void init_socket_layer();
-
-int connect(const uchar_t ip_addr[4], ushort_t port);
-int close(const int sockfd);
-int recv(int sockfd, void * buf, uint_t len);
-int send(int sockfd, void * buf, uint_t len);
-
-void set_ip_addr(uchar_t addr[4]);
-
-#endif /* UIP */
-
-
-#endif
}
-/*Zheng 07/30/2008*/
-
-static int pic_lower_intr(void *private_data, int irq_no) {
+static int pic_lower_intr(void *private_data, int irq) {
struct pic_internal *state = (struct pic_internal*)private_data;
- PrintDebug("[pic_lower_intr] IRQ line %d now low\n", (unsigned) irq_no);
- if (irq_no <= 7) {
+ PrintDebug("[pic_lower_intr] IRQ line %d now low\n", irq);
+ if (irq <= 7) {
- state->master_irr &= ~(1 << irq_no);
+ state->master_irr &= ~(1 << irq);
if ((state->master_irr & ~(state->master_imr)) == 0) {
PrintDebug("\t\tFIXME: Master maybe should do sth\n");
}
- } else if ((irq_no > 7) && (irq_no <= 15)) {
+ } else if ((irq > 7) && (irq < 16)) {
- state->slave_irr &= ~(1 << (irq_no - 8));
+ state->slave_irr &= ~(1 << (irq - 8));
if ((state->slave_irr & (~(state->slave_imr))) == 0) {
PrintDebug("\t\tFIXME: Slave maybe should do sth\n");
}
*/
-/*Zheng 07/30/2008*/
+
static struct intr_ctrl_ops intr_ops = {
.intr_pending = pic_intr_pending,
.get_intr_number = pic_get_intr_number,
.raise_intr = pic_raise_intr,
.begin_irq = pic_begin_irq,
- .lower_intr = pic_lower_intr, //Zheng added
+ .lower_intr = pic_lower_intr,
};
if (!use_ramdisk) {
+ PrintDebug("Hooking IDE IRQs\n");
+
//primary ide
v3_hook_passthrough_irq(info, 14);
(info->intr_state.controller->lower_intr)) {
info->intr_state.controller->lower_intr(info->intr_state.controller_state, irq);
} else {
- PrintDebug("There is no registered Interrupt Controller... (NULL POINTER)\n");
+ PrintError("There is no registered Interrupt Controller... (NULL POINTER)\n");
return -1;
}
(info->intr_state.controller->raise_intr)) {
info->intr_state.controller->raise_intr(info->intr_state.controller_state, irq);
} else {
- PrintDebug("There is no registered Interrupt Controller... (NULL POINTER)\n");
+ PrintError("There is no registered Interrupt Controller... (NULL POINTER)\n");
return -1;
}