From patchwork Tue Dec 31 03:04:48 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexey Kardashevskiy X-Patchwork-Id: 1216567 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47mzgp0kZbz9sPh for ; Tue, 31 Dec 2019 14:05:26 +1100 (AEDT) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ozlabs.ru Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 47mzgn653vzDq9V for ; Tue, 31 Dec 2019 14:05:25 +1100 (AEDT) X-Original-To: slof@lists.ozlabs.org Delivered-To: slof@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=ozlabs.ru (client-ip=107.174.27.60; helo=ozlabs.ru; envelope-from=aik@ozlabs.ru; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=ozlabs.ru Received: from ozlabs.ru (unknown [107.174.27.60]) by lists.ozlabs.org (Postfix) with ESMTP id 47mzgQ135TzDq9M for ; Tue, 31 Dec 2019 14:05:05 +1100 (AEDT) Received: from fstn1-p1.ozlabs.ibm.com (localhost [IPv6:::1]) by ozlabs.ru (Postfix) with ESMTP id 74A25AE80062; Mon, 30 Dec 2019 22:03:48 -0500 (EST) From: Alexey Kardashevskiy To: slof@lists.ozlabs.org Date: Tue, 31 Dec 2019 14:04:48 +1100 Message-Id: <20191231030457.5873-2-aik@ozlabs.ru> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191231030457.5873-1-aik@ozlabs.ru> References: <20191231030457.5873-1-aik@ozlabs.ru> Subject: [SLOF] [PATCH slof 01/10] disk-label: Prepare for extenting X-BeenThere: slof@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Patches for https://github.com/aik/SLOF" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: slof-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "SLOF" We are going to add limited support for ext4 and Linux GPT partitions. This moves try-ext2-files and (interpose-filesystem) earlier to be called from try-gpt-dos-partition. This simplifies UUID defining and handling. This should cause no behavioral change. Signed-off-by: Alexey Kardashevskiy --- Can anyone think of a nicer way of doing this? --- slof/fs/packages/disk-label.fs | 57 ++++++++++++++-------------------- 1 file changed, 24 insertions(+), 33 deletions(-) diff --git a/slof/fs/packages/disk-label.fs b/slof/fs/packages/disk-label.fs index 8859fb0f6913..068a1a88c109 100644 --- a/slof/fs/packages/disk-label.fs +++ b/slof/fs/packages/disk-label.fs @@ -370,34 +370,26 @@ CONSTANT /gpt-part-entry drop 0 ; -\ Check for GPT PReP partition GUID. Only first 3 blocks are -\ byte-swapped treating last two blocks as contigous for simplifying -\ comparison -9E1A2D38 CONSTANT GPT-PREP-PARTITION-1 -C612 CONSTANT GPT-PREP-PARTITION-2 -4316 CONSTANT GPT-PREP-PARTITION-3 -AA268B49521E5A8B CONSTANT GPT-PREP-PARTITION-4 +: uuid! ( v1 v2 v3 v4 addr -- ) >r r@ 8 + x! r@ 6 + w!-le r@ 4 + w!-le r> l!-le ; +: uuid= ( addr1 addr2 -- true|false ) 10 comp 0= ; +\ PowerPC PReP boot 9E1A2D38-C612-4316-AA26-8B49521E5A8B +CREATE GPT-PREP-PARTITION 10 allot +9E1A2D38 C612 4316 AA268B49521E5A8B GPT-PREP-PARTITION uuid! : gpt-prep-partition? ( -- true|false ) block gpt-part-entry>part-type-guid - dup l@-le GPT-PREP-PARTITION-1 <> IF drop false EXIT THEN - dup 4 + w@-le GPT-PREP-PARTITION-2 <> IF drop false EXIT THEN - dup 6 + w@-le GPT-PREP-PARTITION-3 <> IF drop false EXIT THEN - 8 + x@ GPT-PREP-PARTITION-4 = + GPT-PREP-PARTITION uuid= ; \ Check for GPT MSFT BASIC DATA GUID - fat based -EBD0A0A2 CONSTANT GPT-BASIC-DATA-PARTITION-1 -B9E5 CONSTANT GPT-BASIC-DATA-PARTITION-2 -4433 CONSTANT GPT-BASIC-DATA-PARTITION-3 -87C068B6B72699C7 CONSTANT GPT-BASIC-DATA-PARTITION-4 - +\ Windows Basic data partition EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 +CREATE GPT-BASIC-DATA-PARTITION 10 allot +EBD0A0A2 B9E5 4433 87C068B6B72699C7 GPT-BASIC-DATA-PARTITION uuid! : gpt-basic-data-partition? ( -- true|false ) block gpt-part-entry>part-type-guid - dup l@-le GPT-BASIC-DATA-PARTITION-1 <> IF drop false EXIT THEN - dup 4 + w@-le GPT-BASIC-DATA-PARTITION-2 <> IF drop false EXIT THEN - dup 6 + w@-le GPT-BASIC-DATA-PARTITION-3 <> IF drop false EXIT THEN - 8 + x@ GPT-BASIC-DATA-PARTITION-4 = + GPT-BASIC-DATA-PARTITION uuid= +; + ; \ @@ -445,6 +437,18 @@ B9E5 CONSTANT GPT-BASIC-DATA-PARTITION-2 false ; +: (interpose-filesystem) ( str len -- ) + find-package IF args args-len rot interpose THEN +; + +: try-ext2-files ( -- found? ) + 2 read-sector \ read first superblock + block d# 56 + w@-le \ fetch s_magic + ef53 <> IF false EXIT THEN \ s_magic found? + s" ext2-files" (interpose-filesystem) + true +; + : try-gpt-dos-partition ( -- true|false ) get-gpt-partition 0= IF false EXIT THEN block gpt>num-part-entry l@-le dup 0= IF false EXIT THEN @@ -612,10 +616,6 @@ B9E5 CONSTANT GPT-BASIC-DATA-PARTITION-2 \ try-files and try-partitions -: (interpose-filesystem) ( str len -- ) - find-package IF args args-len rot interpose THEN -; - : try-dos-files ( -- found? ) no-mbr? IF false EXIT THEN @@ -624,15 +624,6 @@ B9E5 CONSTANT GPT-BASIC-DATA-PARTITION-2 true ; -: try-ext2-files ( -- found? ) - 2 read-sector \ read first superblock - block d# 56 + w@-le \ fetch s_magic - ef53 <> IF false EXIT THEN \ s_magic found? - s" ext2-files" (interpose-filesystem) - true -; - - : try-iso9660-files has-iso9660-filesystem 0= IF false exit THEN s" iso-9660" (interpose-filesystem) From patchwork Tue Dec 31 03:04:49 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexey Kardashevskiy X-Patchwork-Id: 1216568 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47mzgt3bjHz9sPn for ; Tue, 31 Dec 2019 14:05:30 +1100 (AEDT) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ozlabs.ru Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 47mzgt26c6zDq9n for ; Tue, 31 Dec 2019 14:05:30 +1100 (AEDT) X-Original-To: slof@lists.ozlabs.org Delivered-To: slof@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=ozlabs.ru (client-ip=107.174.27.60; helo=ozlabs.ru; envelope-from=aik@ozlabs.ru; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=ozlabs.ru Received: from ozlabs.ru (unknown [107.174.27.60]) by lists.ozlabs.org (Postfix) with ESMTP id 47mzgQ2bCtzDq9T for ; Tue, 31 Dec 2019 14:05:04 +1100 (AEDT) Received: from fstn1-p1.ozlabs.ibm.com (localhost [IPv6:::1]) by ozlabs.ru (Postfix) with ESMTP id 8DF98AE8056C; Mon, 30 Dec 2019 22:03:49 -0500 (EST) From: Alexey Kardashevskiy To: slof@lists.ozlabs.org Date: Tue, 31 Dec 2019 14:04:49 +1100 Message-Id: <20191231030457.5873-3-aik@ozlabs.ru> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191231030457.5873-1-aik@ozlabs.ru> References: <20191231030457.5873-1-aik@ozlabs.ru> Subject: [SLOF] [PATCH slof 02/10] disk-label: Support Linux GPT partition type X-BeenThere: slof@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Patches for https://github.com/aik/SLOF" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: slof-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "SLOF" This adds support for: "Linux filesystem data" 0FC63DAF-8483-4772-8E79-3D69D8477DE4 Previously, Linux used the same GUID for the data partitions as Windows (Basic data partition: EBD0A0A2-B9E5-4433-87C0-68B6B72699C7). The new GUID (Linux filesystem data: 0FC63DAF-8483-4772-8E79-3D69D8477DE4) was defined jointly by GPT fdisk and GNU. Source: https://en.wikipedia.org/wiki/GUID_Partition_Table#cite_note-linwin-40 Signed-off-by: Alexey Kardashevskiy --- slof/fs/packages/disk-label.fs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/slof/fs/packages/disk-label.fs b/slof/fs/packages/disk-label.fs index 068a1a88c109..790d43374162 100644 --- a/slof/fs/packages/disk-label.fs +++ b/slof/fs/packages/disk-label.fs @@ -390,6 +390,12 @@ EBD0A0A2 B9E5 4433 87C068B6B72699C7 GPT-BASIC-DATA-PARTITION uuid! GPT-BASIC-DATA-PARTITION uuid= ; +\ Linux filesystem data 0FC63DAF-8483-4772-8E79-3D69D8477DE4 +CREATE GPT-LINUX-PARTITION 10 allot +0FC63DAF 8483 4772 8E793D69D8477DE4 GPT-LINUX-PARTITION uuid! +: gpt-linux-partition? ( -- true|false ) + block gpt-part-entry>part-type-guid + GPT-LINUX-PARTITION uuid= ; \ @@ -455,7 +461,7 @@ EBD0A0A2 B9E5 4433 87C068B6B72699C7 GPT-BASIC-DATA-PARTITION uuid! 1+ 1 ?DO seek-pos 0 seek drop block gpt-part-size read drop - gpt-basic-data-partition? IF + gpt-basic-data-partition? gpt-linux-partition? or IF debug-disk-label? IF ." GPT BASIC DATA partition found " cr THEN block gpt-part-entry>first-lba x@-le ( first-lba ) dup to part-start ( first-lba ) From patchwork Tue Dec 31 03:04:50 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexey Kardashevskiy X-Patchwork-Id: 1216564 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47mzgY2vmRz9sPn for ; Tue, 31 Dec 2019 14:05:13 +1100 (AEDT) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ozlabs.ru Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 47mzgW3RpvzDq9Z for ; Tue, 31 Dec 2019 14:05:11 +1100 (AEDT) X-Original-To: slof@lists.ozlabs.org Delivered-To: slof@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=ozlabs.ru (client-ip=107.174.27.60; helo=ozlabs.ru; envelope-from=aik@ozlabs.ru; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=ozlabs.ru Received: from ozlabs.ru (unknown [107.174.27.60]) by lists.ozlabs.org (Postfix) with ESMTP id 47mzgQ14VWzDq9P for ; Tue, 31 Dec 2019 14:05:04 +1100 (AEDT) Received: from fstn1-p1.ozlabs.ibm.com (localhost [IPv6:::1]) by ozlabs.ru (Postfix) with ESMTP id 7C5D6AE8056E; Mon, 30 Dec 2019 22:03:50 -0500 (EST) From: Alexey Kardashevskiy To: slof@lists.ozlabs.org Date: Tue, 31 Dec 2019 14:04:50 +1100 Message-Id: <20191231030457.5873-4-aik@ozlabs.ru> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191231030457.5873-1-aik@ozlabs.ru> References: <20191231030457.5873-1-aik@ozlabs.ru> Subject: [SLOF] [PATCH slof 03/10] disk-label: Try ext2 filesystem when booting from GPT partition X-BeenThere: slof@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Patches for https://github.com/aik/SLOF" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: slof-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "SLOF" Signed-off-by: Alexey Kardashevskiy --- slof/fs/packages/disk-label.fs | 1 + 1 file changed, 1 insertion(+) diff --git a/slof/fs/packages/disk-label.fs b/slof/fs/packages/disk-label.fs index 790d43374162..2677682fa977 100644 --- a/slof/fs/packages/disk-label.fs +++ b/slof/fs/packages/disk-label.fs @@ -472,6 +472,7 @@ CREATE GPT-LINUX-PARTITION 10 allot 0 0 seek drop block block-size read drop block fat-bootblock? ( true|false ) + not IF try-ext2-files THEN UNLOOP EXIT THEN seek-pos gpt-part-size + to seek-pos From patchwork Tue Dec 31 03:04:51 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexey Kardashevskiy X-Patchwork-Id: 1216565 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47mzgc6LC9z9sPh for ; Tue, 31 Dec 2019 14:05:16 +1100 (AEDT) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ozlabs.ru Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 47mzgc3zWGzDq9W for ; Tue, 31 Dec 2019 14:05:16 +1100 (AEDT) X-Original-To: slof@lists.ozlabs.org Delivered-To: slof@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=ozlabs.ru (client-ip=107.174.27.60; helo=ozlabs.ru; envelope-from=aik@ozlabs.ru; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=ozlabs.ru Received: from ozlabs.ru (unknown [107.174.27.60]) by lists.ozlabs.org (Postfix) with ESMTP id 47mzgQ1TW4zDq9Q for ; Tue, 31 Dec 2019 14:05:05 +1100 (AEDT) Received: from fstn1-p1.ozlabs.ibm.com (localhost [IPv6:::1]) by ozlabs.ru (Postfix) with ESMTP id 6A06DAE80571; Mon, 30 Dec 2019 22:03:51 -0500 (EST) From: Alexey Kardashevskiy To: slof@lists.ozlabs.org Date: Tue, 31 Dec 2019 14:04:51 +1100 Message-Id: <20191231030457.5873-5-aik@ozlabs.ru> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191231030457.5873-1-aik@ozlabs.ru> References: <20191231030457.5873-1-aik@ozlabs.ru> Subject: [SLOF] [PATCH slof 04/10] ext2: Prepare for extending X-BeenThere: slof@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Patches for https://github.com/aik/SLOF" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: slof-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "SLOF" Signed-off-by: Alexey Kardashevskiy --- slof/fs/packages/ext2-files.fs | 43 +++++++++++++++++++++++----------- 1 file changed, 29 insertions(+), 14 deletions(-) diff --git a/slof/fs/packages/ext2-files.fs b/slof/fs/packages/ext2-files.fs index 262c64a34915..392615d17d57 100644 --- a/slof/fs/packages/ext2-files.fs +++ b/slof/fs/packages/ext2-files.fs @@ -39,9 +39,9 @@ INSTANCE VARIABLE dindirect-block INSTANCE VARIABLE inode INSTANCE VARIABLE file-len -INSTANCE VARIABLE blocks +INSTANCE VARIABLE blocks \ data from disk blocks INSTANCE VARIABLE #blocks -INSTANCE VARIABLE ^blocks +INSTANCE VARIABLE ^blocks \ current pointer in blocks INSTANCE VARIABLE #blocks-left : blocks-read ( n -- ) dup negate #blocks-left +! 4 * ^blocks +! ; : read-indirect-blocks ( indirect-block# -- ) @@ -73,20 +73,27 @@ INSTANCE VARIABLE #blocks-left drop \ drop 0, the invalid block number ; +: inode-i-block ( inode -- block ) 28 + ; + +\ Reads block numbers into blocks : read-block#s ( -- ) - blocks @ ?dup IF #blocks @ 4 * free-mem THEN - inode @ 4 + l@-le file-len ! - file-len @ block-size @ // #blocks ! - #blocks @ 4 * alloc-mem blocks ! + blocks @ ?dup IF #blocks @ 4 * free-mem THEN \ free blocks if allocated + inode @ 4 + l@-le file-len ! \ *file-len = i_size_lo + file-len @ block-size @ // #blocks ! \ *#blocks = roundup(file-len/block-size) + #blocks @ 4 * alloc-mem blocks ! \ *blocks = allocmem(*#blocks) blocks @ ^blocks ! #blocks @ #blocks-left ! #blocks-left @ c min \ # direct blocks - inode @ 28 + over 4 * ^blocks @ swap move blocks-read + inode @ inode-i-block over 4 * ^blocks @ swap move blocks-read #blocks-left @ IF inode @ 58 + l@-le read-indirect-blocks THEN #blocks-left @ IF inode @ 5c + l@-le read-double-indirect-blocks THEN - #blocks-left @ IF inode @ 60 + l@-le read-triple-indirect-blocks THEN ; + #blocks-left @ IF inode @ 60 + l@-le read-triple-indirect-blocks THEN +; + : read-inode ( inode# -- ) - 1- inodes/group @ u/mod \ # in group, group # - 20 * group-descriptors @ + 8 + l@-le block-size @ * \ # in group, inode table + 1- inodes/group @ u/mod + 20 * group-descriptors @ + + 8 + l@-le \ reads bg_inode_table_lo + block-size @ * \ # in group, inode table swap inode-size @ * + xlsplit seek drop inode @ inode-size @ read drop ; @@ -153,17 +160,25 @@ INSTANCE VARIABLE current-pos : read-dir ( inode# -- adr ) read-inode read-block#s file-len @ alloc-mem 0 0 seek ABORT" ext2-files read-dir: seek failed" - dup file-len @ read file-len @ <> ABORT" ext2-files read-dir: read failed" ; + dup file-len @ read file-len @ <> ABORT" ext2-files read-dir: read failed" +; + : .dir ( inode# -- ) read-dir dup BEGIN 2dup file-len @ - > over l@-le tuck and WHILE cr dup 8 0.r space read-inode .inode space space dup .name - dup 4 + w@-le + REPEAT 2drop file-len @ free-mem ; + dup 4 + w@-le + REPEAT 2drop file-len @ free-mem +; + : (find-file) ( adr name len -- inode#|0 ) 2>r dup BEGIN 2dup file-len @ - > over l@-le and WHILE dup 8 + over 6 + c@ 2r@ str= IF 2r> 2drop nip l@-le EXIT THEN - dup 4 + w@-le + REPEAT 2drop 2r> 2drop 0 ; + dup 4 + w@-le + REPEAT 2drop 2r> 2drop 0 +; + : find-file ( inode# name len -- inode#|0 ) - 2>r read-dir dup 2r> (find-file) swap file-len @ free-mem ; + 2>r read-dir dup 2r> (find-file) swap file-len @ free-mem +; + : find-path ( inode# name len -- inode#|0 ) dup 0= IF 3drop 0 ." empty name " EXIT THEN over c@ [char] \ = IF 1 /string ." slash " RECURSE EXIT THEN From patchwork Tue Dec 31 03:04:52 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexey Kardashevskiy X-Patchwork-Id: 1216570 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47mzh84N4Gz9sPn for ; Tue, 31 Dec 2019 14:05:44 +1100 (AEDT) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ozlabs.ru Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 47mzh834SzzDq9j for ; Tue, 31 Dec 2019 14:05:44 +1100 (AEDT) X-Original-To: slof@lists.ozlabs.org Delivered-To: slof@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=ozlabs.ru (client-ip=107.174.27.60; helo=ozlabs.ru; envelope-from=aik@ozlabs.ru; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=ozlabs.ru Received: from ozlabs.ru (unknown [107.174.27.60]) by lists.ozlabs.org (Postfix) with ESMTP id 47mzgS4d4rzDq9P for ; Tue, 31 Dec 2019 14:05:08 +1100 (AEDT) Received: from fstn1-p1.ozlabs.ibm.com (localhost [IPv6:::1]) by ozlabs.ru (Postfix) with ESMTP id 5BB03AE807DE; Mon, 30 Dec 2019 22:03:52 -0500 (EST) From: Alexey Kardashevskiy To: slof@lists.ozlabs.org Date: Tue, 31 Dec 2019 14:04:52 +1100 Message-Id: <20191231030457.5873-6-aik@ozlabs.ru> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191231030457.5873-1-aik@ozlabs.ru> References: <20191231030457.5873-1-aik@ozlabs.ru> Subject: [SLOF] [PATCH slof 05/10] ext2: Rename group-desc-size X-BeenThere: slof@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Patches for https://github.com/aik/SLOF" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: slof-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "SLOF" A le32 value at 0x20 offset in supernode is: 0x20 __le32 s_blocks_per_group Blocks per group Size of group descriptors is a le16 value at 0xfe. Rename group-desc-size according to the ext2/4 spec. This should cause no behavioral change. Signed-off-by: Alexey Kardashevskiy --- slof/fs/packages/ext2-files.fs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/slof/fs/packages/ext2-files.fs b/slof/fs/packages/ext2-files.fs index 392615d17d57..055e636023ff 100644 --- a/slof/fs/packages/ext2-files.fs +++ b/slof/fs/packages/ext2-files.fs @@ -16,7 +16,7 @@ INSTANCE VARIABLE inode-size INSTANCE VARIABLE block-size INSTANCE VARIABLE inodes/group -INSTANCE VARIABLE group-desc-size +INSTANCE VARIABLE blocks-per-group INSTANCE VARIABLE group-descriptors : seek s" seek" $call-parent ; @@ -128,11 +128,11 @@ CREATE mode-chars 10 allot s" ?pc?d?b?-?l?s???" mode-chars swap move ELSE data @ 58 + w@-le inode-size ! THEN - data @ 20 + l@-le group-desc-size ! + data @ 20 + l@-le blocks-per-group ! \ Read the group descriptor table: first-block @ 1+ block-size @ * - group-desc-size @ + blocks-per-group @ read-data data @ group-descriptors ! @@ -189,7 +189,7 @@ INSTANCE VARIABLE current-pos : close inode @ inode-size @ free-mem - group-descriptors @ group-desc-size @ free-mem + group-descriptors @ blocks-per-group @ free-mem free-data blocks @ ?dup IF #blocks @ 4 * free-mem THEN ; From patchwork Tue Dec 31 03:04:53 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexey Kardashevskiy X-Patchwork-Id: 1216569 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47mzh21J8Yz9sPh for ; Tue, 31 Dec 2019 14:05:38 +1100 (AEDT) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ozlabs.ru Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 47mzh16SYGzDq9s for ; Tue, 31 Dec 2019 14:05:37 +1100 (AEDT) X-Original-To: slof@lists.ozlabs.org Delivered-To: slof@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=ozlabs.ru (client-ip=107.174.27.60; helo=ozlabs.ru; envelope-from=aik@ozlabs.ru; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=ozlabs.ru Received: from ozlabs.ru (unknown [107.174.27.60]) by lists.ozlabs.org (Postfix) with ESMTP id 47mzgS4d0BzDq9M for ; Tue, 31 Dec 2019 14:05:08 +1100 (AEDT) Received: from fstn1-p1.ozlabs.ibm.com (localhost [IPv6:::1]) by ozlabs.ru (Postfix) with ESMTP id 4926FAE807DF; Mon, 30 Dec 2019 22:03:53 -0500 (EST) From: Alexey Kardashevskiy To: slof@lists.ozlabs.org Date: Tue, 31 Dec 2019 14:04:53 +1100 Message-Id: <20191231030457.5873-7-aik@ozlabs.ru> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191231030457.5873-1-aik@ozlabs.ru> References: <20191231030457.5873-1-aik@ozlabs.ru> Subject: [SLOF] [PATCH slof 06/10] ext2: Read size of group descriptors X-BeenThere: slof@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Patches for https://github.com/aik/SLOF" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: slof-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "SLOF" When incompat flags has INCOMPAT_64BIT set ("Enable a filesystem size over 2^32 blocks"), the group descriptor size is stored at 0xFE and these days it is 0x40 so use that rather than the default value of 0x20. Signed-off-by: Alexey Kardashevskiy --- slof/fs/packages/ext2-files.fs | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/slof/fs/packages/ext2-files.fs b/slof/fs/packages/ext2-files.fs index 055e636023ff..7245d9375cf5 100644 --- a/slof/fs/packages/ext2-files.fs +++ b/slof/fs/packages/ext2-files.fs @@ -18,6 +18,7 @@ INSTANCE VARIABLE inodes/group INSTANCE VARIABLE blocks-per-group INSTANCE VARIABLE group-descriptors +INSTANCE VARIABLE desc-size : seek s" seek" $call-parent ; : read s" read" $call-parent ; @@ -91,7 +92,7 @@ INSTANCE VARIABLE #blocks-left : read-inode ( inode# -- ) 1- inodes/group @ u/mod - 20 * group-descriptors @ + + desc-size @ * group-descriptors @ + 8 + l@-le \ reads bg_inode_table_lo block-size @ * \ # in group, inode table swap inode-size @ * + xlsplit seek drop inode @ inode-size @ read drop @@ -117,6 +118,13 @@ CREATE mode-chars 10 allot s" ?pc?d?b?-?l?s???" mode-chars swap move inode @ 04 + l@-le 9 .r \ size r> base ! ; +80 CONSTANT EXT4_INCOMPAT_64BIT +: super-feature-incompat ( data -- flags ) 60 + l@-le ; +: super-desc-size ( data -- size ) FE + w@-le ; +: super-feature-incompat-64bit ( data -- true|false ) + super-feature-incompat EXT4_INCOMPAT_64BIT and 0<> +; + : do-super ( -- ) 400 400 read-data data @ 14 + l@-le first-block ! @@ -129,6 +137,11 @@ CREATE mode-chars 10 allot s" ?pc?d?b?-?l?s???" mode-chars swap move data @ 58 + w@-le inode-size ! THEN data @ 20 + l@-le blocks-per-group ! + data @ super-feature-incompat-64bit IF + data @ super-desc-size desc-size ! + ELSE + 20 desc-size ! + THEN \ Read the group descriptor table: first-block @ 1+ block-size @ * From patchwork Tue Dec 31 03:04:54 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexey Kardashevskiy X-Patchwork-Id: 1216574 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47mzhV0yB0z9sPn for ; Tue, 31 Dec 2019 14:06:02 +1100 (AEDT) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ozlabs.ru Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 47mzhT6nc8zDqBX for ; Tue, 31 Dec 2019 14:06:01 +1100 (AEDT) X-Original-To: slof@lists.ozlabs.org Delivered-To: slof@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=ozlabs.ru (client-ip=107.174.27.60; helo=ozlabs.ru; envelope-from=aik@ozlabs.ru; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=ozlabs.ru Received: from ozlabs.ru (unknown [107.174.27.60]) by lists.ozlabs.org (Postfix) with ESMTP id 47mzh24sg5zDqB5 for ; Tue, 31 Dec 2019 14:05:38 +1100 (AEDT) Received: from fstn1-p1.ozlabs.ibm.com (localhost [IPv6:::1]) by ozlabs.ru (Postfix) with ESMTP id 620B1AE807E2; Mon, 30 Dec 2019 22:03:54 -0500 (EST) From: Alexey Kardashevskiy To: slof@lists.ozlabs.org Date: Tue, 31 Dec 2019 14:04:54 +1100 Message-Id: <20191231030457.5873-8-aik@ozlabs.ru> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191231030457.5873-1-aik@ozlabs.ru> References: <20191231030457.5873-1-aik@ozlabs.ru> Subject: [SLOF] [PATCH slof 07/10] ext2: Read all 64bit of inode number X-BeenThere: slof@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Patches for https://github.com/aik/SLOF" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: slof-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "SLOF" Signed-off-by: Alexey Kardashevskiy --- slof/fs/packages/ext2-files.fs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/slof/fs/packages/ext2-files.fs b/slof/fs/packages/ext2-files.fs index 7245d9375cf5..75cd01e23705 100644 --- a/slof/fs/packages/ext2-files.fs +++ b/slof/fs/packages/ext2-files.fs @@ -93,7 +93,10 @@ INSTANCE VARIABLE #blocks-left : read-inode ( inode# -- ) 1- inodes/group @ u/mod desc-size @ * group-descriptors @ + + dup 8 + l@-le \ reads bg_inode_table_lo + swap 28 + l@-le \ reads bg_inode_table_hi + 32 lshift or block-size @ * \ # in group, inode table swap inode-size @ * + xlsplit seek drop inode @ inode-size @ read drop ; From patchwork Tue Dec 31 03:04:55 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexey Kardashevskiy X-Patchwork-Id: 1216571 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47mzhF5Mpyz9sPh for ; Tue, 31 Dec 2019 14:05:49 +1100 (AEDT) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ozlabs.ru Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 47mzhF40ppzDq9R for ; Tue, 31 Dec 2019 14:05:49 +1100 (AEDT) X-Original-To: slof@lists.ozlabs.org Delivered-To: slof@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=ozlabs.ru (client-ip=107.174.27.60; helo=ozlabs.ru; envelope-from=aik@ozlabs.ru; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=ozlabs.ru Received: from ozlabs.ru (unknown [107.174.27.60]) by lists.ozlabs.org (Postfix) with ESMTP id 47mzgT3s8tzDq9G for ; Tue, 31 Dec 2019 14:05:09 +1100 (AEDT) Received: from fstn1-p1.ozlabs.ibm.com (localhost [IPv6:::1]) by ozlabs.ru (Postfix) with ESMTP id 4EAAFAE807E3; Mon, 30 Dec 2019 22:03:55 -0500 (EST) From: Alexey Kardashevskiy To: slof@lists.ozlabs.org Date: Tue, 31 Dec 2019 14:04:55 +1100 Message-Id: <20191231030457.5873-9-aik@ozlabs.ru> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191231030457.5873-1-aik@ozlabs.ru> References: <20191231030457.5873-1-aik@ozlabs.ru> Subject: [SLOF] [PATCH slof 08/10] ext2/4: Add basic extent tree support X-BeenThere: slof@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Patches for https://github.com/aik/SLOF" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: slof-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "SLOF" This allows booting from ext4 filesystems when EXT4_EXTENTS_FL is set in inode. Based on: https://ext4.wiki.kernel.org/index.php/Ext4_Disk_Layout Signed-off-by: Alexey Kardashevskiy --- slof/fs/packages/ext2-files.fs | 56 ++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/slof/fs/packages/ext2-files.fs b/slof/fs/packages/ext2-files.fs index 75cd01e23705..672f0b482157 100644 --- a/slof/fs/packages/ext2-files.fs +++ b/slof/fs/packages/ext2-files.fs @@ -75,6 +75,61 @@ INSTANCE VARIABLE #blocks-left ; : inode-i-block ( inode -- block ) 28 + ; +80000 CONSTANT EXT4_EXTENTS_FL +: inode-i-flags ( inode -- i_flags ) 20 + l@-le ; +F30A CONSTANT EXT4_EH_MAGIC +: extent-tree-entries ( iblock -- entries ) C + ; + +STRUCT + 2 field ext4_eh>magic + 2 field ext4_eh>entries + 2 field ext4_eh>max + 2 field ext4_eh>depth + 4 field ext4_eh>generation +CONSTANT /ext4_eh + +STRUCT + 4 field ext4-ee>block + 2 field ext4-ee>len + 2 field ext4-ee>start_hi + 4 field ext4-ee>start_lo +CONSTANT /ext4-ee + +: ext4-ee-start ( entries -- ee-start ) + dup ext4-ee>start_hi w@-le 32 lshift + swap + ext4-ee>start_lo l@-le or +; + +: expand-blocks ( start len -- ) + bounds + ?DO + i ^blocks @ l!-le + 1 blocks-read + 1 +LOOP +; + +\ [0x28..0x34] ext4_extent_header +\ [0x34..0x64] ext4_extent_idx[eh_entries if eh_depth > 0] (not supported) +\ ext4_extent[eh_entries if eh_depth == 0] +: read-extent-tree ( inode -- ) + inode-i-block + dup ext4_eh>magic w@-le EXT4_EH_MAGIC <> IF ." BAD extent tree magic" cr EXIT THEN + dup ext4_eh>depth w@-le 0 <> IF ." Root inode is not lead, not supported" cr EXIT THEN + \ depth=0 means it is a leaf and entries are ext4_extent[eh_entries] + dup ext4_eh>entries w@-le + >r + /ext4_eh + + r> + 0 + DO + dup ext4-ee-start + over ext4-ee>len w@-le ( ext4_extent^ start len ) + expand-blocks + /ext4-ee + + LOOP + drop +; \ Reads block numbers into blocks : read-block#s ( -- ) @@ -83,6 +138,7 @@ INSTANCE VARIABLE #blocks-left file-len @ block-size @ // #blocks ! \ *#blocks = roundup(file-len/block-size) #blocks @ 4 * alloc-mem blocks ! \ *blocks = allocmem(*#blocks) blocks @ ^blocks ! #blocks @ #blocks-left ! + inode @ inode-i-flags EXT4_EXTENTS_FL and IF inode @ read-extent-tree EXIT THEN #blocks-left @ c min \ # direct blocks inode @ inode-i-block over 4 * ^blocks @ swap move blocks-read #blocks-left @ IF inode @ 58 + l@-le read-indirect-blocks THEN From patchwork Tue Dec 31 03:04:56 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexey Kardashevskiy X-Patchwork-Id: 1216572 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47mzhK39b6z9sPn for ; Tue, 31 Dec 2019 14:05:53 +1100 (AEDT) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ozlabs.ru Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 47mzhK1JgKzDqB9 for ; Tue, 31 Dec 2019 14:05:53 +1100 (AEDT) X-Original-To: slof@lists.ozlabs.org Delivered-To: slof@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=ozlabs.ru (client-ip=107.174.27.60; helo=ozlabs.ru; envelope-from=aik@ozlabs.ru; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=ozlabs.ru Received: from ozlabs.ru (unknown [107.174.27.60]) by lists.ozlabs.org (Postfix) with ESMTP id 47mzgT6RtzzDq9M for ; Tue, 31 Dec 2019 14:05:09 +1100 (AEDT) Received: from fstn1-p1.ozlabs.ibm.com (localhost [IPv6:::1]) by ozlabs.ru (Postfix) with ESMTP id 67025AE807E6; Mon, 30 Dec 2019 22:03:56 -0500 (EST) From: Alexey Kardashevskiy To: slof@lists.ozlabs.org Date: Tue, 31 Dec 2019 14:04:56 +1100 Message-Id: <20191231030457.5873-10-aik@ozlabs.ru> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191231030457.5873-1-aik@ozlabs.ru> References: <20191231030457.5873-1-aik@ozlabs.ru> Subject: [SLOF] [PATCH slof 09/10] elf64: Add LE64 ABIv1/2 support for loading images to given address X-BeenThere: slof@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Patches for https://github.com/aik/SLOF" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: slof-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "SLOF" c2358afb40d4 ("Add support for 64bit LE ABI v1 and v2 support") added little endian ELF support for one of two ELF loading helpers, this fixes oversight. With this changes, 'boot disk:2,boot\zImage' is able to handle little-endian zimages. Signed-off-by: Alexey Kardashevskiy --- lib/libelf/elf.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/libelf/elf.c b/lib/libelf/elf.c index db2d2abc94f9..5204bc36f99b 100644 --- a/lib/libelf/elf.c +++ b/lib/libelf/elf.c @@ -140,6 +140,7 @@ elf_load_file_to_addr(void *file_addr, void *addr, unsigned long *entry, { int type; long offset; + struct ehdr *ehdr = (struct ehdr *) file_addr; type = elf_check_file(file_addr); @@ -157,6 +158,13 @@ elf_load_file_to_addr(void *file_addr, void *addr, unsigned long *entry, *entry = elf_load_segments64(file_addr, offset, pre_load, post_load) + offset; elf_relocate64(file_addr, offset); + if (ehdr->ei_data != ELFDATA2MSB) { + uint32_t flags = elf_get_eflags_64(file_addr); + if ((flags & 0x3) == 2) + type = 4; /* LE64 ABIv2 */ + else + type = 3; /* LE64 ABIv1 */ + } break; } From patchwork Tue Dec 31 03:04:57 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexey Kardashevskiy X-Patchwork-Id: 1216573 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47mzhP3Sbcz9sPn for ; Tue, 31 Dec 2019 14:05:57 +1100 (AEDT) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ozlabs.ru Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 47mzhP1K1XzDq9n for ; Tue, 31 Dec 2019 14:05:57 +1100 (AEDT) X-Original-To: slof@lists.ozlabs.org Delivered-To: slof@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=ozlabs.ru (client-ip=107.174.27.60; helo=ozlabs.ru; envelope-from=aik@ozlabs.ru; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=ozlabs.ru Received: from ozlabs.ru (unknown [107.174.27.60]) by lists.ozlabs.org (Postfix) with ESMTP id 47mzgV4T50zDq9P for ; Tue, 31 Dec 2019 14:05:10 +1100 (AEDT) Received: from fstn1-p1.ozlabs.ibm.com (localhost [IPv6:::1]) by ozlabs.ru (Postfix) with ESMTP id 53AAAAE807E8; Mon, 30 Dec 2019 22:03:57 -0500 (EST) From: Alexey Kardashevskiy To: slof@lists.ozlabs.org Date: Tue, 31 Dec 2019 14:04:57 +1100 Message-Id: <20191231030457.5873-11-aik@ozlabs.ru> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191231030457.5873-1-aik@ozlabs.ru> References: <20191231030457.5873-1-aik@ozlabs.ru> Subject: [SLOF] [PATCH slof 10/10] [HACK] boot: Force loading images at 64MB X-BeenThere: slof@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Patches for https://github.com/aik/SLOF" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: slof-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "SLOF" Signed-off-by: Alexey Kardashevskiy --- slof/fs/boot.fs | 1 + 1 file changed, 1 insertion(+) diff --git a/slof/fs/boot.fs b/slof/fs/boot.fs index 6d16c54d2af4..7de0d1db74d7 100644 --- a/slof/fs/boot.fs +++ b/slof/fs/boot.fs @@ -170,6 +170,7 @@ defer go ( -- ) THEN true swap -1 ( arg len true file-addr -1 ) + drop 8000 elf-load-claim ( arg len true claim-list entry elftype ) ( arg len true claim-list entry elftype )