Changeset ff3a34b in mainline for kernel/generic/src/lib/rd.c
- Timestamp:
- 2007-06-01T14:15:42Z (18 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- ea7890e7
- Parents:
- 60133d0
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/lib/rd.c
r60133d0 rff3a34b 43 43 #include <sysinfo/sysinfo.h> 44 44 #include <ddi/ddi.h> 45 #include <print.h> 46 #include <align.h> 45 47 46 48 static parea_t rd_parea; /**< Physical memory area for rd. */ 47 49 50 /** 51 * RAM disk initialization routine. At this point, the RAM disk memory is shared 52 * and information about the share is provided as sysinfo values to the userspace 53 * tasks. 54 */ 48 55 int init_rd(rd_header * header, size_t size) 49 56 { … … 75 82 return RE_UNSUPPORTED; 76 83 84 if (dsize % FRAME_SIZE) 85 return RE_UNSUPPORTED; 86 77 87 if (hsize > size) 78 88 return RE_INVALID; … … 81 91 dsize = size - hsize; 82 92 83 rd_parea.pbase = KA2PA((void *) header + hsize);93 rd_parea.pbase = ALIGN_DOWN((uintptr_t) KA2PA((void *) header + hsize), FRAME_SIZE); 84 94 rd_parea.vbase = (uintptr_t) ((void *) header + hsize); 85 95 rd_parea.frames = SIZE2FRAMES(dsize); … … 88 98 89 99 sysinfo_set_item_val("rd", NULL, true); 100 sysinfo_set_item_val("rd.header_size", NULL, hsize); 90 101 sysinfo_set_item_val("rd.size", NULL, dsize); 91 102 sysinfo_set_item_val("rd.address.physical", NULL, (unative_t)
Note:
See TracChangeset
for help on using the changeset viewer.