mirror of
https://gitee.com/Vancouver2017/luban-lite-t3e-pro.git
synced 2025-12-14 10:28:54 +00:00
216 lines
24 KiB
HTML
216 lines
24 KiB
HTML
<!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="zh-cn" lang="zh-cn" data-whc_version="26.0">
|
||
<head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><meta name="description" content="启动过程中,不同的启动流程会用到不同启动参数,用于将当前一级程序的信息传递给下一级程序, 辅助下一级程序的执行,详情如下: BROM 跳转到 SPL 或者 U-Boot 时传递的参数 BROM RISCV 跳转到 SPL 或者 U-Boot 时传递的参数 SPL 跳转 U-Boot 时传递的参数 SPL 和 U-Boot 跳转到内核时传递的参数 表 1 . BROM 跳转到 SPL 或者 ..."/><meta name="DC.rights.owner" content="(C) 版权 2025"/><meta name="copyright" content="(C) 版权 2025"/><meta name="generator" content="DITA-OT"/><meta name="DC.type" content="concept"/><meta name="DC.creator" content="yan.wang"/><meta name="DC.date.created" content="2023-12-14"/><meta name="DC.date.modified" content="2024-12-04"/><meta name="DC.format" content="HTML5"/><meta name="DC.identifier" content="concept_f42_tsl_tzb"/><meta name="DC.language" content="zh-CN"/><title>启动参数的传递</title><!-- Build number 2023110923. --><meta name="wh-path2root" content="../../../"/><meta name="wh-toc-id" content=""/><meta name="wh-source-relpath" content="topics/sdk/boot/uboot-pass-param-1601.dita"/><meta name="wh-out-relpath" content="topics/sdk/boot/uboot-pass-param-1601.html"/>
|
||
|
||
<link rel="stylesheet" type="text/css" href="../../../webhelp/app/commons.css?buildId=2023110923"/>
|
||
<link rel="stylesheet" type="text/css" href="../../../webhelp/app/topic.css?buildId=2023110923"/>
|
||
|
||
<script src="../../../webhelp/app/options/properties.js?buildId=20250121171154"></script>
|
||
<script src="../../../webhelp/app/localization/strings.js?buildId=2023110923"></script>
|
||
<script src="../../../webhelp/app/search/index/keywords.js?buildId=20250121171154"></script>
|
||
<script defer="defer" src="../../../webhelp/app/commons.js?buildId=2023110923"></script>
|
||
<script defer="defer" src="../../../webhelp/app/topic.js?buildId=2023110923"></script>
|
||
<link rel="stylesheet" type="text/css" href="../../../webhelp/template/aic-styles-web.css?buildId=2023110923"/><link rel="stylesheet" type="text/css" href="../../../webhelp/template/notes.css?buildId=2023110923"/><link rel="stylesheet" type="text/css" href="../../../webhelp/template/aic-common.css?buildId=2023110923"/><link rel="stylesheet" type="text/css" href="../../../webhelp/template/aic-images.css?buildId=2023110923"/><link rel="stylesheet" type="text/css" href="../../../webhelp/template/footnote.css?buildId=2023110923"/><link rel="stylesheet" type="text/css" href="../../../webhelp/template/aic-web-watermark.css?buildId=2023110923"/><link rel="stylesheet" type="text/css" href="../../../webhelp/template/topic-body-list.css?buildId=2023110923"/></head>
|
||
|
||
<body id="concept_f42_tsl_tzb" class="wh_topic_page frmBody">
|
||
<a href="#wh_topic_body" class="sr-only sr-only-focusable">
|
||
跳转到主要内容
|
||
</a>
|
||
|
||
|
||
|
||
|
||
<header class="navbar navbar-default wh_header">
|
||
<div class="container-fluid">
|
||
<div class="wh_header_flex_container navbar-nav navbar-expand-md navbar-dark">
|
||
<div class="wh_logo_and_publication_title_container">
|
||
<div class="wh_logo_and_publication_title">
|
||
|
||
<a href="http://www.artinchip.com" class=" wh_logo d-none d-sm-block "><img src="../../../company-logo-white.png" alt="RTOS SDK 使用指南SDK 指南文件"/></a>
|
||
<div class=" wh_publication_title "><a href="../../../index.html"><span class="booktitle"><span class="ph mainbooktitle">RTOS SDK 使用指南</span><span class="ph booktitlealt">SDK 指南文件</span></span></a></div>
|
||
|
||
</div>
|
||
|
||
|
||
</div>
|
||
|
||
<div class="wh_top_menu_and_indexterms_link collapse navbar-collapse" id="wh_top_menu_and_indexterms_link">
|
||
|
||
|
||
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</header>
|
||
|
||
|
||
|
||
|
||
<div class=" wh_search_input navbar-form wh_topic_page_search search " role="form">
|
||
|
||
|
||
|
||
<form id="searchForm" method="get" role="search" action="../../../search.html"><div><input type="search" placeholder="搜索 " class="wh_search_textfield" id="textToSearch" name="searchQuery" aria-label="搜索查询" required="required"/><button type="submit" class="wh_search_button" aria-label="搜索"><span class="search_input_text">搜索</span></button></div></form>
|
||
|
||
|
||
|
||
</div>
|
||
|
||
<div class="container-fluid" id="wh_topic_container">
|
||
<div class="row">
|
||
|
||
<nav class="wh_tools d-print-none navbar-expand-md" aria-label="Tools">
|
||
|
||
<div data-tooltip-position="bottom" class=" wh_breadcrumb "></div>
|
||
|
||
|
||
|
||
<div class="wh_right_tools">
|
||
<button class="wh_hide_highlight" aria-label="切换搜索突出显示" title="切换搜索突出显示"></button>
|
||
<button class="webhelp_expand_collapse_sections" data-next-state="collapsed" aria-label="折叠截面" title="折叠截面"></button>
|
||
|
||
|
||
|
||
|
||
<div class=" wh_print_link print d-none d-md-inline-block "><button onClick="window.print()" title="打印此页" aria-label="打印此页"></button></div>
|
||
|
||
|
||
</div>
|
||
|
||
</nav>
|
||
</div>
|
||
|
||
|
||
|
||
|
||
<div class="wh_content_area">
|
||
<div class="row">
|
||
|
||
|
||
<div class="col-12" id="wh_topic_body">
|
||
|
||
|
||
|
||
<div class=" wh_topic_content body "><main role="main"><article class="- topic/topic concept/concept topic concept" role="article" aria-labelledby="ariaid-title1"><span class="edit-link" style="font-size:12px; opacity:0.6; text-align:right; vertical-align:middle"><a target="_blank" href="http://172.16.35.88/tasks/jdssno1uvvbf2mltu9kb9v3if05d5gopuakboe8hlud18rma/edit/F:/aicdita/aicdita-cn/topics/sdk/boot/uboot-pass-param-1601.dita">Edit online</a></span><h1 class="- topic/title title topictitle1" id="ariaid-title1">启动参数的传递</h1><div class="date inPage">4 Dec 2024</div><div style="color: gray;">
|
||
Read time: 3 minute(s)
|
||
</div><div class="- topic/body concept/conbody body conbody"><div class="- topic/p p" data-ofbid="d73903e23__20250121171523">启动过程中,不同的启动流程会用到不同启动参数,用于将当前一级程序的信息传递给下一级程序, 辅助下一级程序的执行,详情如下:<ul class="- topic/ul ul" id="concept_f42_tsl_tzb__ul_ynf_xtl_tzb" data-ofbid="concept_f42_tsl_tzb__ul_ynf_xtl_tzb"><li class="- topic/li li" data-ofbid="d73903e26__20250121171523"><a class="- topic/xref xref" href="#concept_f42_tsl_tzb__id6">BROM 跳转到 SPL 或者 U-Boot 时传递的参数</a></li><li class="- topic/li li" data-ofbid="d73903e30__20250121171523"><a class="- topic/xref xref" href="#concept_f42_tsl_tzb__id7">BROM RISCV 跳转到 SPL 或者 U-Boot 时传递的参数</a></li><li class="- topic/li li" data-ofbid="d73903e34__20250121171523"><a class="- topic/xref xref" href="#concept_f42_tsl_tzb__id8">SPL 跳转 U-Boot 时传递的参数</a></li><li class="- topic/li li" data-ofbid="d73903e38__20250121171523"><a class="- topic/xref xref" href="#concept_f42_tsl_tzb__p_k4t_ztl_tzb">SPL 和 U-Boot 跳转到内核时传递的参数</a></li></ul></div><div class="table-container"><table class="- topic/table table frame-all" id="concept_f42_tsl_tzb__id6" data-ofbid="concept_f42_tsl_tzb__id6" data-cols="3"><caption class="- topic/title title tablecap" data-caption-side="top" data-is-repeated="true"><span class="table--title-label">表<span class="table--title-label-number"> 1</span><span class="table--title-label-punctuation">. </span></span><span class="table--title">BROM 跳转到 SPL 或者 U-Boot 时传递的参数</span></caption><colgroup><col style="width:33.33333333333333%"/><col style="width:33.33333333333333%"/><col style="width:33.33333333333333%"/></colgroup><thead class="- topic/thead thead"><tr class="- topic/row"><th class="- topic/entry entry colsep-0 rowsep-0" id="concept_f42_tsl_tzb__id6__entry__1">参数名称</th><th class="- topic/entry entry colsep-0 rowsep-0" id="concept_f42_tsl_tzb__id6__entry__2">寄存器</th><th class="- topic/entry entry colsep-0 rowsep-0" id="concept_f42_tsl_tzb__id6__entry__3">说明</th></tr></thead><tbody class="- topic/tbody tbody"><tr class="- topic/row"><td class="- topic/entry entry colsep-0 rowsep-0" headers="concept_f42_tsl_tzb__id6__entry__1">boot device</td><td class="- topic/entry entry colsep-0 rowsep-0" headers="concept_f42_tsl_tzb__id6__entry__2">R0,bit[3:0]</td><td class="- topic/entry entry colsep-0 rowsep-0" headers="concept_f42_tsl_tzb__id6__entry__3">启动的存储介质 ID</td></tr><tr class="- topic/row"><td class="- topic/entry entry colsep-0 rowsep-0" headers="concept_f42_tsl_tzb__id6__entry__1">boot reason</td><td class="- topic/entry entry colsep-0 rowsep-0" headers="concept_f42_tsl_tzb__id6__entry__2">R0,bit[7:4]</td><td class="- topic/entry entry colsep-0 rowsep-0" headers="concept_f42_tsl_tzb__id6__entry__3">启动的原因,如:冷启动、热启动</td></tr><tr class="- topic/row"><td class="- topic/entry entry colsep-0 rowsep-0" headers="concept_f42_tsl_tzb__id6__entry__1">image id</td><td class="- topic/entry entry colsep-0 rowsep-0" headers="concept_f42_tsl_tzb__id6__entry__2">R0,bit[11:8]</td><td class="- topic/entry entry colsep-0 rowsep-0" headers="concept_f42_tsl_tzb__id6__entry__3">使用的备份镜像 ID</td></tr><tr class="- topic/row"><td class="- topic/entry entry colsep-0 rowsep-0" headers="concept_f42_tsl_tzb__id6__entry__1">boot time</td><td class="- topic/entry entry colsep-0 rowsep-0" headers="concept_f42_tsl_tzb__id6__entry__2">R1</td><td class="- topic/entry entry colsep-0 rowsep-0" headers="concept_f42_tsl_tzb__id6__entry__3">BROM 启动所使用的时间(us)</td></tr></tbody></table></div><div class="table-container"><table class="- topic/table table frame-all" id="concept_f42_tsl_tzb__id7" data-ofbid="concept_f42_tsl_tzb__id7" data-cols="3"><caption class="- topic/title title tablecap" data-caption-side="top" data-is-repeated="true"><span class="table--title-label">表<span class="table--title-label-number"> 2</span><span class="table--title-label-punctuation">. </span></span><span class="table--title">BROM RISCV 跳转到 SPL 或者 U-Boot 时传递的参数</span></caption><colgroup><col style="width:33.33333333333333%"/><col style="width:33.33333333333333%"/><col style="width:33.33333333333333%"/></colgroup><thead class="- topic/thead thead"><tr class="- topic/row"><th class="- topic/entry entry colsep-0 rowsep-0" id="concept_f42_tsl_tzb__id7__entry__1">参数名称</th><th class="- topic/entry entry colsep-0 rowsep-0" id="concept_f42_tsl_tzb__id7__entry__2">寄存器</th><th class="- topic/entry entry colsep-0 rowsep-0" id="concept_f42_tsl_tzb__id7__entry__3">说明</th></tr></thead><tbody class="- topic/tbody tbody"><tr class="- topic/row"><td class="- topic/entry entry colsep-0 rowsep-0" headers="concept_f42_tsl_tzb__id7__entry__1">boot device</td><td class="- topic/entry entry colsep-0 rowsep-0" headers="concept_f42_tsl_tzb__id7__entry__2">a0,bit[3:0]</td><td class="- topic/entry entry colsep-0 rowsep-0" headers="concept_f42_tsl_tzb__id7__entry__3">启动的存储介质 ID</td></tr><tr class="- topic/row"><td class="- topic/entry entry colsep-0 rowsep-0" headers="concept_f42_tsl_tzb__id7__entry__1">boot reason</td><td class="- topic/entry entry colsep-0 rowsep-0" headers="concept_f42_tsl_tzb__id7__entry__2">a0,bit[7:4]</td><td class="- topic/entry entry colsep-0 rowsep-0" headers="concept_f42_tsl_tzb__id7__entry__3">启动的原因,如:冷启动、热启动</td></tr><tr class="- topic/row"><td class="- topic/entry entry colsep-0 rowsep-0" headers="concept_f42_tsl_tzb__id7__entry__1">image id</td><td class="- topic/entry entry colsep-0 rowsep-0" headers="concept_f42_tsl_tzb__id7__entry__2">a0,bit[11:8]</td><td class="- topic/entry entry colsep-0 rowsep-0" headers="concept_f42_tsl_tzb__id7__entry__3">使用的备份镜像 ID</td></tr><tr class="- topic/row"><td class="- topic/entry entry colsep-0 rowsep-0" headers="concept_f42_tsl_tzb__id7__entry__1">boot time</td><td class="- topic/entry entry colsep-0 rowsep-0" headers="concept_f42_tsl_tzb__id7__entry__2">a1</td><td class="- topic/entry entry colsep-0 rowsep-0" headers="concept_f42_tsl_tzb__id7__entry__3">BROM 启动所使用的时间(us)</td></tr></tbody></table></div><div class="table-container"><table class="- topic/table table frame-all" id="concept_f42_tsl_tzb__id8" data-ofbid="concept_f42_tsl_tzb__id8" data-cols="3"><caption class="- topic/title title tablecap" data-caption-side="top" data-is-repeated="true"><span class="table--title-label">表<span class="table--title-label-number"> 3</span><span class="table--title-label-punctuation">. </span></span><span class="table--title">SPL 跳转 U-Boot 时传递的参数</span></caption><colgroup><col style="width:33.33333333333333%"/><col style="width:33.33333333333333%"/><col style="width:33.33333333333333%"/></colgroup><thead class="- topic/thead thead"><tr class="- topic/row"><th class="- topic/entry entry colsep-0 rowsep-0" id="concept_f42_tsl_tzb__id8__entry__1">参数名称</th><th class="- topic/entry entry colsep-0 rowsep-0" id="concept_f42_tsl_tzb__id8__entry__2">寄存器</th><th class="- topic/entry entry colsep-0 rowsep-0" id="concept_f42_tsl_tzb__id8__entry__3">说明</th></tr></thead><tbody class="- topic/tbody tbody"><tr class="- topic/row"><td class="- topic/entry entry colsep-0 rowsep-0" headers="concept_f42_tsl_tzb__id8__entry__1">boot device</td><td class="- topic/entry entry colsep-0 rowsep-0" headers="concept_f42_tsl_tzb__id8__entry__2">R0,bit[3:0]</td><td class="- topic/entry entry colsep-0 rowsep-0" headers="concept_f42_tsl_tzb__id8__entry__3">启动的存储介质 ID,BROM 传递过来的值</td></tr><tr class="- topic/row"><td class="- topic/entry entry colsep-0 rowsep-0" headers="concept_f42_tsl_tzb__id8__entry__1">boot reason</td><td class="- topic/entry entry colsep-0 rowsep-0" headers="concept_f42_tsl_tzb__id8__entry__2">R0,bit[7:4]</td><td class="- topic/entry entry colsep-0 rowsep-0" headers="concept_f42_tsl_tzb__id8__entry__3">启动的原因,BROM 传递过来的值</td></tr><tr class="- topic/row"><td class="- topic/entry entry colsep-0 rowsep-0" headers="concept_f42_tsl_tzb__id8__entry__1">image id</td><td class="- topic/entry entry colsep-0 rowsep-0" headers="concept_f42_tsl_tzb__id8__entry__2">R0,bit[11:8]</td><td class="- topic/entry entry colsep-0 rowsep-0" headers="concept_f42_tsl_tzb__id8__entry__3">暂时没有使用</td></tr><tr class="- topic/row"><td class="- topic/entry entry colsep-0 rowsep-0" headers="concept_f42_tsl_tzb__id8__entry__1">boot time</td><td class="- topic/entry entry colsep-0 rowsep-0" headers="concept_f42_tsl_tzb__id8__entry__2">R1</td><td class="- topic/entry entry colsep-0 rowsep-0" headers="concept_f42_tsl_tzb__id8__entry__3">SPL 启动所使用的时间(us)</td></tr></tbody></table></div><div class="- topic/p p" id="concept_f42_tsl_tzb__p_k4t_ztl_tzb" data-ofbid="concept_f42_tsl_tzb__p_k4t_ztl_tzb">SPL 和 U-Boot 跳转到内核时传递的参数相同,分别是:<ul class="- topic/ul ul" id="concept_f42_tsl_tzb__ul_jpc_wyg_bzb" data-ofbid="concept_f42_tsl_tzb__ul_jpc_wyg_bzb"><li class="- topic/li li" data-ofbid="d73903e177__20250121171523">
|
||
<p class="- topic/p p" data-ofbid="d73903e179__20250121171523">R0: zero</p>
|
||
</li><li class="- topic/li li" data-ofbid="d73903e182__20250121171523">
|
||
<p class="- topic/p p" data-ofbid="d73903e184__20250121171523">R1: mach id</p>
|
||
</li><li class="- topic/li li" data-ofbid="d73903e187__20250121171523">
|
||
<p class="- topic/p p" data-ofbid="d73903e189__20250121171523">R2: FDT address</p>
|
||
</li></ul></div><p class="- topic/p p" data-ofbid="d73903e192__20250121171523">无论是 SPL 还是 U-Boot,在执行时的第一步动作就是保存这些启动参数, 具体实现可参考
|
||
<span class="+ topic/ph sw-d/filepath ph filepath">arch/arm/cpu/armv7/start.S</span></p><pre class="+ topic/pre pr-d/codeblock pre codeblock language-c" id="concept_f42_tsl_tzb__codeblock_bpc_wyg_bzb" data-ofbid="concept_f42_tsl_tzb__codeblock_bpc_wyg_bzb">reset:
|
||
<em class="hl-comment">/* Allow the board to save important registers */</em>
|
||
b save_boot_params
|
||
save_boot_params_ret:</pre><p class="- topic/p p" data-ofbid="d73903e198__20250121171523"><span class="+ topic/keyword pr-d/parmname keyword parmname">save_boot_params</span> 的实现在源文件
|
||
<span class="+ topic/ph sw-d/filepath ph filepath">arch/arm/mach-artinchip/lowlevel_init.S</span></p><pre class="+ topic/pre pr-d/codeblock pre codeblock language-c" id="concept_f42_tsl_tzb__codeblock_cpc_wyg_bzb" data-ofbid="concept_f42_tsl_tzb__codeblock_cpc_wyg_bzb">ENTRY(save_boot_params)
|
||
stmfd sp!, {r4} <em class="hl-comment">/* Backup r4 on caller's stack */</em>
|
||
ldr r4, =boot_params_stash
|
||
stmia r4!, {r0 - r3} <em class="hl-comment">/* Save r0 ~ r3 to boot_params_stash */</em>
|
||
mov r0, r4
|
||
ldmfd sp!, {r4} <em class="hl-comment">/* Restore r4 */</em>
|
||
stmia r0!, {r4 - r13, lr} <em class="hl-comment">/* Save r4 ~ r14 to boot_params_stash */</em>
|
||
b save_boot_params_ret
|
||
ENDPROC(save_boot_params)</pre><p class="- topic/p p" data-ofbid="d73903e206__20250121171523">传递的参数被保存在全局变量 <span class="+ topic/keyword pr-d/parmname keyword parmname">boot_params_stash</span> 中,SPL 或者 U-Boot 可从中获取相关信息。 在保存参数时,不仅将
|
||
R0,R1 寄存器保存起来,还将其他重要寄存器一起保存。 原因是这里不仅要传递参数,还为了实现 SPL 返回 BROM 的功能。将其他寄存器一起保存,
|
||
相当于保存了调用现场,需要返回时可以 <span class="+ topic/keyword pr-d/parmname keyword parmname">boot_params_stash</span> 中恢复相应的寄存器参数。</p><p class="- topic/p p" data-ofbid="d73903e214__20250121171523">无论是 SPL 还是 U-Boot,在执行时的第一步动作就是保存这些启动参数, 具体实现可参考
|
||
<span class="+ topic/ph sw-d/filepath ph filepath">arch\riscv\cpu\start.S</span></p><pre class="+ topic/pre pr-d/codeblock pre codeblock language-c" id="concept_f42_tsl_tzb__codeblock_epc_wyg_bzb" data-ofbid="concept_f42_tsl_tzb__codeblock_epc_wyg_bzb">_start:
|
||
<em class="hl-comment">/* Allow the board to save important registers */</em>
|
||
j save_boot_params
|
||
save_boot_params_ret:</pre><p class="- topic/p p" data-ofbid="d73903e221__20250121171523"><span class="+ topic/keyword pr-d/parmname keyword parmname">save_boot_params</span> 的实现在源文件
|
||
<span class="+ topic/ph sw-d/filepath ph filepath">arch\riscv\mach-artinchip\lowlevel_init.S</span></p><pre class="+ topic/pre pr-d/codeblock pre codeblock language-c" id="concept_f42_tsl_tzb__codeblock_fpc_wyg_bzb" data-ofbid="concept_f42_tsl_tzb__codeblock_fpc_wyg_bzb">ENTRY(save_boot_params)
|
||
la t0, boot_params_stash
|
||
SREG a0, REGBYTES * <span class="hl-number">0</span>(t0)
|
||
SREG a1, REGBYTES * <span class="hl-number">1</span>(t0)
|
||
SREG a2, REGBYTES * <span class="hl-number">2</span>(t0)
|
||
SREG a3, REGBYTES * <span class="hl-number">3</span>(t0)
|
||
SREG a4, REGBYTES * <span class="hl-number">4</span>(t0)
|
||
SREG a5, REGBYTES * <span class="hl-number">5</span>(t0)
|
||
SREG a6, REGBYTES * <span class="hl-number">6</span>(t0)
|
||
SREG a7, REGBYTES * <span class="hl-number">7</span>(t0)
|
||
SREG s0, REGBYTES * <span class="hl-number">8</span>(t0)
|
||
SREG s1, REGBYTES * <span class="hl-number">9</span>(t0)
|
||
SREG s2, REGBYTES * <span class="hl-number">10</span>(t0)
|
||
SREG s3, REGBYTES * <span class="hl-number">11</span>(t0)
|
||
SREG s4, REGBYTES * <span class="hl-number">12</span>(t0)
|
||
SREG s5, REGBYTES * <span class="hl-number">13</span>(t0)
|
||
SREG s6, REGBYTES * <span class="hl-number">14</span>(t0)
|
||
SREG s7, REGBYTES * <span class="hl-number">15</span>(t0)
|
||
SREG s8, REGBYTES * <span class="hl-number">16</span>(t0)
|
||
SREG s9, REGBYTES * <span class="hl-number">17</span>(t0)
|
||
SREG s10, REGBYTES * <span class="hl-number">18</span>(t0)
|
||
SREG s11, REGBYTES * <span class="hl-number">19</span>(t0)
|
||
SREG sp, REGBYTES * <span class="hl-number">20</span>(t0)
|
||
SREG ra, REGBYTES * <span class="hl-number">21</span>(t0)
|
||
j save_boot_params_ret
|
||
ENDPROC(save_boot_params)</pre><p class="- topic/p p" data-ofbid="d73903e229__20250121171523">传递的参数被保存在全局变量 <span class="+ topic/keyword pr-d/parmname keyword parmname">boot_params_stash</span> 中,SPL 或者 U-Boot 可从中获取相关信息。具体用法参考上一节。</p><p class="- topic/p p" data-ofbid="d73903e234__20250121171523">相关宏定义的实现在源文件 <span class="+ topic/ph sw-d/filepath ph filepath">arch\riscv\cpu\mtrap.S</span></p><pre class="+ topic/pre pr-d/codeblock pre codeblock language-c" id="concept_f42_tsl_tzb__codeblock_gpc_wyg_bzb" data-ofbid="concept_f42_tsl_tzb__codeblock_gpc_wyg_bzb">#<span class="hl-directive">define</span> LREG ld
|
||
#<span class="hl-directive">define</span> SREG sd
|
||
#<span class="hl-directive">define</span> REGBYTES <span class="hl-number">8</span></pre></div></article></main></div>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
</div>
|
||
|
||
</div>
|
||
</div>
|
||
|
||
|
||
|
||
</div>
|
||
<footer class="navbar navbar-default wh_footer">
|
||
<div class=" footer-container mx-auto ">
|
||
<title>footer def</title>
|
||
<style><!--
|
||
|
||
.p1 {
|
||
font-family: FangZhengShuSong, Times, serif;
|
||
}
|
||
.p2 {
|
||
font-family: Arial, Helvetica, sans-serif;
|
||
}
|
||
.p3 {
|
||
font-family: "Lucida Console", "Courier New", monospace;
|
||
}
|
||
|
||
--></style>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="webhelp.fragment.footer">
|
||
<p class="p1">Copyright © 2019-2024 广东匠芯创科技有限公司. All rights reserved.</p>
|
||
</div><div>
|
||
<div class="generation_time">
|
||
Update Time: 2025-01-21
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</footer>
|
||
|
||
<div id="go2top" class="d-print-none">
|
||
<span class="oxy-icon oxy-icon-up"></span>
|
||
</div>
|
||
|
||
<div id="modal_img_large" class="modal">
|
||
<span class="close oxy-icon oxy-icon-remove"></span>
|
||
<div id="modal_img_container"></div>
|
||
<div id="caption"></div>
|
||
</div>
|
||
|
||
|
||
<script src="${pd}/publishing/publishing-styles-AIC-template/js/custom.js" defer="defer"></script>
|
||
|
||
|
||
</body>
|
||
</html> |