| 38a3021e | 08-Oct-2012 |
Stephen Warren <swarren@nvidia.com> |
disk: part_efi: remove indent level from loop
Simplify the partition printing loop in print_part_efi() to bail out early when the first invalid partition is found, rather than indenting the whole bo
disk: part_efi: remove indent level from loop
Simplify the partition printing loop in print_part_efi() to bail out early when the first invalid partition is found, rather than indenting the whole body of the loop. This simplifies later patches.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
show more ...
|
| d27b5f93 | 21-Sep-2012 |
Stephen Warren <swarren@nvidia.com> |
disk: part_msdos: parse and store partition UUID
The MSDOS/MBR partition table includes a 32-bit unique ID, often referred to as the NT disk signature. When combined with a partition number within t
disk: part_msdos: parse and store partition UUID
The MSDOS/MBR partition table includes a 32-bit unique ID, often referred to as the NT disk signature. When combined with a partition number within the table, this can form a unique ID similar in concept to EFI/GPT's partition UUID.
This patch generates UUIDs in the format 0002dd75-01, which matches the format expected by the Linux kernel.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
show more ...
|
| 894bfbbf | 21-Sep-2012 |
Stephen Warren <swarren@nvidia.com> |
disk: part_efi: parse and store partition UUID
Each EFI partition table entry contains a UUID. Extend U-Boot's struct disk_partition to be able to store this information, and modify get_partition_in
disk: part_efi: parse and store partition UUID
Each EFI partition table entry contains a UUID. Extend U-Boot's struct disk_partition to be able to store this information, and modify get_partition_info_efi() to fill it in.
The implementation of uuid_string() was derived from the Linux kernel, tag v3.6-rc4 file lib/vsprintf.c function uuid_string().
Signed-off-by: Stephen Warren <swarren@nvidia.com>
show more ...
|
| c04d68c6 | 21-Sep-2012 |
Stephen Warren <swarren@nvidia.com> |
disk: part_efi: range-check partition number
Enhance get_partition_info_efi() to range-check the partition number. This prevents invalid partitions being accessed, and prevents access beyond the end
disk: part_efi: range-check partition number
Enhance get_partition_info_efi() to range-check the partition number. This prevents invalid partitions being accessed, and prevents access beyond the end of the gpt_pte[] array.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
show more ...
|
| 10a37fd7 | 21-Sep-2012 |
Stephen Warren <swarren@nvidia.com> |
disk: get_device_and_partition() "auto" partition and cleanup
Rework get_device_and_partition() to: a) Implement a new partition ID of "auto", which requests that U-Boot search for the first "boo
disk: get_device_and_partition() "auto" partition and cleanup
Rework get_device_and_partition() to: a) Implement a new partition ID of "auto", which requests that U-Boot search for the first "bootable" partition, and fall back to the first valid partition if none is found. This way, users don't need to specify an explicit partition in their commands. b) Make use of get_device(). c) Add parameter to indicate whether returning a whole device is acceptable, or whether a partition is mandatory. d) Make error-checking of the user's device-/partition-specification more complete. In particular, if strtoul() doesn't convert all characters, it's an error rather than just ignored.
The resultant device/partition returned by the function will be as follows, based on whether the disk has a partition table (ptable) or not, and whether the calling command allows the whole device to be returned or not.
(D and P are integers, P >= 1)
D D: No ptable: !allow_whole_dev: error allow_whole_dev: device D ptable: device D partition 1 D:0 !allow_whole_dev: error allow_whole_dev: device D D:P No ptable: error ptable: device D partition P D:auto No ptable: !allow_whole_dev: error allow_whole_dev: device D ptable: first partition in device D with bootable flag set. If none, first valid paratition in device D.
Note: In order to review this patch, it's probably easiest to simply look at the file contents post-application, rather than reading the patch itself.
Signed-off-by: Rob Herring <rob.herring@calxeda.com> [swarren: Rob implemented scanning for bootable partitions. I fixed a couple of issues there, switched the syntax to ":auto", added the error-checking rework, and ":0" syntax for the whole device] Signed-off-by: Stephen Warren <swarren@nvidia.com>
show more ...
|
| 99d2c205 | 21-Sep-2012 |
Rob Herring <rob.herring@calxeda.com> |
disk/part: introduce get_device_and_partition
All block device related commands (scsiboot, fatload, ext2ls, etc.) have simliar duplicated device and partition parsing and selection code. This adds a
disk/part: introduce get_device_and_partition
All block device related commands (scsiboot, fatload, ext2ls, etc.) have simliar duplicated device and partition parsing and selection code. This adds a common function to replace various implementations.
The new function has an enhancement over current versions. If no device or partition is specified on the command line, the bootdevice env variable will be used (scsiboot does this).
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
show more ...
|
| deb5ca80 | 19-Oct-2011 |
Doug Anderson <dianders@chromium.org> |
disk: part_efi: fix **pgpt_pte == NULL
Code was setting **pgpt_pte == NULL, which meant that the pointer to the gpt_pte would be stored at RAM address 00000000. This 'worked' on T20 (SDRAM starts @
disk: part_efi: fix **pgpt_pte == NULL
Code was setting **pgpt_pte == NULL, which meant that the pointer to the gpt_pte would be stored at RAM address 00000000. This 'worked' on T20 (SDRAM starts @ 0x00000000), but hung gpt/EFI access on T30 (SDRAM starts @ 0x80000000).
Signed-off-by: Tom Warren <twarren@nvidia.com> Signed-off-by: Doug Anderson <dianders@chromium.org>
show more ...
|