]> git.ipfire.org Git - thirdparty/qemu.git/commit
hw/nvram/fw_cfg: Store 'reboot-timeout' as little endian
authorLi Qiang <liq3ea@163.com>
Wed, 24 Apr 2019 14:06:41 +0000 (07:06 -0700)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Mon, 14 Oct 2019 23:30:11 +0000 (18:30 -0500)
commit306ecc0d24bebd724e766c147c28ccd384582b4f
tree5096531d4eb2b4c1c3add27cd01783c35df3ab40
parent1e821a0abc8c1b1914f55ffb6a265d381ad4946b
hw/nvram/fw_cfg: Store 'reboot-timeout' as little endian

The current codebase is not specific about the endianess of the
fw_cfg 'file' entry 'reboot-timeout'.

Per docs/specs/fw_cfg.txt:

  === All Other Data Items ===

  Please consult the QEMU source for the most up-to-date
  and authoritative list of selector keys and their respective
  items' purpose, format and writeability.

Checking the git history, this code was introduced in commit
ac05f3492421, very similar to commit 3d3b8303c6f8 for the
'boot-menu-wait' entry, which explicitely use little-endian.

OVMF consumes 'boot-menu-wait' as little-endian, however it does
not consume 'reboot-timeout'.

Regarding the git history and OVMF use, we choose to explicit
'reboot-timeout' endianess as little-endian.

Signed-off-by: Li Qiang <liq3ea@163.com>
Tested-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20190424140643.62457-4-liq3ea@163.com>
[PMD: Reword commit description based on review comments]
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
(cherry picked from commit 04da973501b591525ce68c2925c61c8886badd4d)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
hw/nvram/fw_cfg.c