u-boot/common
Sascha Silbe ff8fef5666 Fix block device accesses beyond 2TiB
With CONFIG_SYS_64BIT_LBA, lbaint_t gets defined as a 64-bit type,
which is required to represent block numbers for storage devices that
exceed 2TiB (the block size usually is 512B), e.g. recent hard drives.

For some obscure reason, the current U-Boot code uses lbaint_t for the
number of blocks to read (a rather optimistic estimation of how RAM
sizes will evolve), but not for the starting address. Trying to access
blocks beyond the 2TiB boundary will simply wrap around and read a
block within the 0..2TiB range.

We now use lbaint_t for block start addresses, too. This required
changes to all block drivers as the signature of block_read(),
block_write() and block_erase() in block_dev_desc_t changed.

Signed-off-by: Sascha Silbe <t-uboot@infra-silbe.de>
2013-06-26 10:26:06 -04:00
..
spl spl_mmc: add Falcon mode support for raw variant 2013-06-07 14:17:00 -04:00
bedbug.c Consolidate bool type 2013-04-01 16:33:52 -04:00
board_f.c Add trace support to generic board 2013-06-26 10:16:41 -04:00
board_r.c Add trace support to generic board 2013-06-26 10:16:41 -04:00
bootstage.c Add function to print a number with grouped digits 2013-06-26 10:16:41 -04:00
bouncebuf.c common: rework bouncebuf implementation 2012-11-27 17:26:48 -06:00
cmd_ambapp.c various cmd_* files: fixed layout a little bit 2010-08-09 01:07:37 +02:00
cmd_bdinfo.c common: Update cmd_bdinfo for PPC 2013-05-24 16:54:09 -05:00
cmd_bedbug.c Consolidate bool type 2013-04-01 16:33:52 -04:00
cmd_bmp.c video: Provide an API to access video parameters 2012-11-06 22:57:32 +01:00
cmd_boot.c common/cmd_*.c: sparse fixes 2012-11-04 11:00:35 -07:00
cmd_bootldr.c Blackfin: bootldr: use common defines 2011-04-08 00:44:27 -04:00
cmd_bootm.c cmd_bootm: Add command line arguments to Plan 9 2013-06-26 10:25:22 -04:00
cmd_bootmenu.c New command bootmenu: ANSI terminal boot menu support 2013-03-29 09:35:34 +01:00
cmd_bootstage.c bootstage: Add bootstage command 2012-10-03 00:52:44 +02:00
cmd_cache.c Cleanup cache command prints 2012-10-03 16:01:22 -07:00
cmd_cbfs.c common: Use new numeric setenv functions 2013-02-28 19:09:23 -08:00
cmd_console.c common/cmd_*.c: sparse fixes 2012-11-04 11:00:35 -07:00
cmd_cplbinfo.c various cmd_* files: fixed layout a little bit 2010-08-09 01:07:37 +02:00
cmd_cramfs.c common: Use new numeric setenv functions 2013-02-28 19:09:23 -08:00
cmd_dataflash_mmc_mux.c Convert cmd_usage() calls in common to use a return value 2012-03-06 21:09:46 +01:00
cmd_date.c common/cmd_*.c: sparse fixes 2012-11-04 11:00:35 -07:00
cmd_dcr.c Convert cmd_usage() calls in common to use a return value 2012-03-06 21:09:46 +01:00
cmd_dfu.c dfu: Fix crash when wrong number of arguments given 2013-03-16 21:12:01 +01:00
cmd_diag.c Make sure that argv[] argument pointers are not modified. 2010-07-04 23:55:42 +02:00
cmd_disk.c disk: get_device_and_partition() "auto" partition and cleanup 2012-09-25 14:58:48 -07:00
cmd_display.c led_display: split led display support into generic and hw-dependent parts 2010-10-12 22:44:33 +02:00
cmd_dtt.c TMU: Add TMU support in dtt command 2013-03-12 17:06:22 +09:00
cmd_echo.c common/cmd_*.c: sparse fixes 2012-11-04 11:00:35 -07:00
cmd_eeprom.c Convert cmd_usage() calls in common to use a return value 2012-03-06 21:09:46 +01:00
cmd_elf.c cmd_elf: Fix broken bootvx command 2013-02-20 08:52:29 -05:00
cmd_exit.c common/cmd_*.c: sparse fixes 2012-11-04 11:00:35 -07:00
cmd_ext2.c fs: rename fsload command to load 2012-11-04 11:00:34 -07:00
cmd_ext4.c cmd_ext4: BREAK and correct ext4write parameter order 2013-03-27 15:30:11 -04:00
cmd_fat.c cmd_fat.c: Note in fatread help about alignment requirements 2013-03-12 12:43:31 -04:00
cmd_fdc.c Consolidate bool type 2013-04-01 16:33:52 -04:00
cmd_fdos.c common: Use new numeric setenv functions 2013-02-28 19:09:23 -08:00
cmd_fdt.c sandbox: fdt: Support fdt command for sandbox 2013-05-01 11:17:21 -04:00
cmd_fitupd.c net: Add prototype for update_tftp 2013-06-04 16:06:31 -04:00
cmd_flash.c common/cmd_*.c: sparse fixes 2012-11-04 11:00:35 -07:00
cmd_fpga.c Merge branch 'u-boot/master' into 'u-boot-arm/master' 2013-05-30 14:45:06 +02:00
cmd_fs.c fs: rename fsload command to load 2012-11-04 11:00:34 -07:00
cmd_fuse.c Add fuse API and commands 2013-04-28 11:07:40 +02:00
cmd_gettime.c Add gettime command 2012-12-11 13:17:33 -07:00
cmd_gpio.c Convert cmd_usage() calls in common to use a return value 2012-03-06 21:09:46 +01:00
cmd_gpt.c gpt: fix partion size limit 2013-02-20 08:52:41 -05:00
cmd_hash.c hash: Use lower case for hash algorithm names 2013-02-28 19:49:13 -08:00
cmd_help.c Refactor linker-generated arrays 2013-03-12 23:28:40 +01:00
cmd_i2c.c edid: Add I2C command for printing the EDID 2012-12-11 13:17:35 -07:00
cmd_ide.c Fix block device accesses beyond 2TiB 2013-06-26 10:26:06 -04:00
cmd_immap.c powerpc: fix 8xx and 82xx type-punning warnings with GCC 4.7 2013-06-11 22:01:45 +02:00
cmd_ini.c Improve license declaration for cmd_ini.h 2012-10-05 11:07:42 -07:00
cmd_io.c Add console command to access io space registers 2012-12-11 13:17:35 -07:00
cmd_irq.c common/cmd_*.c: sparse fixes 2012-11-04 11:00:35 -07:00
cmd_itest.c common/cmd_*.c: sparse fixes 2012-11-04 11:00:35 -07:00
cmd_jffs2.c common: Use new numeric setenv functions 2013-02-28 19:09:23 -08:00
cmd_ldrinfo.c Blackfin: ldrinfo: new command 2011-04-08 00:44:27 -04:00
cmd_led.c led: Use STATUS_LED_ON and STATUS_LED_OFF when calling __led_set 2013-03-07 17:22:57 +01:00
cmd_license.c various cmd_* files: fixed layout a little bit 2010-08-09 01:07:37 +02:00
cmd_load.c common: Use new numeric setenv functions 2013-02-28 19:09:23 -08:00
cmd_log.c cmd_log: print log->v2.con value in the "log info" command 2012-03-30 22:32:50 +02:00
cmd_mac.c cmd_mac: fix help for 'mac read' 2011-07-28 16:41:06 +02:00
cmd_md5sum.c Add parameter to md5sum to save the md5 sum 2012-10-03 16:01:22 -07:00
cmd_mdio.c common/cmd_*.c: sparse fixes 2012-11-04 11:00:35 -07:00
cmd_mem.c Fix missing return in do_mem_loop() 2013-06-26 10:16:41 -04:00
cmd_mfsl.c Convert cmd_usage() calls in common to use a return value 2012-03-06 21:09:46 +01:00
cmd_mii.c Convert cmd_usage() calls in common to use a return value 2012-03-06 21:09:46 +01:00
cmd_misc.c common/cmd_*.c: sparse fixes 2012-11-04 11:00:35 -07:00
cmd_mmc.c COMMON: MMC: Command to support EMMC booting and to resize EMMC boot partition 2013-06-13 17:35:14 +09:00
cmd_mmc_spi.c Convert cmd_usage() calls in common to use a return value 2012-03-06 21:09:46 +01:00
cmd_mp.c common/cmd_*.c: sparse fixes 2012-11-04 11:00:35 -07:00
cmd_mtdparts.c mtd: Make mtdparts work with pre-reloc env 2013-04-11 15:52:54 -04:00
cmd_nand.c mtd: resync with Linux-3.7.1 2013-05-31 17:12:03 -05:00
cmd_net.c common/cmd_*.c: sparse fixes 2012-11-04 11:00:35 -07:00
cmd_nvedit.c env: Fix minor comment typos in cmd_nvedit 2013-05-14 15:37:24 -04:00
cmd_onenand.c mtd: resync with Linux-3.7.1 2013-05-31 17:12:03 -05:00
cmd_otp.c Convert cmd_usage() calls in common to use a return value 2012-03-06 21:09:46 +01:00
cmd_part.c cmd_part: don't print cmd name twice in help 2013-03-11 17:00:28 -04:00
cmd_pci.c common/cmd_*.c: sparse fixes 2012-11-04 11:00:35 -07:00
cmd_pcmcia.c Make sure that argv[] argument pointers are not modified. 2010-07-04 23:55:42 +02:00
cmd_portio.c Convert cmd_usage() calls in common to use a return value 2012-03-06 21:09:46 +01:00
cmd_pxe.c pxe: add ipappend support 2013-06-24 19:10:14 -05:00
cmd_read.c Add a command to read raw blocks from a partition 2012-12-11 13:17:33 -07:00
cmd_reginfo.c blackfin: bf60x: Port blackfin core architecture code to boot on bf60x. 2013-03-04 13:42:06 +08:00
cmd_reiser.c common: Use new numeric setenv functions 2013-02-28 19:09:23 -08:00
cmd_sandbox.c sandbox: fs: Add support for saving files to host filesystem 2013-05-01 11:17:21 -04:00
cmd_sata.c part/dev_desc: Add log2 of blocksize to block_dev_desc data struct 2013-05-01 16:24:02 -04:00
cmd_scsi.c part/dev_desc: Add log2 of blocksize to block_dev_desc data struct 2013-05-01 16:24:02 -04:00
cmd_setexpr.c setexpr: add regex substring matching and substitution 2013-05-01 16:24:01 -04:00
cmd_sf.c cmd_sf: Add print mesgs on sf read/write commands 2013-06-03 00:04:41 +05:30
cmd_sha1sum.c hash: Add a flag to support saving hashes in the environment 2013-02-28 19:09:23 -08:00
cmd_softswitch.c blackfin: bf609: add softswitch config command 2013-05-13 16:26:12 +08:00
cmd_sound.c Sound: Add FDT support to CMD. 2013-01-08 10:54:33 +09:00
cmd_source.c image: Rename fit_image_check_hashes() to fit_image_verify() 2013-05-14 15:37:25 -04:00
cmd_spi.c cmd_spi: remove superfluous semicolon 2012-08-09 20:41:32 -04:00
cmd_spibootldr.c various cmd_* files: fixed layout a little bit 2010-08-09 01:07:37 +02:00
cmd_spl.c SPL: Change description for spl command 2013-03-01 12:01:32 -05:00
cmd_strings.c Convert cmd_usage() calls in common to use a return value 2012-03-06 21:09:46 +01:00
cmd_terminal.c Make sure that argv[] argument pointers are not modified. 2010-07-04 23:55:42 +02:00
cmd_test.c common/cmd_test: Avoid macro expansion 2013-04-08 12:00:51 -04:00
cmd_time.c cmd_time: merge run_command_and_time_it with cmd_process 2013-02-04 09:14:02 -05:00
cmd_tpm.c tpm: Add TPM command library 2013-04-12 14:13:13 -07:00
cmd_trace.c Add a trace command 2013-06-26 10:16:41 -04:00
cmd_tsi148.c common: tsi148 - fix gcc 4.6 compiler warning 2011-11-16 21:42:17 +01:00
cmd_ubi.c ubi: ubifs: Turn off verbose prints 2013-04-11 15:52:54 -04:00
cmd_ubifs.c Convert cmd_usage() calls in common to use a return value 2012-03-06 21:09:46 +01:00
cmd_universe.c common/cmd_universe.c: Fix GCC 4.6 build warning 2011-11-16 21:04:55 +01:00
cmd_unzip.c common: Use new numeric setenv functions 2013-02-28 19:09:23 -08:00
cmd_usb.c USB: SS: Add support for Super Speed USB interface 2013-05-05 23:54:22 +02:00
cmd_usb_mass_storage.c usb:gadget: USB Mass Storage Gadget support 2013-03-18 18:58:53 +01:00
cmd_version.c x86: Add coreboot version to u-boot's version command 2012-12-26 10:36:26 -08:00
cmd_ximg.c image: Rename fit_image_check_hashes() to fit_image_verify() 2013-05-14 15:37:25 -04:00
cmd_yaffs2.c u-boot: Update yaffs2 file system 2012-08-09 23:39:18 +02:00
cmd_zfs.c common: Use new numeric setenv functions 2013-02-28 19:09:23 -08:00
cmd_zip.c common: Use new numeric setenv functions 2013-02-28 19:09:23 -08:00
command.c cmd_time: merge run_command_and_time_it with cmd_process 2013-02-04 09:14:02 -05:00
console.c env: Add a silent env handler 2012-12-13 11:46:56 -07:00
ddr_spd.c mpc8xxx: DDR2/DDR3: Clean up DIMM-type switch statements 2011-04-04 09:24:43 -05:00
dlmalloc.c Consolidate bool type 2013-04-01 16:33:52 -04:00
dlmalloc.src Consolidate bool type 2013-04-01 16:33:52 -04:00
edid.c edid: Library of EDID decode and print 2012-12-11 13:17:34 -07:00
env_attr.c tools/env: Add environment variable flags support 2012-12-13 11:46:56 -07:00
env_callback.c env_callback: Mark find_env_callback as static 2013-03-27 15:30:11 -04:00
env_common.c env: Add support for access control to .flags 2012-12-13 11:46:56 -07:00
env_dataflash.c Revert "env: fix potential stack overflow in environment functions" 2013-04-05 14:55:21 -04:00
env_eeprom.c Revert "env: fix potential stack overflow in environment functions" 2013-04-05 14:55:21 -04:00
env_embedded.c env: cosmetic: Consilidate the default env definition 2012-10-19 15:25:43 -07:00
env_fat.c Revert "env: fix potential stack overflow in environment functions" 2013-04-05 14:55:21 -04:00
env_flags.c env: Handle write-once ethaddr and serial# generically 2012-12-13 11:46:57 -07:00
env_flash.c env: Hide '.' variables in env print by default 2012-12-13 11:46:55 -07:00
env_mmc.c env_mmc: allow negative CONFIG_ENV_OFFSET 2013-06-13 16:52:20 -05:00
env_nand.c nand: Extend nand_(read|write)_skip_bad with *actual and limit parameters 2013-04-10 15:22:22 +02:00
env_nowhere.c env: factor out the env_get_char_spec() function 2012-01-05 16:34:10 +01:00
env_nvram.c Revert "env: fix potential stack overflow in environment functions" 2013-04-05 14:55:21 -04:00
env_onenand.c mtd: resync with Linux-3.7.1 2013-05-31 17:12:03 -05:00
env_remote.c env: remove duplicated env_get_char_spec() 2012-09-26 11:08:32 -07:00
env_sf.c Revert "env: fix potential stack overflow in environment functions" 2013-04-05 14:55:21 -04:00
env_ubi.c env: Add redundant env support to UBI env 2013-04-11 15:52:55 -04:00
exports.c Fix SPI build errors in exports.c 2011-12-07 08:41:22 +01:00
fdt_support.c fdt: remove unaligned access in fdt_fixup_ethernet() 2013-06-07 14:17:01 -04:00
flash.c flash: Add optional verify-after-write feature 2013-04-22 10:56:38 +02:00
hash.c hash: Add a way to calculate a hash for any algortihm 2013-05-14 15:37:24 -04:00
hush.c cmd_time: merge run_command_and_time_it with cmd_process 2013-02-04 09:14:02 -05:00
hwconfig.c Minor Coding Style Cleanup. 2011-02-02 22:36:10 +01:00
image-fdt.c Clarify bootm OS arguments 2013-06-26 10:16:41 -04:00
image-fit.c image: Support signing of images 2013-06-26 10:18:56 -04:00
image-sig.c image: Add support for signing of FIT configurations 2013-06-26 10:18:56 -04:00
image.c Clarify bootm OS arguments 2013-06-26 10:16:41 -04:00
iomux.c serial: remove calls to serial_assign() 2012-10-29 09:07:06 -07:00
kallsyms.c Add support for Linux-like kallsysms 2009-06-12 20:45:48 +02:00
kgdb.c Make sure that argv[] argument pointers are not modified. 2010-07-04 23:55:42 +02:00
kgdb_stubs.c kgdb: add default generic stubs 2010-01-18 00:23:00 +01:00
lcd.c lcd: add functions to set up simplefb device tree 2013-06-05 22:40:03 +02:00
lynxkdi.c checkpatch whitespace cleanups 2011-10-22 01:13:35 +02:00
main.c fdt: allow bootdelay to be specified via device tree 2013-06-04 16:06:32 -04:00
Makefile image: Add signing infrastructure 2013-06-26 10:18:56 -04:00
memsize.c Revert "memsize: Fix for bug in memory sizing code" 2012-09-21 08:14:05 -07:00
menu.c menu: export menu_default_choice() function 2013-03-29 09:35:34 +01:00
miiphyutil.c Revert "mii: miiphy register address width change" 2011-12-07 08:35:14 +01:00
modem.c common: move extern char console_buffer[] to common.h 2011-11-22 08:39:25 +01:00
s_record.c Initial revision 2002-08-17 09:36:01 +00:00
stdio.c serial: arm_dcc: Remove CONFIG_ARM_DCC_MULTI option 2013-02-04 09:14:21 -05:00
system_map.c Add support for Linux-like kallsysms 2009-06-12 20:45:48 +02:00
update.c image: Rename fit_image_check_hashes() to fit_image_verify() 2013-05-14 15:37:25 -04:00
usb.c USB: SS: Add support for Super Speed USB interface 2013-05-05 23:54:22 +02:00
usb_hub.c usb: ehci: add Faraday USB 2.0 EHCI support 2013-06-12 22:22:51 +02:00
usb_kbd.c usb: workaround non-working keyboards. 2013-06-12 22:22:50 +02:00
usb_storage.c Fix block device accesses beyond 2TiB 2013-06-26 10:26:06 -04:00
xyzModem.c common/misc: sparse fixes 2012-11-04 11:00:35 -07:00