Browse Source

!170 adapt rtos

pull/171/head
wangxiaodong 3 months ago
parent
commit
7da2883457
  1. 105
      .gitlab-ci.yml
  2. 3
      arch/armv8/aarch32/fmmu.c
  3. 1
      arch/armv8/aarch32/gcc/fvectors.S
  4. 5
      arch/armv8/aarch64/fmmu.c
  5. 1
      arch/armv8/aarch64/gcc/fvectors.S
  6. 25
      doc/ChangeLog.md
  7. 5
      drivers/eth/fxmac/fxmac_intr.c

105
.gitlab-ci.yml

@ -1,19 +1,92 @@
# Phytium Iot gitlab-ci.yml file
workflow:
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
stages:
- basic_stage
risk_controller:
stage: basic_stage
tags:
- normal_runner
script:
- pwd
- echo "Phytium Changsha Iot Gitlab Runner is at work."
- echo "This job only run manually to prevent merge request from not being reviewed by Jenkins pipeline."
- echo "Approve merge request to start Jenkins auto compile item."
- sleep 10 # 这个延时是为了让操作者明确知道自己已经开启了这项操作;
- exit 1 # 这个任务一定会失败,目的是保护被合入的分支
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
when: manual
- pre_stage # 准备阶段
- compile_stage # 编译阶段
- test_stage # 测试阶段
- post_stage # 收尾阶段
start_compile:
stage: pre_stage
script:
- echo "Compile is about to start..."
tags:
- compile
when: manual
# 各模块编译
ai:
stage: compile_stage
script:
- cd /home/gitlab-runner/auto_compile_tool/phytium-test-tools/test_tool
- echo "python3 gitlab_pipeline_compile.py $CI_MERGE_REQUEST_PROJECT_PATH $CI_PROJECT_DIR $CI_PROJECT_DIR/example/ai"
- python3 gitlab_pipeline_compile.py $CI_MERGE_REQUEST_PROJECT_PATH $CI_PROJECT_DIR $CI_PROJECT_DIR/example/ai
tags:
- compile
needs: ["start_compile"]
media:
stage: compile_stage
script:
- cd /home/gitlab-runner/auto_compile_tool/phytium-test-tools/test_tool
- python3 gitlab_pipeline_compile.py $CI_MERGE_REQUEST_PROJECT_PATH $CI_PROJECT_DIR $CI_PROJECT_DIR/example/media
tags:
- compile
needs: ["start_compile"]
network:
stage: compile_stage
script:
- cd /home/gitlab-runner/auto_compile_tool/phytium-test-tools/test_tool
- python3 gitlab_pipeline_compile.py $CI_MERGE_REQUEST_PROJECT_PATH $CI_PROJECT_DIR $CI_PROJECT_DIR/example/network
tags:
- compile
needs: ["start_compile"]
peripherals:
stage: compile_stage
script:
- cd /home/gitlab-runner/auto_compile_tool/phytium-test-tools/test_tool
- python3 gitlab_pipeline_compile.py $CI_MERGE_REQUEST_PROJECT_PATH $CI_PROJECT_DIR $CI_PROJECT_DIR/example/peripherals
tags:
- compile
needs: ["start_compile"]
python:
stage: compile_stage
script:
- cd /home/gitlab-runner/auto_compile_tool/phytium-test-tools/test_tool
- python3 gitlab_pipeline_compile.py $CI_MERGE_REQUEST_PROJECT_PATH $CI_PROJECT_DIR $CI_PROJECT_DIR/example/python
tags:
- compile
needs: ["start_compile"]
storage:
stage: compile_stage
script:
- cd /home/gitlab-runner/auto_compile_tool/phytium-test-tools/test_tool
- python3 gitlab_pipeline_compile.py $CI_MERGE_REQUEST_PROJECT_PATH $CI_PROJECT_DIR $CI_PROJECT_DIR/example/storage
tags:
- compile
needs: ["start_compile"]
system:
stage: compile_stage
script:
- cd /home/gitlab-runner/auto_compile_tool/phytium-test-tools/test_tool
- python3 gitlab_pipeline_compile.py $CI_MERGE_REQUEST_PROJECT_PATH $CI_PROJECT_DIR $CI_PROJECT_DIR/example/system
tags:
- compile
needs: ["start_compile"]
test:
stage: test_stage
script:
- echo "This auto test..."
tags:
- compile
when: manual

3
arch/armv8/aarch32/fmmu.c

@ -20,6 +20,7 @@
* Ver Who Date Changes
* ----- ---------- -------- ---------------------------------
* 1.0 huanghe 2024-06-06 initialization
* 1.2 huanghe 2024-07-24 add mmu init for secondary cpu
*/
#include "fmmu.h"
@ -271,7 +272,7 @@ struct FMmuPermsAttrs {
};
/* Level 1 page table: always required, must be 16k-aligned */
static struct FMmuL1PageTable
struct FMmuL1PageTable
l1_page_table __aligned(KB(16)) = {0};
/*
* Array of level 2 page tables with 4k granularity:

1
arch/armv8/aarch32/gcc/fvectors.S

@ -45,6 +45,7 @@
/* allocatable and executable */
.section .vectors, "a"
.align 11
_vector_table:
B _boot
B Undefined

5
arch/armv8/aarch64/fmmu.c

@ -22,6 +22,7 @@
* ----- ------     --------    --------------------------------------
* 1.0 huanghe 2021/7/3 first release
* 1.1 huanghe 2024/06/06 add support for 4K granule size
* 1.2 huanghe 2024/7/24 add mmu init for secondary cpu
*/
#include "faarch.h"
@ -737,7 +738,7 @@ static void SetupPageTables(struct ArmMmuPtables *ptables)
}
/* Translation table control register settings */
static u64 GetTcr(int el)
u64 GetTcr(int el)
{
u64 tcr;
u64 va_bits = CONFIG_ARM64_VA_BITS;
@ -800,7 +801,7 @@ static void EnableMmuEl1(struct ArmMmuPtables *ptables, u32 flags)
/* ARM MMU Driver Initial Setup */
static struct ArmMmuPtables kernel_ptables;
struct ArmMmuPtables kernel_ptables;
_WEAK void FCacheL3CacheFlush(void)
{

1
arch/armv8/aarch64/gcc/fvectors.S

@ -102,6 +102,7 @@
.section .vectors, "a"
.align 11
_vector_table:
.set VBAR, _vector_table
.org VBAR

25
doc/ChangeLog.md

@ -1,3 +1,28 @@
# Phytium Standalone SDK 2024-07-31 ChangeLog
Change Log since 2024-07-30
## .gitlab-ci
- Migrate Jenkins Pipeline Functionality to GitLab Native CI/CD Pipeline
# Phytium Standalone SDK 2024-07-30 ChangeLog
Change Log since 2024-07-30
## driver
- refine operator judgment in fxmac_intr.c
# Phytium Standalone SDK 2024-07-29 ChangeLog
Change Log since 2024-07-25
## arch
- make alignment for vector
- extern mmu table for rtos usage
# Phytium Standalone SDK 2024-07-25 ChangeLog
Change Log since 2024-07-25

5
drivers/eth/fxmac/fxmac_intr.c

@ -151,7 +151,7 @@ void FXmacIntrHandler(s32 vector, void *args)
/* Transmit error conditions interrupt */
if (((reg_isr & FXMAC_IXR_TX_ERR_MASK) != 0x00000000U) &&
(!(reg_isr & FXMAC_IXR_TXCOMPL_MASK) != 0x00000000U))
((reg_isr & FXMAC_IXR_TXCOMPL_MASK) == 0x00000000U))
{
/* Clear TX status register */
reg_txsr = FXMAC_READREG32(instance_p->config.base_address, FXMAC_TXSR_OFFSET);
@ -326,8 +326,7 @@ void FXmacIntrHandler(s32 vector, void *args)
if ((reg_isr & FXMAC_IXR_RX_ERR_MASK) != 0x00000000U)
{
reg_ctrl =
FXMAC_READREG32(instance_p->config.base_address,
reg_ctrl = FXMAC_READREG32(instance_p->config.base_address,
FXMAC_NWCTRL_OFFSET);
reg_ctrl &= ~(u32)FXMAC_NWCTRL_RXEN_MASK;

Loading…
Cancel
Save