Subversion Repositories HelenOS-historic

Compare Revisions

Ignore whitespace Rev 267 → Rev 268

/SPARTAN/trunk/arch/ia32/include/smp/apic.h
121,7 → 121,7
extern __u32 apic_id_mask;
 
extern void apic_init(void);
extern void apic_spurious(__u8 n, __u32 stack[]);
extern void apic_spurious(__u8 n, __native stack[]);
 
extern void l_apic_init(void);
extern void l_apic_eoi(void);
128,7 → 128,7
extern int l_apic_broadcast_custom_ipi(__u8 vector);
extern int l_apic_send_init_ipi(__u8 apicid);
extern void l_apic_debug(void);
extern void l_apic_timer_interrupt(__u8 n, __u32 stack[]);
extern void l_apic_timer_interrupt(__u8 n, __native stack[]);
extern __u8 l_apic_id(void);
 
extern __u32 io_apic_read(__u8 address);
/SPARTAN/trunk/arch/ia32/Makefile.inc
1,7 → 1,11
CC=gcc
AS=as
LD=ld
OBJCOPY=objcopy
BFD_NAME=elf32-i386
BFD_ARCH=i386
 
 
DEFS:=-DARCH=$(ARCH)
 
ifdef SMP
/SPARTAN/trunk/arch/ia32/src/smp/apic.c
111,7 → 111,7
l_apic_debug();
}
 
void apic_spurious(__u8 n, __u32 stack[])
void apic_spurious(__u8 n, __native stack[])
{
printf("cpu%d: APIC spurious interrupt\n", CPU->id);
}
319,7 → 319,7
#endif
}
 
void l_apic_timer_interrupt(__u8 n, __u32 stack[])
void l_apic_timer_interrupt(__u8 n, __native stack[])
{
l_apic_eoi();
clock();
/SPARTAN/trunk/arch/ia32/src/acpi/madt.c
114,7 → 114,7
__u8 prev_type = 0; /* used to detect inconsecutive entries */
 
 
l_apic = (__u32 *) acpi_madt->l_apic_address;
l_apic = (__u32 *) (__native) acpi_madt->l_apic_address;
 
while (h < end) {
switch (h->type) {
176,7 → 176,7
 
if (!madt_io_apic_entry_cnt++) {
madt_io_apic_entries = ioa;
io_apic = (__u32 *) ioa->io_apic_address;
io_apic = (__u32 *) (__native) ioa->io_apic_address;
}
else {
/* currently not supported */
/SPARTAN/trunk/arch/ia32/src/acpi/acpi.c
95,7 → 95,7
* 2. search 128K starting at 0xe0000
*/
 
addr[0] = (__u8 *) ebda;
addr[0] = (__u8 *) PA2KA(ebda);
for (i = (ebda ? 0 : 1); i < 2; i++) {
for (j = 0; j < length[i]; j += 16) {
if (*((__u64 *) &addr[i][j]) == *sig && rsdp_check(&addr[i][j])) {
110,7 → 110,7
rsdp_found:
printf("%L: ACPI Root System Description Pointer\n", acpi_rsdp);
 
acpi_rsdt = (struct acpi_rsdt *) acpi_rsdp->rsdt_address;
acpi_rsdt = (struct acpi_rsdt *) (__native) acpi_rsdp->rsdt_address;
if (acpi_rsdp->revision) acpi_xsdt = (struct acpi_xsdt *) ((__address) acpi_rsdp->xsdt_address);
 
if (acpi_rsdt) map_sdt((struct acpi_sdt_header *) acpi_rsdt);
136,7 → 136,7
for (i=0; i<cnt; i++) {
for (j=0; j<sizeof(signature_map)/sizeof(struct acpi_signature_map); j++) {
struct acpi_sdt_header *h = (struct acpi_sdt_header *) acpi_rsdt->entry[i];
struct acpi_sdt_header *h = (struct acpi_sdt_header *) (__native) acpi_rsdt->entry[i];
map_sdt(h);
if (*((__u32 *) &h->signature[0])==*((__u32 *) &signature_map[j].signature[0])) {
/SPARTAN/trunk/arch/ia32/src/interrupt.c
36,6 → 36,7
#include <arch/asm.h>
#include <mm/tlb.h>
#include <arch.h>
#include <symtab.h>
 
/*
* Interrupt and exception dispatching.
47,6 → 48,22
void (* enable_irqs_function)(__u16 irqmask) = NULL;
void (* eoi_function)(void) = NULL;
 
#define PRINT_INFO_ERRCODE(x) { \
char *symbol = get_symtab_entry(stack[1]); \
if (!symbol) \
symbol = ""; \
printf("----------------EXCEPTION OCCURED----------------\n"); \
printf("%%eip: %X (%s)\n",x[1],symbol); \
printf("ERROR_WORD=%X\n", x[0]); \
printf("%%cs=%X,flags=%X\n", x[2], x[3]); \
printf("%%eax=%X, %%ebx=%X, %%ecx=%X, %%edx=%X\n",\
x[-2],x[-5],x[-3],x[-4]); \
printf("%%esi=%X, %%edi=%X, %%ebp=%X, %%esp=%X\n",\
x[-8],x[-9],x[-1],x); \
printf("stack: %X, %X, %X, %X\n", x[4], x[5], x[6], x[7]); \
printf(" %X, %X, %X, %X\n", x[8], x[9], x[10], x[11]); \
}
 
iroutine trap_register(__u8 n, iroutine f)
{
ASSERT(n < IVT_ITEMS);
79,17 → 96,13
 
void gp_fault(__u8 n, __native stack[])
{
printf("ERROR_WORD=%X, %%eip=%X, %%cs=%X, flags=%X\n", stack[0], stack[1], stack[2], stack[3]);
printf("%%eax=%L, %%ebx=%L, %%ecx=%L, %%edx=%L,\n%%edi=%L, %%esi=%L, %%ebp=%L, %%esp=%L\n", stack[-2], stack[-5], stack[-3], stack[-4], stack[-9], stack[-8], stack[-1], stack);
printf("stack: %X, %X, %X, %X\n", stack[4], stack[5], stack[6], stack[7]);
PRINT_INFO_ERRCODE(stack);
panic("general protection fault\n");
}
 
void ss_fault(__u8 n, __native stack[])
{
printf("ERROR_WORD=%X, %%eip=%X, %%cs=%X, flags=%X\n", stack[0], stack[1], stack[2], stack[3]);
printf("%%eax=%L, %%ebx=%L, %%ecx=%L, %%edx=%L,\n%%edi=%L, %%esi=%L, %%ebp=%L, %%esp=%L\n", stack[-2], stack[-5], stack[-3], stack[-4], stack[-9], stack[-8], stack[-1], stack);
printf("stack: %X, %X, %X, %X\n", stack[4], stack[5], stack[6], stack[7]);
PRINT_INFO_ERRCODE(stack);
panic("stack fault\n");
}
 
110,10 → 123,8
 
void page_fault(__u8 n, __native stack[])
{
PRINT_INFO_ERRCODE(stack);
printf("page fault address: %X\n", read_cr2());
printf("ERROR_WORD=%X, %%eip=%X, %%cs=%X, flags=%X\n", stack[0], stack[1], stack[2], stack[3]);
printf("%%eax=%L, %%ebx=%L, %%ecx=%L, %%edx=%L,\n%%edi=%L, %%esi=%L, %%ebp=%L, %%esp=%L\n", stack[-2], stack[-5], stack[-3], stack[-4], stack[-9], stack[-8], stack[-1], stack);
printf("stack: %X, %X, %X, %X\n", stack[4], stack[5], stack[6], stack[7]);
panic("page fault\n");
}
 
/SPARTAN/trunk/arch/ia32/_link.ld
45,6 → 45,10
LONG(unmapped_kdata_end - unmapped_kdata_start);
*(.bss); /* uninitialized static variables */
*(K_DATA_END);
 
symbol_table = .;
*(symtab.*); /* Symbol table, must be LAST symbol!*/
 
kdata_end = .;
}