Proxmox and SeaBIOS additional parameters

zc1974

New Member
Jul 31, 2011
14
1
1
Is there any way I can modify the currently used BIOS with additional parameters as stated here http://forums.mydigitallife.info/thr...l=1#post351081 ? My servers has the latest SLIC tables, and I want to use our OEM OS disks to use these or at least have same feature; primarily the SLIC tables.

With VMWare you just add an additional parameter for a BIOS file, with XEN, it's similar. Can anyone point out how to do this with Proxmox? Thanks.
 
  • Like
Reactions: reghwdDRomj2015
You can use that 'args' configuration to pass arbitrary parameters to kvm. You edit /etc/qemu-server/<vmid>.conf and add a line like:

args: -acpitable sig=....


 
Dietmar,

From what you are explaining, I understand that I need to pass some parameters to the VMID.CONF file of the given KVM Guest. The problem is, what are those arguments? A couple posts (referenced above link) suggest it doesn't work so it says to use SeaBIOS modify method.

I was able to dump the ACPI Tables and the SLIC of my BIOS from Dell Servers using SLIC Toolkit, but at this point not exactly sure of where to go from here. I would like to try your suggestion, but what else do I need? A complete reference of only required parameters would be helpful.

The SLIC Toolkit allows me to view, dump, etc various BIOS data and details.
 
From what you are explaining, I understand that I need to pass some parameters to the VMID.CONF file of the given KVM Guest. The problem is, what are those arguments? A couple posts (referenced above link) suggest it doesn't work so it says to use SeaBIOS modify method.

Sorry, I never tried that myself.
 
From memory this is roughly how I did it..

apt-get build-dep seabios
apt-get source seabios

cd to seabios source

wget http://stuff.futile.net/seabios.patch

patch src/acpi.c seabios.patch

extract your SLIC tables to src/acpi-slic.hex

xxd -i /sys/firmware/acpi/tables/SLIC | grep -v len | sed 's/unsigned char.*/static char SLIC[] = {/' > src/acpi-slic.hex

fakeroot dpkg-buildpackage -b -uc -us

replace the file /usr/share/kvm/bios.bin with out/bios.bin
 
http://forums.mydigitallife.info/threads/12401-Modified-Bios-for-KVM-Qemu-Bochs-Bios/page2
http://mrtaz.net

Hi guys,


I patched acpi.c for that you don't need any mods to kvm/qemu soft.
It's a little hack of acpitable's parameters.
When sig 5L1C is sent, BIOS inserts directly "data" in acpi table but copy oem_id and oem_table_id in RSDT table too.


Like this : kvm -bios `patched bios` -acpitable sig=5L1C,data=`SLIC dump`


look my diff n http : / /mrtaz . net / mrtaz / bios . bin

Code:
--- acpi.c.orig    2011-12-24 18:03:11.346256959 +0100
+++ acpi.c    2011-12-24 17:58:07.368750605 +0100
@@ -628,6 +628,11 @@
 
     u16 i, external_tables = qemu_cfg_acpi_additional_tables();
 
+    #define SLIC_SIGNATURE 0x43494C53 // SLIC
+    #define HACK_SLIC_SIGNATURE 0x43314C35 // HACK SLIC
+    struct acpi_table_header *slic;
+    slic = 0;
+
     for(i = 0; i < external_tables; i++) {
         u16 len = qemu_cfg_next_acpi_table_len();
         void *addr = malloc_high(len);
@@ -635,7 +640,13 @@
             warn_noalloc();
             continue;
         }
-        ACPI_INIT_TABLE(qemu_cfg_next_acpi_table_load(addr, len));
+        struct acpi_table_header *acpi_ext_table;
+        acpi_ext_table = qemu_cfg_next_acpi_table_load(addr, len);
+        if (acpi_ext_table->signature == HACK_SLIC_SIGNATURE) {
+                acpi_ext_table = acpi_ext_table+1;
+                slic = acpi_ext_table;
+        }
+        ACPI_INIT_TABLE(acpi_ext_table);
         if (tbl_idx == MAX_ACPI_TABLES) {
             warn_noalloc();
             break;
@@ -653,7 +664,19 @@
     memset(rsdt, 0, rsdt_len);
     memcpy(rsdt->table_offset_entry, tables, sizeof(u32) * tbl_idx);
 
-    build_header((void*)rsdt, RSDT_SIGNATURE, rsdt_len, 1);
+    if (slic->signature == SLIC_SIGNATURE){
+        rsdt->signature = RSDT_SIGNATURE;
+        rsdt->length = cpu_to_le32(rsdt_len);
+        rsdt->revision = 1;
+        memcpy(rsdt->oem_id, slic->oem_id, 6);
+        memcpy(rsdt->oem_table_id, slic->oem_table_id, 8);
+        memcpy(rsdt->asl_compiler_id, CONFIG_APPNAME4, 4);
+        rsdt->oem_revision = cpu_to_le32(1);
+        rsdt->asl_compiler_revision = cpu_to_le32(1);
+        rsdt->checksum -= checksum(rsdt, rsdt_len);
+    } else {
+        build_header((void*)rsdt, RSDT_SIGNATURE, rsdt_len, 1);
+    }
 
     // Build rsdp pointer table
     memset(rsdp, 0, sizeof(*rsdp));

Thx for comments.
 
I modified MrTaz' patch to suit seabios 1.7.1

Code:
--- acpi.c.orig 2012-10-23 16:42:23.000000000 +0200
+++ acpi.c.171  2012-10-23 16:58:29.000000000 +0200
@@ -754,6 +754,11 @@
 
     u16 i, external_tables = qemu_cfg_acpi_additional_tables();
 
+    #define SLIC_SIGNATURE 0x43494C53 // SLIC
+    #define HACK_SLIC_SIGNATURE 0x43314C35 // HACK SLIC
+    struct acpi_table_header *slic;
+    slic = 0;
+
     for (i = 0; i < external_tables; i++) {
         u16 len = qemu_cfg_next_acpi_table_len();
         void *addr = malloc_high(len);
@@ -763,6 +768,12 @@
         }
         struct acpi_table_header *header =
             qemu_cfg_next_acpi_table_load(addr, len);
+
+        if (header->signature == HACK_SLIC_SIGNATURE) {
+                header = header+1;
+                slic = header;
+        }
+
         if (header->signature == DSDT_SIGNATURE) {
             if (fadt) {
                 fill_dsdt(fadt, addr);
@@ -796,7 +807,20 @@
     }
     memset(rsdt, 0, rsdt_len);
     memcpy(rsdt->table_offset_entry, tables, sizeof(u32) * tbl_idx);
-    build_header((void*)rsdt, RSDT_SIGNATURE, rsdt_len, 1);
+     
+    if (slic->signature == SLIC_SIGNATURE){
+        rsdt->signature = RSDT_SIGNATURE;
+        rsdt->length = cpu_to_le32(rsdt_len);
+        rsdt->revision = 1;
+        memcpy(rsdt->oem_id, slic->oem_id, 6);
+        memcpy(rsdt->oem_table_id, slic->oem_table_id, 8);
+        memcpy(rsdt->asl_compiler_id, CONFIG_APPNAME4, 4);
+        rsdt->oem_revision = cpu_to_le32(1);
+        rsdt->asl_compiler_revision = cpu_to_le32(1);
+        rsdt->checksum -= checksum(rsdt, rsdt_len);
+    } else {
+        build_header((void*)rsdt, RSDT_SIGNATURE, rsdt_len, 1);
+    }
 
     // Build rsdp pointer table
     struct rsdp_descriptor *rsdp = malloc_fseg(sizeof(*rsdp));
 
I have patch SeaBios 1.7.0 with MrTaz patch and it work great. I have tried the modified MrTaz' patch to suit seabios 1.7.1 and it didn't work for me. Does the code for the patch need any changes to use it ?
 
Hi
This is a patch for SeaBIOS 1.7.1. I have modified patch from post #6 this topic.
http://hiveliberty.org:60080/other/acpi_slic.patch
Put acpi-slic.patch and acpi-slic.hex into the src dir seabios and compile this.

UPD:
Code:
--- acpi.c	2012-08-31 20:12:45.000000000 +0400
+++ acpi.c	2012-11-13 14:39:59.000000000 +0400
@@ -212,6 +212,11 @@
 
 #include "acpi-dsdt.hex"
 
+#define CONFIG_OEM_SLIC
+#ifdef CONFIG_OEM_SLIC
+#include "acpi-slic.hex"
+#endif
+
 static void
 build_header(struct acpi_table_header *h, u32 sig, int len, u8 rev)
 {
@@ -224,6 +229,10 @@
     h->oem_revision = cpu_to_le32(1);
     memcpy(h->asl_compiler_id, CONFIG_APPNAME4, 4);
     h->asl_compiler_revision = cpu_to_le32(1);
+#ifdef CONFIG_OEM_SLIC
+    if (sig == RSDT_SIGNATURE)    // only RSDT is checked by win7 & vista
+      memcpy(h->oem_id, ((struct acpi_table_header*)SLIC)->oem_id, 14);
+#endif
     h->checksum -= checksum(h, len);
 }
 
@@ -752,6 +761,17 @@
     ACPI_INIT_TABLE(build_srat());
     ACPI_INIT_TABLE(build_pcihp());
 
+#ifdef CONFIG_OEM_SLIC
+    { void *buf = malloc_high(sizeof(SLIC));
+      if (!buf)
+        warn_noalloc();
+      else {
+        memcpy(buf, SLIC, sizeof(SLIC));
+        ACPI_INIT_TABLE(buf);
+      }
+    }
+#endif
+
     u16 i, external_tables = qemu_cfg_acpi_additional_tables();
 
     for (i = 0; i < external_tables; i++) {
 
Last edited:
Hi!

I', trying to compile one working patched bios for months now, have read dozens of threads, but couldn't get it to work, yet :(

Now i tried the solution as described by cmn, but iI can't even get past "apt-get build-dep seabios" as apt-get complains about a missing URI within my sources list. What do i have to change at sources.list? I don't know the URI, how could i find out?
And do I still need build-dep at all when using the patch by Mr.Taz?

Maybe someone could post a working step-by-step guide? That would be great!

Thank you in advance


 
Excuse me, I upload broken patch, now I fixed it. You can re-download patch.
You need download source seabios from this link:
http://code.coreboot.org/p/seabios/downloads/21/
and
extract your SLIC tables to src/acpi-slic.hex
xxd -i /sys/firmware/acpi/tables/SLIC | grep -v len | sed 's/unsigned char.*/static char SLIC[] = {/' > src/acpi-slic.hex
if you have slic-table in bios your server)
example of patching and building bios:
Code:
apt-get update
apt-get install build-essential iasl pve-headers-`uname -r`
cd
wget [URL]http://code.coreboot.org/p/seabios/downloads/get/seabios-1.7.1.tar.gz[/URL]
tar xzf sea*
mv seabios-1.7.1 seabios
cd ./seabios/src
wget  [URL]http://hiveliberty.org:60080/other/seabios/171/acpi_slic.patch[/URL]
put your file "acpi-slic.hex" there
cd ..
make
now you can take bios.bin from "/root/seabios/out" with slic-table

In attach I added patch for seabios 1.7.2.
And Link to acpi_slic.patch 1.7.2
 

Attachments

  • acpi_slic.zip
    732 bytes · Views: 72
  • acpi_slic172.zip
    783 bytes · Views: 88
Last edited:
I've been able to compile the new bios with the instructions you've provided, but using SLIC Toolkit is not able to see the SLIC information.

Do I need to pass in any variables in the XXX.conf file?

I know some versions of the patch look for args: -acpitable sig=5L1C,data='data dump'

Is this still the case?

Would data='/path/to/acpi-hex-file' work?

Excuse me, I upload broken patch, now I fixed it. You can re-download patch.
You need download source seabios from this link:
http://code.coreboot.org/p/seabios/downloads/21/
and

if you have slic-table in bios your server)
example of patching and building bios:
Code:
apt-get update
apt-get install build-essential iasl pve-headers-`uname -r`
cd
wget [URL]http://code.coreboot.org/p/seabios/downloads/get/seabios-1.7.1.tar.gz[/URL]
tar xzf sea*
mv seabios-1.7.1 seabios
cd ./seabios/src
wget  [URL]http://hiveliberty.org:60080/other/seabios/171/acpi_slic.patch[/URL]
put your file "acpi-slic.hex" there
cd ..
make
now you can take bios.bin from "/root/seabios/out" with slic-table

In attach I added patch for seabios 1.7.2.
And Link to acpi_slic.patch 1.7.2
 
James Coleman-Powell, this patch only for patching with hex-file that contain your acpi slic-table.
You don't need any arguments in conf-files. After patch and compile You must put bios.bin to the /usr/share/kvm. And start your vm ;)
You can use any hex-files with slic table.. or You can use any dumps of bios (of course, it would contain slic-table) for extract slic-table to the hex. It all depends on your imagination.
I am successfully using the patch for yourself)
 
Last edited:
Thanks for the reply, that's great! Still having some issue though :/

I've used SLIC Toolkit to extract my SLIC to a Bin file, then ran the following command to convert to Hex:

xxd -i source-bin-file.bin | grep -v len | sed 's/unsigned char.*/unsigned char SLIC[] = {/' > acpi-slic.hex

I've then put this in the scr folder for SeaBios alongside acpi_slic.patch

Then I issued the make command on the Seabios folder and replaced the bios.bin in /usr/share/kvm with this newly generated bios.bin in the out folder.

When booting into windows and running 'Slic Toolkit' It's erroring saying 'SLIC table not found' and I can find no reference of OEM IDs anywhere.

Do I need to patch acpi.c myself using the patch command, or is having acpi_slic.patch in the folder sufficient to have it applied at build time?

Am I doing something wrong?
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!