revert between 56095 -> 55830 in arch
[AROS.git] / arch / ppc-chrp / pegasos / kernel / kernel_bootmem.c
bloba0dbb6d396a8aae74a1e3d6bc82d5db1bbfb7623
1 /*
2 Copyright © 1995-2014, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 /*
7 * Boot-time memory management functions.
8 * In fact this is just a placeholder. All this can be seriously improved.
9 */
11 #include <string.h>
13 #include "kernel_bootmem.h"
14 #include "kernel_intern.h"
16 void *krnAllocBootMem(unsigned int size)
18 return krnAllocBootMemAligned(size, sizeof(void *));
21 void *krnAllocBootMemAligned(unsigned int size, unsigned int align)
23 void *addr = (void *)AROS_ROUNDUP2(__BootData->bd_BootMem, align);
25 __BootData->bd_BootMem = addr + size;
26 /* Clear the allocated memory. In many places we expect it. */
27 memset(addr, 0, size);
29 return addr;