On Sep 11, 2015, at 12:00 PM, qemu-discuss-request@nongnu.org wrote:
On 10/09/2015 8:58 AM, Maximilian H. wrote:
Hello,
I was looking into what parts would need change to save and restore the nvram content for the qemu-system-sparc vm between boots.
I see the code in hw/timer/m48t59.c that implements the nvram.
So some questions arise, and before I spend too much time poking around the still unknown code, I'd thought I ask first.
- Command line processing starts in vl.c in the main fct there ? Can I
add a command line argument there, say "-sparcnvram" ?
- In hw/timer/m48t59.c has no functionality that I see from having a
look at it (not in depth) to save or restore the nvram's contents for sparc. Is there a general facility that qemu has that provides such a functionality - i.e. is there a general qemu save and restore framework ?
- Is there an example somebody could point me to that implements
something similar ? Imitation is the sincerest of flattery ....
- All the alarm and watchdog functionality that the m48t08 provides, is
that used on sparc too ?
- Besides what is in
http://wiki.qemu.org/Documentation/GettingStartedDevelopers, is there some qemu coding documentation to make it faster for somebody unfamilar with qemu's code like me to be able to implement something ? I'd like to spend a few evenings on this, produce a patch and move on.
Thanks BR Max.
This sounds like a good idea. Having OpenBIOS settings actually be saved between boots would make things more real.
Mark, do you think it is possible for a QEMU command line option to actually load the saved OpenBIOS settings from a file and restore them into memory? I'm thinking something along the lines of -prom-memory <file name>.
Max, there is a project that you should probably look at called OpenBIOS. It implements an implementation of Open Firmware. Here is where more info can be found: http://www.openfirmware.info/Welcome_to_OpenBIOS. If you do want to implement this feature, it would help to know how the BIOS is implemented.
Le 11/09/2015 20:01, Programmingkid a écrit :
On Sep 11, 2015, at 12:00 PM, qemu-discuss-request@nongnu.org mailto:qemu-discuss-request@nongnu.org wrote:
On 10/09/2015 8:58 AM, Maximilian H. wrote:
Hello,
I was looking into what parts would need change to save and restore the nvram content for the qemu-system-sparc vm between boots.
I see the code in hw/timer/m48t59.c that implements the nvram.
So some questions arise, and before I spend too much time poking around the still unknown code, I'd thought I ask first.
- Command line processing starts in vl.c in the main fct there ? Can I
add a command line argument there, say "-sparcnvram" ?
- In hw/timer/m48t59.c has no functionality that I see from having a
look at it (not in depth) to save or restore the nvram's contents for sparc. Is there a general facility that qemu has that provides such a functionality - i.e. is there a general qemu save and restore framework ?
- Is there an example somebody could point me to that implements
something similar ? Imitation is the sincerest of flattery ....
- All the alarm and watchdog functionality that the m48t08 provides, is
that used on sparc too ?
- Besides what is in
http://wiki.qemu.org/Documentation/GettingStartedDevelopers, is there some qemu coding documentation to make it faster for somebody unfamilar with qemu's code like me to be able to implement something ? I'd like to spend a few evenings on this, produce a patch and move on.
Thanks BR Max.
This sounds like a good idea. Having OpenBIOS settings actually be saved between boots would make things more real.
Mark, do you think it is possible for a QEMU command line option to actually load the saved OpenBIOS settings from a file and restore them into memory? I'm thinking something along the lines of -prom-memory <file name>.
Nostalgia: a seven years old thread, out of date now:
https://lists.gnu.org/archive/html/qemu-devel/2008-05/msg00002.html
Max, there is a project that you should probably look at called OpenBIOS. It implements an implementation of Open Firmware. Here is where more info can be found: http://www.openfirmware.info/Welcome_to_OpenBIOS. If you do want to implement this feature, it would help to know how the BIOS is implemented.
Laurent
On Sep 11, 2015, at 4:09 PM, Laurent Vivier wrote:
Le 11/09/2015 20:01, Programmingkid a écrit :
On Sep 11, 2015, at 12:00 PM, qemu-discuss-request@nongnu.org mailto:qemu-discuss-request@nongnu.org wrote:
On 10/09/2015 8:58 AM, Maximilian H. wrote:
Hello,
I was looking into what parts would need change to save and restore the nvram content for the qemu-system-sparc vm between boots.
I see the code in hw/timer/m48t59.c that implements the nvram.
So some questions arise, and before I spend too much time poking around the still unknown code, I'd thought I ask first.
- Command line processing starts in vl.c in the main fct there ? Can I
add a command line argument there, say "-sparcnvram" ?
- In hw/timer/m48t59.c has no functionality that I see from having a
look at it (not in depth) to save or restore the nvram's contents for sparc. Is there a general facility that qemu has that provides such a functionality - i.e. is there a general qemu save and restore framework ?
- Is there an example somebody could point me to that implements
something similar ? Imitation is the sincerest of flattery ....
- All the alarm and watchdog functionality that the m48t08 provides, is
that used on sparc too ?
- Besides what is in
http://wiki.qemu.org/Documentation/GettingStartedDevelopers, is there some qemu coding documentation to make it faster for somebody unfamilar with qemu's code like me to be able to implement something ? I'd like to spend a few evenings on this, produce a patch and move on.
Thanks BR Max.
This sounds like a good idea. Having OpenBIOS settings actually be saved between boots would make things more real.
Mark, do you think it is possible for a QEMU command line option to actually load the saved OpenBIOS settings from a file and restore them into memory? I'm thinking something along the lines of -prom-memory <file name>.
Nostalgia: a seven years old thread, out of date now:
https://lists.gnu.org/archive/html/qemu-devel/2008-05/msg00002.html
Max, there is a project that you should probably look at called OpenBIOS. It implements an implementation of Open Firmware. Here is where more info can be found: http://www.openfirmware.info/Welcome_to_OpenBIOS. If you do want to implement this feature, it would help to know how the BIOS is implemented.
Laurent
Could you send the patch please?
Le 11/09/2015 23:07, Programmingkid a écrit :
On Sep 11, 2015, at 4:09 PM, Laurent Vivier wrote:
Le 11/09/2015 20:01, Programmingkid a écrit :
On Sep 11, 2015, at 12:00 PM, qemu-discuss-request@nongnu.org mailto:qemu-discuss-request@nongnu.org wrote:
On 10/09/2015 8:58 AM, Maximilian H. wrote:
Hello,
I was looking into what parts would need change to save and restore the nvram content for the qemu-system-sparc vm between boots.
I see the code in hw/timer/m48t59.c that implements the nvram.
So some questions arise, and before I spend too much time poking around the still unknown code, I'd thought I ask first.
- Command line processing starts in vl.c in the main fct there ? Can I
add a command line argument there, say "-sparcnvram" ?
- In hw/timer/m48t59.c has no functionality that I see from having a
look at it (not in depth) to save or restore the nvram's contents for sparc. Is there a general facility that qemu has that provides such a functionality - i.e. is there a general qemu save and restore framework ?
- Is there an example somebody could point me to that implements
something similar ? Imitation is the sincerest of flattery ....
- All the alarm and watchdog functionality that the m48t08 provides, is
that used on sparc too ?
- Besides what is in
http://wiki.qemu.org/Documentation/GettingStartedDevelopers, is there some qemu coding documentation to make it faster for somebody unfamilar with qemu's code like me to be able to implement something ? I'd like to spend a few evenings on this, produce a patch and move on.
Thanks BR Max.
This sounds like a good idea. Having OpenBIOS settings actually be saved between boots would make things more real.
Mark, do you think it is possible for a QEMU command line option to actually load the saved OpenBIOS settings from a file and restore them into memory? I'm thinking something along the lines of -prom-memory <file name>.
Nostalgia: a seven years old thread, out of date now:
https://lists.gnu.org/archive/html/qemu-devel/2008-05/msg00002.html
Max, there is a project that you should probably look at called OpenBIOS. It implements an implementation of Open Firmware. Here is where more info can be found: http://www.openfirmware.info/Welcome_to_OpenBIOS. If you do want to implement this feature, it would help to know how the BIOS is implemented.
Laurent
Could you send the patch please?
The patch is attached to the mail in the thread. Anyway, I don't think it applies now.
Laurent
On Sep 12, 2015, at 3:46 AM, Laurent Vivier wrote:
Le 11/09/2015 23:07, Programmingkid a écrit :
On Sep 11, 2015, at 4:09 PM, Laurent Vivier wrote:
Le 11/09/2015 20:01, Programmingkid a écrit :
On Sep 11, 2015, at 12:00 PM, qemu-discuss-request@nongnu.org mailto:qemu-discuss-request@nongnu.org wrote:
On 10/09/2015 8:58 AM, Maximilian H. wrote:
Hello,
I was looking into what parts would need change to save and restore the nvram content for the qemu-system-sparc vm between boots.
I see the code in hw/timer/m48t59.c that implements the nvram.
So some questions arise, and before I spend too much time poking around the still unknown code, I'd thought I ask first.
- Command line processing starts in vl.c in the main fct there ? Can I
add a command line argument there, say "-sparcnvram" ?
- In hw/timer/m48t59.c has no functionality that I see from having a
look at it (not in depth) to save or restore the nvram's contents for sparc. Is there a general facility that qemu has that provides such a functionality - i.e. is there a general qemu save and restore framework ?
- Is there an example somebody could point me to that implements
something similar ? Imitation is the sincerest of flattery ....
- All the alarm and watchdog functionality that the m48t08 provides, is
that used on sparc too ?
- Besides what is in
http://wiki.qemu.org/Documentation/GettingStartedDevelopers, is there some qemu coding documentation to make it faster for somebody unfamilar with qemu's code like me to be able to implement something ? I'd like to spend a few evenings on this, produce a patch and move on.
Thanks BR Max.
This sounds like a good idea. Having OpenBIOS settings actually be saved between boots would make things more real.
Mark, do you think it is possible for a QEMU command line option to actually load the saved OpenBIOS settings from a file and restore them into memory? I'm thinking something along the lines of -prom-memory <file name>.
Nostalgia: a seven years old thread, out of date now:
https://lists.gnu.org/archive/html/qemu-devel/2008-05/msg00002.html
Max, there is a project that you should probably look at called OpenBIOS. It implements an implementation of Open Firmware. Here is where more info can be found: http://www.openfirmware.info/Welcome_to_OpenBIOS. If you do want to implement this feature, it would help to know how the BIOS is implemented.
Laurent
Could you send the patch please?
The patch is attached to the mail in the thread. Anyway, I don't think it applies now.
Laurent
The extension on the patch is incorrectly set to .bin. Had to change it to .txt to make it work. Thanks. I don't have the original poster's email address so I can't send it to him. Hopefully he had read these emails and knows about it.
On 11/09/15 19:01, Programmingkid wrote:
On Sep 11, 2015, at 12:00 PM, qemu-discuss-request@nongnu.org mailto:qemu-discuss-request@nongnu.org wrote:
On 10/09/2015 8:58 AM, Maximilian H. wrote:
Hello,
I was looking into what parts would need change to save and restore the nvram content for the qemu-system-sparc vm between boots.
I see the code in hw/timer/m48t59.c that implements the nvram.
So some questions arise, and before I spend too much time poking around the still unknown code, I'd thought I ask first.
- Command line processing starts in vl.c in the main fct there ? Can I
add a command line argument there, say "-sparcnvram" ?
- In hw/timer/m48t59.c has no functionality that I see from having a
look at it (not in depth) to save or restore the nvram's contents for sparc. Is there a general facility that qemu has that provides such a functionality - i.e. is there a general qemu save and restore framework ?
- Is there an example somebody could point me to that implements
something similar ? Imitation is the sincerest of flattery ....
- All the alarm and watchdog functionality that the m48t08 provides, is
that used on sparc too ?
- Besides what is in
http://wiki.qemu.org/Documentation/GettingStartedDevelopers, is there some qemu coding documentation to make it faster for somebody unfamilar with qemu's code like me to be able to implement something ? I'd like to spend a few evenings on this, produce a patch and move on.
Thanks BR Max.
This sounds like a good idea. Having OpenBIOS settings actually be saved between boots would make things more real.
Mark, do you think it is possible for a QEMU command line option to actually load the saved OpenBIOS settings from a file and restore them into memory? I'm thinking something along the lines of -prom-memory <file name>.
Max, there is a project that you should probably look at called OpenBIOS. It implements an implementation of Open Firmware. Here is where more info can be found: http://www.openfirmware.info/Welcome_to_OpenBIOS. If you do want to implement this feature, it would help to know how the BIOS is implemented.
From memory the reason this hasn't been done is because the NVRAM
interface is used across multiple architectures and there hasn't been a solution devised that would work well enough for all of them. Then again as the BIOSs involved have continued to develop, it may be now that some of the issues can now be solved so it never hurts to ask on the -devel list.
May I ask why you want to save the NVRAM state between boots on SPARC? My guess would be that you're using a real SS-5 PROM image and looking to avoid having to type boot commands into the terminal after every reset. If this is the case then you may be pleasantly surprised using QEMU 2.4 with the built-in OpenBIOS as there were fixes applied during the last development cycle that were enough to allow SunOS 4.1.4 to boot.
If this solution works for you and you are keen use the alarm/watchdog features then there may be some scope to add the required features to QEMU/OpenBIOS in future.
ATB,
Mark.
On Sun, 13 Sep 2015, Mark Cave-Ayland wrote:
On 11/09/15 19:01, Programmingkid wrote:
Mark, do you think it is possible for a QEMU command line option to actually load the saved OpenBIOS settings from a file and restore them into memory? I'm thinking something along the lines of -prom-memory <file name>.
From memory the reason this hasn't been done is because the NVRAM
interface is used across multiple architectures and there hasn't been a solution devised that would work well enough for all of them. Then again as the BIOSs involved have continued to develop, it may be now that some of the issues can now be solved so it never hurts to ask on the -devel list.
I'm wondering, why wouldn't it be enough to memmap a nvram file instead of mallocing (or whatever) the memory area?
On Sep 13, 2015, at 5:50 PM, Bodo Eggert wrote:
On Sun, 13 Sep 2015, Mark Cave-Ayland wrote:
On 11/09/15 19:01, Programmingkid wrote:
Mark, do you think it is possible for a QEMU command line option to actually load the saved OpenBIOS settings from a file and restore them into memory? I'm thinking something along the lines of -prom-memory <file name>.
From memory the reason this hasn't been done is because the NVRAM
interface is used across multiple architectures and there hasn't been a solution devised that would work well enough for all of them. Then again as the BIOSs involved have continued to develop, it may be now that some of the issues can now be solved so it never hurts to ask on the -devel list.
I'm wondering, why wouldn't it be enough to memmap a nvram file instead of mallocing (or whatever) the memory area?
What advantage does mmap() have over malloc()? I think malloc() is a lot more familiar to use than mmap().
On Sun, 13 Sep 2015, Programmingkid wrote:
On Sep 13, 2015, at 5:50 PM, Bodo Eggert wrote:
On Sun, 13 Sep 2015, Mark Cave-Ayland wrote:
On 11/09/15 19:01, Programmingkid wrote:
Mark, do you think it is possible for a QEMU command line option to actually load the saved OpenBIOS settings from a file and restore them into memory? I'm thinking something along the lines of -prom-memory <file name>.
From memory the reason this hasn't been done is because the NVRAM
interface is used across multiple architectures and there hasn't been a solution devised that would work well enough for all of them. Then again as the BIOSs involved have continued to develop, it may be now that some of the issues can now be solved so it never hurts to ask on the -devel list.
I'm wondering, why wouldn't it be enough to memmap a nvram file instead of mallocing (or whatever) the memory area?
What advantage does mmap() have over malloc()? I think malloc() is a lot more familiar to use than mmap().
The advantage is that it's file-backed (optionally, but intended here). Everything you write into that memory area will be automatically saved and restored just like a nvram should be. At least, that's what the documentation promises, I never used it myself, therefore I ask.
On Sep 13, 2015, at 7:20 PM, Bodo Eggert wrote:
On Sun, 13 Sep 2015, Programmingkid wrote:
On Sep 13, 2015, at 5:50 PM, Bodo Eggert wrote:
On Sun, 13 Sep 2015, Mark Cave-Ayland wrote:
On 11/09/15 19:01, Programmingkid wrote:
Mark, do you think it is possible for a QEMU command line option to actually load the saved OpenBIOS settings from a file and restore them into memory? I'm thinking something along the lines of -prom-memory <file name>.
From memory the reason this hasn't been done is because the NVRAM
interface is used across multiple architectures and there hasn't been a solution devised that would work well enough for all of them. Then again as the BIOSs involved have continued to develop, it may be now that some of the issues can now be solved so it never hurts to ask on the -devel list.
I'm wondering, why wouldn't it be enough to memmap a nvram file instead of mallocing (or whatever) the memory area?
What advantage does mmap() have over malloc()? I think malloc() is a lot more familiar to use than mmap().
The advantage is that it's file-backed (optionally, but intended here). Everything you write into that memory area will be automatically saved and restored just like a nvram should be. At least, that's what the documentation promises, I never used it myself, therefore I ask.
You make mmap() sound good. Maybe we should use it.
On 14 September 2015 at 00:25, Programmingkid programmingkidx@gmail.com wrote:
On Sep 13, 2015, at 7:20 PM, Bodo Eggert wrote:
On Sun, 13 Sep 2015, Programmingkid wrote:
On Sep 13, 2015, at 5:50 PM, Bodo Eggert wrote:
On Sun, 13 Sep 2015, Mark Cave-Ayland wrote:
On 11/09/15 19:01, Programmingkid wrote:
Mark, do you think it is possible for a QEMU command line option to actually load the saved OpenBIOS settings from a file and restore them into memory? I'm thinking something along the lines of -prom-memory <file name>.
From memory the reason this hasn't been done is because the NVRAM
interface is used across multiple architectures and there hasn't been a solution devised that would work well enough for all of them. Then again as the BIOSs involved have continued to develop, it may be now that some of the issues can now be solved so it never hurts to ask on the -devel list.
I'm wondering, why wouldn't it be enough to memmap a nvram file instead of mallocing (or whatever) the memory area?
What advantage does mmap() have over malloc()? I think malloc() is a lot more familiar to use than mmap().
The advantage is that it's file-backed (optionally, but intended here). Everything you write into that memory area will be automatically saved and restored just like a nvram should be. At least, that's what the documentation promises, I never used it myself, therefore I ask.
You make mmap() sound good. Maybe we should use it.
Rather than reinventing the wheel I suggest looking at how QEMU already supports file-backed ROMs for other platforms...
thanks -- PMM