/****************************************************************************** * Copyright (c) 2004, 2008 IBM Corporation * All rights reserved. * This program and the accompanying materials * are made available under the terms of the BSD License * which accompanies this distribution, and is available at * http://www.opensource.org/licenses/bsd-license.php * * Contributors: * IBM Corporation - initial implementation *****************************************************************************/ #include #include #include /* malloc */ #include #include #include #include #include /* Application entry point .*/ extern int _start(unsigned char *arg_string, long len); extern int main(int, char**); int _start_kernel(unsigned long p0, unsigned long p1); void * malloc_aligned(size_t size, int align); unsigned long exception_stack_frame; snk_fileio_t fd_array[FILEIO_MAX]; extern uint64_t tb_freq; extern char __client_start; extern char __client_end; void * malloc_aligned(size_t size, int align) { unsigned long p = (unsigned long) malloc(size + align - 1); p = p + align - 1; p = p & ~(align - 1); return (void *) p; } int _start_kernel(unsigned long p0, unsigned long p1) { int rc; unsigned int timebase; /* initialize all file descriptor by marking them as empty */ for(rc=0; rc