mirror of
https://github.com/drasko/codezero.git
synced 2026-03-14 16:21:50 +01:00
Changes in merged posix pager mm0 initialization.
- Moved rootfs from being embedded to mm0 image to being an independent image. - MM0 boots up to start_init_process with updated boot convention.
This commit is contained in:
@@ -1,15 +1,19 @@
|
||||
/*
|
||||
* This is just to allocate some memory as a block device.
|
||||
*/
|
||||
#include <init.h>
|
||||
#include <l4/macros.h>
|
||||
#include <bootdesc.h>
|
||||
#include <memfs/memfs.h>
|
||||
|
||||
extern char _start_bdev[];
|
||||
extern char _end_bdev[];
|
||||
|
||||
__attribute__((section(".data.memfs"))) char blockdevice[MEMFS_TOTAL_SIZE];
|
||||
#include <l4lib/arch/syslib.h>
|
||||
|
||||
void *vfs_rootdev_open(void)
|
||||
{
|
||||
return (void *)_start_bdev;
|
||||
struct svc_image *rootfs_img = bootdesc_get_image_byname("rootfs");
|
||||
unsigned long rootfs_size = rootfs_img->phys_end - rootfs_img->phys_start;
|
||||
|
||||
BUG_ON(rootfs_size < MEMFS_TOTAL_SIZE);
|
||||
|
||||
/* Map filesystem blocks to virtual memory */
|
||||
return l4_map_helper((void *)rootfs_img->phys_start, __pfn(rootfs_size));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user