From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Rafael J. Wysocki" Subject: Re: [linux-pm] [RFC PATCH 0/4] save and restore ACPI NVS memory during hibernation Date: Wed, 9 Jul 2008 21:37:18 +0200 Message-ID: <200807092137.18966.rjw@sisk.pl> References: <1215051868.5628.32.camel@rzhang-dt.sh.intel.com> <20080708193752.GD8694@ucw.cz> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Return-path: Received: from ogre.sisk.pl ([217.79.144.158]:47818 "EHLO ogre.sisk.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751483AbYGITfc (ORCPT ); Wed, 9 Jul 2008 15:35:32 -0400 In-Reply-To: <20080708193752.GD8694@ucw.cz> Content-Disposition: inline Sender: linux-acpi-owner@vger.kernel.org List-Id: linux-acpi@vger.kernel.org To: Pavel Machek Cc: Zhang Rui , linux-pm , linux-acpi , linux-kernel On Tuesday, 8 of July 2008, Pavel Machek wrote: > Hi! > > > According to the ACPI spec, ACPI NVS memory region is required to > > be saved/restored by OS during hibernation. > > > > Section 15.3.2 ACPI Spec 3.0b, > > "OSPM will call the _PTS control method some time before entering > > a sleeping state, to allow the platform???s AML code to update > > this memory image before entering the sleeping state. > > After the system awakes from an S4 state, OSPM will restore this > > memory area and call the _WAK control method to enable the BIOS > > to reclaim its memory image." > > > > This patch set add the mechanism to save/restore ACPI NVS memory > > during hibernation. > > > > Patch 01: call platform_begin before swsusp_shrink_memory. > > So that we can allocate enough pages for ACPI NVS memory > > before shrink the memory. > > Why is it neccessary to allocate memory for a copy? We should be able > to save ACPI NVS area same way we are saving kernel pages, no? Because we want to restore it from the hibernated kernel (when it gets control back again). Thanks, Rafael