cachepc-linux

Fork of AMDESE/linux with modifications for CachePC side-channel attack
git clone https://git.sinitax.com/sinitax/cachepc-linux
Log | Files | Refs | README | LICENSE | sfeed.txt

dell_rbu.rst (5063B)


      1=========================================
      2Dell Remote BIOS Update driver (dell_rbu)
      3=========================================
      4
      5Purpose
      6=======
      7
      8Document demonstrating the use of the Dell Remote BIOS Update driver
      9for updating BIOS images on Dell servers and desktops.
     10
     11Scope
     12=====
     13
     14This document discusses the functionality of the rbu driver only.
     15It does not cover the support needed from applications to enable the BIOS to
     16update itself with the image downloaded in to the memory.
     17
     18Overview
     19========
     20
     21This driver works with Dell OpenManage or Dell Update Packages for updating
     22the BIOS on Dell servers (starting from servers sold since 1999), desktops
     23and notebooks (starting from those sold in 2005).
     24
     25Please go to  http://support.dell.com register and you can find info on
     26OpenManage and Dell Update packages (DUP).
     27
     28Libsmbios can also be used to update BIOS on Dell systems go to
     29https://linux.dell.com/libsmbios/ for details.
     30
     31Dell_RBU driver supports BIOS update using the monolithic image and packetized
     32image methods. In case of monolithic the driver allocates a contiguous chunk
     33of physical pages having the BIOS image. In case of packetized the app
     34using the driver breaks the image in to packets of fixed sizes and the driver
     35would place each packet in contiguous physical memory. The driver also
     36maintains a link list of packets for reading them back.
     37
     38If the dell_rbu driver is unloaded all the allocated memory is freed.
     39
     40The rbu driver needs to have an application (as mentioned above) which will
     41inform the BIOS to enable the update in the next system reboot.
     42
     43The user should not unload the rbu driver after downloading the BIOS image
     44or updating.
     45
     46The driver load creates the following directories under the /sys file system::
     47
     48	/sys/class/firmware/dell_rbu/loading
     49	/sys/class/firmware/dell_rbu/data
     50	/sys/devices/platform/dell_rbu/image_type
     51	/sys/devices/platform/dell_rbu/data
     52	/sys/devices/platform/dell_rbu/packet_size
     53
     54The driver supports two types of update mechanism; monolithic and packetized.
     55These update mechanism depends upon the BIOS currently running on the system.
     56Most of the Dell systems support a monolithic update where the BIOS image is
     57copied to a single contiguous block of physical memory.
     58
     59In case of packet mechanism the single memory can be broken in smaller chunks
     60of contiguous memory and the BIOS image is scattered in these packets.
     61
     62By default the driver uses monolithic memory for the update type. This can be
     63changed to packets during the driver load time by specifying the load
     64parameter image_type=packet.  This can also be changed later as below::
     65
     66	echo packet > /sys/devices/platform/dell_rbu/image_type
     67
     68In packet update mode the packet size has to be given before any packets can
     69be downloaded. It is done as below::
     70
     71	echo XXXX > /sys/devices/platform/dell_rbu/packet_size
     72
     73In the packet update mechanism, the user needs to create a new file having
     74packets of data arranged back to back. It can be done as follows:
     75The user creates packets header, gets the chunk of the BIOS image and
     76places it next to the packetheader; now, the packetheader + BIOS image chunk
     77added together should match the specified packet_size. This makes one
     78packet, the user needs to create more such packets out of the entire BIOS
     79image file and then arrange all these packets back to back in to one single
     80file.
     81
     82This file is then copied to /sys/class/firmware/dell_rbu/data.
     83Once this file gets to the driver, the driver extracts packet_size data from
     84the file and spreads it across the physical memory in contiguous packet_sized
     85space.
     86
     87This method makes sure that all the packets get to the driver in a single operation.
     88
     89In monolithic update the user simply get the BIOS image (.hdr file) and copies
     90to the data file as is without any change to the BIOS image itself.
     91
     92Do the steps below to download the BIOS image.
     93
     941) echo 1 > /sys/class/firmware/dell_rbu/loading
     952) cp bios_image.hdr /sys/class/firmware/dell_rbu/data
     963) echo 0 > /sys/class/firmware/dell_rbu/loading
     97
     98The /sys/class/firmware/dell_rbu/ entries will remain till the following is
     99done.
    100
    101::
    102
    103	echo -1 > /sys/class/firmware/dell_rbu/loading
    104
    105Until this step is completed the driver cannot be unloaded.
    106
    107Also echoing either mono, packet or init in to image_type will free up the
    108memory allocated by the driver.
    109
    110If a user by accident executes steps 1 and 3 above without executing step 2;
    111it will make the /sys/class/firmware/dell_rbu/ entries disappear.
    112
    113The entries can be recreated by doing the following::
    114
    115	echo init > /sys/devices/platform/dell_rbu/image_type
    116
    117.. note:: echoing init in image_type does not change its original value.
    118
    119Also the driver provides /sys/devices/platform/dell_rbu/data readonly file to
    120read back the image downloaded.
    121
    122.. note::
    123
    124   After updating the BIOS image a user mode application needs to execute
    125   code which sends the BIOS update request to the BIOS. So on the next reboot
    126   the BIOS knows about the new image downloaded and it updates itself.
    127   Also don't unload the rbu driver if the image has to be updated.
    128