Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/813916/?format=api
{ "id": 813916, "url": "http://patchwork.ozlabs.org/api/patches/813916/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/1505415699-3401-6-git-send-email-york.sun@nxp.com/", "project": { "id": 18, "url": "http://patchwork.ozlabs.org/api/projects/18/?format=api", "name": "U-Boot", "link_name": "uboot", "list_id": "u-boot.lists.denx.de", "list_email": "u-boot@lists.denx.de", "web_url": null, "scm_url": null, "webscm_url": null, "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<1505415699-3401-6-git-send-email-york.sun@nxp.com>", "list_archive_url": null, "date": "2017-09-14T19:01:37", "name": "[U-Boot,v2,5/7] armv8: layerscape: Eanble falcon boot", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "8ceac5175a24dfdd61e959f9dd1c1f7f3f902b34", "submitter": { "id": 67822, "url": "http://patchwork.ozlabs.org/api/people/67822/?format=api", "name": "York Sun", "email": "york.sun@nxp.com" }, "delegate": { "id": 2666, "url": "http://patchwork.ozlabs.org/api/users/2666/?format=api", "username": "yorksun", "first_name": "York", "last_name": "Sun", "email": "yorksun@freescale.com" }, "mbox": "http://patchwork.ozlabs.org/project/uboot/patch/1505415699-3401-6-git-send-email-york.sun@nxp.com/mbox/", "series": [ { "id": 3150, "url": "http://patchwork.ozlabs.org/api/series/3150/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/list/?series=3150", "date": "2017-09-14T19:01:33", "name": "Enable falcon boot for LS1043ARDB", "version": 2, "mbox": "http://patchwork.ozlabs.org/series/3150/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/813916/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/813916/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<u-boot-bounces@lists.denx.de>", "X-Original-To": "incoming@patchwork.ozlabs.org", "Delivered-To": "patchwork-incoming@bilbo.ozlabs.org", "Authentication-Results": [ "ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.denx.de\n\t(client-ip=81.169.180.215; helo=lists.denx.de;\n\tenvelope-from=u-boot-bounces@lists.denx.de;\n\treceiver=<UNKNOWN>)", "spf=fail (sender IP is 192.88.168.50)\n\tsmtp.mailfrom=nxp.com; nxp.com; dkim=none (message not signed)\n\theader.d=none;nxp.com; dmarc=fail action=none header.from=nxp.com;" ], "Received": [ "from lists.denx.de (dione.denx.de [81.169.180.215])\n\tby ozlabs.org (Postfix) with ESMTP id 3xtSdf5h3Fz9sCZ\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri, 15 Sep 2017 05:04:54 +1000 (AEST)", "by lists.denx.de (Postfix, from userid 105)\n\tid 895A0C21E26; Thu, 14 Sep 2017 19:04:01 +0000 (UTC)", "from lists.denx.de (localhost [IPv6:::1])\n\tby lists.denx.de (Postfix) with ESMTP id 1DCE8C21E5D;\n\tThu, 14 Sep 2017 19:02:31 +0000 (UTC)", "by lists.denx.de (Postfix, from userid 105)\n\tid ED479C21D6A; Thu, 14 Sep 2017 19:02:16 +0000 (UTC)", "from NAM02-CY1-obe.outbound.protection.outlook.com\n\t(mail-cys01nam02on0045.outbound.protection.outlook.com\n\t[104.47.37.45])\n\tby lists.denx.de (Postfix) with ESMTPS id 38C7BC21E09\n\tfor <u-boot@lists.denx.de>; Thu, 14 Sep 2017 19:02:12 +0000 (UTC)", "from CY1PR03CA0007.namprd03.prod.outlook.com (2603:10b6:600::17) by\n\tBN1PR0301MB0721.namprd03.prod.outlook.com (2a01:111:e400:4c::12) with\n\tMicrosoft SMTP Server (version=TLS1_2,\n\tcipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.56.11;\n\tThu, 14 Sep 2017 19:02:07 +0000", "from BL2FFO11OLC007.protection.gbl (2a01:111:f400:7c09::184) by\n\tCY1PR03CA0007.outlook.office365.com (2603:10b6:600::17) with\n\tMicrosoft SMTP Server (version=TLS1_2,\n\tcipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id\n\t15.20.56.8 via Frontend Transport; Thu, 14 Sep 2017 19:02:07 +0000", "from tx30smr01.am.freescale.net (192.88.168.50) by\n\tBL2FFO11OLC007.mail.protection.outlook.com (10.173.160.142) with\n\tMicrosoft\n\tSMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id\n\t15.20.13.11 via Frontend Transport; Thu, 14 Sep 2017 19:02:07 +0000", "from oslab-l16.am.freescale.net ([10.214.83.126])\n\tby tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id\n\tv8EJ1uUb021058; Thu, 14 Sep 2017 12:02:05 -0700" ], "X-Spam-Checker-Version": "SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de", "X-Spam-Level": "", "X-Spam-Status": "No, score=-0.0 required=5.0 tests=BAD_ENC_HEADER,\n\tRCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,\n\tSPF_HELO_PASS\n\tautolearn=unavailable autolearn_force=no version=3.4.0", "Received-SPF": "Fail (protection.outlook.com: domain of nxp.com does not\n\tdesignate 192.88.168.50 as permitted sender)\n\treceiver=protection.outlook.com; \n\tclient-ip=192.88.168.50; helo=tx30smr01.am.freescale.net;", "From": "York Sun <york.sun@nxp.com>", "To": "<u-boot@lists.denx.de>", "Date": "Thu, 14 Sep 2017 12:01:37 -0700", "Message-ID": "<1505415699-3401-6-git-send-email-york.sun@nxp.com>", "X-Mailer": "git-send-email 2.7.4", "In-Reply-To": "<1505415699-3401-1-git-send-email-york.sun@nxp.com>", "References": "<1505415699-3401-1-git-send-email-york.sun@nxp.com>", "X-EOPAttributedMessage": "0", "X-Matching-Connectors": "131498893276473541;\n\t(91ab9b29-cfa4-454e-5278-08d120cd25b8); ()", "X-Forefront-Antispam-Report": "CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI;\n\tSFV:NSPM;\n\tSFS:(10009020)(6009001)(336005)(376002)(39860400002)(39380400002)(346002)(2980300002)(1110001)(1109001)(339900001)(189002)(199003)(8936002)(81156014)(6916009)(2950100002)(189998001)(50226002)(8676002)(2351001)(50986999)(85426001)(106466001)(76176999)(81166006)(305945005)(105606002)(356003)(47776003)(16586007)(498600001)(33646002)(2906002)(6666003)(36756003)(50466002)(316002)(8656003)(39060400002)(54906002)(53936002)(4326008)(110136004)(5003940100001)(104016004)(48376002)(86362001)(5660300001)(7416002)(77096006)(97736004)(68736007)(107886003);\n\tDIR:OUT; SFP:1101; SCL:1; SRVR:BN1PR0301MB0721;\n\tH:tx30smr01.am.freescale.net; \n\tFPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; ", "X-Microsoft-Exchange-Diagnostics": [ "1; BL2FFO11OLC007;\n\t1:pTX6kJ8bUc+ydHIEeheH7UQ/HYcZWRo1xaLny3l5GS2tDxSh2pjmj9NPOiWjaUbsGV4RrBqbH+Y0AktDwQg4scENCCWpHQqRpUBqL25Okjlr2YGPKeSrOJQy5NCIuUsj", "1; BN1PR0301MB0721;\n\t3:yS5cEFlhuZJYXv4s5pdXLDKj/cpbW+a5SJinAd5JHefqtqpHgSrw8+1njUi3y6RPTgAVj/bqPWOr+w4GNLxCb950BNjFztsRWYkixbU94LhhslxelmrHxgy6ZT/3nSFLOy+Q+6y3JWnDgTClwhMVg/qS6QU3TyPLHn36hC8v+++JMTlnAT4mAe4q2cJGJSaWwIT6FSB/slUWFW5frPx92gzF6SS+FoGI+G2WPKuwhbUQlEzCzcvAk6h1TRmQuLMoKdlpoZ20xZjS/4wEuSThcYFxvNotCE8msWp9YGNpVGbl2DGZ7UGUWDwV0NsuIdaqQpcn3AM5/4gHOy17WQA8FXQmWUhY5X0yV2HIOtTwk8s=;\n\t25:3UkCLlV5LWQLXzx28i1GoBG8BBeauJACnpXGNVb4Njrg9+7OIp3HRgcKWgu48hx7L3qFD2nZVOGWuIH7kdeRqBBP0Z1m9gPakzh4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cAFG9wuLxZvFjgPiAvY0BwbmQnf4KWsgQzTLlFRmNinXO7tBSEzJmaIhBxQoULNJwy7UdW9YDOYJs4TFul7ETGLnQSDpA5rqGuX4Bt8QjGbokykoqV6kQkroJj+Pi4IJfWFiJSQMOn2dTNoaFj64bTrq/q9zxD8+rNHHz7ExGExY4RRpPnGY4gOm6fBn8Jf7TUHQE/TTPYgL4J4z43CNSHiuG4j4s2K7yJvUQNN8AiKj6MnzMKjIqaSw3NlzNuhDcChKTaWxzz8FfNQ6qFSTSYztwcZUOhR9KXJF24/mHF+R3zJ8weLMHeV88RosFtQC6DqVkww==;\n\t5:kVuxuLi3hIqKllDsZEQABmhsky6b1Qi6PADN/vgESYsVfGjOM+QW/TRXTnxLGRv4QXdINoLMzXOeV2JT7yM78dQprEV+4BATeu2drWRA89CrqhqW7B1P2qFud9g1hzehnBBIUtRYP5wC4Mcyaiv9IQ==;\n\t24:TnofXO2b2ZWS5EBXz75h5YIl70lFIffNraLg4d74Apa5s4RfPfhuM5W8VSf9P38PCdvzzivLY3KnYZF0jMdMDaI1Wh6EBRqgdET8OTLitf4=;\n\t7:ZKLRB2QoFTP01z6fa4rx9p2pnU1n/R/axPU1kO7bIKs7IJv2tRBMxtAbuzhKksvEFDKhi0n8Z5jO39OBeZmQG4UrmP2PuTv41O0Bt0TK+uYEcVsDNYwTzkP0LOnTNSSjzWRchNbTrrAK0ABZLL8W0aEakNkaO12bCReV+guvd+gpu6wadUcjIJJsQhlXobvnMlhi7X8ud5IKFr643cSpB2RthUN/c3iWwVUFnSh5wsQ=" ], "MIME-Version": "1.0", "X-MS-PublicTrafficType": "Email", "X-MS-Office365-Filtering-Correlation-Id": "e16e8401-69bc-4c28-7c80-08d4fba3187b", "X-Microsoft-Antispam": "UriScan:; BCL:0; PCL:0;\n\tRULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(300000503095)(300135400095)(2017052603199)(201703131430075)(201703131517081)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095);\n\tSRVR:BN1PR0301MB0721; ", "X-MS-TrafficTypeDiagnostic": "BN1PR0301MB0721:", "X-Exchange-Antispam-Report-Test": "UriScan:(185117386973197);", "X-Microsoft-Antispam-PRVS": "<BN1PR0301MB0721D28C40EBCA55D3C6DD3D9A6F0@BN1PR0301MB0721.namprd03.prod.outlook.com>", "X-Exchange-Antispam-Report-CFA-Test": "BCL:0; PCL:0;\n\tRULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6095135)(2401047)(8121501046)(5005006)(3002001)(10201501046)(100000703101)(100105400095)(93006095)(93001095)(6055026)(6096035)(20161123559100)(20161123561025)(201703131430075)(201703131433075)(201703131448075)(201703161259150)(201703151042153)(20161123556025)(20161123563025)(20161123565025)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095);\n\tSRVR:BN1PR0301MB0721; BCL:0; PCL:0;\n\tRULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(400006)(100000804101)(100110200095)(100000805101)(100110500095);\n\tSRVR:BN1PR0301MB0721; ", "X-Forefront-PRVS": "0430FA5CB7", "SpamDiagnosticOutput": "1:99", "SpamDiagnosticMetadata": "NSPM", "X-MS-Exchange-CrossTenant-OriginalArrivalTime": "14 Sep 2017 19:02:07.2261\n\t(UTC)", "X-MS-Exchange-CrossTenant-Id": "5afe0b00-7697-4969-b663-5eab37d5f47e", "X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp": "TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e;\n\tIp=[192.88.168.50]; \n\tHelo=[tx30smr01.am.freescale.net]", "X-MS-Exchange-CrossTenant-FromEntityHeader": "HybridOnPrem", "X-MS-Exchange-Transport-CrossTenantHeadersStamped": "BN1PR0301MB0721", "Cc": "Albert Aribaud <albert.u.boot@aribaud.net>,\n\tStephen Warren <swarren@nvidia.com>,\n\tHou Zhiqiang <Zhiqiang.Hou@nxp.com>, \n\tVinitha Pillai-B57223 <vinitha.pillai@nxp.com>,\n\tRuchika Gupta <ruchika.gupta@nxp.com>", "Subject": "[U-Boot] [PATCH v2 5/7] armv8: layerscape: Eanble falcon boot", "X-BeenThere": "u-boot@lists.denx.de", "X-Mailman-Version": "2.1.18", "Precedence": "list", "List-Id": "U-Boot discussion <u-boot.lists.denx.de>", "List-Unsubscribe": "<https://lists.denx.de/options/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=unsubscribe>", "List-Archive": "<http://lists.denx.de/pipermail/u-boot/>", "List-Post": "<mailto:u-boot@lists.denx.de>", "List-Help": "<mailto:u-boot-request@lists.denx.de?subject=help>", "List-Subscribe": "<https://lists.denx.de/listinfo/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=subscribe>", "Content-Type": "text/plain; charset=\"utf-8\"", "Content-Transfer-Encoding": "base64", "Errors-To": "u-boot-bounces@lists.denx.de", "Sender": "\"U-Boot\" <u-boot-bounces@lists.denx.de>" }, "content": "Add jump_to_image_linux() for arm64. Add \"noreturn\" flag to\narmv8_switch_to_el2(). Add hooks to fsl-layerscape to enable falcon\nboot.\n\nSigned-off-by: York Sun <york.sun@nxp.com>\n\n---\n\nChanges in v2:\nRelace getenv_f() with env_get_f() after rebasing to latet master.\n\n .../arm/cpu/armv8/fsl-layerscape/doc/README.falcon | 140 +++++++++++++++++++++\n arch/arm/cpu/armv8/fsl-layerscape/spl.c | 29 +++++\n arch/arm/include/asm/system.h | 2 +-\n arch/arm/lib/spl.c | 11 ++\n 4 files changed, 181 insertions(+), 1 deletion(-)\n create mode 100644 arch/arm/cpu/armv8/fsl-layerscape/doc/README.falcon", "diff": "diff --git a/arch/arm/cpu/armv8/fsl-layerscape/doc/README.falcon b/arch/arm/cpu/armv8/fsl-layerscape/doc/README.falcon\nnew file mode 100644\nindex 0000000..282b19f\n--- /dev/null\n+++ b/arch/arm/cpu/armv8/fsl-layerscape/doc/README.falcon\n@@ -0,0 +1,140 @@\n+Falcon boot option\n+------------------\n+Falcon boot is a short cut boot method for SD/eMMC targets. It skips loading the\n+RAM version U-Boot. Instead, it loads FIT image and boot directly to Linux.\n+CONFIG_SPL_OS_BOOT enables falcon boot. CONFIG_SPL_LOAD_FIT enables the FIT\n+image support (also need CONFIG_SPL_OF_LIBFDT, CONFIG_SPL_FIT and optionally\n+CONFIG_SPL_GZIP).\n+\n+To enable falcon boot, a hook function spl_start_uboot() returns 0 to indicate\n+booting U-Boot is not the first choice. The kernel FIT image needs to be put\n+at CONFIG_SYS_MMCSD_RAW_MODE_KERNEL_SECTOR. SPL mmc driver reads the header to\n+determine if this is a FIT image. If true, FIT image components are parsed and\n+copied or decompressed (if applicable) to their desitinations. If FIT image is\n+not found, normal U-Boot flow will follow.\n+\n+An important part of falcon boot is to prepare the device tree. A normal U-Boot\n+does FDT fixups when booting Linux. For falcon boot, Linux boots directly from\n+SPL, skipping the normal U-Boot. The device tree has to be prepared in advance.\n+A command \"spl export\" should be called under the normal RAM version U-Boot.\n+It is equivalent to go through \"bootm\" step-by-step until device tree fixup is\n+done. The device tree in memory is the one needed for falcon boot. Falcon boot\n+flow suggests to save this image to SD/eMMC at the location pointed by macro\n+CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTOR, with maximum size specified by macro\n+CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTORS. However, when FIT image is used for\n+Linux, the device tree stored in FIT image overwrites the memory loaded by spl\n+driver from these sectors. We could change this loading order to favor the\n+stored sectors. But when secure boot is enabled, these sectors are used for\n+signature header and needs to be loaded before the FIT image. So it is important\n+to understand the device tree in FIT image should be the one actually used, or\n+leave it abscent to favor the stored sectors. It is easier to deploy the FIT\n+image with embedded static device tree to multiple boards.\n+\n+Macro CONFIG_SYS_SPL_ARGS_ADDR serves two purposes. One is the pointer to load\n+the stored sectors to. Normally this is the static device tree. The second\n+purpose is the memory location of signature header for secure boot. After the\n+FIT image is loaded into memory, it is validated against the signature header\n+before individual components are extracted (and optionally decompressed) into\n+their final memory locations, respectivelly. After the validation, the header\n+is no longer used. The static device tree is copied into this location. So\n+this macro is passed as the location of device tree when booting Linux.\n+\n+Steps to prepare static device tree\n+-----------------------------------\n+To prepare the static device tree for Layerscape boards, it is important to\n+understand the fixups in U-Boot. Memory size and location, as well as reserved\n+memory blocks are added/updated. Ethernet MAC addressed are updated. FMan\n+microcode (if used) is embedded in the device tree. Kernel command line and\n+initrd information are embedded. Others including CPU status, boot method,\n+Ethernet port status, etc. are also updated.\n+\n+Following normal booting process, all variables are set, all images are loaded\n+before \"bootm\" command would be issued to boot, run command\n+\n+spl export fdt <address>\n+\n+where the address is the location of FIT image. U-Boot goes through the booting\n+process as if \"bootm start\", \"bootm loados\", \"bootm ramdisk\"... commands but\n+stops before \"bootm go\". There we have the fixed-up device tree in memory.\n+We can check the device tree header by these commands\n+\n+fdt addr <fdt address>\n+fdt header\n+\n+Where the fdt address is the device tree in memory. It is printed by U-Boot.\n+It is useful to know the exact size. One way to extract this static device\n+tree is to save it to eMMC/SD using command in U-Boot, and extract under Linux\n+with these commands, repectivelly\n+\n+mmc write <address> <sector> <sectors>\n+dd if=/dev/mmcblk0 of=<filename> bs=512 skip=<sector> count=<sectors>\n+\n+Note, U-Boot takes values as hexadecimals while Linux takes them as decimals by\n+default. If using NAND or other storage, the commands are slightly different.\n+When we have the static device tree image, we can re-make the FIT image with\n+it. It is important to specify the load addresses in FIT image for every\n+components. Otherwise U-Boot cannot load them correctly.\n+\n+Generate FIT image with static device tree\n+------------------------------------------\n+Example:\n+\n+/dts-v1/;\n+\n+/ {\n+\tdescription = \"Image file for the LS1043A Linux Kernel\";\n+\t#address-cells = <1>;\n+\n+\timages {\n+\t\tkernel@1 {\n+\t\t\tdescription = \"ARM64 Linux kernel\";\n+\t\t\tdata = /incbin/(\"./arch/arm64/boot/Image.gz\");\n+\t\t\ttype = \"kernel\";\n+\t\t\tarch = \"arm64\";\n+\t\t\tos = \"linux\";\n+\t\t\tcompression = \"gzip\";\n+\t\t\tload = <0x80080000>;\n+\t\t\tentry = <0x80080000>;\n+\t\t};\n+\t\tfdt@1 {\n+\t\t\tdescription = \"Flattened Device Tree blob\";\n+\t\t\tdata = /incbin/(\"./fsl-ls1043ardb-static.dtb\");\n+\t\t\ttype = \"flat_dt\";\n+\t\t\tarch = \"arm64\";\n+\t\t\tcompression = \"none\";\n+\t\t\tload = <0x90000000>;\n+\t\t};\n+\t\tramdisk@1 {\n+\t\t\tdescription = \"LS1043 Ramdisk\";\n+ data = /incbin/(\"./rootfs.cpio.gz\");\n+\t\t\ttype = \"ramdisk\";\n+\t\t\tarch = \"arm64\";\n+\t\t\tos = \"linux\";\n+\t\t\tcompression = \"gzip\";\n+\t\t\tload = <0xa0000000>;\n+\t\t};\n+\t};\n+\n+\tconfigurations {\n+\t\tdefault = \"config@1\";\n+\t\tconfig@1 {\n+\t\t\tdescription = \"Boot Linux kernel\";\n+\t\t\tkernel = \"kernel@1\";\n+\t\t\tfdt = \"fdt@1\";\n+\t\t\tramdisk = \"ramdisk@1\";\n+\t\t\tloadables = \"fdt\", \"ramdisk\";\n+\t\t};\n+\t};\n+};\n+\n+The \"loadables\" is not optional. It tells SPL which images to load into memory.\n+\n+Other things to consider\n+-----------------------\n+Falcon boot skips a lot of initialization in U-Boot. If Linux expects the\n+hardware to be initialized by U-Boot, the related code should be ported to SPL\n+build. For example, if Linux expect Ethernet PHY to be initialized in U-Boot\n+(which is not a common case), the PHY initialization has to be included in\n+falcon boot. This increases the SPL image size and should be handled carefully.\n+If Linux has PHY driver enabled, it still depends on the correct MDIO bus setup\n+in U-Boot. Normal U-Boot sets the MDC ratio to generate a proper clock signal.\ndiff --git a/arch/arm/cpu/armv8/fsl-layerscape/spl.c b/arch/arm/cpu/armv8/fsl-layerscape/spl.c\nindex 2776240..30b5432 100644\n--- a/arch/arm/cpu/armv8/fsl-layerscape/spl.c\n+++ b/arch/arm/cpu/armv8/fsl-layerscape/spl.c\n@@ -116,4 +116,33 @@ void board_init_f(ulong dummy)\n \tgd->arch.tlb_allocated = gd->arch.tlb_addr;\n #endif\t/* CONFIG_SPL_FSL_LS_PPA */\n }\n+\n+#ifdef CONFIG_SPL_OS_BOOT\n+/*\n+ * Return\n+ * 0 if booting into OS is selected\n+ * 1 if booting into U-Boot is selected\n+ */\n+int spl_start_uboot(void)\n+{\n+\tchar s[8];\n+\n+\tenv_init();\n+\tenv_get_f(\"boot_os\", s, sizeof(s));\n+\tif ((s != NULL) && (*s != '0' && *s != 'n' && *s != 'N' &&\n+\t\t\t *s != 'f' && *s != 'F'))\n+\t\treturn 0;\n+\n+\treturn 1;\n+}\n+#endif\t/* CONFIG_SPL_OS_BOOT */\n+#ifdef CONFIG_SPL_LOAD_FIT\n+int board_fit_config_name_match(const char *name)\n+{\n+\t/* Just empty function now - can't decide what to choose */\n+\tdebug(\"%s: %s\\n\", __func__, name);\n+\n+\treturn 0;\n+}\n+#endif\n #endif /* CONFIG_SPL_BUILD */\ndiff --git a/arch/arm/include/asm/system.h b/arch/arm/include/asm/system.h\nindex 79bd19a..7d8dc44 100644\n--- a/arch/arm/include/asm/system.h\n+++ b/arch/arm/include/asm/system.h\n@@ -215,7 +215,7 @@ void __asm_switch_ttbr(u64 new_ttbr);\n * @entry_point: kernel entry point\n * @es_flag: execution state flag, ES_TO_AARCH64 or ES_TO_AARCH32\n */\n-void armv8_switch_to_el2(u64 args, u64 mach_nr, u64 fdt_addr,\n+void __noreturn armv8_switch_to_el2(u64 args, u64 mach_nr, u64 fdt_addr,\n \t\t\t u64 arg4, u64 entry_point, u64 es_flag);\n /*\n * Switch from EL2 to EL1 for ARMv8\ndiff --git a/arch/arm/lib/spl.c b/arch/arm/lib/spl.c\nindex 27d6682..ab5d227 100644\n--- a/arch/arm/lib/spl.c\n+++ b/arch/arm/lib/spl.c\n@@ -7,6 +7,7 @@\n *\n * SPDX-License-Identifier:\tGPL-2.0+\n */\n+\n #include <common.h>\n #include <config.h>\n #include <spl.h>\n@@ -47,6 +48,15 @@ void __weak board_init_f(ulong dummy)\n * image.\n */\n #ifdef CONFIG_SPL_OS_BOOT\n+#ifdef CONFIG_ARM64\n+void __noreturn jump_to_image_linux(struct spl_image_info *spl_image)\n+{\n+\tdebug(\"Entering kernel arg pointer: 0x%p\\n\", spl_image->arg);\n+\tcleanup_before_linux();\n+\tarmv8_switch_to_el2((u64)spl_image->arg, 0, 0, 0,\n+\t\t\t spl_image->entry_point, ES_TO_AARCH64);\n+}\n+#else\n void __noreturn jump_to_image_linux(struct spl_image_info *spl_image)\n {\n \tunsigned long machid = 0xffffffff;\n@@ -62,4 +72,5 @@ void __noreturn jump_to_image_linux(struct spl_image_info *spl_image)\n \tcleanup_before_linux();\n \timage_entry(0, machid, spl_image->arg);\n }\n+#endif\t/* CONFIG_ARM64 */\n #endif\n", "prefixes": [ "U-Boot", "v2", "5/7" ] }