Changeset 7f5b37a in mainline


Ignore:
Timestamp:
2006-05-28T10:05:03Z (19 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
0b99e40
Parents:
01ff41c
Message:

Sync with kernel.
Make map_physmem() pass address space area flags instead of boolean switch.

Try to map fb memory with caching enabled.

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • fb/fb.c

    r01ff41c r7f5b37a  
    2929
    3030#include <stdio.h>
     31#include <stdlib.h>
     32#include <unistd.h>
     33#include <string.h>
    3134#include <ddi.h>
    3235#include <task.h>
    33 #include <stdlib.h>
    34 #include <ddi.h>
    3536#include <sysinfo.h>
    3637#include <align.h>
    3738#include <as.h>
    3839#include <ipc/fb.h>
    39 
    40 
    4140#include <ipc/ipc.h>
     41#include <ipc/ns.h>
    4242#include <ipc/services.h>
    43 #include <unistd.h>
    44 #include <stdlib.h>
    45 #include <ipc/ns.h>
    46 
    4743#include <kernel/errno.h>
    4844#include <async.h>
    49 
    50 
    5145#include "font-8x16.h"
    52 #include <string.h>
    53 
    5446#include "helenos.xbm"
    5547#include "fb.h"
     
    6961#define H_NO_VFBS 3
    7062#define V_NO_VFBS 3
    71 
    7263
    7364static void fb_putchar(int item,char ch);
     
    7768        unsigned int BGCOLOR,unsigned int FGCOLOR,unsigned int LOGOCOLOR);
    7869
    79 
    8070unsigned int mod_col(unsigned int col,int mod);
    81 
    82 
    8371
    8472static int init_fb(void)
     
    10290
    10391        fb_addr=ALIGN_UP(((__address)set_maxheapsize(USER_ADDRESS_SPACE_SIZE_ARCH>>1)),PAGE_SIZE);
    104 
    105 
    10692       
    10793        map_physmem(task_get_id(),(void *)((__address)fb_ph_addr),(void *)fb_addr,
    108                     (fb_scanline*fb_height+PAGE_SIZE-1)>>PAGE_WIDTH,1);
     94                    (fb_scanline*fb_height+PAGE_SIZE-1)>>PAGE_WIDTH,
     95                    AS_AREA_READ | AS_AREA_WRITE | AS_AREA_CACHEABLE);
    10996       
    11097        fb_init(0,fb_addr, fb_width, fb_height, fb_bpp, fb_scanline,
  • libc/generic/ddi.c

    r01ff41c r7f5b37a  
    4040 * @param vp Virtual address of the sterting page.
    4141 * @param pages Number of pages to map.
    42  * @param writable If true, the mapping will be created writable.
     42 * @param flags Flags for the new address space area.
    4343 *
    4444 * @return 0 on success, EPERM if the caller lacks the CAP_MEM_MANAGER capability,
     
    4646 *         was some problem in creating address space area.
    4747 */
    48 int map_physmem(task_id_t id, void *pf, void *vp, unsigned long pages, int writable)
     48int map_physmem(task_id_t id, void *pf, void *vp, unsigned long pages, int flags)
    4949{
    5050        task_id_t task_id;
     
    5555        arg.virt_base = vp;
    5656        arg.pages = pages;
    57         arg.writable = writable;
     57        arg.flags = flags;
    5858
    5959        return __SYSCALL1(SYS_MAP_PHYSMEM, (sysarg_t) &arg);
  • libc/include/ddi.h

    r01ff41c r7f5b37a  
    3232#include <task.h>
    3333
    34 extern int map_physmem(task_id_t id, void *pf, void *vp, unsigned long pages, int writable);
     34extern int map_physmem(task_id_t id, void *pf, void *vp, unsigned long pages, int flags);
    3535extern int iospace_enable(task_id_t id, void *ioaddr, unsigned long size);
    3636extern int preemption_control(int enable);
Note: See TracChangeset for help on using the changeset viewer.