Changeset 57b4f46 in mainline for kernel/generic/src/lib/rd.c
- Timestamp:
- 2008-08-06T18:09:09Z (17 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- ade06b4
- Parents:
- 30b3ddb
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/lib/rd.c
r30b3ddb r57b4f46 49 49 /** 50 50 * RAM disk initialization routine. At this point, the RAM disk memory is shared 51 * and information about the share is provided as sysinfo values to the userspace52 * tasks.51 * and information about the share is provided as sysinfo values to the 52 * userspace tasks. 53 53 */ 54 54 int init_rd(rd_header_t *header, size_t size) … … 56 56 /* Identify RAM disk */ 57 57 if ((header->magic[0] != RD_MAG0) || (header->magic[1] != RD_MAG1) || 58 58 (header->magic[2] != RD_MAG2) || (header->magic[3] != RD_MAG3)) 59 59 return RE_INVALID; 60 60 … … 87 87 dsize = size - hsize; 88 88 89 rd_parea.pbase = ALIGN_DOWN((uintptr_t) KA2PA((void *) header + hsize), FRAME_SIZE); 89 rd_parea.pbase = ALIGN_DOWN((uintptr_t) KA2PA((void *) header + hsize), 90 FRAME_SIZE); 90 91 rd_parea.vbase = (uintptr_t) ((void *) header + hsize); 91 92 rd_parea.frames = SIZE2FRAMES(dsize); … … 96 97 sysinfo_set_item_val("rd.header_size", NULL, hsize); 97 98 sysinfo_set_item_val("rd.size", NULL, dsize); 98 sysinfo_set_item_val("rd.address.physical", NULL, (unative_t)99 KA2PA((void *) header + hsize));99 sysinfo_set_item_val("rd.address.physical", NULL, 100 (unative_t) KA2PA((void *) header + hsize)); 100 101 101 102 return RE_OK;
Note:
See TracChangeset
for help on using the changeset viewer.