Subversion Repositories HelenOS-historic

Compare Revisions

Ignore whitespace Rev 1429 → Rev 1430

/uspace/trunk/fb/fb.c
28,29 → 28,21
*/
 
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <ddi.h>
#include <task.h>
#include <stdlib.h>
#include <ddi.h>
#include <sysinfo.h>
#include <align.h>
#include <as.h>
#include <ipc/fb.h>
 
 
#include <ipc/ipc.h>
#include <ipc/ns.h>
#include <ipc/services.h>
#include <unistd.h>
#include <stdlib.h>
#include <ipc/ns.h>
 
#include <kernel/errno.h>
#include <async.h>
 
 
#include "font-8x16.h"
#include <string.h>
 
#include "helenos.xbm"
#include "fb.h"
 
69,7 → 61,6
#define H_NO_VFBS 3
#define V_NO_VFBS 3
 
 
static void fb_putchar(int item,char ch);
int create_window(int item,unsigned int x, unsigned int y,unsigned int x_size, unsigned int y_size,
unsigned int BGCOLOR,unsigned int FGCOLOR,unsigned int LOGOCOLOR);
76,11 → 67,8
void fb_init(int item,__address addr, unsigned int x, unsigned int y, unsigned int bpp, unsigned int scan,
unsigned int BGCOLOR,unsigned int FGCOLOR,unsigned int LOGOCOLOR);
 
 
unsigned int mod_col(unsigned int col,int mod);
 
 
 
static int init_fb(void)
{
__address fb_ph_addr;
101,11 → 89,10
fb_scanline=sysinfo_value("fb.scanline");
 
fb_addr=ALIGN_UP(((__address)set_maxheapsize(USER_ADDRESS_SPACE_SIZE_ARCH>>1)),PAGE_SIZE);
 
 
map_physmem(task_get_id(),(void *)((__address)fb_ph_addr),(void *)fb_addr,
(fb_scanline*fb_height+PAGE_SIZE-1)>>PAGE_WIDTH,1);
(fb_scanline*fb_height+PAGE_SIZE-1)>>PAGE_WIDTH,
AS_AREA_READ | AS_AREA_WRITE | AS_AREA_CACHEABLE);
fb_init(0,fb_addr, fb_width, fb_height, fb_bpp, fb_scanline,
MAIN_BGCOLOR,MAIN_FGCOLOR,MAIN_LOGOCOLOR);
/uspace/trunk/libc/include/ddi.h
31,7 → 31,7
 
#include <task.h>
 
extern int map_physmem(task_id_t id, void *pf, void *vp, unsigned long pages, int writable);
extern int map_physmem(task_id_t id, void *pf, void *vp, unsigned long pages, int flags);
extern int iospace_enable(task_id_t id, void *ioaddr, unsigned long size);
extern int preemption_control(int enable);
 
/uspace/trunk/libc/generic/ddi.c
39,13 → 39,13
* @param pf Physical address of the starting frame.
* @param vp Virtual address of the sterting page.
* @param pages Number of pages to map.
* @param writable If true, the mapping will be created writable.
* @param flags Flags for the new address space area.
*
* @return 0 on success, EPERM if the caller lacks the CAP_MEM_MANAGER capability,
* ENOENT if there is no task with specified ID and ENOMEM if there
* was some problem in creating address space area.
*/
int map_physmem(task_id_t id, void *pf, void *vp, unsigned long pages, int writable)
int map_physmem(task_id_t id, void *pf, void *vp, unsigned long pages, int flags)
{
task_id_t task_id;
ddi_memarg_t arg;
54,7 → 54,7
arg.phys_base = pf;
arg.virt_base = vp;
arg.pages = pages;
arg.writable = writable;
arg.flags = flags;
 
return __SYSCALL1(SYS_MAP_PHYSMEM, (sysarg_t) &arg);
}