makerule floppy
depends "all"
- action "mcopy -o romimage a:"
+ action "mcopy -o linuxbios.rom a:"
end
makerule nrv2b
#include <arch/pirq_routing.h>
#include <string.h>
-#ifdef DEBUG
+#if DEBUG==1
void check_pirq_routing_table(void)
{
const uint8_t *addr;
#ifndef __ASM_MPSPEC_H
#define __ASM_MPSPEC_H
-#ifdef HAVE_MP_TABLE
+#if HAVE_MP_TABLE==1
/*
* Structure definitions for SMP machines following the
#include <arch/asm.h>
#include <arch/intel.h>
-#ifdef CONFIG_SMP
+#if CONFIG_SMP==1
#include <cpu/p6/apic.h>
#endif
.section ".text"
/* set new stack */
movl $_estack, %esp
-#ifdef CONFIG_SMP
+#if CONFIG_SMP==1
/* Get the cpu id */
movl $APIC_DEFAULT_BASE, %edi
movl APIC_ID(%edi), %eax
* so absolute minimum needed to get it going.
*/
/* OK, linux it turns out does nothing. We have to do it ... */
-#if defined(i686)
+#if i686==1
// totalram here is in linux sizing, i.e. units of KB.
// set_mtrr is responsible for getting it into the right units!
setup_mtrrs(mem);
apic_read(APIC_ID));
#else /* APIC */
-#ifdef i686
+#if i686==1
/* Only Pentium Pro and later have those MSR stuff */
msr_t msr;
makedefine GCC_INC_DIR := $(shell $(CC) -print-search-dirs | sed -ne "s/install: \(.*\)/\1include/gp")
makedefine CPPFLAGS := -I$(TOP)/src/include -I$(TOP)/src/arch/$(ARCH)/include -I$(GCC_INC_DIR) $(CPUFLAGS)
-makedefine ROMCCPPFLAGS := -D__ROMCC__=0 -D__ROMCC_MINOR__=23
+makedefine ROMCCPPFLAGS := -D__ROMCC__=0 -D__ROMCC_MINOR__=34
makedefine CFLAGS := $(CPU_OPT) $(CPPFLAGS) -Os -nostdinc -nostdlib -fno-builtin -Wall
makedefine HOSTCFLAGS:= -Os -Wall
makerule ./romcc
depends "$(TOP)/util/romcc/romcc.c"
- action "$(HOSTCC) -g $(HOSTCFLAGS) -DVERSION='\"0.21\"' -DRELEASE_DATE='\"7 april 2003\"' $< -o $@"
+ action "$(HOSTCC) -g $(HOSTCFLAGS) -DVERSION='\"0.34\"' -DRELEASE_DATE='\"4 July 2003\"' $< -o $@"
end
makerule build_opt_tbl
export always
comment "LinuxBIOS version"
end
+define LINUXBIOS_EXTRA_VERSION
+ default ""
+ export used
+ comment "LinuxBIOS extra version"
+end
define LINUXBIOS_BUILD
default "$(shell date)"
export always
comment "Default heap size"
end
define _RAMBASE
- default 0x4000
+ default none
format "0x%x"
export always
comment "Base address of LinuxBIOS in RAM"
export always
comment "Define if we support SMP"
end
+define CONFIG_MAX_CPUS
+ default 1
+ export always
+ comment "Config CPU count for this machine"
+end
define MAX_CPUS
default 1
export always
*/
void post_code(uint8_t value)
{
-#ifdef CONFIG_SERIAL_POST
+#if CONFIG_SERIAL_POST==1
printk_info("POST: 0x%02x\n", value);
#elsif !define(NO_POST)
outb(value, 0x80);
#include <console/console.h>
#include <cpu/p5/cpuid.h>
-#ifdef i586
+#if i586==1
#include <cpu/p6/msr.h>
#endif
int mtrr_check(void)
{
-#ifdef i686
+#if i686==1
/* Only Pentium Pro and later have MTRR */
msr_t msr;
printk_debug("\nMTRR check\n");
### Build the objects we have code for in this directory.
###
##object mainboard.o
-config chip.h
-register "fixup_scsi" = "1"
+#config chip.h
+#register "fixup_scsi" = "1"
+
driver mainboard.o
+driver lsi_scsi.o
object static_devices.o
if HAVE_MP_TABLE object mptable.o end
if HAVE_PIRQ_TABLE object irq_tables.o end
action "$(CPP) -I$(TOP)/src $(ROMCCPPFLAGS) $(CPPFLAGS) $(MAINBOARD)/auto.c > ./auto.E"
end
makerule ./auto.inc
- depends "./romcc ./auto.E"
- action "./romcc -mcpu=k8 -O ./auto.E > auto.inc"
+ depends "./romcc ./auto.E"
+ action "./romcc -O -mcpu=k8 -o auto.inc --label-prefix=auto ./auto.E"
+# action "./romcc -mcpu=k8 -O ./auto.E > auto.inc"
end
mainboardinit cpu/k8/enable_mmx_sse.inc
mainboardinit ./auto.inc
southbridge amd/amd8131
end
#mainboardinit archi386/smp/secondary.inc
-superio NSC/pc87360
- register "com1" = "{1}"
- register "lpt" = "{1}"
-end
+#superio NSC/pc87360
+# register "com1" = "{1}"
+# register "lpt" = "{1}"
+#end
dir /pc80
##dir /src/superio/winbond/w83627hf
cpu p5 end
dump_pci_devices();
#endif
#if 0
- dump_pci_device(PCI_DEV(0, 0x18, 2));
+ dump_pci_device(PCI_DEV(0, 0x18, 1));
#endif
/* Check all of memory */
#if 0
msr_t msr;
- msr = rdmsr(TOP_MEM);
- print_debug("TOP_MEM: ");
+ msr = rdmsr(TOP_MEM2);
+ print_debug("TOP_MEM2: ");
print_debug_hex32(msr.hi);
print_debug_hex32(msr.lo);
print_debug("\r\n");
#endif
/*
-#if 1
- ram_check(0x00000000, msr.lo);
+#if 0
+ ram_check(0x00000000, msr.lo+(msr.hi<<32));
#else
#if TOTAL_CPUS < 2
// Check 16MB of memory @ 0
#include <console/console.h>
#include <device/device.h>
-#include <device/chip.h>
+//#include <device/chip.h>
#include <device/pci.h>
#include <device/pci_ids.h>
#include <device/pci_ops.h>
-#include "chip.h"
+//#include "chip.h"
//#include <part/mainboard.h>
//#include "lsi_scsi.c"
unsigned long initial_apicid[MAX_CPUS] =
*/
}
-
+/*
static void
enable(struct chip *chip, enum chip_pass pass)
{
enable: enable,
name: "Tyan s2880 mainboard "
};
-
+*/
* [31: 8] Reserved
*/
PCI_ADDR(0, 0x18, 3, 0x60), 0xffffff00, 0x00000000,
+//BY LYH add IOMMU 64M APERTURE
+ PCI_ADDR(0, 0x18, 3, 0x94), 0xffff8000, 0x00000f70,
+ PCI_ADDR(0, 0x18, 3, 0x90), 0xffffff80, 0x00000002,
+ PCI_ADDR(0, 0x18, 3, 0x98), 0x0000000f, 0x00068300,
+
+//BY LYH END
};
int i;
int max;
set_dimm_size(ctrl, sz, i);
}
}
-
+static void fill_last(unsigned long node_id,unsigned long base)
+{
+//BY LYH //Fill next base reg with right value
+ unsigned i;
+ unsigned base_reg;
+ base &=0xffff0000;
+ device_t device;
+ for(device = PCI_DEV(0, 0x18, 1); device <= PCI_DEV(0, 0x1f, 1); device
++= PCI_DEV(0, 1, 0)) {
+ for(i=node_id+1;i<=7;i++) {
+ base_reg=0x40+(i<<3);
+ pci_write_config32(device,base_reg,base);
+ }
+ }
+//BY LYH END
+}
+
static void route_dram_accesses(const struct mem_controller *ctrl,
unsigned long base_k, unsigned long limit_k)
{
unsigned base;
unsigned index;
unsigned limit_reg, base_reg;
+
device_t device;
node_id = ctrl->node_id;
index = (node_id << 3);
pci_write_config32(device, limit_reg, limit);
pci_write_config32(device, base_reg, base);
}
+
}
static void set_top_mem(unsigned tom_k)
/* Recompute the cs base register value */
#if 1 // BY LYH Need to count from 0 for every memory controller
csbase = ((tom - (base_k>>15))<< 21) | 1;
- print_debug("csbase=");
- print_debug_hex32(csbase);
- print_debug("\r\n");
+// print_debug("csbase=");
+// print_debug_hex32(csbase);
+// print_debug("\r\n");
#else //BY LYH END
csbase = (tom << 21) | 1;
#endif
print_debug("\r\n");
#endif
route_dram_accesses(ctrl, base_k, tom_k);
+//BY LYH
+ fill_last(ctrl->node_id, tom_k<<2);
+//BY LYH END
#if 0 //BY LYH
- if(ctrl->node_id==1) {
- pci_write_config32(ctrl->f2, DRAM_CSBASE, 0x00000001);
-
- }
+ dump_pci_device(PCI_DEV(0, 0x18, 1));
+
+// if(ctrl->node_id==1) {
+// pci_write_config32(ctrl->f2, DRAM_CSBASE, 0x00000001);
+// }
#endif
set_top_mem(tom_k);