| #
f749a034 |
| 27-Feb-2024 |
Yifeng Zhao <yifeng.zhao@rock-chips.com> |
spl: add support ufs boot
Signed-off-by: Yifeng Zhao <yifeng.zhao@rock-chips.com> Change-Id: I52da725df705d82925548e57203a0aaa2d020cae
|
| #
a4578d1a |
| 25-Sep-2021 |
Simon Glass <sjg@chromium.org> |
UPSTREAM: Add support for an owned buffer
When passing a data buffer back from a function, it is not always clear who owns the buffer, i.e. who is responsible for freeing the memory used. An example
UPSTREAM: Add support for an owned buffer
When passing a data buffer back from a function, it is not always clear who owns the buffer, i.e. who is responsible for freeing the memory used. An example of this is where multiple files are decompressed from the firmware image, using a temporary buffer for reading (since the compressed data has to live somewhere) and producing a temporary or permanent buffer with the resuilts.
Where the firmware image can be memory-mapped, as on x86, the compressed data does not need to be buffered, but the complexity of having a buffer which is either allocated or not, makes the code hard to understand.
Introduce a new 'abuf' which supports simple buffer operations:
- encapsulating a buffer and its size - either allocated with malloc() or not - able to be reliably freed if necessary - able to be converted to an allocated buffer if needed
This simple API makes it easier to deal with allocated and memory-mapped buffers.
Signed-off-by: Simon Glass <sjg@chromium.org> (cherry picked from commit 67bc59df05331eaac56cd0a00219d1386130aee2) Change-Id: I1445cda254d266705d5f76ba1f9d1046408807bf Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
show more ...
|
| #
4700eff1 |
| 11-Jun-2021 |
Tero Kristo <t-kristo@ti.com> |
UPSTREAM: lib: rational: copy the rational fraction lib routines from Linux
Copy the best rational approximation calculation routines from Linux. Typical usecase for these routines is to calculate t
UPSTREAM: lib: rational: copy the rational fraction lib routines from Linux
Copy the best rational approximation calculation routines from Linux. Typical usecase for these routines is to calculate the M/N divider values for PLLs to reach a specific clock rate.
This is based on linux kernel commit: "lib/math/rational.c: fix possible incorrect result from rational fractions helper" (sha1: 323dd2c3ed0641f49e89b4e420f9eef5d3d5a881)
Signed-off-by: Tero Kristo <t-kristo@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com> Signed-off-by: Tero Kristo <kristo@kernel.org> (cherry picked from commit 7d0f3fbb93cfebd7b5dc5635166e48ab998c4f82) Change-Id: Ia0b04dcde2e0ed208ae10f2f3ed8648564bd5220 Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
show more ...
|
| #
4425319b |
| 13-Jan-2022 |
Joseph Chen <chenjh@rock-chips.com> |
lib: Add CONFIG_SPL_LZMA option
Signed-off-by: Joseph Chen <chenjh@rock-chips.com> Change-Id: I258a738157ecbc4f754098c9faf6aface57847be
|
| #
5f5b89c2 |
| 24-Aug-2021 |
Joseph Chen <chenjh@rock-chips.com> |
lib: Makefile: build rand.c if not set CONFIG_LIB_HW_RAND=y
The hardware rand lib has the higher priority.
Signed-off-by: Joseph Chen <chenjh@rock-chips.com> Change-Id: I4c051911c91d7b72f30cfde6a08
lib: Makefile: build rand.c if not set CONFIG_LIB_HW_RAND=y
The hardware rand lib has the higher priority.
Signed-off-by: Joseph Chen <chenjh@rock-chips.com> Change-Id: I4c051911c91d7b72f30cfde6a0896f9d7c925ee8
show more ...
|
| #
f93178ae |
| 06-Sep-2021 |
Joseph Chen <chenjh@rock-chips.com> |
lib: add libxbc support
Pick from google U-Boot commit.
Signed-off-by: Joseph Chen <chenjh@rock-chips.com> Change-Id: I5241db252789249cfc72b1017065c9e3ed3fc695
|
| #
08f7f19a |
| 03-Nov-2020 |
Jason Zhu <jason.zhu@rock-chips.com> |
lib: avb: separate the ab from the avb lib
Open CONFIG_AVB_LIBAVB_USER & CONFIG_ANDROID_AB & CONFIG_AVB_LIBAVB_AB to enable ab.
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com> Change-Id: I16119
lib: avb: separate the ab from the avb lib
Open CONFIG_AVB_LIBAVB_USER & CONFIG_ANDROID_AB & CONFIG_AVB_LIBAVB_AB to enable ab.
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com> Change-Id: I1611907b3cb82f72d5e706ed966ee98c7569d230
show more ...
|
| #
7497bc3d |
| 13-Mar-2020 |
Joseph Chen <chenjh@rock-chips.com> |
Merge branch 'next-dev' into thunder-boot
Change-Id: I35db1f0aa79575e972942b5c366f380fc8106343
|
| #
3fbeaf46 |
| 06-Mar-2020 |
Joseph Chen <chenjh@rock-chips.com> |
lib: Makefile: compile rsa/ depends on $(SPL_TPL_)
Fix compile error.
Signed-off-by: Joseph Chen <chenjh@rock-chips.com> Change-Id: Ib6a159cd4fe5fe8387c9abb8369326a4411245b2
|
| #
2227535d |
| 11-Jul-2019 |
Joseph Chen <chenjh@rock-chips.com> |
lib: add sha512 support
Porting from: https://tls.mbed.org/sha-512-source-code.
Update and follow sha1/256.c function name and coding style.
Change-Id: Idbe70b71e54e0e56a88aac5ec306c75fb2237f4f Si
lib: add sha512 support
Porting from: https://tls.mbed.org/sha-512-source-code.
Update and follow sha1/256.c function name and coding style.
Change-Id: Idbe70b71e54e0e56a88aac5ec306c75fb2237f4f Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
show more ...
|
| #
28386b6d |
| 05-Jun-2018 |
Alexey Brodkin <Alexey.Brodkin@synopsys.com> |
UPSTREAM: lib: Add hexdump
Often during debugging session it's very interesting to see what data we were dealing with. For example what we write or read to/from memory or peripherals.
This change i
UPSTREAM: lib: Add hexdump
Often during debugging session it's very interesting to see what data we were dealing with. For example what we write or read to/from memory or peripherals.
This change introduces functions that allow to dump binary data with one simple function invocation like: ------------------->8---------------- print_hex_dump_bytes("", DUMP_PREFIX_OFFSET, buf, len); ------------------->8----------------
which gives us the following: ------------------->8---------------- 00000000: f2 b7 c9 88 62 61 75 64 72 61 74 65 3d 31 31 35 ....baudrate=115 00000010: 32 30 30 00 62 6f 6f 74 61 72 67 73 3d 63 6f 6e 200.bootargs=con 00000020: 73 6f 6c 65 3d 74 74 79 53 33 2c 31 31 35 32 30 sole=ttyS3,11520 00000030: 30 6e 38 00 62 6f 6f 74 64 65 6c 61 79 3d 33 00 0n8.bootdelay=3. 00000040: 62 6f 6f 74 66 69 6c 65 3d 75 49 6d 61 67 65 00 bootfile=uImage. 00000050: 66 64 74 63 6f 6e 74 72 6f 6c 61 64 64 72 3d 39 fdtcontroladdr=9 00000060: 66 66 62 31 62 61 30 00 6c 6f 61 64 61 64 64 72 ffb1ba0.loadaddr 00000070: 3d 30 78 38 32 30 30 30 30 30 30 00 73 74 64 65 =0x82000000.stde 00000080: 72 72 3d 73 65 72 69 61 6c 30 40 65 30 30 32 32 rr=serial0@e0022 00000090: 30 30 30 00 73 74 64 69 6e 3d 73 65 72 69 61 6c 000.stdin=serial 000000a0: 30 40 65 30 30 32 32 30 30 30 00 73 74 64 6f 75 0@e0022000.stdou 000000b0: 74 3d 73 65 72 69 61 6c 30 40 65 30 30 32 32 30 t=serial0@e00220 000000c0: 30 30 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00.............. ... ------------------->8----------------
Source of hexdump.c was copied from Linux kernel v4.7-rc2.
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com> Cc: Anatolij Gustschin <agust@denx.de> Cc: Mario Six <mario.six@gdsys.cc> Cc: Simon Glass <sjg@chromium.org> Cc: Tom Rini <trini@konsulko.com> Cc: Stefan Roese <sr@denx.de>
Change-Id: I038b41f51d45d1b853da499578bf8ef384a63730 Signed-off-by: Jon Lin <jon.lin@rock-chips.com> (cherry picked from commit f8c987f8f127f867d96ca74bcd1fcb11d8265b67)
show more ...
|
| #
c46b3f6d |
| 28-Jun-2019 |
Jason Zhu <jason.zhu@rock-chips.com> |
lib: add stdlib.c
Since we need to realize standard library function other than use them with gcc tool chain in U-Boot. So add standard library function here.
Change-Id: I10009c5bbe31fabacd929df3c4
lib: add stdlib.c
Since we need to realize standard library function other than use them with gcc tool chain in U-Boot. So add standard library function here.
Change-Id: I10009c5bbe31fabacd929df3c44218ae9c6a885f Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
show more ...
|
| #
483d0493 |
| 14-Mar-2019 |
Joseph Chen <chenjh@rock-chips.com> |
lib: introduce bidram for GD board bi_dram[] memory management
Some platform provides more than one dram banks and reserved firmware regions (eg. ATF, OP-TEE, etc) by pre-loader dynamically. It mean
lib: introduce bidram for GD board bi_dram[] memory management
Some platform provides more than one dram banks and reserved firmware regions (eg. ATF, OP-TEE, etc) by pre-loader dynamically. It means there are memory holes in board dram layout. What's more, U-Boot will reserved regions at the late bootflow(eg. firmware reserved for AMP).
So we introduce bidram mechanism to manage GD board bi_dram[], which provides a way to easily manage memory holes and update bi_dram[]. It dpends on LMB which provides a good algorithm to manage memory blocks.
What's different from sysmem? - bidram manage and pass the avaliable memory blocks to kernel; - sysmem is only for U-Boot memory management to avoid ram overlap, it doesn't matter about kernel avaliable memory.
Change-Id: I697cbb80bdc961e4ad5ab94548e2dc93feefde6f Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
show more ...
|
| #
ffa8f8b7 |
| 13-Jan-2019 |
Joseph Chen <chenjh@rock-chips.com> |
lib: introduce sysmem for permanent memory management
U-Boot provides MALLOC for runtime temporary memory management and LMB for bootm memory management. There is not a mechanism for permanent memor
lib: introduce sysmem for permanent memory management
U-Boot provides MALLOC for runtime temporary memory management and LMB for bootm memory management. There is not a mechanism for permanent memory management. so that the memory blocks are easy to overlap with each other.
What does permanent memory mean ? - The memory can't be touched by U-Boot(ATF/OPTEE/SHM/kernel-reserved, etc); - The memory occupied even in kernel, such as some firmware load buffer;
This patch introduces sysmem to do permanent memory management, which implements base on LMB. It provides memory block (pool): - init; - add; - alloc; - free; - reserve; - stat; - overflow check;
Here is an example for RK3399 sysmem boot stat(assume the "fdt" region is Overflow) called by sysmem_dump_all():
sysmem_dump_all: ------------------------------------------------------ memory.rgn[0].base = 0x00000000 .size = 0x00000000 memory.rgn[1].base = 0x00200000 .size = 0x08200000 memory.rgn[2].base = 0x0a200000 .size = 0x75e00000
memory.total = 0x7e000000 (2016 MiB. 0 KiB) ------------------------------------------------------ reserved.rgn[0].name = "ATF" .base = 0x00000000 .size = 0x00100000 reserved.rgn[1].name = "PSTORE/ATAGS/SHM" .base = 0x00100000 .size = 0x00100000 reserved.rgn[2].name = "OP-TEE" .base = 0x08400000 .size = 0x01e00000 reserved.rgn[3].name = "U-Boot" .base = 0x71be03c0 .size = 0x0e41fc40 reserved.rgn[4].name = "secure-memory@20000000" .base = 0x20000000 .size = 0x10000000
reserved.total = 0x2041fc40 (516 MiB. 127 KiB) ------------------------------------------------------ allocated.rgn[0].name = "fdt" (Overflow) .base = 0x01f00000 .size = 0x00009704 allocated.rgn[1].name = "kernel" .base = 0x0027c000 .size = 0x0129da04 allocated.rgn[2].name = "ramdisk" .base = 0x0a200000 .size = 0x001e6c04
allocated.total = 0x0148dd0c (20 MiB. 567 KiB) ------------------------------------------------------ LMB.reserved[0].base = 0x00000000 .size = 0x00200000 LMB.reserved[1].base = 0x0027c000 .size = 0x0129da04 LMB.reserved[2].base = 0x01f00000 .size = 0x00009704 LMB.reserved[3].base = 0x08400000 .size = 0x01fe6c04 LMB.reserved[4].base = 0x20000000 .size = 0x10000000 LMB.reserved[5].base = 0x71be03c0 .size = 0x0e41fc40
reserved.core.total = 0x218ad94c (536 MiB. 694 KiB) ------------------------------------------------------
Change-Id: If63b7abed2cdd3c054719511fcceed733ddf606d Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
show more ...
|
| #
37a7bc39 |
| 26-Jan-2018 |
Jason Zhu <jason.zhu@rock-chips.com> |
lib: avb: update and modify the avb library
The commit point is updated to google external/avb/ which commit point is cf8c56208d2d9643804a7f123b196c7ebc9af276.
Change-Id: I5a10a8a45d3e9e2c9d20d9b3d
lib: avb: update and modify the avb library
The commit point is updated to google external/avb/ which commit point is cf8c56208d2d9643804a7f123b196c7ebc9af276.
Change-Id: I5a10a8a45d3e9e2c9d20d9b3d44946073c9a49ff Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
show more ...
|
| #
205ac79e |
| 15-Sep-2017 |
Jean-Jacques Hiblot <jjhiblot@ti.com> |
UPSTREAM: lib: allow building lzo for the SPL
Change-Id: If6ccf36b13632f5450f700b8931975a4742a698e Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com> Rev
UPSTREAM: lib: allow building lzo for the SPL
Change-Id: If6ccf36b13632f5450f700b8931975a4742a698e Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Kever Yang <kever.yang@rock-chips.com> (cherry picked from commit f52bdf4b678defea2341aa4b68736e6978180222)
show more ...
|
| #
92193ef7 |
| 03-Sep-2017 |
Marek Behún <marek.behun@nic.cz> |
UPSTREAM: lib: Add CRC32-C
This is needed for BTRFS.
Change-Id: I7415e99a6f06aef89f3520ebe9a9ba92a9189059 Signed-off-by: Marek Behun <marek.behun@nic.cz> Signed-off-by: Kever Yang <kever.yang@rock-
UPSTREAM: lib: Add CRC32-C
This is needed for BTRFS.
Change-Id: I7415e99a6f06aef89f3520ebe9a9ba92a9189059 Signed-off-by: Marek Behun <marek.behun@nic.cz> Signed-off-by: Kever Yang <kever.yang@rock-chips.com> (cherry picked from commit 85d8bf57131a21424b50e50884372e813345f09a)
show more ...
|
| #
407d40f4 |
| 09-Sep-2017 |
Rob Clark <robdclark@gmail.com> |
UPSTREAM: lib: add some utf16 handling helpers
We'll eventually want these in a few places in efi_loader, and also vsprintf.
Change-Id: I6c04463ad364e46730fcc84b86d38400f433e8de Signed-off-by: Rob
UPSTREAM: lib: add some utf16 handling helpers
We'll eventually want these in a few places in efi_loader, and also vsprintf.
Change-Id: I6c04463ad364e46730fcc84b86d38400f433e8de Signed-off-by: Rob Clark <robdclark@gmail.com> Signed-off-by: Kever Yang <kever.yang@rock-chips.com> (cherry picked from commit 78178bb0c9dfe2a91a636a411291d8bab50e8a7d)
show more ...
|
| #
b81c4739 |
| 15-Aug-2017 |
York Sun <york.sun@nxp.com> |
UPSTREAM: spl: fit: Eanble GZIP support for image decompression
Add Kconfig option SPL_GZIP and SPL_ZLIB to enable gunzip support for SPL boot, eg. falcon boot compressed kernel image.
Change-Id: I
UPSTREAM: spl: fit: Eanble GZIP support for image decompression
Add Kconfig option SPL_GZIP and SPL_ZLIB to enable gunzip support for SPL boot, eg. falcon boot compressed kernel image.
Change-Id: I68f64aca8ecad26478f2ce25676253cee7e57d30 Signed-off-by: York Sun <york.sun@nxp.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Kever Yang <kever.yang@rock-chips.com> (cherry picked from commit 7264f2928b46c5f5685e39ed607652c8991e47b6)
show more ...
|
| #
2d07abe1 |
| 18-Sep-2017 |
Jason Zhu <jason.zhu@rock-chips.com> |
tipc: change the tipc compile conditions
Since the tipc is not used in tpl and spl, we just compile tipc and generate in u-boot.bin.
Change-Id: Id2845aef127d209c8243cb4cfee8dfbd04ba1305 Signed-off-
tipc: change the tipc compile conditions
Since the tipc is not used in tpl and spl, we just compile tipc and generate in u-boot.bin.
Change-Id: Id2845aef127d209c8243cb4cfee8dfbd04ba1305 Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
show more ...
|
| #
38de3d97 |
| 15-Sep-2017 |
Jason Zhu <jason.zhu@rock-chips.com> |
avb: add avb config to spl and tpl
Change-Id: Idc5102e29c4b66acacda554f3c61903606314025 Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
|
| #
6c551138 |
| 14-Sep-2017 |
Jason Zhu <jason.zhu@rock-chips.com> |
avb: create avb function for user use
The libavb_user provide some fuctions to get a/b and avb information from misc or vbmeta partitions, which can be use in libavb...
It also can use to enable or
avb: create avb function for user use
The libavb_user provide some fuctions to get a/b and avb information from misc or vbmeta partitions, which can be use in libavb...
It also can use to enable or disable the verification function by using avb_user_verity_set in the file avb_user_verify.c.
Since we use fastboot to program our firmware, some necessary function is provided to fastboot to get useful information, like slot number, current slot and so on.
Some functions in the avb_ops_user.c, like read_rollback_index, depend on the OpteeClientTest.h.
Change-Id: I94f77db30d5c7896724b5da3d218041ebdc1f46a Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
show more ...
|
| #
abdd2437 |
| 24-Aug-2017 |
hisping <hisping.lin@rock-chips.com> |
lib: add tipc functions
tipc functions is used for uboot communicate with TEE. uboot can request service for secure store or secure algorithm.
Change-Id: Ie44095aff4c044feceb5f362abf6e3d24ceb8d4c S
lib: add tipc functions
tipc functions is used for uboot communicate with TEE. uboot can request service for secure store or secure algorithm.
Change-Id: Ie44095aff4c044feceb5f362abf6e3d24ceb8d4c Signed-off-by: Hisping Lin <hisping.lin@rock-chips.com>
show more ...
|
| #
3ccd4bb0 |
| 13-Sep-2017 |
Jason Zhu <jason.zhu@rock-chips.com> |
avb: support vbmeta key_pub verify
Android Things requires specific public key metadata and verification logic to correctly verify vbmeta public keys.
This commit provide fuction avb_atx_validate_v
avb: support vbmeta key_pub verify
Android Things requires specific public key metadata and verification logic to correctly verify vbmeta public keys.
This commit provide fuction avb_atx_validate_vbmeta_public_key to verify the vbmeta.
Change-Id: I227e93b342671b4395cbaa7dea2121cbf0d7234b Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
show more ...
|
| #
cf7c71c1 |
| 13-Sep-2017 |
Jason Zhu <jason.zhu@rock-chips.com> |
avb: add functions to choose a/b system
This commit is based on google avb, and it can be getted by https://android.googlesource.com/platform/external/avb.
This new rk_libavb_ab depend on rk_libavb
avb: add functions to choose a/b system
This commit is based on google avb, and it can be getted by https://android.googlesource.com/platform/external/avb.
This new rk_libavb_ab depend on rk_libavb.
This commit provide some useful functions. The function of avb_ab_flow can be use to chose a/b system and flow.The other functions can be used to debug.
Change-Id: I768272286898b36e9a64749ff30bc6ff0cb019a1 Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
show more ...
|