holly.c 888 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. /*
  2. * Copyright 2007 IBM Corporation
  3. *
  4. * Stephen Winiecki <stevewin@us.ibm.com>
  5. * Josh Boyer <jwboyer@linux.vnet.ibm.com>
  6. *
  7. * Based on earlier code:
  8. * Copyright (C) Paul Mackerras 1997.
  9. *
  10. * This program is free software; you can redistribute it and/or
  11. * modify it under the terms of the GNU General Public License
  12. * version 2 as published by the Free Software Foundation.
  13. */
  14. #include <stdarg.h>
  15. #include <stddef.h>
  16. #include "types.h"
  17. #include "elf.h"
  18. #include "string.h"
  19. #include "stdio.h"
  20. #include "page.h"
  21. #include "ops.h"
  22. #include "io.h"
  23. extern char _start[];
  24. extern char _end[];
  25. extern char _dtb_start[];
  26. extern char _dtb_end[];
  27. BSS_STACK(4096);
  28. void platform_init(unsigned long r3, unsigned long r4, unsigned long r5)
  29. {
  30. u32 heapsize = 0x8000000 - (u32)_end; /* 128M */
  31. simple_alloc_init(_end, heapsize, 32, 64);
  32. ft_init(_dtb_start, 0, 4);
  33. serial_console_init();
  34. }