dell_rbu: Resubmitting patch for new Dell BIOS update driver
PATCH 1/1 dell_rbu: Resubmitting patch for new Dell BIOS update driver
This is a resubmit of the patch after incorporating all the inputs from revieweres. This has the hotplug firmware interface as suggested by many. Currently it does not suport reading back the data; I am workingon it and will add that feature as new patch.
By making a contribution to this project, I certify that:
The contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file.
Thanks,
Abhay Salunke
Software Engineer.
DELL Inc
Documentation/DELL_RBU.txt +70 -0
@@ -0,0 +1,70 @@ +Purpose: +Demonstrate the usage of the DELL_RBU (DELL Remote BIOS Update) driver +for updating BIOS images on Dell hardware. + +Scope: +This document discusses the functionality of the DELL_RBU driver. +This driver is required by BIOS update applications shipped by DELL for updating +BIOS on DELL servers and client systems. + +Overview: +The rbu driver is designed to be running on 2.6 kernel. +This driver is one single dell_rbu.c file (approx 800 lines total). +This driver utilizes the hotplug interface for downloading the BIOS update image +in the contiguous or packetized memory depending upon the update type. +The BIOS then scans the memory to find the image and will then update itself. +There are basically two different mechanisms for writing the BIOS image in to +contiguous memory +1> By writing the image to one monolithic chunk of contiguous physical memory. +2> By writing image in to smaller packet chunks of contiguous physical memory. +The update mechanism is determined by the update application based on the +particular system type. + +Update mechanism using single physical chunk of memory: +The rbu driver on its load time created the following entries in sysfs +/sys/firmware/dell_rbu/monolithic/mono_name +/sys/firmware/dell_rbu/monolithic/mono_size +/sys/firmware/dell_rbu/packetized/packet_name +/sys/firmware/dell_rbu/packetized/packet_size + +Steps to update the BIOS image: + +1> Copy the image file in to /lib/firmware +2> echo the image name in to /sys/firmware/dell_rbu/xxxx/xxxx_name + +This will generate a hotplug event and the data form the image file is +transferred to the memory. +Here xxxx stands for the type of BIOS update mechanism chosen by choosing +monolitich the image is copied to contiguous physical pages and by choosing +the mechanism as packetized the image is treated as one single packet and the +packet size is set to the first packet image size. If a new image packet of +different size form the previous is copied then all the previous packets are +freed and this packet's size is treated as new packet size. + +On a driver unload all the allocated memory is freed. +The user should not unload the driver after downloading the new BIOS image +if it wants to update BIOS with that image. +The user can overwrite the previously loaded monolithich image by echoing a +new file name string to /sys/firmware/dell_rbu/monolithic/mono_name. Make sure +the file is present in /lib/firmware. If the image size is more than +previous image then the previous image is freed and the new alocation is made. + +The user can know of a successful allocation by readind the size files. +cat /sys/firmware/dell_rbu/monolithic/mono_size + +Update using smaller chunks (packets) of contiguous memory: +The disadvantage of contiguous allocation is that it may not be always possible +to get that size of contiuguous chunk of avaliable physical pages as in most +Linux systems the memory gets fragmented immideately after a reboot. +The update using smaller chunks fixes this issue; it also requires the BIOS on +the system to support this feature; the update application needs to query this +with the BIOS on the system before using this technique. + + +NOTE: +Afte updating the BIOS image the appplication needs to communicate with the BIOS +for enabling the update on the next reboot. The application can then choose to +reboot the system imideately or not reboot the system and leave up to the user +to do a reboot. + +
drivers/firmware/dell_rbu.c +700 -0
700 lines not on this page · raw message
drivers/firmware/Kconfig +12 -0
@@ -58,4 +58,16 @@ config EFI_PCDP See <http://www.dig64.org/specifications/DIG64_HCDPv20_042804.pdf> +config DELL_RBU + tristate "BIOS update support for DELL systems via sysfs" + default n + help + Say Y if you want to have the option of updating the BIOS for your + DELL system. Note you need a supporting application to comunicate + with the BIOS regardign the new image for the image update to + take effect. + + See <file:Documentation/DELL_RBU.txt> for more details on the driver. + + endmenu
drivers/firmware/Makefile +1 -0
@@ -4,3 +4,4 @@ obj-$(CONFIG_EDD) += edd.o obj-$(CONFIG_EFI_VARS) += efivars.o obj-$(CONFIG_EFI_PCDP) += pcdp.o +obj-$(CONFIG_DELL_RBU) += dell_rbu.o
Hi Abhay,
Quoted 4 lines
This is a resubmit of the patch after incorporating all the inputs from revieweres. This has the hotplug firmware interface as suggested by many. Currently it does not suport reading back the data; I am workingon it and will add that feature as new patch.
please fix the coding style. We use tabs instead of spaces.
Make sure that all functions are static and clean your namespace. Even if they are static it is still unclean.
It is <linux/firmware.h> and not "linux/firmware.h".
The Kconfig is missing a "select FW_LOADER".
Regards
Marcel