-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hello all,
This patch is a WIP patch to get working S3 on AM2 boards. Currently it works on M2V-MX SE. The resume code does only the ram init right. No code which saves/restores mem is there. It is not yet usable.
I needed to implement DQS timming save restore. I use NVRAM in K8M890 for this. The SB600 has also such NVRAM.
There is quite strange errata for mine CPU, so the exit self refresh code is strange.
Rudolf
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hi all,
This is yet another WIP patch. This one actually works (suspend/resume works in Linux), but it:
1) corrupts memory around 0x1000 (the real mode trampoline) 2) it corrupts memory randomly in first 64KB copy_secondary_start_to_1m_below
It puts Coreboot to last 1MB below 32MB (and reserves the memory there). So all I need is to solve the secondary.S starter and the real mode jumper -> somehow not to corrupt the lowmem or find some hole where it can be hidden.
Rudolf
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hi all,
Here is yet another WIP. I need bit help to solve some issues:
1) include file mess in CAR
In src/southbridge/via/k8t890/k8t890_early_car.c I'm not able to include the nb header file. There is a NVRAM base with #define. Now I just duplicated the macro.
The reason why it does not go is in the rest of k8t890.h because of prototype for writeback function. Eventually we might get rid of writeback...
2) src/northbridge/amd/amdk8/exit_from_self.c
I'm not able to do: ctrl[i].f2->path.pci.devfn
Compiler complains dont know why. I solved it like:
ctrl[i].node_id + 0x18) << 3) | 0x2
Not ideal but works
3) I have an idea how to do the realmode memory reservation for coreboot. I simply made RSDP table much larger (this table stays below 1MB).
during resume I copy there simple trampoline which turns off PE and do the ljmp to waking vector. Unfortunately this does not work for some reason. I believe the CS base of GDT is invalid perhaps I should there base not zero?
The code should execute like this:
set GDT set LDT jmp ebx -> to code inside the variable jump_to_wakeup. because I cannot do the direct ljmp $0x0008,%0 because rsdp space address is run-time.
So inside the jump_to_wakeup I load CS with the new GDT value and jump to the lowmem where I put the simple code:
movl %cr0,%eax andb $0xfe,al movl %eax,%cr0 jmp far waking vector
It is bit hard to follow but please have a look to a patch.
Here is some real example:
Trying to find the wakeup vector ...
Looking on 000f9560 for valid checksum
Checksum 1 passed
RSDP found at 000f9560
RSDT found at 1bff0424 ends at 1bff0464
FADT found at 1bff0e62
FACS found at 1bff0480
OS waking vector is 0001a000
The RSDP is at 000f9560 spare memory at: 000f9584
IN ACPI JUMP WAKE TO 1a000
ea 0 0 0 1a
ea 84 95 f 0 8 0 (CPU resets here)
As I have written I believe that problem is in selector 0x8 which has base 0 and limit 64KB perhaps it should have base f0000 to fit the location of the low table?
Hope it is more clear -> I need sleep. Looking forward for suggestions. Oh btw even without this 3) Windows 7 and Linux S3 mode works (I put the trampoline to last bytes of first 4KB).
Rudolf