blob: 557c7a0ece08df9f4c402b088242288db41c27ef [file] [log] [blame]
Thomas Gleixnerd2912cb2019-06-04 10:11:33 +02001// SPDX-License-Identifier: GPL-2.0-only
Josh Boyer7487a222007-05-08 07:32:10 +10002/*
3 * Copyright 2007 IBM Corporation
4 *
5 * Stephen Winiecki <stevewin@us.ibm.com>
6 * Josh Boyer <jwboyer@linux.vnet.ibm.com>
7 *
8 * Based on earlier code:
9 * Copyright (C) Paul Mackerras 1997.
Josh Boyer7487a222007-05-08 07:32:10 +100010 */
11#include <stdarg.h>
12#include <stddef.h>
13#include "types.h"
14#include "elf.h"
15#include "string.h"
16#include "stdio.h"
17#include "page.h"
18#include "ops.h"
19#include "io.h"
20
Josh Boyer7487a222007-05-08 07:32:10 +100021BSS_STACK(4096);
22
23void platform_init(unsigned long r3, unsigned long r4, unsigned long r5)
24{
25 u32 heapsize = 0x8000000 - (u32)_end; /* 128M */
26
27 simple_alloc_init(_end, heapsize, 32, 64);
David Gibson2f0dfea2007-12-10 14:28:39 +110028 fdt_init(_dtb_start);
Josh Boyer7487a222007-05-08 07:32:10 +100029 serial_console_init();
30}