Commit Graph

13 Commits

Author SHA1 Message Date
Tao Zeng 187ca993ca t6d: amfc: use device config and compress uImage
PD#SWPL-181954

Problem:
uImage not decompressed by AMFC

Solution:
1, change zstd tools to append size at end of uImage;
2, change scripts to support uImage decomperss by AMFC

Verify:
t6d

Change-Id: I2f2465a2247085c150a1c7f42ede688011745071
Signed-off-by: Tao Zeng <tao.zeng@amlogic.com>
2024-08-22 14:40:36 +08:00
Tao Zeng d601d7ea09 t6d: enable amfc [1/3]
PD#SWPL-181159

Problem:
AMFC not enabled

Solution:
enable it

Verify:
t6d

Change-Id: I710887e1d00b296e8c0e804ce62cf0dccf5c8957
Signed-off-by: Tao Zeng <tao.zeng@amlogic.com>
2024-08-22 14:27:52 +08:00
Jian Hu a8025e46cc ioremap: correct ioremap size [1/1]
PD#SWPL-177699

Problem:
the ioremap size is res->end - res->start,
it should be res->end - res->start + 1

Solution:
use resource_size instead

Verify:
t6d ptm

Change-Id: I32ee1248978c0646d5d24830326fa34a8209b37b
Signed-off-by: Jian Hu <jian.hu@amlogic.com>
2024-08-22 14:27:51 +08:00
Tao Zeng 64a15f5873 amfc: fix boot crash on S6 [1/1]
PD#SWPL-179595

Problem:
boot failed on S6

Solution:
fix it

Verify:
s6_bl201

Change-Id: Ia75afe7aa2447bb9074063b12f3b6024f9af1b86
Signed-off-by: Tao Zeng <tao.zeng@amlogic.com>
2024-08-05 19:44:17 -07:00
Tao Zeng 537a14ac2a erofs: async handle for symbol fix [1/1]
PD#SWPL-179595

Problem:
aml erofs init cost 130ms

Solution:
1, remove some unnecessary ops in symbol fix, save 8ms;
2, async handle of symbol fix. now only takes 14ms

[    0.884318] init: Loading module /lib/modules/aml-erofs.ko with args ''
[    0.887422] calling  init_module.cfi_jt+0x0/0x4 [aml_erofs] @ 1
[    0.902698] initcall init_module.cfi_jt+0x0/0x4 [aml_erofs] returned 0 after 14795 usecs
[    1.014342] init: Loaded kernel module /lib/modules/aml-erofs.ko

Verify:
S7D bm201

Change-Id: If439175377cd79b093cf12c8413a098721c550dd
Signed-off-by: Tao Zeng <tao.zeng@amlogic.com>
2024-08-01 04:10:21 -07:00
pengzhao.liu 3e6d108e12 kernel: s6 build fail. [1/1]
PD#SWPL-172848

Problem:
s6 build fail

Solution:
s6 build fail

Verify:
s6

Change-Id: Ibac5aaa59623112852999ed9eb93f88f16e79719
Signed-off-by: pengzhao.liu <pengzhao.liu@amlogic.com>
2024-07-04 23:16:48 -07:00
Tao Zeng f771c0e99b amfc: enable amfc on S6 [2/2]
PD#SWPL-173836

Problem:
amfc not enabled on S6

Solution:
add it

Verify:
s6

Change-Id: Id92962b11292a02b67f6ab185f23837fe0f62ede
Signed-off-by: Tao Zeng <tao.zeng@amlogic.com>
2024-07-05 10:41:13 +08:00
Tao Zeng c8d8b493d3 amfc: add support for s7d revb [1/1]
PD#SWPL-175588

Problem:
Need support s7d revb

Solution:
1, add clk set for revb;
2, use clk interface for clk set

Verify:
S7D bm201

Change-Id: I168a942f6796208dd4dff67a13f065be14a40f0c
Signed-off-by: Tao Zeng <tao.zeng@amlogic.com>
2024-07-02 21:10:48 -07:00
Tao Zeng 1ca8311a90 amfc: add aml erofs ko to suppor hardware [1/2]
PD#SWPL-173093

Problem:
build in erofs do not support amfc hardware

Solution:
add aml erofs ko to support it

Verify:
s7d bm201

Change-Id: I89ef060fabaca2f4d7cbaf26b552ba147c73f539
Signed-off-by: Tao Zeng <tao.zeng@amlogic.com>
2024-06-24 20:04:09 -07:00
wenbo.wang 317510d680 amfc: amfc driver support power-domain [1/1]
PD#SWPL-164972

Problem:
add amfc power-domain

Solution:
power-domains = <&pwrdm PDID_S7D_AMFC>

Verify:
local

Change-Id: Ibc6de8bb7b13ef5e68b24533b36f6faad35a6766
Signed-off-by: wenbo.wang <wenbo.wang@amlogic.com>
Signed-off-by: hongyu.chen1 <hongyu.chen1@amlogic.com>
2024-06-07 01:03:32 -07:00
Tao Zeng d3fcfcf6f0 amfc: fix kasan report [1/1]
PD#SWPL-171396

Problem:
kasan report:
BUG: KASAN: slab-out-of-bounds in amfc_decompress+0x144/0x14bc [amlogic_amfc]
write of size 32 at addr ffffff8011d68780 by task init/1

 CPU: 3 PID: 1 Comm: init Tainted: P B OE 5.15.137-android14-11-maybe-dirty #1
 Hardware name: s7d_s905x5m_bm201 (DT)
 Call trace:
 dump_backtrace+0x144/0x190
 show_stack+0x2c/0x48
 dump_stack_lvl+0x7c/0x94
 print_report+0x178/0x4a0
 kasan_report+0xb0/0x104
 kasan_check_range+0x274/0x2b4
 memset+0x58/0x88
 amfc_decompress+0x144/0x14bc [amlogic_amfc]
 amfc_crypto_decompress+0x68/0xd8 [amlogic_amfc]

Solution:
fix it

Verify:
local

Change-Id: I84df77652100ba1d43169feedef057d13cf34656
Signed-off-by: Tao Zeng <tao.zeng@amlogic.com>
2024-05-29 22:03:02 -07:00
Tao Zeng 916e1b7f7f amfc: using source code for zstd tools [1/1]
PD#SWPL-169230

Problem:
Previous commit https://scgit.amlogic.com/#/c/427562/ including a
close source binary for zstd compress, which have license problems

Solution:
1, remove this binary in auto-patch;
2, add source code for this binary

Verify:
S7D

Change-Id: Ic0355b6ad3d0d91a9772d007fa2c9797f18004b1
Signed-off-by: Tao Zeng <tao.zeng@amlogic.com>
2024-05-20 22:39:43 -07:00
Tao Zeng c2ce371c4a amfc: add amfc driver support [1/1]
PD#SWPL-137614
PD#SWPL-163213

Problem:
No amfc driver

Solution:
add it:
1, basic driver for AMFC
2, EROFS support
3, kernel compressed by ZSTD support

Verify:
pxp

Change-Id: I45d2e308d209e35edba626619072aae93c4d0f56
Signed-off-by: Tao Zeng <tao.zeng@amlogic.com>
2024-05-15 02:28:22 -07:00