1
0

mm.c/h -> frames.c/h: Naming indicating dealing with physical not virtual memory

This commit is contained in:
2013-01-01 23:42:45 -05:00
parent e279d83d7d
commit 806d00f471
9 changed files with 79 additions and 66 deletions

View File

@ -20,7 +20,7 @@
#include <types.h>
#include <framebuffer.h>
#include <mm.h>
#include <frames.h>
#include <math.h>
#define PL110_CR_EN 0x001
@ -45,7 +45,7 @@ int pl110_init(struct fb *f, unsigned int color_depth) {
unsigned int width, height;
unsigned int fb_size, power;
struct pl110_control *plio = (struct pl110_control*)PL110_IOBASE;
struct page *p;
struct frame *fr;
/* 640x480 pixels */
width = 640;
@ -58,11 +58,11 @@ int pl110_init(struct fb *f, unsigned int color_depth) {
power = log(fb_size) - log(MM_PAGE_SIZE);
if ((unsigned int)1<<power < fb_size)
power++;
p = mm_get_free_pages(power);
if (!p)
fr = get_free_frames(power);
if (!fr)
return -1;
plio->upbase = (uint32)p->address;
plio->upbase = (uint32)fr->address;
if (color_depth == FB_COLOR_DEPTH_8) {
plio->control = 0x1827;

View File

@ -21,7 +21,7 @@
#include <framebuffer.h>
#include <init.h>
#include <math.h>
#include <mm.h>
#include <frames.h>
#include <types.h>
#include <drivers/fb.h>
@ -47,7 +47,7 @@ int pl111_init_dev(struct fb *f, unsigned int color_depth) {
unsigned int width, height;
unsigned int fb_size, power;
struct pl111_control *plio = (struct pl111_control*)PL111_IOBASE;
struct page *p;
struct frame *fr;
/* 640x480 pixels */
width = 640;
@ -60,11 +60,11 @@ int pl111_init_dev(struct fb *f, unsigned int color_depth) {
power = log(fb_size) - log(MM_PAGE_SIZE);
if ((unsigned int)1<<power < fb_size)
power++;
p = mm_get_free_pages(power);
if (!p)
fr = get_free_frames(power);
if (!fr)
return -1;
plio->upbase = (uint32)p->address;
plio->upbase = (uint32)fr->address;
if (color_depth == FB_COLOR_DEPTH_8) {
plio->control = 0x1827;