1 diff -urN linux-2.6.19.2//arch/cris/arch-v10/boot/compressed/hw_settings.S /tmp/linux-2.6.19.2/arch/cris/arch-v10/boot/compressed/hw_settings.S
2 --- linux-2.6.19.2//arch/cris/arch-v10/boot/compressed/hw_settings.S 2007-06-01 00:37:57.000000000 +0200
3 +++ /tmp/linux-2.6.19.2/arch/cris/arch-v10/boot/compressed/hw_settings.S 2007-06-01 00:34:55.000000000 +0200
5 .dword 0 ; No more register values
6 .ascii "ACME_PART_MAGIC" ; Magic number
8 + .ascii "ACME_RAM_MAGIC" ; Magic number
10 diff -urN linux-2.6.19.2//arch/cris/arch-v10/boot/compressed/hw_settings_416.S /tmp/linux-2.6.19.2/arch/cris/arch-v10/boot/compressed/hw_settings_416.S
11 --- linux-2.6.19.2//arch/cris/arch-v10/boot/compressed/hw_settings_416.S 2007-06-01 00:37:57.000000000 +0200
12 +++ /tmp/linux-2.6.19.2/arch/cris/arch-v10/boot/compressed/hw_settings_416.S 2007-06-01 00:34:55.000000000 +0200
14 .dword 0 ; No more register values
15 .ascii "ACME_PART_MAGIC" ; Magic number
17 + .ascii "ACME_RAM_MAGIC" ; Magic number
19 diff -urN linux-2.6.19.2//arch/cris/arch-v10/boot/compressed/hw_settings_816.S /tmp/linux-2.6.19.2/arch/cris/arch-v10/boot/compressed/hw_settings_816.S
20 --- linux-2.6.19.2//arch/cris/arch-v10/boot/compressed/hw_settings_816.S 2007-06-01 00:37:57.000000000 +0200
21 +++ /tmp/linux-2.6.19.2/arch/cris/arch-v10/boot/compressed/hw_settings_816.S 2007-06-01 00:34:55.000000000 +0200
23 .dword 0 ; No more register values
24 .ascii "ACME_PART_MAGIC" ; Magic number
26 + .ascii "ACME_RAM_MAGIC" ; Magic number
28 diff -urN linux-2.6.19.2//arch/cris/arch-v10/boot/compressed/hw_settings_832.S /tmp/linux-2.6.19.2/arch/cris/arch-v10/boot/compressed/hw_settings_832.S
29 --- linux-2.6.19.2//arch/cris/arch-v10/boot/compressed/hw_settings_832.S 2007-06-01 00:37:57.000000000 +0200
30 +++ /tmp/linux-2.6.19.2/arch/cris/arch-v10/boot/compressed/hw_settings_832.S 2007-06-01 00:34:55.000000000 +0200
32 .dword 0 ; No more register values
33 .ascii "ACME_PART_MAGIC" ; Magic number
35 + .ascii "ACME_RAM_MAGIC" ; Magic number
37 diff -urN linux-2.6.19.2//arch/cris/arch-v10/boot/compressed/hw_settings_MCM.S /tmp/linux-2.6.19.2/arch/cris/arch-v10/boot/compressed/hw_settings_MCM.S
38 --- linux-2.6.19.2//arch/cris/arch-v10/boot/compressed/hw_settings_MCM.S 2007-06-01 00:37:57.000000000 +0200
39 +++ /tmp/linux-2.6.19.2/arch/cris/arch-v10/boot/compressed/hw_settings_MCM.S 2007-06-01 00:34:55.000000000 +0200
41 .dword 0 ; No more register values
42 .ascii "ACME_PART_MAGIC" ; Magic number
44 + .ascii "ACME_RAM_MAGIC" ; Magic number
46 --- linux-2.6.19.2//arch/cris/kernel/setup.c 2007-06-01 00:37:55.000000000 +0200
47 +++ /tmp/linux-2.6.19.2/arch/cris/kernel/setup.c 2007-06-01 00:34:55.000000000 +0200
49 * boot code and the system.
52 +#ifdef CONFIG_CRIS_LOW_MAP
53 +#define FLASH_UNCACHED_ADDR KSEG_8
54 +#define FLASH_CACHED_ADDR KSEG_5
56 +#define FLASH_UNCACHED_ADDR KSEG_E
57 +#define FLASH_CACHED_ADDR KSEG_F
61 setup_arch(char **cmdline_p)
63 unsigned long bootmap_size;
64 unsigned long start_pfn, max_pfn;
65 unsigned long memory_start;
67 + unsigned int ram_size = 0;
68 + unsigned char *flash_mem = (unsigned char*)(FLASH_CACHED_ADDR);
69 + unsigned int ram_scan_count = 0;
70 + const char *ram_magic = "ACME_RAM_MAGIC";
71 + unsigned int magic_len = strlen(ram_magic);
73 /* register an initial console printing routine for printk's */
77 /* we should really poll for DRAM size! */
78 + printk(KERN_INFO "Determinig RAM size\n");
79 + for(ram_scan_count = 0; ram_scan_count < 100000; ram_scan_count++){
80 + if(strncmp(&flash_mem[ram_scan_count], ram_magic, magic_len - 1) == 0){
81 + ram_size = flash_mem[ram_scan_count + magic_len ];
83 + ram_size += flash_mem[ram_scan_count + magic_len + 2];
85 + ram_size += flash_mem[ram_scan_count + magic_len + 1];
87 + ram_size += flash_mem[ram_scan_count + magic_len + 3];
88 + printk(KERN_INFO "RAM size is %uMB\n", 16 * ram_size);
89 + ram_scan_count = 1100000;
93 high_memory = &dram_end;
95 + dend = dram_start + 16 * 1024 * 1024 * ram_size;
97 + high_memory = 0xc1000000;
99 if(romfs_in_flash || !romfs_length) {
100 /* if we have the romfs in flash, or if there is no rom filesystem,
101 * our free area starts directly after the BSS