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

2005-03-06 Thread Rafael J. Wysocki
Hi, On Sunday, 6 of March 2005 20:41, Pavel Machek wrote: > Hi! > > > > Yes. I thought about using PG_nosave in the begining, but there's a > > > > > > > > BUG_ON(PageReserved(page) && PageNosave(page)); > > > > > > > > in swsusp.c:saveable() that I just didn't want to trigger. It seems to >

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

2005-03-06 Thread Pavel Machek
Hi! > > > Yes. I thought about using PG_nosave in the begining, but there's a > > > > > > BUG_ON(PageReserved(page) && PageNosave(page)); > > > > > > in swsusp.c:saveable() that I just didn't want to trigger. It seems to > > > me, > > > though, that we don't need it any more, do we? > > > > N

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

2005-03-06 Thread Rafael J. Wysocki
On Saturday, 5 of March 2005 00:41, Pavel Machek wrote: > Hi! > > > > Actually, take a look at Nigel's patch. He simply uses PageNosave > > > instead of PageLocked -- that is cleaner. > > > > Yes. I thought about using PG_nosave in the begining, but there's a > > > > BUG_ON(PageReserved(page) &

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

2005-03-05 Thread Rafael J. Wysocki
Hi, On Friday, 4 of March 2005 15:21, Nigel Cunningham wrote: [-- snip --] > > Will something like this patch help? > [-- snip --] I think that the changes below are unnecessary. free_all_bootmem() is actually called _before_ the loop in mem_init() in which PG_nosave is set for the first time,

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

2005-03-05 Thread Rafael J. Wysocki
Hi, On Saturday, 5 of March 2005 02:10, Nigel Cunningham wrote: > Hi. > > On Sat, 2005-03-05 at 10:41, Pavel Machek wrote: > > > non-RAM areas with PG_nosave, at least for sanity reasons (eg to be sure > > > that > > > we do not break things by dumping stuff to where we should not write to). > >

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

2005-03-04 Thread Bernard Blackham
On Sat, Mar 05, 2005 at 10:37:29AM +1100, Nigel Cunningham wrote: > On Sat, 2005-03-05 at 10:26, Rafael J. Wysocki wrote: > > Yes, I think I'll just port the Nigel's patch to x86-64. BTW, it's striking > > that we found similar solutions independently (I didn't know the Nigel's > > patch before :-

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

2005-03-04 Thread Nigel Cunningham
Hi. On Sat, 2005-03-05 at 10:41, Pavel Machek wrote: > > non-RAM areas with PG_nosave, at least for sanity reasons (eg to be sure > > that > > we do not break things by dumping stuff to where we should not write to). > > I'm not sure if it is not better to save & restore non-RAM areas, but > it

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

2005-03-04 Thread Nigel Cunningham
Hi. On Sat, 2005-03-05 at 10:26, Rafael J. Wysocki wrote: > Yes. I thought about using PG_nosave in the begining, but there's a > > BUG_ON(PageReserved(page) && PageNosave(page)); > > in swsusp.c:saveable() that I just didn't want to trigger. It seems to me, > though, that we don't need it any

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

2005-03-04 Thread Rafael J. Wysocki
Hi, On Friday, 4 of March 2005 21:11, 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

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

2005-03-04 Thread Pavel Machek
Hi! > > Actually, take a look at Nigel's patch. He simply uses PageNosave > > instead of PageLocked -- that is cleaner. > > Yes. I thought about using PG_nosave in the begining, but there's a > > BUG_ON(PageReserved(page) && PageNosave(page)); > > in swsusp.c:saveable() that I just didn't want

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

2005-03-04 Thread Pavel Machek
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

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

2005-03-04 Thread Nigel Cunningham
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 > > > > reserv

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

2005-03-04 Thread Nigel Cunningham
Hi. On Fri, 2005-03-04 at 22: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

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

2005-03-04 Thread Rafael J. Wysocki
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 mar

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

2005-03-04 Thread Pavel Machek
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

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

2005-03-03 Thread Rafael J. Wysocki
Hi, On Thursday, 3 of March 2005 00:54, Pavel Machek wrote: > Hi! > > > > > It seems that we write to the BIOS while moving the image, at least on > > > > my box, > > > > which is quite not correct, IMO. > > [-- snip --] > > > > > > > > IMO this may lead to unexpected results, like the mysterio

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

2005-03-02 Thread Pavel Machek
Hi! > > > It seems that we write to the BIOS while moving the image, at least on my > > > box, > > > which is quite not correct, IMO. > [-- snip --] > > > > > > IMO this may lead to unexpected results, like the mysterious reboots > > > during > > > resume. > > > > Well, I always thought that R

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

2005-03-02 Thread Rafael J. Wysocki
Hi, On Wednesday, 2 of March 2005 23:05, Pavel Machek wrote: > Hi! > [-- snip --] > > It seems that we write to the BIOS while moving the image, at least on my > > box, > > which is quite not correct, IMO. [-- snip --] > > > > IMO this may lead to unexpected results, like the mysterious reboot

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

2005-03-02 Thread Pavel Machek
Hi! > > > It sounds to me like we run at 2GHz from batteries at resume time, and > > > that causes bad things (tm), > [-- snip --] > > It seems that we write to the BIOS while moving the image, at least on my box, > which is quite not correct, IMO. ... > At the same time, from powernow-k8, I got