OK, more information. There does seem to be an issue with currticks.
In main (main.c) I placed:
unsigned long x = currticks();
as in:
int main(struct Elf_Bhdr *ptr)
{
char *p;
int state;
++ unsigned long x = currticks();
for (p = _bss; p < _ebss; p++)
*p = 0; /* Zero BSS */
console_init();
arch_main(ptr);
#ifdef DELIMITERLINES
for (i=0; i<80; i++) putchar('=');
#endif
rom = *(struct rom_info *)phys_to_virt(ROM_INFO_LOCATION);
printf("ROM segment %#hx length %#hx reloc %#x\n",
rom.rom_segment,
rom.rom_length << 1, (unsigned long)_text);
printf("Got Here 0\n");
gateA20_set();
printf("Got Here 1\n");
print_config();
printf("Got Here 2\n");
get_memsizes();
printf("Got Here 3\n");
before any of my debugging printfs. The execution did not get past that
line. (None of the other prints occurred.)
So, I modified empty_8042 in misc.c to remove the call to currticks
(repaced with a simple counting loop) as follows:
static void empty_8042(void)
{
unsigned long time;
char st;
int x;
-- time = currticks() + TICKS_PER_SEC; /* max wait of 1 second
*/
++ time = 1000;
++ x = 0;
printf("empty_8042 1\n");
-- while ((((st = inb(K_CMD)) & K_OBUF_FUL) ||
(st & K_IBUF_FUL)) &&
curticks() < time)
++ while ((((st = inb(K_CMD)) & K_OBUF_FUL) ||
(st & K_IBUF_FUL)) &&
x++ < time)
inb(K_RDWR);
}
This allowed me to return from gateA20_set() and the code executed as
far as the call to get_memsizes();
I will review get_memsizes (when I find it).
Tim
> -----Original Message-----
> From: eth...@li...
[mailto:etherboot-
> dev...@li...] On Behalf Of Timothy Legge
> Sent: Sunday, January 26, 2003 10:01 AM
> To: eth...@li...
> Cc: 'Eric W. Biederman'; 'Tom Trebisky'
> Subject: RE: [Etherboot-developers] 5.1 will not boot on 486 was
Serial
> Port Debugging
>
> A little more information:
>
> I tracked through misc.c and placed printfs:
>
> #if defined(PCBIOS) && !defined(IBM_L40)
> static void empty_8042(void)
> {
> unsigned long time;
> char st;
> printf("empty_8042 0\n");
> time = currticks() + TICKS_PER_SEC; /* max wait of 1 second
> */
> printf("empty_8042 1\n");
> while ((((st = inb(K_CMD)) & K_OBUF_FUL) ||
> (st & K_IBUF_FUL)) &&
> currticks() < time)
> inb(K_RDWR);
> printf("empty_8042 2\n");
> }
> #endif /* IBM_L40 */
>
> I only received the first printf: empty_8042 0. I then moved into
> arch/i386/core/i386_timer.c but non of the printfs I placed in
currticks
> displayed anything.
>
> Thinking it might be dieing as a result of a previous operation, I
> changed the first printf("empty_8042 0\n"); to:
>
> int x;
> for(x=0;x<1000;x++)
> printf("empty_8042 %d\n", x);
>
> This properly displayed the correct number of llines, but again
failed.
> Is it possible that it cannot find currticks?
>
> Tim
>
>
>
> -------------------------------------------------------
> This SF.NET email is sponsored by:
> SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
> http://www.vasoftware.com
> _______________________________________________
> Etherboot-developers mailing list
> Eth...@li...
> https://lists.sourceforge.net/lists/listinfo/etherboot-developers
|