Fixed again for sdram

This commit is contained in:
Ronald G. Minnich 2001-03-13 15:40:33 +00:00
commit bcf4cbbac1
3 changed files with 15 additions and 10 deletions

View file

@ -16,7 +16,7 @@ CPUFLAGS += -DUSE_DOC_MIL
CPUFLAGS += -DCMD_LINE='"ro root=/dev/hda1 console=ttyS0,115200 single "'
TOP=../..
INCLUDES=-nostdinc -I $(TOP)/src/include
INCLUDES=-nostdinc -I $(TOP)/src/include -I $(TOP)/src/arch/i386/include
NOOPT_CFLAGS=$(INCLUDES) $(CPUFLAGS) -Wall
CFLAGS=$(NOOPT_CFLAGS) -O2
@ -32,6 +32,7 @@ OBJECTS += serial_subr.o
OBJECTS += mpspec.o
OBJECTS += microcode.o
OBJECTS += keyboard.o
OBJECTS += ioapic.o
LINUX=$(TOP)/../linux-2.4.0-ali/
LINK = ld -T ldscript.ld -o $@ $(OBJECTS)
@ -97,6 +98,9 @@ fill_inbuf.o: $(TOP)/src/lib/fill_inbuf.c
params.o: $(TOP)/src/lib/params.c
cc $(CFLAGS) $(LINUXINCLUDE) -c $<
ioapic.o: $(TOP)/src/cpu/p6/ioapic.c
cc $(CFLAGS) $(LINUXINCLUDE) -c $<
hardwaremain.o: $(TOP)/src/lib/hardwaremain.c
cc $(CFLAGS) -c $<

View file

@ -22,7 +22,7 @@ CPUFLAGS += -DRAMTEST
CPUFLAGS += -DCMD_LINE='"ro root=/dev/hda1 console=ttyS0,115200 single "'
TOP=../..
INCLUDES=-nostdinc -I $(TOP)/src/include
INCLUDES=-nostdinc -I $(TOP)/src/include -I $(TOP)/src/arch/i386/include
NOOPT_CFLAGS=$(INCLUDES) $(CPUFLAGS) -Wall
CFLAGS=$(NOOPT_CFLAGS) -O2
@ -37,6 +37,7 @@ OBJECTS += serial_subr.o
OBJECTS += mpspec.o
OBJECTS += microcode.o
OBJECTS += keyboard.o
OBJECTS += ioapic.o
#LINUX=$(TOP)/../linux-2.4.0-test6.via/
LINUX=$(TOP)/../linux-2.4.0-via/
@ -93,6 +94,9 @@ fill_inbuf.o: $(TOP)/src/lib/fill_inbuf.c
params.o: $(TOP)/src/lib/params.c
cc $(CFLAGS) $(LINUXINCLUDE) -c $<
ioapic.o: $(TOP)/src/cpu/p6/ioapic.c
cc $(CFLAGS) $(LINUXINCLUDE) -c $<
hardwaremain.o: $(TOP)/src/lib/hardwaremain.c
cc $(CFLAGS) -c $<

View file

@ -243,12 +243,9 @@ spd_set_drb_loop_top:
movl %edi, %esi
20:
/* Compute the end address for the DRB register */
// Has to be at least 64 MB? Not sure what Eric Biederman was doing
// here, but I think minimum SDRAM is 64 MB, so that would fit.
// this covers somewhat for buggy SDRAMs. -- rgm
// If it's smaller, assume it is not there.
// 2^3=8, times 8 mb, is 64 mb.
cmpl $3, %edi
// If it is >= 8, i.e. >= 2^8 or 256, skip it.
// >= 8 is a bogus value.
cmpl $8, %edi
jae 21f
movl $1, %eax
movl %edi, %ecx
@ -263,7 +260,7 @@ spd_set_drb_loop_top:
PCI_WRITE_CONFIG_BYTE
/* Compute the end address for the DRB register */
cmpl $3, %esi
cmpl $8, %esi
jae 30f
mov $1, %eax
movl %esi, %ecx
@ -528,4 +525,4 @@ spd_set_nbxcfg:
smbus_pcibus_end:
smbus_pcibus_end: