Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 79727
b: refs/heads/master
c: a4ec1ef
h: refs/heads/master
i:
  79725: 17d9b46
  79723: b04acbf
  79719: 600c51f
  79711: 963696a
v: v3
  • Loading branch information
Ingo Molnar committed Jan 30, 2008
1 parent 10956d9 commit 562c124
Show file tree
Hide file tree
Showing 6 changed files with 719 additions and 772 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 31183ba8fd05b6ddc67ab4d726167cbc52e1b346
refs/heads/master: a4ec1effce83796209a0258602b0cf50026d86f2
32 changes: 17 additions & 15 deletions trunk/arch/x86/mach-voyager/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ void __init trap_init_hook(void)
{
}

static struct irqaction irq0 = {
static struct irqaction irq0 = {
.handler = timer_interrupt,
.flags = IRQF_DISABLED | IRQF_NOBALANCING | IRQF_IRQPOLL,
.mask = CPU_MASK_NONE,
Expand All @@ -59,44 +59,47 @@ void __init time_init_hook(void)

/* Hook for machine specific memory setup. */

char * __init machine_specific_memory_setup(void)
char *__init machine_specific_memory_setup(void)
{
char *who;

who = "NOT VOYAGER";

if(voyager_level == 5) {
if (voyager_level == 5) {
__u32 addr, length;
int i;

who = "Voyager-SUS";

e820.nr_map = 0;
for(i=0; voyager_memory_detect(i, &addr, &length); i++) {
for (i = 0; voyager_memory_detect(i, &addr, &length); i++) {
add_memory_region(addr, length, E820_RAM);
}
return who;
} else if(voyager_level == 4) {
} else if (voyager_level == 4) {
__u32 tom;
__u16 catbase = inb(VOYAGER_SSPB_RELOCATION_PORT)<<8;
__u16 catbase = inb(VOYAGER_SSPB_RELOCATION_PORT) << 8;
/* select the DINO config space */
outb(VOYAGER_DINO, VOYAGER_CAT_CONFIG_PORT);
/* Read DINO top of memory register */
tom = ((inb(catbase + 0x4) & 0xf0) << 16)
+ ((inb(catbase + 0x5) & 0x7f) << 24);
+ ((inb(catbase + 0x5) & 0x7f) << 24);

if(inb(catbase) != VOYAGER_DINO) {
printk(KERN_ERR "Voyager: Failed to get DINO for L4, setting tom to EXT_MEM_K\n");
tom = (boot_params.screen_info.ext_mem_k)<<10;
if (inb(catbase) != VOYAGER_DINO) {
printk(KERN_ERR
"Voyager: Failed to get DINO for L4, setting tom to EXT_MEM_K\n");
tom = (boot_params.screen_info.ext_mem_k) << 10;
}
who = "Voyager-TOM";
add_memory_region(0, 0x9f000, E820_RAM);
/* map from 1M to top of memory */
add_memory_region(1*1024*1024, tom - 1*1024*1024, E820_RAM);
add_memory_region(1 * 1024 * 1024, tom - 1 * 1024 * 1024,
E820_RAM);
/* FIXME: Should check the ASICs to see if I need to
* take out the 8M window. Just do it at the moment
* */
add_memory_region(8*1024*1024, 8*1024*1024, E820_RESERVED);
add_memory_region(8 * 1024 * 1024, 8 * 1024 * 1024,
E820_RESERVED);
return who;
}

Expand All @@ -114,8 +117,7 @@ char * __init machine_specific_memory_setup(void)
unsigned long mem_size;

/* compare results from other methods and take the greater */
if (boot_params.alt_mem_k
< boot_params.screen_info.ext_mem_k) {
if (boot_params.alt_mem_k < boot_params.screen_info.ext_mem_k) {
mem_size = boot_params.screen_info.ext_mem_k;
who = "BIOS-88";
} else {
Expand All @@ -126,6 +128,6 @@ char * __init machine_specific_memory_setup(void)
e820.nr_map = 0;
add_memory_region(0, LOWMEMSIZE(), E820_RAM);
add_memory_region(HIGH_MEMORY, mem_size << 10, E820_RAM);
}
}
return who;
}
Loading

0 comments on commit 562c124

Please sign in to comment.