dc9f5cd546
Instead of reaching into src/include and re-writing code allow for cleaner code sharing within coreboot and its utilities. The additional thing needed at this point is for the utilities to provide a printk() declaration within a <console/console.h> file. That way code which uses printk() can than be mapped properly to verbosity of utility parameters. Change-Id: I9e46a279569733336bc0a018aed96bc924c07cdd Signed-off-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: http://review.coreboot.org/11592 Tested-by: build bot (Jenkins) Reviewed-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
22 lines
407 B
C
22 lines
407 B
C
#ifndef STDLIB_H
|
|
#define STDLIB_H
|
|
|
|
#include <stddef.h>
|
|
|
|
#define min(a,b) MIN((a),(b))
|
|
#define max(a,b) MAX((a),(b))
|
|
|
|
void *memalign(size_t boundary, size_t size);
|
|
void *malloc(size_t size);
|
|
/* We never free memory */
|
|
static inline void free(void *ptr) {}
|
|
|
|
#ifndef __ROMCC__
|
|
static inline unsigned long div_round_up(unsigned int n, unsigned int d)
|
|
{
|
|
return (n + d - 1) / d;
|
|
}
|
|
#endif
|
|
|
|
|
|
#endif /* STDLIB_H */
|