9
0
Fork 0
Commit Graph

15 Commits

Author SHA1 Message Date
Andrey Smirnov 84dc21e185 partitions/efi: Fix off-by-one error in 'last_lba'
LBAs are numbered starting from zero so the last LBA # would be equal
to total number of blocks minus one.

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-11-11 15:02:23 +01:00
Sascha Hauer 1dff7e414d Add initial EFI architecture support
This adds support for running barebox in an EFI environment
on X86 PC hardware.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-16 10:46:18 +02:00
Sascha Hauer 17d1f9288c Move efi.h to include/
With upcoming EFI payload support the efi.h file will diverge
from the kernel, so move it from include/linux/ to include/

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-14 08:01:11 +02:00
Antony Pavlov 8e89bc594a treewide: remove address of the Free Software Foundation
The FSF address has changed; The FSF site says that
address is

  Free Software Foundation
  51 Franklin Street, Fifth Floor
  Boston, MA 02110-1301
  USA

(see http://www.fsf.org/about/contact/)

Instead of updating it each time the address changes,
just drop it completely treewide.

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-06-11 08:35:25 +02:00
Uwe Kleine-König 6fecd2aaca partitions: dos: parse extended partition
DOS MBRs might contain an extended partition that holds several logical
partitions. Add these to the partitions of the block device.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-11-08 15:38:27 +01:00
Uwe Kleine-König 8ddf910d2f partitions: dos: don't open code get_unaligned_le32
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-11-08 15:28:27 +01:00
Uwe Kleine-König e55160fe10 partitions: dos: improve guess of disk size
The code used to ineffectively take the end of the last partition as guess
for the disk size. Better use the end of the partition that has its end
rearmost.

Also return an unsigned type instead of int as the result is always
non-negative.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-11-08 15:27:17 +01:00
Sascha Hauer 1369bfd44f cdev: store dos partition type in struct cdev
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-10-14 14:04:20 +02:00
Sascha Hauer 7c3603a199 partitions: dos: fix memory leak in nt disk signature
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-19 22:59:55 +02:00
Sascha Hauer b27af5cdf3 partition: DOS: Add parameter for the NT disk Signature
The NT disk Signature is a unique 32-bit value in the MBR allowing
to identify a MSDOS partitioned disk. The signature can be used to
specify the Linux rootfs.
This patch adds support for the NT disk Signature in the form of a
device parameter which can both be read and written.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-02 12:35:13 +02:00
Sascha Hauer 5014bf0cc5 partitions: Add missing depends on BLOCK
The disk partitions use blockdevice functions, so add the corresponding
depends on BLOCK.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-02 12:35:13 +02:00
Sascha Hauer e82e40523f block: implement block_read/block_write functions
Some drivers use blk->ops->read/write. This bypasses the caching block
layer and was never intended like this. The upper API to the block layer
is the cdev layer. This patch adds block_read and block_write functions
and uses them where appropriate.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-05-31 09:34:48 +02:00
Jean-Christophe PLAGNIOL-VILLARD 760689e5cc disk: partitions: add EFI GUID Partition Table
form linux 3.8

so you can have part by num or name
not by GUID as this is a non human reading name

     `---- ffe08000.sata
          `---- 0x00000000-0x3fffffff: /dev/ata0
          `---- 0x00100000-0x063fffff: /dev/ata0.0
          `---- 0x00100000-0x063fffff: /dev/ata0.boot
          `---- 0x06400000-0x3fefffff: /dev/ata0.1
          `---- 0x06400000-0x3fefffff: /dev/ata0.linux

Cc: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-18 09:11:37 +01:00
Jean-Christophe PLAGNIOL-VILLARD 86b3577a72 disk: introduce partition name
so we can register partion with name as present in EFI GPT

Cc: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-16 23:39:08 +01:00
Jean-Christophe PLAGNIOL-VILLARD 263bb23ed2 partitons: add framework
so we can support multiple format

use filetpye to detect the parser to use

Cc: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-16 23:39:08 +01:00