here is a summary of what openbsd do (code flow i have identified)

  1.  ZZZ -Z is the command to hibernate
  2.  acpiioctl (sys/dev/acpi/acpi.c) handles the hibernation
  3.  does _TTS, _PTS, _GTS etc programming as per acpi specs required for 
entering sleep states
  4.  allocate memory for hibernation image
  5.  suspend devices
  6.  freeze processes
  7.  reset clocks
  8.  disable interrupts
  9.  write to pm registers as mentioned in acpi specs
  10. enable wakeup sources
  11. save cpu context
  12. hibernate_suspend (sys/kern/subr_hibernate.c)
     *  1. Calculating this machine's hibernate_info information
      *  2. Allocating a piglet and saving the piglet's physaddr
     *  3. Calculating the memory chunks
     *  4. Writing the compressed chunks to disk
     *  5. Writing the chunk table
     *  6. Writing the signature block (hibernate_info)
  13. powerdown disk drives
  14. write to WKS_STS and SLP_TYPx as per acpi specs


-Shiva



________________________________
From: Shivaprashanth H
Sent: Wednesday, March 27, 2019 12:50 AM
To: Adrian Chadd
Cc: Peter Jeremy; [email protected]
Subject: Re: loading the coredump file to memory

In short it creates hibernate image in a swap space before going to suspend. 
After boot checks for availability of image and if present loads it. I can 
share more details tomorrow.

Get Outlook for Android<https://aka.ms/ghei36>

________________________________
From: Adrian Chadd <[email protected]>
Sent: Wednesday, March 27, 2019 12:39:01 AM
To: Shivaprashanth H
Cc: Peter Jeremy; [email protected]
Subject: Re: loading the coredump file to memory

hi,

What's openbsd do exactly?


-adrian


On Tue, 26 Mar 2019 at 12:00, Shivaprashanth H 
<[email protected]<mailto:[email protected]>> 
wrote:
Two options. One to use coredump. Other to port from openbsd where hibernate is 
working fine

Get Outlook for Android<https://aka.ms/ghei36>

________________________________
From: Adrian Chadd <[email protected]<mailto:[email protected]>>
Sent: Wednesday, March 27, 2019 12:27:55 AM
To: Shivaprashanth H
Cc: Peter Jeremy; [email protected]<mailto:[email protected]>
Subject: Re: loading the coredump file to memory

woo!



-adrian


On Tue, 26 Mar 2019 at 11:55, Shivaprashanth H 
<[email protected]<mailto:[email protected]>> 
wrote:
Yes 😁

Get Outlook for Android<https://aka.ms/ghei36>

________________________________
From: Adrian Chadd <[email protected]<mailto:[email protected]>>
Sent: Wednesday, March 27, 2019 12:24:17 AM
To: Peter Jeremy
Cc: Shivaprashanth H; [email protected]<mailto:[email protected]>
Subject: Re: loading the coredump file to memory

... is someone trying to make suspend-to-disk work? :)


-adrian

On Tue, 26 Mar 2019 at 11:45, Peter Jeremy 
<[email protected]<mailto:[email protected]>> wrote:
On 2019-Mar-26 13:16:40 +0000, Shivaprashanth H 
<[email protected]<mailto:[email protected]>> 
wrote:
>using sysctl debug.kdb.panic=1 command, panic can be simulated which results 
>in system reboot and writing of system context(ram snapshot?) to a file 
>vmcore.x in /var/crash
>
>my question is, will it be possible to load this file back into memory?

If you mean, can you take the crashdump and turn it back into a running system,
no that's not possible.  Maybe if you explain what your objective is, we might
be able to make suggestions.

(And, I'm not sure how this relates to ACPI).
--
Peter Jeremy
Disclaimer: "This message is intended only for the designated recipient(s). It 
may contain confidential or proprietary information and may be subject to other 
confidentiality protections. If you are not a designated recipient, you may not 
review, copy or distribute this message. Please notify the sender by e-mail and 
delete this message. GlobalEdge does not accept any liability for virus 
infected mails."
Disclaimer: "This message is intended only for the designated recipient(s). It 
may contain confidential or proprietary information and may be subject to other 
confidentiality protections. If you are not a designated recipient, you may not 
review, copy or distribute this message. Please notify the sender by e-mail and 
delete this message. GlobalEdge does not accept any liability for virus 
infected mails."
Disclaimer: "This message is intended only for the designated recipient(s). It 
may contain confidential or proprietary information and may be subject to other 
confidentiality protections. If you are not a designated recipient, you may not 
review, copy or distribute this message. Please notify the sender by e-mail and 
delete this message. GlobalEdge does not accept any liability for virus 
infected mails."
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-acpi
To unsubscribe, send any mail to "[email protected]"

Reply via email to