qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] add missing firmware configuration channel numbers to BIOS
@ 2008-12-21 23:49 Andre Przywara
  2008-12-22  6:29 ` Blue Swirl
  0 siblings, 1 reply; 4+ messages in thread
From: Andre Przywara @ 2008-12-21 23:49 UTC (permalink / raw)
  To: Anthony Liguori; +Cc: qemu-devel

Hi,

although we currently don't use firmware config channel
numbers higher than '0x02' in the PC-BIOS, add the channel
names to the BIOS source to mark already used entries.
This will make picking new number easier in the future.

Signed-off-by: Andre Przywara <andre.przywara@amd.com>

Regards,
Andre.
---
From: Andre Przywara <andre.przywara@amd.com>

     sync firmware configuration channel numbers between QEMU and BIOS

diff --git a/pc-bios/bios-pq/0006_fw_cfg_sync.patch b/pc-bios/bios-pq/0006_fw_cfg_sync.patch
new file mode 100644
index 0000000..9f958c0
--- /dev/null
+++ b/pc-bios/bios-pq/0006_fw_cfg_sync.patch
@@ -0,0 +1,19 @@
+From: Andre Przywara <andre.przywara@amd.com>
+
+    add missing qemu firmware configuration inferface channel numbers
+
+diff --git a/bios/rombios32.c b/bios/rombios32.c
+index f81b269..3d42528 100644
+--- a/bios/rombios32.c
++++ b/bios/rombios32.c
+@@ -413,6 +413,10 @@ unsigned long bios_table_end_addr;
+ #define QEMU_CFG_SIGNATURE  0x00
+ #define QEMU_CFG_ID         0x01
+ #define QEMU_CFG_UUID       0x02
++#define QEMU_CFG_RAM_SIZE   0x03
++#define QEMU_CFG_NOGRAPHIC  0x04
++#define QEMU_CFG_NB_CPUS    0x05
++#define QEMU_CFG_MACHINE_ID 0x06
+
+ int qemu_cfg_port;
+
diff --git a/pc-bios/bios-pq/series b/pc-bios/bios-pq/series
index 0e7558c..bf40a88 100644
--- a/pc-bios/bios-pq/series
+++ b/pc-bios/bios-pq/series
@@ -2,3 +2,4 @@
  0002_e820-high-mem.patch
  0003_smp-startup-poll.patch
  0005_hpet.patch
+0006_fw_cfg_sync.patch

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PATCH] add missing firmware configuration channel numbers to BIOS
  2008-12-21 23:49 [Qemu-devel] [PATCH] add missing firmware configuration channel numbers to BIOS Andre Przywara
@ 2008-12-22  6:29 ` Blue Swirl
  2008-12-22  9:36   ` Andre Przywara
  0 siblings, 1 reply; 4+ messages in thread
From: Blue Swirl @ 2008-12-22  6:29 UTC (permalink / raw)
  To: qemu-devel

On 12/22/08, Andre Przywara <andre.przywara@amd.com> wrote:
> Hi,
>
>  although we currently don't use firmware config channel
>  numbers higher than '0x02' in the PC-BIOS, add the channel
>  names to the BIOS source to mark already used entries.
>  This will make picking new number easier in the future.

Isn't it possible to use fw_cfg.h directly? To get just the constants,
you can use NO_QEMU_PROTOS.

This is how it is used in OpenBIOS/Sparc64 as an example:

http://tracker.coreboot.org/trac/openbios/browser/openbios-devel/arch/sparc64/entry.S#L14

http://tracker.coreboot.org/trac/openbios/browser/openbios-devel/arch/sparc64/openbios.c#L29

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PATCH] add missing firmware configuration channel numbers to BIOS
  2008-12-22  6:29 ` Blue Swirl
@ 2008-12-22  9:36   ` Andre Przywara
  2008-12-22 10:34     ` Blue Swirl
  0 siblings, 1 reply; 4+ messages in thread
From: Andre Przywara @ 2008-12-22  9:36 UTC (permalink / raw)
  To: qemu-devel

Blue Swirl wrote:
>>
>>  although we currently don't use firmware config channel
>>  numbers higher than '0x02' in the PC-BIOS, add the channel
>>  names to the BIOS source to mark already used entries.
>>  This will make picking new number easier in the future.
> 
> Isn't it possible to use fw_cfg.h directly? To get just the constants,
> you can use NO_QEMU_PROTOS.
Nice idea, but this would require to have the QEMU sources directly 
available when building the BIOS ROM. This is not a real problem, but 
would require to pull in the QEMU source path from the BOCHS autotools 
Makefile (with what default? Revert to the current code if no QEMU 
source path is given?). Currently you can build the BIOS independently 
with just the QEMU patches applied. If you (or Anthony) think this OK, 
I'd prepare a patch for this.

Regards,
Andre.

> 
> This is how it is used in OpenBIOS/Sparc64 as an example:
> 
> http://tracker.coreboot.org/trac/openbios/browser/openbios-devel/arch/sparc64/entry.S#L14
> 
> http://tracker.coreboot.org/trac/openbios/browser/openbios-devel/arch/sparc64/openbios.c#L29
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PATCH] add missing firmware configuration channel numbers to BIOS
  2008-12-22  9:36   ` Andre Przywara
@ 2008-12-22 10:34     ` Blue Swirl
  0 siblings, 0 replies; 4+ messages in thread
From: Blue Swirl @ 2008-12-22 10:34 UTC (permalink / raw)
  To: qemu-devel

On 12/22/08, Andre Przywara <andre.przywara@amd.com> wrote:
> Blue Swirl wrote:
>
> >
> > >
> > >  although we currently don't use firmware config channel
> > >  numbers higher than '0x02' in the PC-BIOS, add the channel
> > >  names to the BIOS source to mark already used entries.
> > >  This will make picking new number easier in the future.
> > >
> >
> > Isn't it possible to use fw_cfg.h directly? To get just the constants,
> > you can use NO_QEMU_PROTOS.
> >
>  Nice idea, but this would require to have the QEMU sources directly
> available when building the BIOS ROM. This is not a real problem, but would
> require to pull in the QEMU source path from the BOCHS autotools Makefile
> (with what default? Revert to the current code if no QEMU source path is
> given?). Currently you can build the BIOS independently with just the QEMU
> patches applied. If you (or Anthony) think this OK, I'd prepare a patch for
> this.

I'd just copy fw_cfg.h to BOCHS directory so that rombios32.c can
include it and remove the current #defines. That way Qemu sources are
not needed.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-12-22 10:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-21 23:49 [Qemu-devel] [PATCH] add missing firmware configuration channel numbers to BIOS Andre Przywara
2008-12-22  6:29 ` Blue Swirl
2008-12-22  9:36   ` Andre Przywara
2008-12-22 10:34     ` Blue Swirl

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).