Changeset ab08b42 in mainline for arch/ia32/src


Ignore:
Timestamp:
2005-09-03T16:40:25Z (20 years ago)
Author:
Ondrej Palkovsky <ondrap@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
6401f79
Parents:
f6297e0
Message:

Added symbol table lookup in exceptions.
This breaks ia64 & ppc architecture compiles.

Location:
arch/ia32/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • arch/ia32/src/acpi/acpi.c

    rf6297e0 rab08b42  
    9696         */
    9797
    98         addr[0] = (__u8 *) ebda;
     98        addr[0] = (__u8 *) PA2KA(ebda);
    9999        for (i = (ebda ? 0 : 1); i < 2; i++) {
    100100                for (j = 0; j < length[i]; j += 16) {
     
    111111        printf("%L: ACPI Root System Description Pointer\n", acpi_rsdp);
    112112
    113         acpi_rsdt = (struct acpi_rsdt *) acpi_rsdp->rsdt_address;
     113        acpi_rsdt = (struct acpi_rsdt *) (__native) acpi_rsdp->rsdt_address;
    114114        if (acpi_rsdp->revision) acpi_xsdt = (struct acpi_xsdt *) ((__address) acpi_rsdp->xsdt_address);
    115115
     
    137137        for (i=0; i<cnt; i++) {
    138138                for (j=0; j<sizeof(signature_map)/sizeof(struct acpi_signature_map); j++) {
    139                         struct acpi_sdt_header *h = (struct acpi_sdt_header *) acpi_rsdt->entry[i];
     139                        struct acpi_sdt_header *h = (struct acpi_sdt_header *) (__native) acpi_rsdt->entry[i];
    140140               
    141141                        map_sdt(h);     
  • arch/ia32/src/acpi/madt.c

    rf6297e0 rab08b42  
    115115
    116116
    117         l_apic = (__u32 *) acpi_madt->l_apic_address;
     117        l_apic = (__u32 *) (__native) acpi_madt->l_apic_address;
    118118
    119119        while (h < end) {
     
    177177        if (!madt_io_apic_entry_cnt++) {
    178178                madt_io_apic_entries = ioa;
    179                 io_apic = (__u32 *) ioa->io_apic_address;
     179                io_apic = (__u32 *) (__native) ioa->io_apic_address;
    180180        }
    181181        else {
  • arch/ia32/src/interrupt.c

    rf6297e0 rab08b42  
    3737#include <mm/tlb.h>
    3838#include <arch.h>
     39#include <symtab.h>
    3940
    4041/*
     
    4748void (* enable_irqs_function)(__u16 irqmask) = NULL;
    4849void (* eoi_function)(void) = NULL;
     50
     51#define PRINT_INFO_ERRCODE(x) { \
     52        char *symbol = get_symtab_entry(stack[1]); \
     53        if (!symbol) \
     54                symbol = ""; \
     55        printf("----------------EXCEPTION OCCURED----------------\n"); \
     56        printf("%%eip: %X (%s)\n",x[1],symbol); \
     57        printf("ERROR_WORD=%X\n", x[0]); \
     58        printf("%%cs=%X,flags=%X\n", x[2], x[3]); \
     59        printf("%%eax=%X, %%ebx=%X, %%ecx=%X, %%edx=%X\n",\
     60               x[-2],x[-5],x[-3],x[-4]); \
     61        printf("%%esi=%X, %%edi=%X, %%ebp=%X, %%esp=%X\n",\
     62               x[-8],x[-9],x[-1],x); \
     63        printf("stack: %X, %X, %X, %X\n", x[4], x[5], x[6], x[7]); \
     64        printf("       %X, %X, %X, %X\n", x[8], x[9], x[10], x[11]); \
     65        }
    4966
    5067iroutine trap_register(__u8 n, iroutine f)
     
    8097void gp_fault(__u8 n, __native stack[])
    8198{
    82         printf("ERROR_WORD=%X, %%eip=%X, %%cs=%X, flags=%X\n", stack[0], stack[1], stack[2], stack[3]);
    83         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);
    84         printf("stack: %X, %X, %X, %X\n", stack[4], stack[5], stack[6], stack[7]);
     99        PRINT_INFO_ERRCODE(stack);
    85100        panic("general protection fault\n");
    86101}
     
    88103void ss_fault(__u8 n, __native stack[])
    89104{
    90         printf("ERROR_WORD=%X, %%eip=%X, %%cs=%X, flags=%X\n", stack[0], stack[1], stack[2], stack[3]);
    91         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);
    92         printf("stack: %X, %X, %X, %X\n", stack[4], stack[5], stack[6], stack[7]);
     105        PRINT_INFO_ERRCODE(stack);
    93106        panic("stack fault\n");
    94107}
     
    111124void page_fault(__u8 n, __native stack[])
    112125{
     126        PRINT_INFO_ERRCODE(stack);
    113127        printf("page fault address: %X\n", read_cr2());
    114         printf("ERROR_WORD=%X, %%eip=%X, %%cs=%X, flags=%X\n", stack[0], stack[1], stack[2], stack[3]);
    115         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);
    116         printf("stack: %X, %X, %X, %X\n", stack[4], stack[5], stack[6], stack[7]);
    117128        panic("page fault\n");
    118129}
  • arch/ia32/src/smp/apic.c

    rf6297e0 rab08b42  
    112112}
    113113
    114 void apic_spurious(__u8 n, __u32 stack[])
     114void apic_spurious(__u8 n, __native stack[])
    115115{
    116116        printf("cpu%d: APIC spurious interrupt\n", CPU->id);
     
    320320}
    321321
    322 void l_apic_timer_interrupt(__u8 n, __u32 stack[])
     322void l_apic_timer_interrupt(__u8 n, __native stack[])
    323323{
    324324        l_apic_eoi();
Note: See TracChangeset for help on using the changeset viewer.