Ignore:
Timestamp:
2006-08-30T15:50:29Z (18 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
beb3926a
Parents:
e11ae91
Message:

sparc64 work.
More bits needed to reach the userspace milestone were added.
The preemptible_handler(), still a prototype, now contains all functionality it needs.
Some sanitation was added to functions expecting page-aligned pointers to
userspace window buffer.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/sparc64/src/proc/scheduler.c

    re11ae91 ree454eb  
    7979                 */
    8080                ASSERT(THREAD->arch.uspace_window_buffer);
    81                 uintptr_t uw_buf = (uintptr_t) THREAD->arch.uspace_window_buffer;
     81                uintptr_t uw_buf = ALIGN_DOWN((uintptr_t) THREAD->arch.uspace_window_buffer, PAGE_SIZE);
    8282                if (!overlaps(uw_buf, PAGE_SIZE, base, 1<<KERNEL_PAGE_WIDTH)) {
    8383                        /*
    8484                         * The buffer is not covered by the 4M locked kernel DTLB entry.
    8585                         */
    86                         dtlb_demap(TLB_DEMAP_PAGE, TLB_DEMAP_NUCLEUS, (uintptr_t) uw_buf);
     86                        dtlb_demap(TLB_DEMAP_PAGE, TLB_DEMAP_NUCLEUS, uw_buf);
    8787                        dtlb_insert_mapping(uw_buf, KA2PA(uw_buf), PAGESIZE_8K, true, true);
    8888                }
     
    127127                flushw();       /* force all userspace windows into memory */
    128128               
    129                 uintptr_t uw_buf = (uintptr_t) THREAD->arch.uspace_window_buffer;
     129                uintptr_t uw_buf = ALIGN_DOWN((uintptr_t) THREAD->arch.uspace_window_buffer, PAGE_SIZE);
    130130                if (!overlaps(uw_buf, PAGE_SIZE, base, 1<<KERNEL_PAGE_WIDTH)) {
    131131                        /*
     
    134134                         * Demap it.
    135135                         */
    136                         dtlb_demap(TLB_DEMAP_PAGE, TLB_DEMAP_NUCLEUS, (uintptr_t) uw_buf);
     136                        dtlb_demap(TLB_DEMAP_PAGE, TLB_DEMAP_NUCLEUS, uw_buf);
    137137                }
    138138       
Note: See TracChangeset for help on using the changeset viewer.