Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: GPL-2.0-or-later
0002 
0003 #include <stddef.h>
0004 #include "stdio.h"
0005 #include "types.h"
0006 #include "io.h"
0007 #include "ops.h"
0008 
0009 BSS_STACK(8192);
0010 
0011 void platform_init(unsigned long r3, unsigned long r4, unsigned long r5)
0012 {
0013     unsigned long heapsize = 16*1024*1024 - (unsigned long)_end;
0014 
0015     /*
0016      * Disable interrupts and turn off MSR_RI, since we'll
0017      * shortly be overwriting the interrupt vectors.
0018      */
0019     __asm__ volatile("mtmsrd %0,1" : : "r" (0));
0020 
0021     simple_alloc_init(_end, heapsize, 32, 64);
0022     fdt_init(_dtb_start);
0023     serial_console_init();
0024 }