File: q-firmware.c

package info (click to toggle)
linux-2.6.24 2.6.24-6~etchnhalf.9etch3
  • links: PTS
  • area: main
  • in suites: etch
  • size: 317,768 kB
  • ctags: 974,658
  • sloc: ansic: 5,384,710; asm: 212,187; makefile: 14,202; perl: 7,066; cpp: 3,159; python: 2,833; yacc: 2,629; sh: 2,526; lex: 1,511; lisp: 218; awk: 96; pascal: 41
file content (24 lines) | stat: -rw-r--r-- 527 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#include <linux/init.h>
#include <linux/string.h>
#include <asm/addrspace.h>
#include <asm/bootinfo.h>
#include <asm/io.h>

#define QEMU_PORT_BASE 0xb4000000

void __init prom_init(void)
{
	int *cmdline;

	cmdline = (int *) (CKSEG0 + (0x10 << 20) - 260);
	if (*cmdline == 0x12345678) {
		if (*(char *)(cmdline + 1))
			strcpy(arcs_cmdline, (char *)(cmdline + 1));
		add_memory_region(0x0<<20, cmdline[-1], BOOT_MEM_RAM);
	} else {
		add_memory_region(0x0<<20, 0x10<<20, BOOT_MEM_RAM);
	}


	set_io_port_base(QEMU_PORT_BASE);
}