<feed xmlns='http://www.w3.org/2005/Atom'>
<title>bwlp/qemu.git/pc-bios/s390-ccw/bootmap.h, branch spice_video_codecs</title>
<subtitle>Experimental fork of QEMU with video encoding patches</subtitle>
<id>https://git.openslx.org/bwlp/qemu.git/atom/pc-bios/s390-ccw/bootmap.h?h=spice_video_codecs</id>
<link rel='self' href='https://git.openslx.org/bwlp/qemu.git/atom/pc-bios/s390-ccw/bootmap.h?h=spice_video_codecs'/>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/'/>
<updated>2020-10-06T17:57:35+00:00</updated>
<entry>
<title>pc-bios: s390x: Fix bootmap.c zipl component entry data handling</title>
<updated>2020-10-06T17:57:35+00:00</updated>
<author>
<name>Janosch Frank</name>
</author>
<published>2020-10-06T09:42:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=4906a4e41c29b65ad350736e0a989e5cf3387baf'/>
<id>urn:sha1:4906a4e41c29b65ad350736e0a989e5cf3387baf</id>
<content type='text'>
The two main types of zipl component entries are execute and
load/data. The last member of the component entry struct therefore
denotes either a PSW or an address. Let's make this a bit more clear
by introducing a union and cleaning up the code that uses that struct
member.

The execute type component entries written by zipl contain short PSWs,
not addresses. Let's mask them and only pass the address part to
jump_to_IPL_code(uint64_t address) because it expects an address as
visible by the name of the argument.

Signed-off-by: Janosch Frank &lt;frankja@linux.ibm.com&gt;
Reviewed-by: Thomas Huth &lt;thuth@redhat.com&gt;
Message-Id: &lt;20201006094249.50640-2-frankja@linux.ibm.com&gt;
Signed-off-by: Thomas Huth &lt;thuth@redhat.com&gt;
</content>
</entry>
<entry>
<title>misc: Replace zero-length arrays with flexible array member (automatic)</title>
<updated>2020-03-16T21:07:42+00:00</updated>
<author>
<name>Philippe Mathieu-Daudé</name>
</author>
<published>2020-03-04T15:38:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=f7795e4096d8bd1c767c5ddb450fa859ff20490e'/>
<id>urn:sha1:f7795e4096d8bd1c767c5ddb450fa859ff20490e</id>
<content type='text'>
Description copied from Linux kernel commit from Gustavo A. R. Silva
(see [3]):

--v-- description start --v--

  The current codebase makes use of the zero-length array language
  extension to the C90 standard, but the preferred mechanism to
  declare variable-length types such as these ones is a flexible
  array member [1], introduced in C99:

  struct foo {
      int stuff;
      struct boo array[];
  };

  By making use of the mechanism above, we will get a compiler
  warning in case the flexible array does not occur last in the
  structure, which will help us prevent some kind of undefined
  behavior bugs from being unadvertenly introduced [2] to the
  Linux codebase from now on.

--^-- description end --^--

Do the similar housekeeping in the QEMU codebase (which uses
C99 since commit 7be41675f7cb).

All these instances of code were found with the help of the
following Coccinelle script:

  @@
  identifier s, m, a;
  type t, T;
  @@
   struct s {
      ...
      t m;
  -   T a[0];
  +   T a[];
  };
  @@
  identifier s, m, a;
  type t, T;
  @@
   struct s {
      ...
      t m;
  -   T a[0];
  +   T a[];
   } QEMU_PACKED;

[1] https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html
[2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=76497732932f
[3] https://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux.git/commit/?id=17642a2fbd2c1

Inspired-by: Gustavo A. R. Silva &lt;gustavo@embeddedor.com&gt;
Reviewed-by: David Hildenbrand &lt;david@redhat.com&gt;
Signed-off-by: Philippe Mathieu-Daudé &lt;philmd@redhat.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
<entry>
<title>s390-bios: Skip bootmap signature entries</title>
<updated>2019-05-08T08:52:14+00:00</updated>
<author>
<name>Jason J. Herne</name>
</author>
<published>2019-04-29T13:09:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=2497b4a3c08426122d1a89b808c669a734469e5a'/>
<id>urn:sha1:2497b4a3c08426122d1a89b808c669a734469e5a</id>
<content type='text'>
Newer versions of zipl have the ability to write signature entries to the boot
script for secure boot. We don't yet support secure boot, but we need to skip
over signature entries while reading the boot script in order to maintain our
ability to boot guest operating systems that have a secure bootloader.

Signed-off-by: Jason J. Herne &lt;jjherne@linux.ibm.com&gt;
Reviewed-by: Farhan Ali &lt;alifm@linux.ibm.com&gt;
Message-Id: &lt;1556543381-12671-1-git-send-email-jjherne@linux.ibm.com&gt;
Signed-off-by: Thomas Huth &lt;thuth@redhat.com&gt;
</content>
</entry>
<entry>
<title>pc-bios/s390-ccw/net: Use diag308 to reset machine before jumping to the OS</title>
<updated>2018-05-02T09:27:14+00:00</updated>
<author>
<name>Thomas Huth</name>
</author>
<published>2018-04-20T09:30:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=9a848adf45d6732e62551decb3c0255173090767'/>
<id>urn:sha1:9a848adf45d6732e62551decb3c0255173090767</id>
<content type='text'>
The netboot firmware so far simply jumped directly into the OS kernel
after the download has been completed. This, however, bears the risk
that the virtio-net device still might be active in the background and
incoming packets are still placed into the buffers - which could destroy
memory of the now-running Linux kernel in case it did not take over the
device fast enough. Also the SCLP console is not put into a well-defined
state here. We should hand over the system in a clean state when jumping
into the kernel, so let's use the same mechanism as it's done in the
main s390-ccw firmware and reset the machine with diag308 into a clean
state before jumping into the OS kernel code. To be able to share the
code with the main s390-ccw firmware, the related functions are now
extracted from bootmap.c into a new file called jump2ipl.c.

Since we now also set the boot device schid at address 184 for the network
boot device, this patch also slightly changes the way how we detect the
entry points for non-ELF binary images: The code now looks for the "S390EP"
magic first and then jumps to 0x10000 in case it has been found. This is
necessary for booting from network devices, since the normal kernel code
(where the PSW at ddress 0 points to) tries to do a block load from the
boot device. This of course fails for a virtio-net device and causes the
kernel to abort with a panic-PSW silently.

Acked-by: Christian Borntraeger &lt;borntraeger@de.ibm.com&gt;
Signed-off-by: Thomas Huth &lt;thuth@redhat.com&gt;
</content>
</entry>
<entry>
<title>pc-bios/s390-ccw: rename MAX_TABLE_ENTRIES to MAX_BOOT_ENTRIES</title>
<updated>2018-05-02T09:27:14+00:00</updated>
<author>
<name>Collin Walling</name>
</author>
<published>2018-04-16T16:56:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=6df2a829dfacfbf10a78199ad4b023a7ea65d9cd'/>
<id>urn:sha1:6df2a829dfacfbf10a78199ad4b023a7ea65d9cd</id>
<content type='text'>
The MAX_TABLE_ENTRIES constant has a name that is too generic. As we
want to declare a limit for boot menu entries, let's rename it to a more
fitting MAX_BOOT_ENTRIES and set its value to 31 (30 boot entries and
1 default entry). Also we move it from bootmap.h to s390-ccw.h to make
it available for menu.c in a later patch.

Signed-off-by: Collin Walling &lt;walling@linux.ibm.com&gt;
Reviewed-by: Thomas Huth &lt;thuth@redhat.com&gt;
Reviewed-by: Janosch Frank &lt;frankja@linux.ibm.com&gt;
Signed-off-by: Thomas Huth &lt;thuth@redhat.com&gt;
</content>
</entry>
<entry>
<title>pc-bios/s390-ccw: Move string arrays from bootmap header to .c file</title>
<updated>2018-03-08T14:49:23+00:00</updated>
<author>
<name>Thomas Huth</name>
</author>
<published>2018-03-06T06:18:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=6af978ae8b2912ec0c608402b8bedd60e85fa3a0'/>
<id>urn:sha1:6af978ae8b2912ec0c608402b8bedd60e85fa3a0</id>
<content type='text'>
bootmap.h can currently only be included once - otherwise the linker
complains about multiple definitions of the "magic" strings. It's a
bad style to define string arrays in header files, so let's better
move these to the bootmap.c file instead where they are used.

Signed-off-by: Thomas Huth &lt;thuth@redhat.com&gt;
Message-Id: &lt;1520317081-5341-1-git-send-email-thuth@redhat.com&gt;
Reviewed-by: Christian Borntraeger &lt;borntraeger@de.ibm.com&gt;
Signed-off-by: Cornelia Huck &lt;cohuck@redhat.com&gt;
</content>
</entry>
<entry>
<title>s390-ccw: read stage2 boot loader data to find menu</title>
<updated>2018-02-26T06:56:55+00:00</updated>
<author>
<name>Collin L. Walling</name>
</author>
<published>2018-02-23T15:43:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=ba831b25262aa3d0c6d5eb0cd530487d3cb05493'/>
<id>urn:sha1:ba831b25262aa3d0c6d5eb0cd530487d3cb05493</id>
<content type='text'>
Read the stage2 boot loader data block-by-block. We scan the
current block for the string "zIPL" to detect the start of the
boot menu banner. We then load the adjacent blocks (previous
block and next block) to account for the possibility of menu
data spanning multiple blocks.

Signed-off-by: Collin L. Walling &lt;walling@linux.vnet.ibm.com&gt;
Reviewed-by: Thomas Huth &lt;thuth@redhat.com&gt;
Signed-off-by: Thomas Huth &lt;thuth@redhat.com&gt;
</content>
</entry>
<entry>
<title>s390-ccw: update libc</title>
<updated>2018-02-26T06:56:54+00:00</updated>
<author>
<name>Collin L. Walling</name>
</author>
<published>2018-02-23T15:43:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=fc0e208774364c2a8013aa028b742a8dde6d2c2b'/>
<id>urn:sha1:fc0e208774364c2a8013aa028b742a8dde6d2c2b</id>
<content type='text'>
Moved:
  memcmp from bootmap.h to libc.h (renamed from _memcmp)
  strlen from sclp.c to libc.h (renamed from _strlen)

Added C standard functions:
  isdigit

Added non C-standard function:
  uitoa
  atoui

Signed-off-by: Collin L. Walling &lt;walling@linux.vnet.ibm.com&gt;
Acked-by: Christian Borntraeger &lt;borntraeger@de.ibm.com&gt;
Reviewed-by: Janosch Frank &lt;frankja@linux.vnet.ibm.com&gt;
Reviewed-by: Thomas Huth &lt;thuth@redhat.com&gt;
Signed-off-by: Thomas Huth &lt;thuth@redhat.com&gt;
</content>
</entry>
<entry>
<title>s390-ccw: refactor IPL structs</title>
<updated>2018-02-26T06:56:54+00:00</updated>
<author>
<name>Collin L. Walling</name>
</author>
<published>2018-02-23T15:43:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=ac4c5958b1e6165971303cb02598b190485481f5'/>
<id>urn:sha1:ac4c5958b1e6165971303cb02598b190485481f5</id>
<content type='text'>
ECKD DASDs have different IPL structures for CDL and LDL
formats. The current Ipl1 and Ipl2 structs follow the CDL
format, so we prepend "EckdCdl" to them. Boot info for LDL
has been moved to a new struct: EckdLdlIpl1.

Signed-off-by: Collin L. Walling &lt;walling@linux.vnet.ibm.com&gt;
Acked-by: Janosch Frank &lt;frankja@linux.vnet.ibm.com&gt;
Reviewed-by: Thomas Huth &lt;thuth@redhat.com&gt;
Acked-by: Christian Borntraeger &lt;borntraeger@de.ibm.com&gt;
Signed-off-by: Thomas Huth &lt;thuth@redhat.com&gt;
</content>
</entry>
<entry>
<title>s390-ccw: refactor eckd_block_num to use CHS</title>
<updated>2018-02-26T06:56:54+00:00</updated>
<author>
<name>Collin L. Walling</name>
</author>
<published>2018-02-23T15:43:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=80beedcc387062a71c6563dfae0f607b396c2bfb'/>
<id>urn:sha1:80beedcc387062a71c6563dfae0f607b396c2bfb</id>
<content type='text'>
Add new cylinder/head/sector struct. Use it to calculate
eckd block numbers instead of a BootMapPointer (which used
eckd chs anyway).

Signed-off-by: Collin L. Walling &lt;walling@linux.vnet.ibm.com&gt;
Reviewed-by: Thomas Huth &lt;thuth@redhat.com&gt;
Acked-by: Christian Borntraeger &lt;borntraeger@de.ibm.com&gt;
Signed-off-by: Thomas Huth &lt;thuth@redhat.com&gt;
</content>
</entry>
</feed>
