S3 resume on Fujitsu-Siemens Amilo A7620 (CONTINUES)
Please refer to threads "ACPI S3 resume only reboots" and "[PATCH] GDT table patch for resume only reboots problem" for history on this thread. I moved to a new one because was becoming hard to follow.
Properly using beeping code by Pavel I was able to follow the code after
wakeup_pmode_return: movw $__KERNEL_DS, %ax movw %ax, %ss
and verified that it doesn't hang at that point.
Wakeup works until:
[...]
# and restore the stack ... but you need gdt for this to work movl saved_context_esp, %esp
movl %cs:saved_magic, %eax
cmpl $0x12345678, %eax
jne bogus_magic
# jump to place where we left off
movl saved_eip,%eax
jmp *%eax ###BEFORE THE JMP IT'S STILL ALIVE!
[...]
If i let it enter the jmp, it hangs. How can i follow that jump? Does that mean that we're going out of wakeup.S, finally? That would be a progress.
Current situation is:
with wakeup_addr.patch, wakeup_gdt.patch and
movl %cr0, %eax andl $0xfffffff0, %eax # TS/EM/MP bit off movl %eax, %cr0
placed at the beginning of wakeup code as suggest by Hiroshi 2 Itoh the laptop still doesn't survive pushl $0, that causes reboot. Commenting out pushl $0 and popfl it goes on until the point reported above.
Thanks,
Alberto
-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
A message that is not in the archive (sent off-list or not yet received): [email protected]
Hi!
Quoted 17 lines
Please refer to threads "ACPI S3 resume only reboots" and "[PATCH] GDT table patch for resume only reboots problem" for history on this thread. I moved to a new one because was becoming hard to follow.
Properly using beeping code by Pavel I was able to follow the code after
wakeup_pmode_return: movw $__KERNEL_DS, %ax movw %ax, %ssand verified that it doesn't hang at that point.
Wakeup works until:
[...]# and restore the stack ... but you need gdt for this to work movl saved_context_esp, %espmovl %cs:saved_magic, %eax
cmpl $0x12345678, %eax
jnebogus_magic
Quoted 7 lines
# jump to place where we left off
movl saved_eip,%eax
jmp *%eax ###BEFORE THE JMP IT'S STILL ALIVE!
[...]If i let it enter the jmp, it hangs. How can i follow that jump? Does that mean that we're going out of
wakeup.S, finally? That would be a progress.
Yes, you are going out of wakeup.S... Actually no. You are going to ret_point down in do_suspend_lowlevel.
Pavel
Signature · 9 lines
People were complaining that M$ turns users into beta-testers... ...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl! ------------------------------------------------------- This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more http://productguide.itmanagersjournal.com/guidepromo.tmpl
A message that is not in the archive (sent off-list or not yet received): 20041018124756.GA28463-I/[email protected]
Quoted 2 lines · On Mon, 18 Oct 2004 14:47:56 +0200 Pavel Machek…
Yes, you are going out of
wakeup.S... Actually no. You are going toret_pointdown indo_suspend_lowlevel.
Update: code is executed until
[...]ENTRY(do_suspend_lowlevel)
call save_processor_state call save_registers pushl $3 call acpi_enter_sleep_state addl $4,%esp ret .p2align 4,,7
ret_point:
call restore_registers
call restore_processor_state
# Here it's still alive :)
ret
[...]
So now it's going out of wakeup.S, right?
We should be in drivers/acpi/sleep/main.c at that point [...]
switch (pm_state)
{
case PM_SUSPEND_STANDBY:
barrier();
status = acpi_enter_sleep_state(acpi_state);
break;
case PM_SUSPEND_MEM:
do_suspend_lowlevel();
break;
case PM_SUSPEND_DISK:
if (acpi_pm_ops.pm_disk_mode == PM_DISK_PLATFORM)
status = acpi_enter_sleep_state(acpi_state);
else
do_suspend_lowlevel_s4bios();
break;
default:
return -EINVAL;
}
local_irq_restore(flags);
printk(KERN_DEBUG "Back to C!\n");[...]
right?
Can i use some beep code from here as well?
I won't sleep until this laptop resumes! ;)
Alberto
-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
A message that is not in the archive (sent off-list or not yet received): [email protected]
Hi!
Quoted 13 lines
Quoted 2 lines
Yes, you are going out of
wakeup.S... Actually no. You are going toret_pointdown indo_suspend_lowlevel.Update: code is executed until
[...]ENTRY(do_suspend_lowlevel)call save_processor_state call save_registers pushl $3 call acpi_enter_sleep_state addl $4,%esp ret .p2align 4,,7
Quoted 8 lines
ret_point:
callrestore_registers
callrestore_processor_state
# Here it's still alive :)
ret
[...]So now it's going out of
wakeup.S, right?
Good.
Quoted 1 line
We should be in
drivers/acpi/sleep/main.cat that point
Yes. I assume that video does not work for you? Do you see at least blinking cursor?
...hmm, problem is that normal video calls really require stack. Very bad.
Quoted 20 lines
case PM_SUSPEND_STANDBY: barrier(); status = acpi_enter_sleep_state(acpi_state); break; case PM_SUSPEND_MEM: do_suspend_lowlevel(); break; case PM_SUSPEND_DISK: if (acpi_pm_ops.pm_disk_mode == PM_DISK_PLATFORM) status = acpi_enter_sleep_state(acpi_state); else do_suspend_lowlevel_s4bios(); break; default: return -EINVAL; } local_irq_restore(flags); printk(KERN_DEBUG "Back to C!\n");
Quoted 3 lines
[...]
right?
Can i use some beep code from here as well?
You'd have to wrap it with asm("") at least, and need right constraints.... Hmm, this should be C-equivalent. First try it somewhere in normal code.
outb(inb(97), 0x80); outb_p(3, 97); outb_p(-74,67); outb_p(-119,66); outb_p(15,66);
Quoted 1 line
I won't sleep until this laptop resumes! ;)
Given that human can only handle about 72 hours without sleep... I'd say that is bad idea.
Pavel
Signature · 9 lines
People were complaining that M$ turns users into beta-testers... ...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl! ------------------------------------------------------- This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more http://productguide.itmanagersjournal.com/guidepromo.tmpl
A message that is not in the archive (sent off-list or not yet received): 20041018212208.GA10490-I/[email protected]
Quoted 11 lines · On Mon, 18 Oct 2004 23:22:08 +0200 Pavel Machek…
Quoted 1 line
So now it's going out of
wakeup.S, right?Good.
Quoted 1 line
We should be in
drivers/acpi/sleep/main.cat that pointYes. I assume that video does not work for you? Do you see at least blinking cursor?
...hmm, problem is that normal video calls really require stack. Very bad.
Hey. Some messages ago we got to the point were stack was properly initialized, so i couldn't use pushl anymore to debug. That was on [...]wakeup_pmode_return:
movw $__KERNEL_DS, %ax movw %ax, %ss movw %ax, %ds
[...]
could we try to run video code after that?
[OT]
Ps:ok, maybe i'll go to sleep... but i'm not going to surrender. :p
-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
A message that is not in the archive (sent off-list or not yet received): [email protected]
Hi!
Quoted 15 lines
Quoted 11 lines
Quoted 1 line
So now it's going out of
wakeup.S, right?Good.
Quoted 1 line
We should be in
drivers/acpi/sleep/main.cat that pointYes. I assume that video does not work for you? Do you see at least blinking cursor?
...hmm, problem is that normal video calls really require stack. Very bad.
Hey. Some messages ago we got to the point were stack was properly initialized, so i couldn't use pushl anymore to debug. That was on [...]
wakeup_pmode_return:
Quoted 6 lines
movw $__KERNEL_DS, %ax movw %ax, %ss movw %ax, %ds[...]
could we try to run video code after that?
We can't call video bios from protected mode, sorry. If machine comes up with all devices working (try capslock) but video, you should be able to reinitialize video using emu from X11 or some other hack.
Pavel
Signature · 9 lines
People were complaining that M$ turns users into beta-testers... ...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl! ------------------------------------------------------- This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more http://productguide.itmanagersjournal.com/guidepromo.tmpl
A message that is not in the archive (sent off-list or not yet received): 20041018230008.GC10490-I/[email protected]
Quoted 6 lines · On Tue, 19 Oct 2004 01:00:08 +0200 Pavel Machek…
Hi!
Quoted 4 lines
Quoted 4 lines
Quoted 3 lines
So now it's going out of
wakeup.S, right?We should be in
drivers/acpi/sleep/main.cat that point
Quoted 7 lines
Quoted 3 lines
Quoted 3 lines
Yes. I assume that video does not work for you? Do you see at least blinking cursor?
We can't call video bios from protected mode, sorry. If machine comes up with all devices working (try capslock) but video, you should be able to reinitialize video using emu from X11 or some other hack.
Update:
2.6.9, with pushl and popl lines commented out:
the machine survives wakeup.S, then hangs with the hard disk light on. CapsLock is working, but Ctrl+Alt+Del doesn't reboot (if i keep it pressed for some seconds it generates a beep.)
I still didn't find a way to debug it, please help me! At which point should we be if harddisk was (kind of) turned on?
Thanks,
Alberto
-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
A message that is not in the archive (sent off-list or not yet received): [email protected]
Hi!
Quoted 12 lines
Quoted 11 lines
Quoted 7 lines
Quoted 7 lines
Quoted 3 lines
So now it's going out of
wakeup.S, right?We should be in
drivers/acpi/sleep/main.cat that pointYes. I assume that video does not work for you? Do you see at least blinking cursor?
We can't call video bios from protected mode, sorry. If machine comes up with all devices working (try capslock) but video, you should be able to reinitialize video using emu from X11 or some other hack.
Quoted 5 lines
Update:
2.6.9, with pushl and popl lines commented out:
the machine surviveswakeup.S, then hangs with the hard disk light on. CapsLock is working, but Ctrl+Alt+Del doesn't reboot (if i keep it pressed for some seconds it generates a beep.)I still didn't find a way to debug it, please help me! At which point should we be if harddisk was (kind of) turned on?
Remap capslock to, say, right shift, and try to see if right shift toggles leds after resume.
If it does, try to find out if serial or network card is working after resume.
Pavel
Signature · 9 lines
People were complaining that M$ turns users into beta-testers... ...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl! ------------------------------------------------------- This SF.Net email is sponsored by: Sybase ASE Linux Express Edition - download now for FREE LinuxWorld Reader's Choice Award Winner for best database on Linux. http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click