Hi, All,
I am still trying to implement the S3 state in dbm690t. Now I can jump into the waking vector code running under the real mode. However, the code contains some 32bit instructions, when these instructions are executed, the system always hangs, for the processor thought they were of 16bit. Please see the code in the below link.
http://lxr.linux.no/linux+v2.6.18/arch/x86_64/kernel/acpi/wakeup.S
In 37 and 38 line, there are two 32bit instructions,
66 6a 00 pushl $0 # Kill any dangerous flags 66 9d popfl
You can see the machine codes starting with 0x66 indicating these 32bit instructions. However, processor always thought these were of 16bit, so, instructions are changed into:
66 6a push byte 00h 00 66 9d add [bp-63h], ah
Then, maybe an exception occurs, system hangs. I am stuck here for a while, How can I make processor running both 16bit and 32bit instructions under the real mode? Thanks in advance.
Best Regards
丰立波 Feng Libo @ AMD Ext: 20906 Mobile Phone: 13683249071 Office Phone: 0086-010-62801406
-----Original Message----- From: Rudolf Marek [mailto:r.marek@assembler.cz] Sent: Saturday, November 15, 2008 7:33 AM To: Feng, Libo Cc: coreboot@coreboot.org; Xie, Michael; Bao, Zheng; Huang, FrankR; Li, Maggie; Wang, Qingpei Subject: Re: [coreboot] ACPI S3
Hi all,
As Jordan noted, some device context must be restored. It won't fit in CMOS. Some chipset have additional NVRAM for this S3 resume process.
You have basically two options:
1) Follow the way I did, re-run coreboot and jump later to OS waking vector. Check the patches and the other threads.
2) Save memory config in CMOS, restore memory config, restore memory, re-init the chipset registers (not the leafs) and jump to OS vector. This means that the rest of device state is saved in reserved RAM. To be sure to save actual context you will need also SMM (system management mode trap) and trap the SLP register write, do the backup of all important registers and then go off.
I think easier is 1) Only problem is about memory overwrites. Check the Jason's thread. He is facing similar issues. Maybe put whole coreboot to TOPMEM-something and put low memory trampolines and stack to some place where it don't hurt. You may also save/restore the region during resume.
Rudolf