diff options
| author | Andrew Morton <akpm@digeo.com> | 2003-02-18 05:28:09 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.transmeta.com> | 2003-02-18 05:28:09 -0800 |
| commit | 61f8a05dea3657e4634668257278cc49748073f7 (patch) | |
| tree | 0d90a1dc49c84e515dbffabbb3fea8f6a1f87db2 /include | |
| parent | e6a88220a077cf04e46481243032b632d84435d9 (diff) | |
[PATCH] visws: core
Patch from Andrey Panin <pazke@orbita1.ru>
This patch contains core support for visws subarch.
Diffstat (limited to 'include')
| -rw-r--r-- | include/asm-i386/mach-visws/do_timer.h | 2 | ||||
| -rw-r--r-- | include/asm-i386/mach-visws/irq_vectors.h | 12 | ||||
| -rw-r--r-- | include/asm-i386/mach-visws/setup_arch_post.h | 60 |
3 files changed, 38 insertions, 36 deletions
diff --git a/include/asm-i386/mach-visws/do_timer.h b/include/asm-i386/mach-visws/do_timer.h index d19c7063e17d..24d510a2f8de 100644 --- a/include/asm-i386/mach-visws/do_timer.h +++ b/include/asm-i386/mach-visws/do_timer.h @@ -1,7 +1,7 @@ /* defines for inline arch setup functions */ #include <asm/fixmap.h> -#include <asm/cobalt.h> +#include "cobalt.h" static inline void do_timer_interrupt_hook(struct pt_regs *regs) { diff --git a/include/asm-i386/mach-visws/irq_vectors.h b/include/asm-i386/mach-visws/irq_vectors.h index 5c53f00e21a8..c05f144d0084 100644 --- a/include/asm-i386/mach-visws/irq_vectors.h +++ b/include/asm-i386/mach-visws/irq_vectors.h @@ -47,18 +47,8 @@ #define TIMER_IRQ 0 /* - * 16 8259A IRQ's, 208 potential APIC interrupt sources. - * Right now the APIC is mostly only used for SMP. - * 256 vectors is an architectural limit. (we can have - * more than 256 devices theoretically, but they will - * have to use shared interrupts) - * Since vectors 0x00-0x1f are used/reserved for the CPU, - * the usable vector space is 0x20-0xff (224 vectors) + * */ -#ifdef CONFIG_X86_IO_APIC #define NR_IRQS 224 -#else -#define NR_IRQS 16 -#endif #endif /* _ASM_IRQ_VECTORS_H */ diff --git a/include/asm-i386/mach-visws/setup_arch_post.h b/include/asm-i386/mach-visws/setup_arch_post.h index e8611ae44c45..2857daf5af40 100644 --- a/include/asm-i386/mach-visws/setup_arch_post.h +++ b/include/asm-i386/mach-visws/setup_arch_post.h @@ -3,35 +3,47 @@ * This is included late in kernel/setup.c so that it can make use of all of * the static functions. */ +#define MB (1024 * 1024) + +unsigned long sgivwfb_mem_phys; +unsigned long sgivwfb_mem_size; + +long long mem_size __initdata = 0; + static inline char * __init machine_specific_memory_setup(void) { - char *who; + long long gfx_mem_size = 8 * MB; + mem_size = ALT_MEM_K; - who = "BIOS-e820"; + if (!mem_size) { + printk(KERN_WARNING "Bootloader didn't set memory size, upgrade it !\n"); + mem_size = 128 * MB; + } /* - * Try to copy the BIOS-supplied E820-map. - * - * Otherwise fake a memory map; one section from 0k->640k, - * the next section from 1mb->appropriate_mem_k + * this hardcodes the graphics memory to 8 MB + * it really should be sized dynamically (or at least + * set as a boot param) */ - sanitize_e820_map(E820_MAP, &E820_MAP_NR); - if (copy_e820_map(E820_MAP, E820_MAP_NR) < 0) { - unsigned long mem_size; - - /* compare results from other methods and take the greater */ - if (ALT_MEM_K < EXT_MEM_K) { - mem_size = EXT_MEM_K; - who = "BIOS-88"; - } else { - mem_size = ALT_MEM_K; - who = "BIOS-e801"; - } - - e820.nr_map = 0; - add_memory_region(0, LOWMEMSIZE(), E820_RAM); - add_memory_region(HIGH_MEMORY, mem_size << 10, E820_RAM); - } - return who; + if (!sgivwfb_mem_size) { + printk(KERN_WARNING "Defaulting to 8 MB framebuffer size\n"); + sgivwfb_mem_size = 8 * MB; + } + + /* + * Trim to nearest MB + */ + sgivwfb_mem_size &= ~((1 << 20) - 1); + sgivwfb_mem_phys = mem_size - gfx_mem_size; + + add_memory_region(0, LOWMEMSIZE(), E820_RAM); + add_memory_region(HIGH_MEMORY, mem_size - sgivwfb_mem_size - HIGH_MEMORY, E820_RAM); + add_memory_region(sgivwfb_mem_phys, sgivwfb_mem_size, E820_RESERVED); + + return "PROM"; + + /* Remove gcc warnings */ + (void) sanitize_e820_map(NULL, NULL); + (void) copy_e820_map(NULL, 0); } |
