-#define ASM_CONSOLE_LOGLEVEL 8
#include <stdint.h>
#include <device/pci_def.h>
#include <arch/io.h>
#include <device/pnp_def.h>
#include <arch/romcc_io.h>
#include <arch/hlt.h>
-#include "pc80/mc146818rtc_early.c"
-#include "pc80/serial.c"
-#include "console/console.c"
-#include "lib/ramtest.c"
+#include <pc80/mc146818rtc.h>
+#include <console/console.h>
#include "cpu/x86/bist.h"
-//#include "lib/delay.c"
void setup_pars(void)
{
#include "cpu/amd/sc520/raminit.c"
-typedef void (*lj)(void);
-
struct mem_controller {
int i;
};
-static void memreset_setup(void)
-{
-}
-
-static void memreset(int controllers, const struct mem_controller *ctrl)
-{
-}
-
-static inline void activate_spd_rom(const struct mem_controller *ctrl)
-{
- /* nothing to do */
-}
-
-static inline int spd_read_byte(unsigned device, unsigned address)
-{
-// return smbus_read_byte(device, address);
-}
-
-//#include "lib/generic_sdram.c"
+static int spd_read_byte(unsigned device, unsigned address) { }
static inline void dumpmem(void){
int i, j;
/* these values taken from the msm board itself.
* and they cause the board to not even come out of calibrating_delay_loop
* if you can believe it. Our problem right now is no IDE or serial interrupts
- * So we'll try to put interrupts in, one at a time. IDE first.
+ * So we'll try to put interrupts in, one at a time. IDE first.
*/
cp = (volatile unsigned char *) 0xfffefd00;
*cp = 0x11;
print_err("HI THERE!\n");
// sizemem();
staticmem();
- print_err("c60 is "); print_err_hex16(*(unsigned short *)0xfffefc60);
+ print_err("c60 is "); print_err_hex16(*(unsigned short *)0xfffefc60);
print_err("\n");
-
+
// while(1)
print_err("STATIC MEM DONE\n");
- outb(0xee, 0x80);
+ post_code(0xee);
print_err("loop forever ...\n");
#if 0
"jnz 1b\n\t"
:
: "a" (0), "D" (0), "c" (1024*1024)
- );
-
-
+ );
+
+
#endif
-
+
#if 0
dump_pci_devices();
#endif
#if 0
dump_pci_device(PCI_DEV(0, 0, 0));
#endif
-
-#if 0
- print_err("RAM CHECK!\n");
- // Check 16MB of memory @ 0
- ram_check(0x00000000, 0x01000000);
-#endif
-#if 0
- print_err("RAM CHECK for 32 MB!\n");
- // Check 32MB of memory @ 0
- ram_check(0x00000000, 0x02000000);
-#endif
+
#if 1
{
volatile unsigned char *src = (unsigned char *) 0x2000000 + 0x60000;
- volatile unsigned char *dst = (unsigned char *) 0x4000;
+ volatile unsigned char *dst = (unsigned char *) 0x4000;
for(i = 0; i < 0x20000; i++) {
/*
- print_err("Set dst "); print_err_hex32((unsigned long) dst);
+ print_err("Set dst "); print_err_hex32((unsigned long) dst);
print_err(" to "); print_err_hex32(*src); print_err("\n");
*/
*dst = *src;
//print_err(" dst is now "); print_err_hex32(*dst); print_err("\n");
dst++, src++;
- outb((unsigned char)i, 0x80);
+ post_code(i & 0xff);
}
}
dumpmem();
- outb(0, 0x80);
+ post_code(0x00);
+
print_err("loop forever\n");
- outb(0xdd, 0x80);
+ post_code(0xdd);
__asm__ volatile(
"movl %0, %%edi\n\t"
"jmp *%%edi\n\t"
:
: "a" (0x4000)
- );
-
+ );
+
print_err("Oh dear, I'm afraid it didn't work...\n");
-
+
while(1);
#endif
}
-