Changeset 2382d09 in mainline for arch/ia32/src/interrupt.c


Ignore:
Timestamp:
2006-04-29T15:01:41Z (19 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
407862e
Parents:
69a5600
Message:

Improve SYS_IOSPACE_ENABLE support.
The general protection fault handler now contains
code to service early I/O Permission bitmap faults.

File:
1 edited

Legend:

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

    r69a5600 r2382d09  
    4141#include <symtab.h>
    4242#include <proc/thread.h>
     43#include <proc/task.h>
     44#include <synch/spinlock.h>
     45#include <arch/ddi/ddi.h>
    4346
    4447/*
     
    7982}
    8083
     84/** General Protection Fault. */
    8185void gp_fault(int n, istate_t *istate)
    8286{
     87        if (TASK) {
     88                count_t ver;
     89               
     90                spinlock_lock(&TASK->lock);
     91                ver = TASK->arch.iomapver;
     92                spinlock_unlock(&TASK->lock);
     93       
     94                if (CPU->arch.iomapver_copy != ver) {
     95                        /*
     96                         * This fault can be caused by an early access
     97                         * to I/O port because of an out-dated
     98                         * I/O Permission bitmap installed on CPU.
     99                         * Install the fresh copy and restart
     100                         * the instruction.
     101                         */
     102                        io_perm_bitmap_install();
     103                        return;
     104                }
     105        }
     106
    83107        PRINT_INFO_ERRCODE(istate);
    84108        panic("general protection fault\n");
Note: See TracChangeset for help on using the changeset viewer.