Changeset 454f1da in mainline for kernel/arch/sparc64/include/cpu.h


Ignore:
Timestamp:
2007-03-26T19:35:28Z (17 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
5d7daff
Parents:
4638401
Message:

Reworked handling of illegal virtual aliases caused by frame reuse.
We moved the incomplete handling from backend's frame method to
backend's page_fault method. The page_fault method is the one that
can create an illegal alias if it writes the userspace frame using
kernel address with a different page color than the page to which is
this frame mapped in userspace. When we detect this, we do D-cache
shootdown on all processors (!!!).

If we add code that accesses userspace memory from kernel address
space, we will have to check for illegal virtual aliases at all such
places.

I tested this on a 4-way simulated E6500 and a real-world Ultra 5,
which has unfortunatelly only one processor.

This solves ticket #26.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/sparc64/include/cpu.h

    r4638401 r454f1da  
    4040#include <arch/asm.h>
    4141
     42#ifdef CONFIG_SMP
     43#include <arch/mm/cache.h>
     44#endif
     45
    4246#define MANUF_FUJITSU           0x04
    4347#define MANUF_ULTRASPARC        0x17    /**< UltraSPARC I, UltraSPARC II */
     
    5458
    5559typedef struct {
    56         uint32_t mid;                   /**< Processor ID as read from UPA_CONFIG. */
     60        uint32_t mid;                   /**< Processor ID as read from
     61                                             UPA_CONFIG. */
    5762        ver_reg_t ver;
    5863        uint32_t clock_frequency;       /**< Processor frequency in Hz. */
    5964        uint64_t next_tick_cmpr;        /**< Next clock interrupt should be
    60                                                                          generated when the TICK register
    61                                                                          matches this value. */
     65                                             generated when the TICK register
     66                                             matches this value. */
     67#ifdef CONFIG_SMP
     68        int dcache_active;
     69        dcache_shootdown_msg_t dcache_messages[DCACHE_MSG_QUEUE_LEN];
     70        count_t dcache_message_count;
     71#endif
    6272} cpu_arch_t;
    6373       
Note: See TracChangeset for help on using the changeset viewer.