OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [linux/] [linux-2.4/] [arch/] [mips/] [hp-lj/] [init.c] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1275 phoenix
/*
2
 * init.c: PROM library initialisation code.
3
 *
4
 * Copyright (C) 1998 Gleb Raiko & Vladimir Roganov
5
 */
6
 
7
#include <linux/mm.h>
8
#include <asm/bootinfo.h>
9
#include <asm/addrspace.h>
10
#include <asm/hp-lj/asic.h>
11
#include <linux/bootmem.h>
12
 
13
#include "utils.h"
14
 
15
 
16
#define Delimiter "CMDLINE="
17
const char CommandLine[] = Delimiter
18
  "root=/dev/hda3                                                                                                                                                                                                                                            ";
19
 
20
char arcs_cmdline[CL_SIZE];
21
 
22
int __init prom_init(int argc, char ** argv, char **envp)
23
{
24
        ulong mem_size = get_mem_avail();
25
        int reserve_size = 0;
26
 
27
        printk("Total Memory: %ld bytes\n", mem_size);
28
 
29
        reserve_buffer(CommandLine, mem_size);
30
 
31
        reserve_size = get_reserved_buffer_size();
32
        mem_size -= reserve_size;
33
 
34
        add_memory_region(0x0,mem_size, BOOT_MEM_RAM);
35
        add_memory_region(mem_size,reserve_size, BOOT_MEM_RESERVED);
36
 
37
        printk("Main Memory: %ld bytes\n", mem_size);
38
        printk("Reserved Memory: %ld bytes at 0x%08x\n",
39
                get_reserved_buffer_size(), (ulong)get_reserved_buffer());
40
 
41
        printk("Detected %s ASIC\n", GetAsicName());
42
        mips_machgroup  = MACH_GROUP_HP_LJ;
43
        mips_machtype   = MACH_UNKNOWN;
44
 
45
        strcpy(arcs_cmdline, CommandLine+strlen(Delimiter));
46
 
47
        return 0;
48
}
49
 
50
 
51
void prom_free_prom_memory (void)
52
{
53
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.