| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Change-Id: I4f4ca146eb905d1fc0f56eac6dfc8c4477b5e80c
Signed-off-by: Dongjin Kim <tobetter@gmail.com>
|
|
|
|
|
| |
Signed-off-by: Chris KIM <codewalker@hardkernel.com>
Change-Id: I7b462108bfa5417198fba64357077e524b7dabf1
|
|
|
|
|
|
| |
to Amlogic code style
Change-Id: I1f8e19d4309e49638702493ccee8602b61457831
|
|
|
|
|
| |
Change-Id: Ib52f1accc13dfa0db9b02a2dfbdab5dceb404efc
Signed-off-by: Dongjin Kim <tobetter@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
6a2a443 storage: mmc/nand: support support to read saved ddr parameter [1/1]
cb80c6c uboot: emmc: setup emmc hs400 debug environment in uboot [1/1]
9927af4 ddr: timing:G12A/G12B/TL1/TM2 update LPDDR4_PHY_V_0_1_14 bl33 [2/3]
c9dfa59 ddr: driver:G12A/G12B/TL1 update LPDDR4_PHY_V_0_1_13 bl33 [2/3]
ac463ed ddr: timing:G12A/G12B/TL1_update_LPDDR4_PHY_V_0_1_12_bl33 [2/3]
3fead4a dram: scramble: update scramble key config [2/2]
dram: scramble: update scramble key config [2/2]
PD#SWPL-3152
Problem:
can not configure non-sec memory scramble key in uboot
Solution:
add config interface in ddr function
Verity:
test pass on u200/w400/x301
Change-Id: Ie987ecc336483518913dc3cb850cbe04d348720e
Signed-off-by: xiaobo gu <xiaobo.gu@amlogic.com>
Signed-off-by: Luan Yuan <luan.yuan@amlogic.com>
ddr: timing:G12A/G12B/TL1_update_LPDDR4_PHY_V_0_1_12_bl33 [2/3]
PD#SWPL-5973
Problem:
none
Solution:
DDR_DRIVER_VERSION "LPDDR4_PHY_V_0_1_12" 20190128
1 reduice funciton ddr_init_soc_calculate_impedence_ctrl code size
2 modify ddr4 DqDqsRcvCntrl register for swith to extend vref range
improve vref training
3 adjust 16bit lpddr4 dfi mode register and DMC_DRAM_DFI_CTRL
register for 16bit test
4 change ddr scramble to after exter_ddrtest
5 add amlogic vref correction function
6 combine g12 rev-a and rev-b
7 repair tl1 ddr3 autosize function
8 config cfg_ddr_dqs=5 improve rank switch speed
9 change ddr4 rtt_park to 0 for ddr4 dqs level will increase vddq power
10 add fail_pass_ddr test method
11 disable asr only apd after ddrtest
12 add ddr_fast_boot function
13 add lpddr4 fast boot vt function
Verify:
test pass at x301
Change-Id: I19c0100cd08990854ab1f006d5e7060e7c2cc1bf
Signed-off-by: zhiguang.ouyang <zhiguang.ouyang@amlogic.com>
Signed-off-by: Luan Yuan <luan.yuan@amlogic.com>
ddr: driver:G12A/G12B/TL1 update LPDDR4_PHY_V_0_1_13 bl33 [2/3]
PD#SWPL-7341
Problem:
none.
Solution:
DDR_DRIVER_VERSION "LPDDR4_PHY_V_0_1_13" 20190417
1 add ddr_fast_boot data sha2 checksum
2 repair ddr reinit training all use for auto frequency scan
3 adjust tl1 bl2 stack link
4 reparir cs0 4GB support ,limit ddr addtest <=3928M
5 change tl1 board id to ddr id
Verify:
test pass at x301 and u200.
Change-Id: I582fc6b67d6b565ef260b9bc4c144425ece95cc4
Signed-off-by: zhiguang.ouyang <zhiguang.ouyang@amlogic.com>
ddr: timing:G12A/G12B/TL1/TM2 update LPDDR4_PHY_V_0_1_14 bl33 [2/3]
PD#SWPL-7880
Problem:
none.
Solution:
DDR_DRIVER_VERSION "LPDDR4_PHY_V_0_1_14" 20190426
1 add soc window vref offset function
2 add usb_download_full test function
3 repair lpddr4 CA delay offset function
4 repair suspend resume test command
5 2400 ddr4 change cl from 16 to 18. compatibility new JEDEC
6 add dfi_mrl max value limmit
7 change lpddr4 init soc vref value
Verify:
test pass at T309,U200,W400.
Change-Id: Ie92971f4a009511b72b22eea6dba56c461438d2b
Signed-off-by: zhiguang.ouyang <zhiguang.ouyang@amlogic.com>
Signed-off-by: Luan Yuan <luan.yuan@amlogic.com>
uboot: emmc: setup emmc hs400 debug environment in uboot [1/1]
PD#SWPL-1265
Problem:
HS400 enviroment is too complexity to debug
Solution:
setup HS400 environment in uboot
Verify:
verify on tl1_skt
Change-Id: Iddc3ec8bdad496baf5792457d5417fe06ac3ce9b
Signed-off-by: Ruixuan Li <ruixuan.li@amlogic.com>
Signed-off-by: Luan Yuan <luan.yuan@amlogic.com>
storage: mmc/nand: support support to read saved ddr parameter [1/1]
PD#SWPL-5550
Problem:
Implement to the function that can read ddr
parameter which saved in reserved area.
Solution:
provide interface.
Verify:
tl1-x301
axg-s400
Change-Id: I68a0a83ac435ad6d4a11e01edc290aedae650941
Signed-off-by: Liang Yang <liang.yang@amlogic.com>
Signed-off-by: Qiang Li <qiang.li@amlogic.com>
Signed-off-by: Liang Yang <liang.yang@amlogic.com>
Signed-off-by: Luan Yuan <luan.yuan@amlogic.com>
|
|\ |
|
| |
| |
| |
| |
| |
| |
| | |
SPDIF output remained high-level when odroid was turned off using
shutdown command. So, add code to set pin mode to input mode.
Change-Id: I3bd5f064c008a4542bebb84e697e1e66519f0bf1
|
| |
| |
| |
| |
| |
| |
| | |
Most importantly, the superblock provides the used group descriptor size,
which is required for the EXT4_FEATURE_INCOMPAT_64BIT.
Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
|
| |
| |
| |
| |
| |
| |
| | |
Enable mounting of ext4 fs with 64bit feature, as it is supported now.
These had been disabled in 6f94ab6656ceffb3f2a972c8de4c554502b6f2b7.
Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
|
| |
| |
| |
| |
| |
| | |
Also adjust high 16/32 bits when free inode/block counts are modified.
Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The descriptor size is variable, thus array indices are not generically
applicable. The larger group descriptors also contain e.g. high parts
of block numbers, which have to be read and written.
Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
Change-Id: I83e44f27fdbdcb2cb65b309d28e66ab59566e1cf
|
| |
| |
| |
| |
| |
| |
| | |
The correct descriptor size must be used when calculating offsets, and
also to read the correct amount of data.
Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The helper functions encapsulate access of the block group descriptors,
independent of group descriptor size. The helpers also deal with the
endianess of the fields, and with split fields like free_blocks/
free_blocks_high.
Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
|
| |
| |
| |
| |
| |
| |
| |
| | |
If EXT4_FEATURE_INCOMPAT_64BIT is set, the descriptor can be read from
the superblocks, otherwise it defaults to 32.
Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
Change-Id: I23c1ca650846d7498711c89f9c95962b67359619
|
| |
| |
| |
| |
| |
| |
| |
| | |
If the same block is updated multiple times in a row during a single
file system operation, gd_index is decremented to use the same journal
entry again. Avoid loosing the already allocated buffer.
Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
read_allocated block may return block number 0, which is just an indicator
a chunk of the file is not backed by a block, i.e. it is sparse.
During file deletions, just continue with the next logical block, for other
operations treat blocknumber <= 0 as an error.
For writes, blocknumber 0 should never happen, as U-Boot always allocates
blocks for the whole file. Reading already handles this correctly, i.e. the
read buffer is 0-fillled.
Not treating block 0 as sparse block leads to FS corruption, e.g.
./sandbox/u-boot -c 'host bind 0 ./sandbox/test/fs/3GB.ext4.img ;
ext4write host 0 0 /2.5GB.file 1 '
The 2.5GB.file from the fs test is actually a sparse file.
Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The data blocks are identical for files using traditional direct/indirect
block allocation scheme and extent trees, thus this code part can be
common. Only the code to deallocate the indirect blocks to record the
used blocks has to be seperate, respectively the code to release extent
tree index blocks.
Actually the code to release the extent tree index blocks is still missing,
but at least add a FIXME at the appropriate place.
Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Make sure the the extra_isize field (offset 128) is initialized to 0, to
mark any extra data as invalid.
Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
Reviewed-by: Lukasz Majewski <l.majewski@samsung.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
fs->inodesz is already correctly (i.e. dependent on fs revision)
initialized in ext4fs_mount.
Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
Reviewed-by: Lukasz Majewski <l.majewski@samsung.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
temp_ptr should always be freed, even if the function is left via
goto fail.
Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
Reviewed-by: Lukasz Majewski <l.majewski@samsung.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
If the blocksize is 1024, count is initialized with 1. Incrementing count
by 8 will never match (count == fs->blksz * 8), and ptr may be
incremented beyond the buffer end if the bitmap is filled. Add the
startblock offset after the loop.
Remove the second loop, as only the first iteration will be done.
Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
Reviewed-by: Lukasz Majewski <l.majewski@samsung.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The last free block of a block group may be in its middle. After it has
been allocated, the next block group should be scanned from its beginning.
The following command triggers the bad behaviour (on a blocksize 1024 fs):
./sandbox/u-boot -c 'i=0; host bind 0 ./disk.raw ;
while test $i -lt 260 ; do echo $i; setexpr i $i + 1;
ext4write host 0:2 0 /X${i} 0x1450; done ;
ext4write host 0:2 0 /X240 0x2000 ; '
When 'X240' is extended from 5200 byte to 8192 byte, the new blocks should
start from the first free block (8811), but it uses the blocks 8098-8103
and 16296-16297 -- 8103 + 1 + 8192 = 16296. This can be shown with
debugfs, commands 'ffb' and 'stat X240'.
Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
Reviewed-by: Lukasz Majewski <l.majewski@samsung.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
zero_buffer is never written, thus clearing it is pointless.
journal_buffer is completely initialized by ext4fs_devread (or in case
of failure, not used).
Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
Reviewed-by: Lukasz Majewski <l.majewski@samsung.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
e2fsck warns about "Group descriptor 0 marked uninitialized without
feature set."
The bg_itable_unused field is only defined if FEATURE_RO_COMPAT_GDT_CSUM
is set, and should be set (kept) zero otherwise.
Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
Reviewed-by: Lukasz Majewski <l.majewski@samsung.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Scanning only the direct blocks of the directory file may falsely report
an existing file as nonexisting, and worse can also lead to creation
of a duplicate entry on file creation.
Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
Reviewed-by: Lukasz Majewski <l.majewski@samsung.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
While directories can be read using the old linear scan method, adding a
new file would require updating the index tree (alternatively, the whole
tree could be removed).
Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
Reviewed-by: Lukasz Majewski <l.majewski@samsung.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Previously, only the last directory block was scanned for available space.
Instead, scan all blocks back to front, and if no sufficient space is
found, eventually append a new block.
Blocks are only appended if the directory does not use extents or the new
block would require insertion of indirect blocks, as the old code does.
Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
Reviewed-by: Lukasz Majewski <l.majewski@samsung.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The following command crashes u-boot:
./sandbox/u-boot -c 'i=0; host bind 0 ./sandbox/test/fs/3GB.ext4.img ;
while test $i -lt 200 ; do echo $i; setexpr i $i + 1;
ext4write host 0 0 /foobar${i} 0; done'
Previously, the code updated the direct_block even for extents, and
fortunately crashed before pushing garbage to the disk.
Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
Reviewed-by: Lukasz Majewski <l.majewski@samsung.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
In case the dir entry creation failed, ext4fs_write would later overwrite
a random inode, as inodeno was never initialized.
Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
Reviewed-by: Lukasz Majewski <l.majewski@samsung.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The following command triggers a segfault in search_dir:
./sandbox/u-boot -c 'host bind 0 ./sandbox/test/fs/3GB.ext4.img ;
ext4write host 0 0 /./foo 0x10'
The following command triggers a segfault in check_filename:
./sandbox/u-boot -c 'host bind 0 ./sandbox/test/fs/3GB.ext4.img ;
ext4write host 0 0 /. 0x10'
"." is the first entry in the directory, thus previous_dir is NULL. The
whole previous_dir block in search_dir seems to be a bad copy from
check_filename(...). As the changed data is not written to disk, the
statement is mostly harmless, save the possible NULL-ptr reference.
Typically a file is unlinked by extending the direntlen of the previous
entry. If the entry is the first entry in the directory block, it is
invalidated by setting inode=0.
The inode==0 case is hard to trigger without crafted filesystems. It only
hits if the first entry in a directory block is deleted and later a lookup
for the entry (by name) is done.
Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
Reviewed-by: Lukasz Majewski <l.majewski@samsung.com>
|
| |
| |
| |
| |
| |
| |
| | |
le32_to_cpu() must only convert the revision_level and not the boolean
result.
Signed-off-by: Michael Walle <michael@walle.cc>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
All fields were accessed directly instead of using the proper byte swap
functions. Thus, ext4 write support was only usable on little-endian
architectures. Fix this.
Signed-off-by: Michael Walle <michael@walle.cc>
Change-Id: I9bac7da61f5dbda1b2069b1bf6e904ea47a32156
|
| |
| |
| |
| |
| |
| |
| |
| | |
Change all the types of ext2/4 fields to little endian types and all the
JBD fields to big endian types. Now we can use sparse (make C=1) to check
for statements where we need byteswaps.
Signed-off-by: Michael Walle <michael@walle.cc>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
With e2fsprogs after 1.43 the 64bit and metadata_csum features are
enabled by default. The metadata_csum feature changes how
ext4_group_desc->bg_checksum is calculated, which would break write
support. The 64bit feature however introduces changes such that it
cannot be read by implementations that do not support it. Since we do
not support this, we must not mount it.
Cc: Stephen Warren <swarren@nvidia.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Lukasz Majewski <l.majewski@samsung.com>
Cc: Stefan Roese <sr@denx.de>
Reported-by: Andrew Bradford <andrew.bradford@kodakalaris.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
If the ext3 journal gets out of sync with what is written on disk, for
example because of an unexpected power cut, ext4fs_read_file can
return an all-zero directory entry. In that case, ext4fs_iterate_dir
would infinite loop.
This patch detects when a directory entry's direntlen member is 0 and
returns a failure status, which breaks out of the infinite loop. As a
result, U-Boot will not find files that may subsequently be recovered
when the journal is replayed.
This is better behaviour than hanging in an infinite loop, but as a
further improvement maybe U-Boot could interpret the ext3 journal and
actually find the unsynced entries.
Signed-off-by: Thomas Fitzsimmons <fitzsim@cisco.com>
Reviewed-by: Stefan Roese <sr@denx.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
root_first_block_buffer should be free()d in all cases, not just when an
error occurs. Fix the success exit path of the function to do this.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Lukasz Majewski <l.majewski@samsung.com>
Tested-by: Lukasz Majewski <l.majewski@samsung.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
parse_path() malloc()s the entries in the array it's passed. Those
allocations must be free()d by the caller, ext4fs_get_parent_inode_num().
Add code to do this.
For this to work, all the array entries must be dynamically allocated,
rather than a mix of dynamic and static allocations. Fix parse_path() not
to over-write arr[0] with a pointer to statically allocated data.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Lukasz Majewski <l.majewski@samsung.com>
Tested-by: Lukasz Majewski <l.majewski@samsung.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
ext4_write_file() is only called from the "fs" layer, which calls both
ext4fs_mount() and ext4fs_close() before/after calling ext4_write_file().
Fix ext4_write_file() not to call ext4fs_mount() again, since the mount
operation malloc()s some RAM which is leaked when a second mount call
over-writes the pointer to that data, if no intervening close call is
made.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Lukasz Majewski <l.majewski@samsung.com>
Tested-by: Lukasz Majewski <l.majewski@samsung.com>
Change-Id: Ic90440819d9d373a201455a15974501b659179db
|
|/
|
|
|
|
|
|
|
|
|
|
| |
After rework of the file system API, the size of ext4
write was missed. This causes printing unreliable write
size at the end of the file system write operation.
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Cc: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
Cc: Lukasz Majewski <l.majewski@samsung.com>
Cc: Simon Glass <sjg@chromium.org>
Tested-by: Stephen Warren <swarren@nvidia.com>
|
|\
| |
| |
| | |
odroidn2-v2015.01
|
| |
| |
| |
| |
| |
| |
| |
| | |
in DTS [1/2]"
This reverts commit 97e50f66a7ad18a4bd825966be54cf4142b9b72b.
Change-Id: Id8fb40b90f16c5479131770e4575af183f5234ed
|
| |
| |
| |
| |
| |
| |
| |
| | |
The address of FDT is already given by the command 'boot*' as its
parameter, not neceesary to read from U-boot environment.
Change-Id: If2c5f377e276400e463a9b0ec9028f2dac491494
Signed-off-by: Dongjin Kim <tobetter@gmail.com>
|
| |
| |
| |
| |
| |
| | |
This reverts commit 7dd95889d965e5beba61e40f402770ac94af696f.
Change-Id: I4de1c79672c4e458fb0501186deea817d1f46a38
|
| |
| |
| |
| |
| | |
Change-Id: Ibe487370494eca5c70f4dc5bc373794b7accee2c
Signed-off-by: Dongjin Kim <tobetter@gmail.com>
|
| |
| |
| |
| |
| | |
Change-Id: I94cf548e4868f716467d48313d8b7ea2be95d0de
Signed-off-by: Dongjin Kim <tobetter@gmail.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
in DTS [1/2]"
This reverts commit 97e50f66a7ad18a4bd825966be54cf4142b9b72b.
Change-Id: Id8fb40b90f16c5479131770e4575af183f5234ed
|
| |
| |
| |
| |
| |
| |
| |
| | |
The address of FDT is already given by the command 'boot*' as its
parameter, not neceesary to read from U-boot environment.
Change-Id: If2c5f377e276400e463a9b0ec9028f2dac491494
Signed-off-by: Dongjin Kim <tobetter@gmail.com>
|
| |
| |
| |
| |
| |
| | |
This reverts commit 7dd95889d965e5beba61e40f402770ac94af696f.
Change-Id: I4de1c79672c4e458fb0501186deea817d1f46a38
|
| |
| |
| |
| |
| | |
Change-Id: Ibe487370494eca5c70f4dc5bc373794b7accee2c
Signed-off-by: Dongjin Kim <tobetter@gmail.com>
|
|/
|
|
|
| |
Change-Id: I94cf548e4868f716467d48313d8b7ea2be95d0de
Signed-off-by: Dongjin Kim <tobetter@gmail.com>
|