Changeset 771cd22 in mainline for boot/genarch/ofw.c
- Timestamp:
- 2006-12-16T19:07:02Z (18 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 7e7c8747
- Parents:
- 1ecdbb0
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
boot/genarch/ofw.c
r1ecdbb0 r771cd22 234 234 } 235 235 236 236 /** Save OpenFirmware physical memory map. 237 * 238 * @param map Memory map structure where the map will be saved. 239 * 240 * @return Zero on failure, non-zero on success. 241 */ 237 242 int ofw_memmap(memmap_t *map) 238 243 { … … 240 245 unsigned int sc = ofw_get_size_cells(ofw_memory); 241 246 242 uint32_t buf[((ac +sc)*MEMMAP_MAX_RECORDS)];247 uint32_t buf[((ac + sc) * MEMMAP_MAX_RECORDS)]; 243 248 int ret = ofw_get_property(ofw_memory, "reg", buf, sizeof(buf)); 244 249 if (ret <= 0) /* ret is the number of written bytes */ … … 248 253 map->total = 0; 249 254 map->count = 0; 250 for (pos = 0; (pos < ret / sizeof(uint32_t)) && (map->count < MEMMAP_MAX_RECORDS); pos += ac + sc) { 255 for (pos = 0; (pos < ret / sizeof(uint32_t)) && (map->count < 256 MEMMAP_MAX_RECORDS); pos += ac + sc) { 251 257 void * start = (void *) ((uintptr_t) buf[pos + ac - 1]); 252 258 unsigned int size = buf[pos + ac + sc - 1];
Note:
See TracChangeset
for help on using the changeset viewer.