cregit-Linux how code gets into the kernel

Release 4.14 arch/powerpc/boot/treeboot-iss4xx.c

/*
 * Copyright 2010 Ben. Herrenschmidt, IBM Corporation.
 *
 * Based on earlier code:
 *   Copyright (C) Paul Mackerras 1997.
 *
 *   Matt Porter <mporter@kernel.crashing.org>
 *   Copyright 2002-2005 MontaVista Software Inc.
 *
 *   Eugene Surovegin <eugene.surovegin@zultys.com> or <ebs@ebshome.net>
 *   Copyright (c) 2003, 2004 Zultys Technologies
 *
 *    Copyright 2007 David Gibson, IBM Corporation.
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version
 * 2 of the License, or (at your option) any later version.
 */
#include <stdarg.h>
#include <stddef.h>
#include "types.h"
#include "elf.h"
#include "string.h"
#include "stdio.h"
#include "page.h"
#include "ops.h"
#include "reg.h"
#include "io.h"
#include "dcr.h"
#include "4xx.h"
#include "44x.h"
#include "libfdt.h"

BSS_STACK(4096);


static u32 ibm4xx_memstart;


static void iss_4xx_fixups(void) { void *memory; u32 reg[3]; memory = finddevice("/memory"); if (!memory) fatal("Can't find memory node\n"); /* This assumes #address-cells = 2, #size-cells =1 and that */ getprop(memory, "reg", reg, sizeof(reg)); if (reg[2]) /* If the device tree specifies the memory range, use it */ ibm4xx_memstart = reg[1]; else /* othersize, read it from the SDRAM controller */ ibm4xx_sdram_fixup_memsize(); }

Contributors

PersonTokensPropCommitsCommitProp
Dave Kleikamp5984.29%150.00%
Torez Smith1115.71%150.00%
Total70100.00%2100.00%


static void *iss_4xx_vmlinux_alloc(unsigned long size) { return (void *)ibm4xx_memstart; }

Contributors

PersonTokensPropCommitsCommitProp
Dave Kleikamp18100.00%1100.00%
Total18100.00%1100.00%

#define SPRN_PIR 0x11E /* Processor Identification Register */
void platform_init(void) { unsigned long end_of_ram = 0x08000000; unsigned long avail_ram = end_of_ram - (unsigned long)_end; u32 pir_reg; simple_alloc_init(_end, avail_ram, 128, 64); platform_ops.fixups = iss_4xx_fixups; platform_ops.vmlinux_alloc = iss_4xx_vmlinux_alloc; platform_ops.exit = ibm44x_dbcr_reset; pir_reg = mfspr(SPRN_PIR); fdt_set_boot_cpuid_phys(_dtb_start, pir_reg); fdt_init(_dtb_start); serial_console_init(); }

Contributors

PersonTokensPropCommitsCommitProp
Torez Smith7392.41%150.00%
Dave Kleikamp67.59%150.00%
Total79100.00%2100.00%


Overall Contributors

PersonTokensPropCommitsCommitProp
Torez Smith13660.71%133.33%
Dave Kleikamp8738.84%133.33%
Adam Buchbinder10.45%133.33%
Total224100.00%3100.00%
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.
Created with cregit.