Pager works until end of init_physmem_secondary

This commit is contained in:
Bahadir Balban
2009-08-09 17:22:13 +03:00
parent a45b5676ab
commit 02a3f1ac91
33 changed files with 607 additions and 556 deletions

View File

@@ -6,4 +6,8 @@
#ifndef __API_CAPABILITY_H__
#define __API_CAPABILITY_H__
/* Capability syscall request types */
#define CAP_CONTROL_NCAPS 0
#define CAP_CONTROL_READ_CAPS 1
#endif /* __API_CAPABILITY_H__ */

View File

@@ -1,25 +0,0 @@
#ifndef __BOOTDESC_H__
#define __BOOTDESC_H__
/* Supervisor task at load time. */
struct svc_image {
char name[16];
unsigned int phys_start;
unsigned int phys_end;
} __attribute__((__packed__));
/* Supervisor task descriptor at load time */
struct bootdesc {
int desc_size;
int total_images;
struct svc_image images[];
} __attribute__((__packed__));
#if defined (__KERNEL__)
extern struct bootdesc *bootdesc;
void read_bootdesc(void);
void copy_bootdesc(void);
#endif
#endif /* __BOOTDESC_H__ */

View File

@@ -1,45 +0,0 @@
/*
* Boot time memory initialisation and memory allocator interface.
*
* Copyright (C) 2007 Bahadir Balban
*
*/
#ifndef __GENERIC_PHYSMEM_H__
#define __GENERIC_PHYSMEM_H__
#include <l4/lib/list.h>
#include INC_PLAT(offsets.h)
#include INC_GLUE(memory.h)
#define PHYSMEM_TOTAL_PAGES ((PHYS_MEM_END - PHYS_MEM_START) >> PAGE_BITS)
/* A compact memory descriptor to determine used/unused pages in the system */
struct page_bitmap {
unsigned long pfn_start;
unsigned long pfn_end;
unsigned int map[PHYSMEM_TOTAL_PAGES >> 5];
};
/* Describes a portion of physical memory. */
struct memdesc {
unsigned int start;
unsigned int end;
unsigned int free_cur;
unsigned int free_end;
unsigned int numpages;
};
#if defined(__KERNEL__)
/* Describes bitmap of used/unused state for all physical pages */
extern struct page_bitmap page_map;
extern struct memdesc physmem;
#endif
/* Sets the global page map as used/unused. Aligns input when needed. */
int set_page_map(unsigned long start, int numpages, int val);
/* Memory allocator interface */
void physmem_init(void);
void memory_init(void);
#endif /* __GENERIC_PHYSMEM_H__ */

View File

@@ -11,6 +11,7 @@
#include <l4/lib/spinlock.h>
#include <l4/generic/scheduler.h>
#include <l4/generic/resource.h>
#include <l4/generic/capability.h>
#include <l4/generic/space.h>
#include INC_GLUE(memory.h)
#include INC_GLUE(syscall.h)
@@ -98,6 +99,11 @@ struct ktcb {
/* Container */
struct container *container;
struct pager *pager;
/* Capability list */
struct cap_list *cap_list_ptr;
struct cap_list cap_list;
/* Fields for ipc rendezvous */
struct waitqueue_head wqh_recv;

View File

@@ -7,7 +7,6 @@
#ifndef __GLUE_ARM_MEMORY_H__
#define __GLUE_ARM_MEMORY_H__
#include INC_ARCH(bootdesc.h) /* Definition of last loaded svc image address */
#include INC_GLUE(memlayout.h) /* Important generic definitions */
#include INC_SUBARCH(mm.h)