Kevin O'Connor | 1 Aug 2010 21:44

[PATCH][QEMU] Load "bootsplash.jpg" if present

Load the "bootsplash.jpg" file into fw_cfg if it is found in the roms
directory.

--- a/hw/fw_cfg.c
+++ b/hw/fw_cfg.c
 <at>  <at>  -304,8 +304,12  <at>  <at>  int fw_cfg_add_file(FWCfgState *s,  const char *dir, const char 
*filename,
         basename = filename;
     }

-    snprintf(s->files->f[index].name, sizeof(s->files->f[index].name),
-             "%s/%s", dir, basename);
+    if (dir && dir[0])
+        snprintf(s->files->f[index].name, sizeof(s->files->f[index].name),
+                 "%s/%s", dir, basename);
+    else
+        strncpy(s->files->f[index].name, basename,
+                sizeof(s->files->f[index].name));
     for (i = 0; i < index; i++) {
         if (strcmp(s->files->f[index].name, s->files->f[i].name) == 0) {
             FW_CFG_DPRINTF("%s: skip duplicate: %s\n", __FUNCTION__,
diff --git a/hw/pc.c b/hw/pc.c
index 58dea57..6893799 100644
--- a/hw/pc.c
+++ b/hw/pc.c
 <at>  <at>  -54,6 +54,7  <at>  <at> 
 #endif

 #define BIOS_FILENAME "bios.bin"
+#define BOOTSPLASH_FILENAME "bootsplash.jpg"
(Continue reading)

Kevin O'Connor | 1 Aug 2010 21:45

[PATCH][SEABIOS] Allow qemu to use bootsplash code via fwcfg interface.

Allow the bootsplash code to pull the jpeg file from either cbfs (on
coreboot) or fwcfg (on qemu).

diff --git a/src/bootsplash.c b/src/bootsplash.c
index 676ece3..1dcd402 100644
--- a/src/bootsplash.c
+++ b/src/bootsplash.c
 <at>  <at>  -11,14 +11,14  <at>  <at> 
 #include "util.h" // dprintf
 #include "jpeg.h" // splash
 #include "biosvar.h" // SET_EBDA
+#include "paravirt.h" // romfile_find

 
 /****************************************************************
  * VESA structures
  ****************************************************************/

-struct vesa_info
-{
+struct vesa_info {
     u32 vesa_signature;
     u16 vesa_version;
     struct segoff_s oem_string_ptr;
 <at>  <at>  -36,8 +36,7  <at>  <at>  struct vesa_info
 #define VESA_SIGNATURE 0x41534556 // VESA
 #define VBE2_SIGNATURE 0x32454256 // VBE2

-struct vesa_mode_info
-{
(Continue reading)

Kevin O'Connor | 1 Aug 2010 21:56

[PATCH][SEABIOS] Allow qemu to use bootsplash code via fwcfg interface.

On Sun, Aug 01, 2010 at 03:45:34PM -0400, Kevin O'Connor wrote:
> Allow the bootsplash code to pull the jpeg file from either cbfs (on
> coreboot) or fwcfg (on qemu).

FYI, I've pushed this patch (and the previous series) into SeaBIOS
git.

-Kevin

Kevin O'Connor | 1 Aug 2010 21:42

[PATCH] Enable SeaBIOS bootsplash in qemu

These two patches enable qemu to use the recently added SeaBIOS
bootsplash code.  The first patch is for SeaBIOS - it enables finding
the "bootsplash.jpg" file from either CBFS (on coreboot) or fw_cfg (on
QEMU).  The second patch is for qemu - it enables loading a
"bootsplash.jpg" file into fw_cfg from the bios roms directory if the
file is present.

Some notes:

This uses the qemu "rom" interface for loading the jpeg file.  It
seems to work, but I'm not sure if this is strictly correct.

The jpeg viewer in SeaBIOS will look at the image size and try to find
a vesa graphics mode that supports that size.  So, choose images that
are exactly 640x480, 1024x768, etc.  Also, the SeaBIOS viewer has
stripped down support for jpegs - not all valid jpegs will work.  Some
quick tests with the netpbm tools worked okay for me.

SeaBIOS only shows the bootsplash during the interval between vgabios
init and OS execution.  This is generally too short a time to be seen.
Add "-menu boot=on" to the qemu command line to have it shown longer.

Unfortunately, the vgabios doesn't support writing text to the screen
while in a vesa video mode.  So, this means that if a user selects F12
for the boot menu, they can't actually see the boot menu.  This will
need to be fixed in SeaBIOS in a follow up patch.

-Kevin

(Continue reading)

Liu, Jinsong | 2 Aug 2010 04:41
Picon
Favicon

Alt SeaBIOS SSDT cpu hotplug

Kevin,

This patch still has issue, 
It can boot Windows 2008 DataCenter, however,
when run "cpu_set cpu online" command, windows 2008 Datacenter system shutdown at once.

Thanks,
Jinsong

> 
> Sorry about that.  It looks like I messed up the SSDT ScopeOp length.
> New patch attached below.  I've tested it by adding/removing cpus on
> Linux, and I've now also boot tested winxp and winvista.  (I don't
> have Windows 2008 DataCenter.)
> 
> -Kevin
> 
> 
> diff --git a/src/acpi-dsdt.dsl b/src/acpi-dsdt.dsl
> index cc31112..640716c 100644
> --- a/src/acpi-dsdt.dsl
> +++ b/src/acpi-dsdt.dsl
>  <at>  <at>  -648,6 +648,78  <at>  <at>  DefinitionBlock (
>          Zero   /* reserved */
>      })
> 
> +    /* CPU hotplug */
> +    Scope(\_SB) {
> +        /* Objects filled in by run-time generated SSDT */
> +        External(NTFY, MethodObj)
(Continue reading)

Kevin O'Connor | 2 Aug 2010 07:49

Alt SeaBIOS SSDT cpu hotplug

On Mon, Aug 02, 2010 at 10:41:39AM +0800, Liu, Jinsong wrote:
> Kevin,
> 
> This patch still has issue, It can boot Windows 2008 DataCenter,
> however, when run "cpu_set cpu online" command, windows 2008
> Datacenter system shutdown at once.

Thanks for testing.

I've inspected the generated DSDT and SSDT files, and I don't see
anything wrong with them.  (To inspect a generated SSDT, uncomment the
call to hexdump(), cut and paste the hexdump output into SeaBIOS'
tools/transdump.py, and then call "iasl -d" on the output.)

It seems the Windows acpi interpreter is significantly different from
the Linux one.  The only guess I have is that Windows doesn't like one
of the ASL constructs even though they all look valid.  I'd try to
debug this by commenting out parts of the ASL until I narrowed down
the parts causing the problem.  Unfortunately, I don't have Windows
2008 to do this directly.

Any other ideas?

-Kevin

Alexander Graf | 2 Aug 2010 10:12
Picon

Alt SeaBIOS SSDT cpu hotplug


On 02.08.2010, at 07:49, Kevin O'Connor wrote:

> On Mon, Aug 02, 2010 at 10:41:39AM +0800, Liu, Jinsong wrote:
>> Kevin,
>> 
>> This patch still has issue, It can boot Windows 2008 DataCenter,
>> however, when run "cpu_set cpu online" command, windows 2008
>> Datacenter system shutdown at once.
> 
> Thanks for testing.
> 
> I've inspected the generated DSDT and SSDT files, and I don't see
> anything wrong with them.  (To inspect a generated SSDT, uncomment the
> call to hexdump(), cut and paste the hexdump output into SeaBIOS'
> tools/transdump.py, and then call "iasl -d" on the output.)
> 
> It seems the Windows acpi interpreter is significantly different from
> the Linux one.  The only guess I have is that Windows doesn't like one
> of the ASL constructs even though they all look valid.  I'd try to
> debug this by commenting out parts of the ASL until I narrowed down
> the parts causing the problem.  Unfortunately, I don't have Windows
> 2008 to do this directly.
> 
> Any other ideas?

Just grab yourself a free copy of the Hyper-V server 2008:

http://arstechnica.com/microsoft/news/2009/08/microsoft-hyper-v-server-2008-r2-arrives-for-free.ars

(Continue reading)

Kevin O'Connor | 2 Aug 2010 17:55

Alt SeaBIOS SSDT cpu hotplug

On Mon, Aug 02, 2010 at 10:12:31AM +0200, Alexander Graf wrote:
> On 02.08.2010, at 07:49, Kevin O'Connor wrote:
> > On Mon, Aug 02, 2010 at 10:41:39AM +0800, Liu, Jinsong wrote:
> > It seems the Windows acpi interpreter is significantly different from
> > the Linux one.  The only guess I have is that Windows doesn't like one
> > of the ASL constructs even though they all look valid.  I'd try to
> > debug this by commenting out parts of the ASL until I narrowed down
> > the parts causing the problem.  Unfortunately, I don't have Windows
> > 2008 to do this directly.
> > 
> > Any other ideas?
> 
> Just grab yourself a free copy of the Hyper-V server 2008:
> 
> http://arstechnica.com/microsoft/news/2009/08/microsoft-hyper-v-server-2008-r2-arrives-for-free.ars

I downloaded and installed it, but I can't reproduce the crash.  It
seems like a really stripped down version of Windows, so I can't tell
if it actually worked or not either.

-Kevin

Avi Kivity | 2 Aug 2010 18:13
Picon
Favicon

Alt SeaBIOS SSDT cpu hotplug

  On 08/02/2010 06:55 PM, Kevin O'Connor wrote:
> On Mon, Aug 02, 2010 at 10:12:31AM +0200, Alexander Graf wrote:
>> On 02.08.2010, at 07:49, Kevin O'Connor wrote:
>>> On Mon, Aug 02, 2010 at 10:41:39AM +0800, Liu, Jinsong wrote:
>>> It seems the Windows acpi interpreter is significantly different from
>>> the Linux one.  The only guess I have is that Windows doesn't like one
>>> of the ASL constructs even though they all look valid.  I'd try to
>>> debug this by commenting out parts of the ASL until I narrowed down
>>> the parts causing the problem.  Unfortunately, I don't have Windows
>>> 2008 to do this directly.
>>>
>>> Any other ideas?
>> Just grab yourself a free copy of the Hyper-V server 2008:
>>
>> http://arstechnica.com/microsoft/news/2009/08/microsoft-hyper-v-server-2008-r2-arrives-for-free.ars
> I downloaded and installed it, but I can't reproduce the crash.  It
> seems like a really stripped down version of Windows, so I can't tell
> if it actually worked or not either.

I thought only the Datacenter edition supported cpu hotplug.

--

-- 
error compiling committee.c: too many arguments to function

Alexander Graf | 2 Aug 2010 18:10
Picon

Alt SeaBIOS SSDT cpu hotplug


On 02.08.2010, at 17:55, Kevin O'Connor wrote:

> On Mon, Aug 02, 2010 at 10:12:31AM +0200, Alexander Graf wrote:
>> On 02.08.2010, at 07:49, Kevin O'Connor wrote:
>>> On Mon, Aug 02, 2010 at 10:41:39AM +0800, Liu, Jinsong wrote:
>>> It seems the Windows acpi interpreter is significantly different from
>>> the Linux one.  The only guess I have is that Windows doesn't like one
>>> of the ASL constructs even though they all look valid.  I'd try to
>>> debug this by commenting out parts of the ASL until I narrowed down
>>> the parts causing the problem.  Unfortunately, I don't have Windows
>>> 2008 to do this directly.
>>> 
>>> Any other ideas?
>> 
>> Just grab yourself a free copy of the Hyper-V server 2008:
>> 
>> http://arstechnica.com/microsoft/news/2009/08/microsoft-hyper-v-server-2008-r2-arrives-for-free.ars
> 
> I downloaded and installed it, but I can't reproduce the crash.  It
> seems like a really stripped down version of Windows, so I can't tell
> if it actually worked or not either.

I haven't tried for a while now, but last time I used that stripped down version I could log in as
administrator. Maybe it was through RDP only. But from there it was almost a fully functional copy of
Windows that certainly sufficed to do simple functionality tests.

Alex

(Continue reading)


Gmane