[PATCH] Automatic RAM detection for VT8601

SONE Takeshi ts1 at cma.co.jp
Tue May 20 04:30:01 CEST 2003


On Tue, May 20, 2003 at 02:15:23PM +0900, NEWBELL7 at magicn.com wrote:
> I have a question about ADLO. My LinuxBIOS + etherboot + ADLO go through
> to ADLO, but stop at " sti " instruction  before jumping to Bochs BIOS.
> I look up "sti" from Intel IA32 Instruction set Volume 2.  I read that
> "sti" is "protected mode virtual interrupt enable".
> 
> I removed "sti" from ADLO because it is real mode. 
> Does It affect badly to my EPIA operation ? 

sti should also work in real mode.

> ps.> If I reset my system with LinuxBIOS after booting it with PC BIOS,
> it works great.

Linux's reboot code sometimes doesn't work for some reason.
(I think it resets only CPU)

I wrote a small program to directly hit the power management device
found in EPIA to reset the system, not only CPU.
It works for me.
Changing 0x29 to 0x28 makes it power off instead of reboot.
See southbridge manual for detail. (0x4000 is PM base)
--
Takeshi



#include <sys/io.h>

main()
{
    iopl(3);
    outb(0xff, 0x4001);
    printf("01=%x\n", inb(0x4001));
    outb(0x20, 0x4005);
    printf("05=%x\n", inb(0x4005));
    outw(0xff, 0x4020);
    printf("20=%x\n", inw(0x4020));
    outb(0x29, 0x4005);
//    while ((inb(0x4001) & 1) == 0)
//        sleep(2);
}



More information about the coreboot mailing list