Re: BIOS overwritten during resume (was: Re: Asus L5D resume onbattery power)

From: Nigel Cunningham
Date: Fri Mar 04 2005 - 09:49:48 EST


Hi.

On Sat, 2005-03-05 at 00:15, Rafael J. Wysocki wrote:
> Hi,
>
> On Friday, 4 of March 2005 12:04, Pavel Machek wrote:
> > Hi!
> >
> > > > IIRC kernel code/data is marked as PageReserved(), that's why we need
> > > > to save that :(. Not sure what to do with data e820 marked as
> > > > reserved...
> > >
> > > Perhaps we need another page flag, like PG_readonly, and mark the pages
> > > reserved by the e820 as PG_reserved | PG_readonly (the same for the areas
> > > that are not returned by e820 at all). Would that be acceptable?
> >
> > This flags are little in the short supply, but being able to tell
> > kernel code from memory hole seems like "must have", so yes, that
> > looks ok.
> >
> > You could get subtle and reuse some other pageflag. I do not think
> > PG_reserved can have PG_locked... So using for example PG_locked for
> > this purpose should be okay.
>
> The following patch does this. It is only for x86-64 without
> CONFIG_DISCONTIGMEM, but it has no effect in other cases.

Oops! That's what you get for replying to earlier messages before you
read later ones! The patch I posted has been in use for quite a while,
so it might be helpful to compare anyway.

Regards,

Nigel

--
Nigel Cunningham
Software Engineer, Canberra, Australia
http://www.cyclades.com
Bus: +61 (2) 6291 9554; Hme: +61 (2) 6292 8028; Mob: +61 (417) 100 574

Maintainer of Suspend2 Kernel Patches http://softwaresuspend.berlios.de


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/