20 Commits

Author SHA1 Message Date
Han Gao
61d7484c75 ci: update toolchains
Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
2024-01-12 21:53:40 +08:00
thead_admin
00ce75ee41 Linux_SDK_V1.4.2
Signed-off-by: thead_admin <occ_thead@service.alibaba.com>
2024-01-12 21:53:40 +08:00
thead_admin
d35408efb1 Linux_SDK_V1.3.3
Signed-off-by: thead_admin <occ_thead@service.alibaba.com>
2024-01-12 21:53:40 +08:00
Jisheng Zhang
d16b0e0a00 lib: utils: reset: thead: add back "plic-delegate" handling
When backporting commit 78c2b19218bd ("lib: utils/irqchip:
Automatically delegate T-HEAD PLIC access"), we removed the delegate
property handling as upstream does, but it will break sdk linux
kernel which still relies on "plic-delegate" property, add back
it.
2023-09-26 21:55:29 +08:00
Jisheng Zhang
58bc661d74 lib: utils/timer: add T-HEAD C9xx plic support
For upstream linux kernel usage
2023-09-26 21:55:29 +08:00
Icenowy Zheng
2a01b611c9 lib: utils/ipi: add T-Head C9xx CLINT compatible
backport commit a8ee82cd8c008f09c91b5c307de4c9b37660ff71 upstream

Althoug the MTIMER part of a C9xx CLINT differs from a SiFive one, the
MSWI part is compliant.

Add T-Head C9xx CLINT compatible string to fdt_ipi_mswi code, sharing
the same codepath with SiFive CLINT.

Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
Reviewed-by: Anup Patel <anup@brainfault.org>
2023-09-26 21:55:29 +08:00
Samuel Holland
400de74755 lib: utils/irqchip: Automatically delegate T-HEAD PLIC access
commit 78c2b19218bd62653b9fb31623a42ced45f38ea6 upstream

The T-HEAD PLIC implementation requires setting a delegation bit
to allow access from S-mode. Now that the T-HEAD PLIC has its own
compatible string, set this bit automatically from the PLIC driver,
instead of reaching into the PLIC's MMIO space from another driver.

Signed-off-by: Samuel Holland <samuel@sholland.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Anup Patel <anup.patel@wdc.com>
2023-09-26 21:55:29 +08:00
Heinrich Schuchardt
ab383936e1 lib: utils: missing initialization in thead_reset_init
commit 360ab88569201f8d282cf98546b86b8576b6f2ad upstream

If property csr-copy does not exist, fdt_getprop() will return NULL and cnt
will have a random value from the stack.

Call clone_csrs() only if cnt is initialized to a non-zero value.

Fixes: 49e422c5ad7a ("lib: utils: reset: Add T-HEAD sample platform reset driver")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Anup Patel <anup.patel@wdc.com>
2023-09-26 21:55:29 +08:00
Fabrice Fontaine
f6e8831ac4 Makefile: unconditionally disable SSP
Though -nostdlib is passed in CFLAGS, -fno-stack-protector must also be
passed to avoid linking errors related to undefined references to
'__stack_chk_guard' and '__stack_chk_fail' if toolchain enforces
-fstack-protector.

Fixes:
 - https://gitlab.com/kubu93/buildroot/-/jobs/1247043359

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Xiang W <wxjstz@126.com>
2023-08-06 19:44:41 +08:00
Robert Nelson
44fe1cd431 fdt_serial_uart8250.c: add .compatible = "snps,dw-apb-uart", from Drew and Fu Wei
Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
2023-08-01 23:56:19 +08:00
Han Gao
24b6b1d418 feat: update SDK1.2.0
Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
2023-07-30 03:23:20 +08:00
Han Gao
e042f21ecc feat: add gcc-12 build
Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
2023-07-24 06:12:36 +08:00
Han Gao
574b950215 fix: maybe-uninitialized resovled
Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
2023-07-24 06:12:36 +08:00
Aurelien Jarno
0c27ac7f5d Makefile: fix build with binutils 2.38
From version 2.38, binutils default to ISA spec version 20191213. This
means that the csr read/write (csrr*/csrw*) instructions and fence.i
instruction has separated from the `I` extension, become two standalone
extensions: Zicsr and Zifencei. As the kernel uses those instruction,
this causes the following build failure:

 CC        lib/sbi/sbi_tlb.o
<<BUILDDIR>>/lib/sbi/sbi_tlb.c: Assembler messages:
<<BUILDDIR>>/lib/sbi/sbi_tlb.c:190: Error: unrecognized opcode `fence.i'
make: *** [Makefile:431: <<BUILDDIR>>/build/lib/sbi/sbi_tlb.o] Error 1

The fix is to specify those extensions explicitly in -march. However as
older binutils version do not support this, we first need to detect
that.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Alexandre Ghiti <alexandre.ghiti@canonical.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
2023-07-24 06:12:36 +08:00
Rahul Pathak
d98da90a19 lib: sbi_illegal_insn: Fix FENCE.TSO emulation infinite trap loop
In case of missing "FENCE.TSO" instruction implementation,
opensbi can emulate the "FENCE.TSO" with "FENCE RW,RW", but
mepc was not incremented to continue from the next instruction
causing infinite trap.

Fixes: cb8271c8 ("lib: sbi_illegal_insn: Add emulation for fence.tso")
Signed-off-by: Rahul Pathak <rpathak@ventanamicro.com>
Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
Reviewed-by: Xiang W <wxjstz@126.com>
Reviewed-by: Samuel Holland <samuel@sholland.org>
2023-04-12 09:21:26 +00:00
Samuel Holland
39d1e698c9 lib: sbi_illegal_insn: Add emulation for fence.tso
While OpenC906 appears to properly decode `fence.tso` as a fence
instruction[1], the version of the C906 taped out in the Allwinner D1
does not, and raises illegal instruction.

Handle this errata by emulating `fence.tso` as `fence rw, rw`.

[1]: https://github.com/T-head-Semi/openc906/blob/30827e7f/C906_RTL_FACTORY/gen_rtl/idu/rtl/aq_idu_id_decd.v#L2097

Signed-off-by: Samuel Holland <samuel@sholland.org>
Reviewed-by: Anup Patel <anup@brainfault.org>
2023-04-12 09:21:16 +00:00
thead_admin
513f62819b Linux_SDK_V1.1.2 Linux_SDK_V1.1.2 2023-03-05 22:36:27 +08:00
thead_admin
bfbb0a7b5d Linux_SDK_V1.0.3 Linux_SDK_V1.0.3 2023-01-04 13:12:26 +08:00
thead_admin
aad6533a3b Linux_SDK_V1.0.2 Linux_SDK_V1.0.2 2022-11-22 15:53:45 +08:00
thead_admin
c0919a898e Linux_SDK_V0.9.5 Linux_SDK_V0.9.5 2022-09-13 11:10:36 +08:00