1. 02 7月, 2018 1 次提交
  2. 26 6月, 2018 1 次提交
    • G
      ramfb: fix overflow · 6b9b3c1e
      Gerd Hoffmann 提交于
      > CID 1393621:    (OVERFLOW_BEFORE_WIDEN)
      > Potentially overflowing expression "stride * s->height" with type "unsigned
      > int" (32 bits, unsigned) is evaluated using +32-bit arithmetic, and then used
      > in a context that expects an expression of type "hwaddr" (64 bits, unsigned).
      
      Fix by changing stride from uint32_t to hwaddr.
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      Message-id: 20180626083120.19515-1-kraxel@redhat.com
      6b9b3c1e
  3. 18 6月, 2018 1 次提交
    • G
      hw/display: add ramfb, a simple boot framebuffer living in guest ram · 995b3017
      Gerd Hoffmann 提交于
      The boot framebuffer is expected to be configured by the firmware, so it
      uses fw_cfg as interface.  Initialization goes as follows:
      
        (1) Check whenever etc/ramfb is present.
        (2) Allocate framebuffer from RAM.
        (3) Fill struct RAMFBCfg, write it to etc/ramfb.
      
      Done.  You can write stuff to the framebuffer now, and it should appear
      automagically on the screen.
      
      Note that this isn't very efficient because it does a full display
      update on each refresh.  No dirty tracking.  Dirty tracking would have
      to be active for the whole ram slot, so that wouldn't be very efficient
      either.  For a boot display which is active for a short time only this
      isn't a big deal.  As permanent guest display something better should be
      used (if possible).
      
      This is the ramfb core code.  Some windup is needed for display devices
      which want have a ramfb boot display.
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      Tested-by: NLaszlo Ersek <lersek@redhat.com>
      Message-id: 20180613122948.18149-2-kraxel@redhat.com
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      995b3017