Changeset 48c1ef9 in mainline for arch/ppc64/src/mm/tlb.c


Ignore:
Timestamp:
2006-05-21T20:38:18Z (19 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
040542aa
Parents:
bd55bbb
Message:

port ppc32 changes to ppc64 (raw)

File:
1 moved

Legend:

Unmodified
Added
Removed
  • arch/ppc64/src/mm/tlb.c

    rbd55bbb r48c1ef9  
    11/*
    2  * Copyright (C) 2005 Jakub Jermar
     2 * Copyright (C) 2006 Martin Decky
    33 * All rights reserved.
    44 *
     
    2727 */
    2828
    29 #include <arch/boot/boot.h>
    30 #include <arch/console.h>
    31 #include <console/chardev.h>
    32 #include <console/console.h>
    33 #include <genarch/fb/fb.h>
     29#include <mm/tlb.h>
    3430
    3531
    36 /** Initialize console to use frame buffer. */
    37 void ppc64_console_init(void)
     32/** Initialize Page Hash Table.
     33 *
     34 * Setup the Page Hash Table with no entries.
     35 *
     36 */
     37void tlb_arch_init(void)
    3838{
    39         /* TODO: Framebuffer mapping */
    40         fb_init(0xf0000000 + (bootinfo.screen.addr & ((__address) ~0 >> 15)), bootinfo.screen.width, bootinfo.screen.height, bootinfo.screen.bpp, bootinfo.screen.scanline);
     39        tlb_invalidate_all();
    4140}
     41
     42
     43void tlb_invalidate_all(void)
     44{
     45        asm volatile (
     46                "tlbia\n"
     47                "tlbsync\n"
     48        );
     49}
     50
     51
     52/** Invalidate all entries in TLB that belong to specified address space.
     53 *
     54 * @param asid This parameter is ignored as the architecture doesn't support it.
     55 */
     56void tlb_invalidate_asid(asid_t asid)
     57{
     58        tlb_invalidate_all();
     59}
     60
     61/** Invalidate TLB entries for specified page range belonging to specified address space.
     62 *
     63 * @param asid This parameter is ignored as the architecture doesn't support it.
     64 * @param page Address of the first page whose entry is to be invalidated.
     65 * @param cnt Number of entries to invalidate.
     66 */
     67void tlb_invalidate_pages(asid_t asid, __address page, count_t cnt)
     68{
     69        tlb_invalidate_all();
     70}
     71
     72
     73
     74/** Print contents of Page Hash Table. */
     75void tlb_print(void)
     76{
     77}
Note: See TracChangeset for help on using the changeset viewer.