^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) // SPDX-License-Identifier: GPL-2.0-only
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) * Compatibility for old (not device tree aware) U-Boot versions
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) * Author: Scott Wood <scottwood@freescale.com>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) * Consolidated using macros by David Gibson <david@gibson.dropbear.id.au>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8) * Copyright 2007 David Gibson, IBM Corporation.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) * Copyright (c) 2007 Freescale Semiconductor, Inc.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) #include "ops.h"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) #include "stdio.h"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) #include "ppcboot.h"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) void cuboot_init(unsigned long r4, unsigned long r5,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) unsigned long r6, unsigned long r7,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) unsigned long end_of_ram)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) unsigned long avail_ram = end_of_ram - (unsigned long)_end;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) loader_info.initrd_addr = r4;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) loader_info.initrd_size = r4 ? r5 - r4 : 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) loader_info.cmdline = (char *)r6;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) loader_info.cmdline_len = r7 - r6;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) simple_alloc_init(_end, avail_ram - 1024*1024, 32, 64);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) }