import SLOF-20171214-5.gitfa98132.module+el8.1.0+2983+b2ae9c0a
This commit is contained in:
commit
a28fc1d094
1
.SLOF.metadata
Normal file
1
.SLOF.metadata
Normal file
@ -0,0 +1 @@
|
||||
bd6a7eebe47e1cf9be75373b21afdf0353d1af84 SOURCES/qemu-slof-20171214.tar.gz
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
SOURCES/qemu-slof-20171214.tar.gz
|
@ -0,0 +1,72 @@
|
||||
From 864e689e887cd2fd00cc36e5d905238b18eb39bb Mon Sep 17 00:00:00 2001
|
||||
From: Laurent Vivier <lvivier@redhat.com>
|
||||
Date: Wed, 8 Aug 2018 15:10:58 +0100
|
||||
Subject: [PATCH 2/6] Fix bad assembler statements for compiling with gcc 8.1 /
|
||||
as 2.30
|
||||
|
||||
RH-Author: Laurent Vivier <lvivier@redhat.com>
|
||||
Message-id: <20180808151102.11232-3-lvivier@redhat.com>
|
||||
Patchwork-id: 81678
|
||||
O-Subject: [RHEL-8.0 SLOF PATCH 2/6] Fix bad assembler statements for compiling with gcc 8.1 / as 2.30
|
||||
Bugzilla: 1613619
|
||||
RH-Acked-by: Thomas Huth <thuth@redhat.com>
|
||||
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
|
||||
RH-Acked-by: David Gibson <dgibson@redhat.com>
|
||||
|
||||
From: Thomas Huth <thuth@redhat.com>
|
||||
|
||||
When compiling with a very recent toolchain, I get these warnings:
|
||||
|
||||
../../llfw/boot_abort.S: Assembler messages:
|
||||
../../llfw/boot_abort.S:76: Warning: invalid register expression
|
||||
|
||||
and:
|
||||
|
||||
stage2_head.S: Assembler messages:
|
||||
stage2_head.S:57: Warning: invalid register expression
|
||||
|
||||
The first one is using the wrong opcode, we should use "and" instead of
|
||||
"andi" here. The second one is using a register instead of a constant
|
||||
for load-immediate, which is non-sense, too. Fix it to use the right
|
||||
constant instead.
|
||||
|
||||
Signed-off-by: Thomas Huth <thuth@redhat.com>
|
||||
Reviewed-by: Laurent Vivier <lvivier@redhat.com>
|
||||
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
|
||||
(cherry picked from commit 203f6686dc3953a7248abb4f3e895a68c65d9b10)
|
||||
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
|
||||
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
|
||||
---
|
||||
board-qemu/llfw/stage2_head.S | 2 +-
|
||||
llfw/boot_abort.S | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/board-qemu/llfw/stage2_head.S b/board-qemu/llfw/stage2_head.S
|
||||
index adf7554..1568f27 100644
|
||||
--- a/board-qemu/llfw/stage2_head.S
|
||||
+++ b/board-qemu/llfw/stage2_head.S
|
||||
@@ -54,7 +54,7 @@ bsscdone:
|
||||
/* jump to c-code */
|
||||
/* r31 = fdt - r5 */
|
||||
/* ------------------------------------ */
|
||||
- li r3, r0
|
||||
+ li r3, 0
|
||||
mr r4, r31
|
||||
bl .early_c_entry
|
||||
|
||||
diff --git a/llfw/boot_abort.S b/llfw/boot_abort.S
|
||||
index 996bdd7..47a9178 100644
|
||||
--- a/llfw/boot_abort.S
|
||||
+++ b/llfw/boot_abort.S
|
||||
@@ -73,7 +73,7 @@ ASM_ENTRY(boot_abort)
|
||||
|
||||
/* check if i/o is possible, if yes then print message */
|
||||
li r10, ABORT_CANIO
|
||||
- andi. r3, r31, r10
|
||||
+ and. r3, r31, r10
|
||||
bne abort_noio
|
||||
|
||||
/* use i/o ..., first print reference message */
|
||||
--
|
||||
1.8.3.1
|
||||
|
100
SOURCES/slof-Fix-output-word.patch
Normal file
100
SOURCES/slof-Fix-output-word.patch
Normal file
@ -0,0 +1,100 @@
|
||||
From 22d45fb249bd6e276c26c5ff64132005b385d374 Mon Sep 17 00:00:00 2001
|
||||
From: Laurent Vivier <lvivier@redhat.com>
|
||||
Date: Tue, 29 May 2018 11:09:32 +0200
|
||||
Subject: [PATCH 1/2] Fix output word
|
||||
|
||||
RH-Author: Laurent Vivier <lvivier@redhat.com>
|
||||
Message-id: <20180529110933.1441-2-lvivier@redhat.com>
|
||||
Patchwork-id: 80504
|
||||
O-Subject: [RHEL7.6 SLOF PATCH 1/2] Fix output word
|
||||
Bugzilla: 1495467
|
||||
RH-Acked-by: Thomas Huth <thuth@redhat.com>
|
||||
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
|
||||
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
|
||||
|
||||
We can select the console output, but it does not really work
|
||||
|
||||
Implement term-io-emit, as we have term-io-key to really
|
||||
send characters to the output selected by stdout.
|
||||
|
||||
Resolve xt and ihandle in the output command.
|
||||
|
||||
Use them in the new term-io-emit function.
|
||||
|
||||
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
|
||||
Reviewed-by: Thomas Huth <thuth@redhat.com>
|
||||
[aik: fixed commit log]
|
||||
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
|
||||
(cherry picked from commit f05c38f7625eca1b9210ce68e80fa520274d7a8a)
|
||||
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
|
||||
|
||||
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
||||
---
|
||||
slof/fs/term-io.fs | 36 +++++++++++++++++++++++++++++++-----
|
||||
1 file changed, 31 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/slof/fs/term-io.fs b/slof/fs/term-io.fs
|
||||
index 52ce12a..f13ae87 100644
|
||||
--- a/slof/fs/term-io.fs
|
||||
+++ b/slof/fs/term-io.fs
|
||||
@@ -10,6 +10,17 @@
|
||||
\ * IBM Corporation - initial implementation
|
||||
\ ****************************************************************************/
|
||||
|
||||
+0 VALUE write-xt
|
||||
+
|
||||
+VARIABLE stdout
|
||||
+
|
||||
+: set-stdout ( ihandle -- )
|
||||
+ \ Close old stdout:
|
||||
+ stdout @ ?dup IF close-dev THEN
|
||||
+ \ Now set the new stdout:
|
||||
+ dup stdout !
|
||||
+ encode-int s" stdout" set-chosen
|
||||
+;
|
||||
|
||||
: input ( dev-str dev-len -- )
|
||||
open-dev ?dup IF
|
||||
@@ -24,12 +35,15 @@
|
||||
|
||||
: output ( dev-str dev-len -- )
|
||||
open-dev ?dup IF
|
||||
- \ Close old stdout:
|
||||
- s" stdout" get-chosen IF
|
||||
- decode-int nip nip ?dup IF close-dev THEN
|
||||
+ \ find new ihandle and xt handle
|
||||
+ dup s" write" rot ihandle>phandle find-method
|
||||
+ 0= IF
|
||||
+ drop
|
||||
+ cr ." Cannot find the write method for the given output console " cr
|
||||
+ EXIT
|
||||
THEN
|
||||
- \ Now set the new stdout:
|
||||
- encode-int s" stdout" set-chosen
|
||||
+ to write-xt
|
||||
+ set-stdout
|
||||
THEN
|
||||
;
|
||||
|
||||
@@ -40,6 +54,18 @@
|
||||
|
||||
1 BUFFER: (term-io-char-buf)
|
||||
|
||||
+: term-io-emit ( char -- )
|
||||
+ write-xt IF
|
||||
+ (term-io-char-buf) c!
|
||||
+ (term-io-char-buf) 1 write-xt stdout @ call-package
|
||||
+ drop
|
||||
+ ELSE
|
||||
+ serial-emit
|
||||
+ THEN
|
||||
+;
|
||||
+
|
||||
+' term-io-emit to emit
|
||||
+
|
||||
: term-io-key ( -- char )
|
||||
s" stdin" get-chosen IF
|
||||
decode-int nip nip dup 0= IF 0 EXIT THEN
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -0,0 +1,54 @@
|
||||
From 49c493991c8cb9779022ffe3f1b2ac980f07852c Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Huth <thuth@redhat.com>
|
||||
Date: Thu, 20 Dec 2018 10:26:07 +0000
|
||||
Subject: [PATCH 1/3] board-qemu/slof/vio-vscsi: Scan up to 64 SCSI IDs
|
||||
|
||||
RH-Author: Thomas Huth <thuth@redhat.com>
|
||||
Message-id: <1545301567-8565-2-git-send-email-thuth@redhat.com>
|
||||
Patchwork-id: 83706
|
||||
O-Subject: [RHEL8 SLOF PATCH 1/1] board-qemu/slof/vio-vscsi: Scan up to 64 SCSI IDs
|
||||
Bugzilla: 1655649
|
||||
RH-Acked-by: Laurent Vivier <lvivier@redhat.com>
|
||||
RH-Acked-by: David Gibson <dgibson@redhat.com>
|
||||
RH-Acked-by: Serhii Popovych <spopovyc@redhat.com>
|
||||
|
||||
QEMU supports up the 64 SCSI IDs on the vscsi "bus", see the string
|
||||
"max_target = 63" in the source file hw/scsi/spapr_vscsi.c of QEMU.
|
||||
However, SLOF currently only checks the first 9 IDs on the vscsi adaptor,
|
||||
so when you try to boot from a CD-ROM like this, the boot fails:
|
||||
|
||||
qemu-system-ppc64 ... -device spapr-vscsi,id=scsi0,reg=0x2000 \
|
||||
-drive file=/path/to/cdrom.iso,format=raw,if=none,id=dr1,readonly=on \
|
||||
-device scsi-cd,bus=scsi0.0,channel=0,scsi-id=63,lun=1,drive=dr1,id=scd1
|
||||
|
||||
Thus let's change the amount of IDs that we scan in SLOF to 64, too, to
|
||||
match the ID range that QEMU provides.
|
||||
|
||||
Signed-off-by: Thomas Huth <thuth@redhat.com>
|
||||
Reviewed-by: Laurent Vivier <lvivier@redhat.com>
|
||||
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
|
||||
(cherry picked from commit cad96808d130bcc1fc36741cbedaaa3f8215e6c4)
|
||||
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
|
||||
---
|
||||
board-qemu/slof/vio-vscsi.fs | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/board-qemu/slof/vio-vscsi.fs b/board-qemu/slof/vio-vscsi.fs
|
||||
index f2d4c6f..be11b69 100644
|
||||
--- a/board-qemu/slof/vio-vscsi.fs
|
||||
+++ b/board-qemu/slof/vio-vscsi.fs
|
||||
@@ -507,9 +507,9 @@ TRUE VALUE first-time-init?
|
||||
10000 \ Larger value seem to have problems with some CDROMs
|
||||
;
|
||||
|
||||
-8 CONSTANT #dev
|
||||
+\ Report the amount of supported SCSI IDs - QEMU uses "max_target = 63"
|
||||
: dev-max-target ( -- #max-target )
|
||||
- #dev
|
||||
+ 40
|
||||
;
|
||||
|
||||
" scsi-probe-helpers.fs" included
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -0,0 +1,49 @@
|
||||
From a32ea0519c017dec93014e16ef3063728f6491b5 Mon Sep 17 00:00:00 2001
|
||||
From: Laurent Vivier <lvivier@redhat.com>
|
||||
Date: Wed, 8 Aug 2018 15:10:57 +0100
|
||||
Subject: [PATCH 1/6] libelf: Add REL32 to the list of ignored relocations
|
||||
|
||||
RH-Author: Laurent Vivier <lvivier@redhat.com>
|
||||
Message-id: <20180808151102.11232-2-lvivier@redhat.com>
|
||||
Patchwork-id: 81679
|
||||
O-Subject: [RHEL-8.0 SLOF PATCH 1/6] libelf: Add REL32 to the list of ignored relocations
|
||||
Bugzilla: 1613619
|
||||
RH-Acked-by: Thomas Huth <thuth@redhat.com>
|
||||
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
|
||||
RH-Acked-by: David Gibson <dgibson@redhat.com>
|
||||
|
||||
From: Thomas Huth <thuth@redhat.com>
|
||||
|
||||
When compiling SLOF with GCC 8.1, I currently get a lot of these errors:
|
||||
|
||||
ERROR: Unhandled relocation (A) type 26
|
||||
|
||||
Type 26 is the "relative 32-bit" relocation. We can simply ignore it
|
||||
(like the other relative relocations - REL14, REL24 and REL64) to
|
||||
shut up these error messages.
|
||||
|
||||
Signed-off-by: Thomas Huth <thuth@redhat.com>
|
||||
Reviewed-by: Laurent Vivier <lvivier@redhat.com>
|
||||
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
|
||||
(cherry picked from commit 031cb1b921694f0c8676e0b478a3dccbae9d1639)
|
||||
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
|
||||
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
|
||||
---
|
||||
lib/libelf/elf64.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/lib/libelf/elf64.c b/lib/libelf/elf64.c
|
||||
index 37e9c10..775cdee 100644
|
||||
--- a/lib/libelf/elf64.c
|
||||
+++ b/lib/libelf/elf64.c
|
||||
@@ -362,6 +362,7 @@ elf_apply_rela64(void *file_addr, signed long offset, struct rela *relaentry,
|
||||
case R_PPC64_TOC16_DS: /* (S + A - .TOC) >> 2 */
|
||||
case R_PPC64_REL14:
|
||||
case R_PPC64_REL24: /* (S + A - P) >> 2 */
|
||||
+ case R_PPC64_REL32: /* S + A - P */
|
||||
case R_PPC64_REL64: /* S + A - P */
|
||||
case R_PPC64_GOT16_DS:
|
||||
case R_PPC64_GOT16_LO_DS:
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -0,0 +1,49 @@
|
||||
From 0b16818885a56bcf946e09a4c172d74e31d87342 Mon Sep 17 00:00:00 2001
|
||||
From: Laurent Vivier <lvivier@redhat.com>
|
||||
Date: Wed, 8 Aug 2018 15:10:59 +0100
|
||||
Subject: [PATCH 3/6] make.rules: Compile SLOF with
|
||||
-fno-asynchronous-unwind-tables
|
||||
|
||||
RH-Author: Laurent Vivier <lvivier@redhat.com>
|
||||
Message-id: <20180808151102.11232-4-lvivier@redhat.com>
|
||||
Patchwork-id: 81680
|
||||
O-Subject: [RHEL-8.0 SLOF PATCH 3/6] make.rules: Compile SLOF with -fno-asynchronous-unwind-tables
|
||||
Bugzilla: 1613619
|
||||
RH-Acked-by: Thomas Huth <thuth@redhat.com>
|
||||
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
|
||||
RH-Acked-by: David Gibson <dgibson@redhat.com>
|
||||
|
||||
From: Thomas Huth <thuth@redhat.com>
|
||||
|
||||
With the new GCC 8, the asynchronous-unwind-tables are always enabled.
|
||||
We don't need this for SLOF, so disable them to save 32 kiB in the
|
||||
boot_rom.bin.
|
||||
|
||||
Signed-off-by: Thomas Huth <thuth@redhat.com>
|
||||
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
|
||||
(cherry picked from commit 5cd96a5ba9782d6f1c2d53d02d5a265fbcae580b)
|
||||
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
|
||||
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
|
||||
---
|
||||
make.rules | 5 +++--
|
||||
1 file changed, 3 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/make.rules b/make.rules
|
||||
index 3067314..acbc8ab 100644
|
||||
--- a/make.rules
|
||||
+++ b/make.rules
|
||||
@@ -73,8 +73,9 @@ RANLIB ?= $(CROSS)ranlib
|
||||
CPP ?= $(CROSS)cpp
|
||||
|
||||
WARNFLAGS = -Wall -Wmissing-prototypes -Wstrict-prototypes -Wformat-security
|
||||
-CFLAGS ?= -g -O2 -fno-builtin -ffreestanding -nostdinc -msoft-float -fno-strict-aliasing \
|
||||
- -mno-altivec -mabi=no-altivec -fno-stack-protector $(WARNFLAGS)
|
||||
+CFLAGS ?= -g -O2 -fno-builtin -ffreestanding -nostdinc -msoft-float \
|
||||
+ -fno-strict-aliasing -mno-altivec -mabi=no-altivec \
|
||||
+ -fno-stack-protector -fno-asynchronous-unwind-tables $(WARNFLAGS)
|
||||
|
||||
export CC AS LD CLEAN OBJCOPY OBJDUMP STRIP AR RANLIB CFLAGS
|
||||
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -0,0 +1,123 @@
|
||||
From d8b13f259660ed37f219db40f3d93f2ae81d4945 Mon Sep 17 00:00:00 2001
|
||||
From: Laurent Vivier <lvivier@redhat.com>
|
||||
Date: Tue, 29 May 2018 11:09:33 +0200
|
||||
Subject: [PATCH 2/2] resolve ihandle and xt handle in the input command (like
|
||||
for the output)
|
||||
|
||||
RH-Author: Laurent Vivier <lvivier@redhat.com>
|
||||
Message-id: <20180529110933.1441-3-lvivier@redhat.com>
|
||||
Patchwork-id: 80502
|
||||
O-Subject: [RHEL7.6 SLOF PATCH 2/2] resolve ihandle and xt handle in the input command (like for the output)
|
||||
Bugzilla: 1495467
|
||||
RH-Acked-by: Thomas Huth <thuth@redhat.com>
|
||||
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
|
||||
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
|
||||
|
||||
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
|
||||
Reviewed-by: Thomas Huth <thuth@redhat.com>
|
||||
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
|
||||
(cherry picked from commit 85d5b4d62d0563163bd12d06a783fbc04a4d9069)
|
||||
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
|
||||
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
||||
---
|
||||
slof/fs/term-io.fs | 40 ++++++++++++++++++++++++----------------
|
||||
1 file changed, 24 insertions(+), 16 deletions(-)
|
||||
|
||||
diff --git a/slof/fs/term-io.fs b/slof/fs/term-io.fs
|
||||
index f13ae87..5b94b26 100644
|
||||
--- a/slof/fs/term-io.fs
|
||||
+++ b/slof/fs/term-io.fs
|
||||
@@ -10,10 +10,20 @@
|
||||
\ * IBM Corporation - initial implementation
|
||||
\ ****************************************************************************/
|
||||
|
||||
+0 VALUE read-xt
|
||||
0 VALUE write-xt
|
||||
|
||||
+VARIABLE stdin
|
||||
VARIABLE stdout
|
||||
|
||||
+: set-stdin ( ihandle -- )
|
||||
+ \ Close old stdin:
|
||||
+ stdin @ ?dup IF close-dev THEN
|
||||
+ \ Now set the new stdin:
|
||||
+ dup stdin !
|
||||
+ encode-int s" stdin" set-chosen
|
||||
+;
|
||||
+
|
||||
: set-stdout ( ihandle -- )
|
||||
\ Close old stdout:
|
||||
stdout @ ?dup IF close-dev THEN
|
||||
@@ -24,12 +34,15 @@ VARIABLE stdout
|
||||
|
||||
: input ( dev-str dev-len -- )
|
||||
open-dev ?dup IF
|
||||
- \ Close old stdin:
|
||||
- s" stdin" get-chosen IF
|
||||
- decode-int nip nip ?dup IF close-dev THEN
|
||||
+ \ find new ihandle and xt handle
|
||||
+ dup s" read" rot ihandle>phandle find-method
|
||||
+ 0= IF
|
||||
+ drop
|
||||
+ cr ." Cannot find the read method for the given input console " cr
|
||||
+ EXIT
|
||||
THEN
|
||||
- \ Now set the new stdin:
|
||||
- encode-int s" stdin" set-chosen
|
||||
+ to read-xt
|
||||
+ set-stdin
|
||||
THEN
|
||||
;
|
||||
|
||||
@@ -51,7 +64,6 @@ VARIABLE stdout
|
||||
2dup input output
|
||||
;
|
||||
|
||||
-
|
||||
1 BUFFER: (term-io-char-buf)
|
||||
|
||||
: term-io-emit ( char -- )
|
||||
@@ -67,16 +79,14 @@ VARIABLE stdout
|
||||
' term-io-emit to emit
|
||||
|
||||
: term-io-key ( -- char )
|
||||
- s" stdin" get-chosen IF
|
||||
- decode-int nip nip dup 0= IF 0 EXIT THEN
|
||||
- >r BEGIN
|
||||
- (term-io-char-buf) 1 s" read" r@ $call-method
|
||||
+ read-xt IF
|
||||
+ BEGIN
|
||||
+ (term-io-char-buf) 1 read-xt stdin @ call-package
|
||||
0 >
|
||||
UNTIL
|
||||
(term-io-char-buf) c@
|
||||
- r> drop
|
||||
ELSE
|
||||
- [ ' key behavior compile, ]
|
||||
+ serial-key
|
||||
THEN
|
||||
;
|
||||
|
||||
@@ -88,8 +98,7 @@ VARIABLE stdout
|
||||
\ - if it's an hv console, use hvterm-key?
|
||||
\ otherwise it will always return false
|
||||
: term-io-key? ( -- true|false )
|
||||
- s" stdin" get-chosen IF
|
||||
- decode-int nip nip dup 0= IF drop 0 EXIT THEN \ return false and exit if no stdin set
|
||||
+ stdin @ ?dup IF
|
||||
>r \ store ihandle on return stack
|
||||
s" device_type" r@ ihandle>phandle ( propstr len phandle )
|
||||
get-property ( true | data dlen false )
|
||||
@@ -115,8 +124,7 @@ VARIABLE stdout
|
||||
2drop r> drop false EXIT \ unknown device_type cleanup return-stack, return false
|
||||
THEN
|
||||
ELSE
|
||||
- \ stdin not set, return false
|
||||
- false
|
||||
+ serial-key?
|
||||
THEN
|
||||
;
|
||||
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -0,0 +1,128 @@
|
||||
From 14f7e3a845c339fc98c14d0d57908d4c76f4596a Mon Sep 17 00:00:00 2001
|
||||
From: Laurent Vivier <lvivier@redhat.com>
|
||||
Date: Wed, 8 Aug 2018 15:11:00 +0100
|
||||
Subject: [PATCH 4/6] romfs/tools: Remove superfluous union around the rom
|
||||
header struct
|
||||
|
||||
RH-Author: Laurent Vivier <lvivier@redhat.com>
|
||||
Message-id: <20180808151102.11232-5-lvivier@redhat.com>
|
||||
Patchwork-id: 81683
|
||||
O-Subject: [RHEL-8.0 SLOF PATCH 4/6] romfs/tools: Remove superfluous union around the rom header struct
|
||||
Bugzilla: 1613619
|
||||
RH-Acked-by: Thomas Huth <thuth@redhat.com>
|
||||
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
|
||||
RH-Acked-by: David Gibson <dgibson@redhat.com>
|
||||
|
||||
From: Thomas Huth <thuth@redhat.com>
|
||||
|
||||
Accessing the struct with memset and memcpy can also be done without the
|
||||
union wrapper. While we're at it, also remove the FLASHFS_HEADER_DATA_SIZE
|
||||
macre and use sizeof(stHeader) instead.
|
||||
|
||||
Signed-off-by: Thomas Huth <thuth@redhat.com>
|
||||
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
|
||||
(cherry picked from commit d4443f17c956e77df7bb23b2d19462faae9f4b23)
|
||||
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
|
||||
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
|
||||
---
|
||||
include/calculatecrc.h | 1 -
|
||||
romfs/tools/create_crc.c | 29 +++++++++++++----------------
|
||||
2 files changed, 13 insertions(+), 17 deletions(-)
|
||||
|
||||
diff --git a/include/calculatecrc.h b/include/calculatecrc.h
|
||||
index a19a229..667ea81 100644
|
||||
--- a/include/calculatecrc.h
|
||||
+++ b/include/calculatecrc.h
|
||||
@@ -17,7 +17,6 @@
|
||||
#define FLASHFS_HEADER_SIZE_ADDR 0x08 // uint64_t position of total flash header size value
|
||||
|
||||
#define FLASHFS_ROMADDR 0x00 // uint64_t position of pointer to next file
|
||||
-#define FLASHFS_HEADER_DATA_SIZE 0x68 // 104 bytes of total header data size
|
||||
#define CRC_METHODE Ethernet_32 // define the CRC genarator (CRC 16 bit to 64 is supported)
|
||||
|
||||
//--- header format ---------------------------------
|
||||
diff --git a/romfs/tools/create_crc.c b/romfs/tools/create_crc.c
|
||||
index 5a76b9c..e354339 100644
|
||||
--- a/romfs/tools/create_crc.c
|
||||
+++ b/romfs/tools/create_crc.c
|
||||
@@ -10,6 +10,7 @@
|
||||
* IBM Corporation - initial implementation
|
||||
*****************************************************************************/
|
||||
|
||||
+#include <assert.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
@@ -71,21 +72,18 @@ createHeaderImage(int notime)
|
||||
char dastr[16] = { 0, };
|
||||
unsigned long long da = 0;
|
||||
|
||||
- union {
|
||||
- unsigned char pcArray[FLASHFS_HEADER_DATA_SIZE];
|
||||
- struct stH stHeader;
|
||||
- } uHeader;
|
||||
+ struct stH stHeader;
|
||||
|
||||
/* initialize Header */
|
||||
- memset(uHeader.pcArray, 0x00, FLASHFS_HEADER_DATA_SIZE);
|
||||
+ memset(&stHeader, 0x00, sizeof(stHeader));
|
||||
|
||||
/* read driver info */
|
||||
if (NULL != (pcVersion = getenv("DRIVER_NAME"))) {
|
||||
- strncpy(uHeader.stHeader.version, pcVersion, 16);
|
||||
+ strncpy(stHeader.version, pcVersion, 16);
|
||||
} else if (NULL != (pcVersion = getenv("USER"))) {
|
||||
- strncpy(uHeader.stHeader.version, pcVersion, 16);
|
||||
+ strncpy(stHeader.version, pcVersion, 16);
|
||||
} else if (pcVersion == NULL) {
|
||||
- strncpy(uHeader.stHeader.version, "No known user!", 16);
|
||||
+ strncpy(stHeader.version, "No known user!", 16);
|
||||
}
|
||||
|
||||
if (!notime) {
|
||||
@@ -104,18 +102,18 @@ createHeaderImage(int notime)
|
||||
}
|
||||
da = cpu_to_be64(strtoll(dastr, NULL, 16));
|
||||
}
|
||||
- memcpy(uHeader.stHeader.date, &da, 8);
|
||||
+ memcpy(stHeader.date, &da, 8);
|
||||
|
||||
/* write Magic value into data stream */
|
||||
- strncpy(uHeader.stHeader.magic, FLASHFS_MAGIC, 8);
|
||||
+ strncpy(stHeader.magic, FLASHFS_MAGIC, 8);
|
||||
/* write platform name into data stream */
|
||||
- strcpy(uHeader.stHeader.platform_name, FLASHFS_PLATFORM_MAGIC);
|
||||
+ strcpy(stHeader.platform_name, FLASHFS_PLATFORM_MAGIC);
|
||||
/* write platform revision into data stream */
|
||||
- strcpy(uHeader.stHeader.platform_revision, FLASHFS_PLATFORM_REVISION);
|
||||
+ strcpy(stHeader.platform_revision, FLASHFS_PLATFORM_REVISION);
|
||||
|
||||
|
||||
/* fill end of file info (8 bytes of FF) into data stream */
|
||||
- uHeader.stHeader.ui64FileEnd = -1;
|
||||
+ stHeader.ui64FileEnd = -1;
|
||||
|
||||
/* read address of next file and address of header date, both are 64 bit values */
|
||||
ui64RomAddr = 0;
|
||||
@@ -129,7 +127,7 @@ createHeaderImage(int notime)
|
||||
|
||||
/* calculate final flash-header-size and flash-file-size */
|
||||
/* calculate end addr of header */
|
||||
- ui64globalHeaderSize = (uint32_t) ui64DataAddr + (uint32_t) FLASHFS_HEADER_DATA_SIZE;
|
||||
+ ui64globalHeaderSize = (uint32_t) ui64DataAddr + sizeof(stHeader);
|
||||
/* cut 64 bit to place CRC for File-End */
|
||||
ui64globalHeaderSize -= 8;
|
||||
/* add 64 bit to place CRC behind File-End */
|
||||
@@ -143,8 +141,7 @@ createHeaderImage(int notime)
|
||||
/* fill free space in Header with zeros */
|
||||
memset(&pucFileStream[ui64DataAddr], 0, (ui64RomAddr - ui64DataAddr));
|
||||
/* place data to header */
|
||||
- memcpy(&pucFileStream[ui64DataAddr], uHeader.pcArray,
|
||||
- FLASHFS_HEADER_DATA_SIZE);
|
||||
+ memcpy(&pucFileStream[ui64DataAddr], &stHeader, sizeof(stHeader));
|
||||
|
||||
/* insert header length into data stream */
|
||||
*(uint64_t *) (pucFileStream + FLASHFS_HEADER_SIZE_ADDR) =
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -0,0 +1,83 @@
|
||||
From e17f0d9c136d4304e53d6f875e25279b838ae476 Mon Sep 17 00:00:00 2001
|
||||
From: Laurent Vivier <lvivier@redhat.com>
|
||||
Date: Wed, 8 Aug 2018 15:11:01 +0100
|
||||
Subject: [PATCH 5/6] romfs/tools: Silence GCC 8.1 compiler warning with
|
||||
FLASHFS_MAGIC
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
RH-Author: Laurent Vivier <lvivier@redhat.com>
|
||||
Message-id: <20180808151102.11232-6-lvivier@redhat.com>
|
||||
Patchwork-id: 81684
|
||||
O-Subject: [RHEL-8.0 SLOF PATCH 5/6] romfs/tools: Silence GCC 8.1 compiler warning with FLASHFS_MAGIC
|
||||
Bugzilla: 1613619
|
||||
RH-Acked-by: Thomas Huth <thuth@redhat.com>
|
||||
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
|
||||
RH-Acked-by: David Gibson <dgibson@redhat.com>
|
||||
|
||||
From: Thomas Huth <thuth@redhat.com>
|
||||
|
||||
GCC 8.1 introduce some new warnings which affect create_crc.c. One of
|
||||
them is:
|
||||
|
||||
create_crc.c: In function ‘createHeaderImage’:
|
||||
create_crc.c:110:2: warning: ‘strncpy’ output truncated before terminating nul
|
||||
copying 8 bytes from a string of the same length [-Wstringop-truncation]
|
||||
strncpy(uHeader.stHeader.magic, FLASHFS_MAGIC, 8);
|
||||
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Initialize the header struct statically here instead to silence the warning.
|
||||
|
||||
Suggested-by: Segher Boessenkool <segher@kernel.crashing.org>
|
||||
Signed-off-by: Thomas Huth <thuth@redhat.com>
|
||||
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
|
||||
(cherry picked from commit 49482e06ea74652a70a8cd067b852cc142021c03)
|
||||
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
|
||||
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
|
||||
---
|
||||
romfs/tools/create_crc.c | 21 ++++++---------------
|
||||
1 file changed, 6 insertions(+), 15 deletions(-)
|
||||
|
||||
diff --git a/romfs/tools/create_crc.c b/romfs/tools/create_crc.c
|
||||
index e354339..475b184 100644
|
||||
--- a/romfs/tools/create_crc.c
|
||||
+++ b/romfs/tools/create_crc.c
|
||||
@@ -72,10 +72,12 @@ createHeaderImage(int notime)
|
||||
char dastr[16] = { 0, };
|
||||
unsigned long long da = 0;
|
||||
|
||||
- struct stH stHeader;
|
||||
-
|
||||
- /* initialize Header */
|
||||
- memset(&stHeader, 0x00, sizeof(stHeader));
|
||||
+ struct stH stHeader = {
|
||||
+ .magic = FLASHFS_MAGIC,
|
||||
+ .platform_name = FLASHFS_PLATFORM_MAGIC,
|
||||
+ .platform_revision = FLASHFS_PLATFORM_REVISION,
|
||||
+ .ui64FileEnd = -1,
|
||||
+ };
|
||||
|
||||
/* read driver info */
|
||||
if (NULL != (pcVersion = getenv("DRIVER_NAME"))) {
|
||||
@@ -104,17 +106,6 @@ createHeaderImage(int notime)
|
||||
}
|
||||
memcpy(stHeader.date, &da, 8);
|
||||
|
||||
- /* write Magic value into data stream */
|
||||
- strncpy(stHeader.magic, FLASHFS_MAGIC, 8);
|
||||
- /* write platform name into data stream */
|
||||
- strcpy(stHeader.platform_name, FLASHFS_PLATFORM_MAGIC);
|
||||
- /* write platform revision into data stream */
|
||||
- strcpy(stHeader.platform_revision, FLASHFS_PLATFORM_REVISION);
|
||||
-
|
||||
-
|
||||
- /* fill end of file info (8 bytes of FF) into data stream */
|
||||
- stHeader.ui64FileEnd = -1;
|
||||
-
|
||||
/* read address of next file and address of header date, both are 64 bit values */
|
||||
ui64RomAddr = 0;
|
||||
ui64DataAddr = 0;
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -0,0 +1,81 @@
|
||||
From bc63c0f48746d246e0c2fb755515fa05077a3bfd Mon Sep 17 00:00:00 2001
|
||||
From: Laurent Vivier <lvivier@redhat.com>
|
||||
Date: Wed, 8 Aug 2018 15:11:02 +0100
|
||||
Subject: [PATCH 6/6] romfs/tools: Silence more compiler warnings with GCC 8.1
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
RH-Author: Laurent Vivier <lvivier@redhat.com>
|
||||
Message-id: <20180808151102.11232-7-lvivier@redhat.com>
|
||||
Patchwork-id: 81682
|
||||
O-Subject: [RHEL-8.0 SLOF PATCH 6/6] romfs/tools: Silence more compiler warnings with GCC 8.1
|
||||
Bugzilla: 1613619
|
||||
RH-Acked-by: Thomas Huth <thuth@redhat.com>
|
||||
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
|
||||
RH-Acked-by: David Gibson <dgibson@redhat.com>
|
||||
|
||||
From: Thomas Huth <thuth@redhat.com>
|
||||
|
||||
GCC 8 complains about the following usages of strncpy, too:
|
||||
|
||||
create_crc.c:86:3: warning: ‘strncpy’ specified bound 16 equals destination
|
||||
size [-Wstringop-truncation]
|
||||
strncpy(uHeader.stHeader.version, pcVersion, 16);
|
||||
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
create_crc.c:84:3: warning: ‘strncpy’ specified bound 16 equals destination
|
||||
size [-Wstringop-truncation]
|
||||
strncpy(uHeader.stHeader.version, pcVersion, 16);
|
||||
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Let's work around the issue by using memcpy instead.
|
||||
|
||||
Signed-off-by: Thomas Huth <thuth@redhat.com>
|
||||
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
|
||||
(cherry picked from commit d8a9354c2a351360da438826c95cf78efcaaf1b0)
|
||||
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
|
||||
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
|
||||
---
|
||||
romfs/tools/create_crc.c | 19 ++++++++++++-------
|
||||
1 file changed, 12 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/romfs/tools/create_crc.c b/romfs/tools/create_crc.c
|
||||
index 475b184..abc373b 100644
|
||||
--- a/romfs/tools/create_crc.c
|
||||
+++ b/romfs/tools/create_crc.c
|
||||
@@ -32,6 +32,11 @@ static uint64_t ui64globalHeaderSize = 0;
|
||||
/* flag to filter detect the header in buildDataStream() */
|
||||
static int iglobalHeaderFlag = 1;
|
||||
|
||||
+static size_t min(size_t a, size_t b)
|
||||
+{
|
||||
+ return a < b ? a : b;
|
||||
+}
|
||||
+
|
||||
/**
|
||||
* Build the file image and store it as Data Stream of bytes
|
||||
* calculate a first CRC for the first file and
|
||||
@@ -80,13 +85,13 @@ createHeaderImage(int notime)
|
||||
};
|
||||
|
||||
/* read driver info */
|
||||
- if (NULL != (pcVersion = getenv("DRIVER_NAME"))) {
|
||||
- strncpy(stHeader.version, pcVersion, 16);
|
||||
- } else if (NULL != (pcVersion = getenv("USER"))) {
|
||||
- strncpy(stHeader.version, pcVersion, 16);
|
||||
- } else if (pcVersion == NULL) {
|
||||
- strncpy(stHeader.version, "No known user!", 16);
|
||||
- }
|
||||
+ pcVersion = getenv("DRIVER_NAME");
|
||||
+ if (!pcVersion)
|
||||
+ pcVersion = getenv("USER");
|
||||
+ if (!pcVersion)
|
||||
+ pcVersion = "unknown";
|
||||
+ memcpy(stHeader.version, pcVersion,
|
||||
+ min(strlen(pcVersion), sizeof(stHeader.version)));
|
||||
|
||||
if (!notime) {
|
||||
/* read time and write it into data stream */
|
||||
--
|
||||
1.8.3.1
|
||||
|
110
SOURCES/slof-usb-storage-Implement-block-write-support.patch
Normal file
110
SOURCES/slof-usb-storage-Implement-block-write-support.patch
Normal file
@ -0,0 +1,110 @@
|
||||
From 54b418a32c1e12265dd421f0289b45f77fd38fc1 Mon Sep 17 00:00:00 2001
|
||||
From: Laurent Vivier <lvivier@redhat.com>
|
||||
Date: Thu, 20 Dec 2018 11:33:01 +0000
|
||||
Subject: [PATCH 3/3] usb/storage: Implement block write support
|
||||
|
||||
RH-Author: Laurent Vivier <lvivier@redhat.com>
|
||||
Message-id: <20181220113301.29914-3-lvivier@redhat.com>
|
||||
Patchwork-id: 83709
|
||||
O-Subject: [RHEL-8.0 SLOF PATCH 2/2] usb/storage: Implement block write support
|
||||
Bugzilla: 1654196
|
||||
RH-Acked-by: Thomas Huth <thuth@redhat.com>
|
||||
RH-Acked-by: David Gibson <dgibson@redhat.com>
|
||||
RH-Acked-by: Serhii Popovych <spopovyc@redhat.com>
|
||||
|
||||
The only missing parts were to manage the transfer direction in
|
||||
do-bulk-command and to copy the data to the buffer before the
|
||||
write operation.
|
||||
|
||||
This is needed as GRUB2 wants to write the grubenv file at start
|
||||
and hangs because the data are not provided to the disk controller.
|
||||
|
||||
I've checked the file is correctly modified by modifying an environment
|
||||
variable in GRUB2 with "set saved_entry=2" then "save_env saved_entry"
|
||||
and checking the result in linux with "grub2-editenv list".
|
||||
|
||||
Fixes: Fixes: a0b96fe66fcd991b407c1d67ca842921e477a6fd
|
||||
(Provide "write" function in the disk-label package)
|
||||
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
|
||||
Reviewed-by: Thomas Huth <thuth@redhat.com>
|
||||
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
|
||||
(cherry picked from commit d10500a4e0378b7f02f63f78a97e3440805f1374)
|
||||
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
|
||||
|
||||
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
|
||||
---
|
||||
slof/fs/usb/dev-storage.fs | 27 ++++++++++++++++++++++-----
|
||||
1 file changed, 22 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/slof/fs/usb/dev-storage.fs b/slof/fs/usb/dev-storage.fs
|
||||
index a0a0bac..db5d0a8 100644
|
||||
--- a/slof/fs/usb/dev-storage.fs
|
||||
+++ b/slof/fs/usb/dev-storage.fs
|
||||
@@ -103,23 +103,30 @@ scsi-open
|
||||
\ if sense-len is 0 then no sense data is actually present
|
||||
\
|
||||
|
||||
-: do-bulk-command ( resp-buffer resp-size -- TRUE | FALSE )
|
||||
+: do-bulk-command ( dir resp-buffer resp-size -- TRUE | FALSE )
|
||||
TO resp-size
|
||||
TO resp-buffer
|
||||
udev USB_PIPE_OUT td-buf td-buf-phys dma-buf-phys usb>cmd 1F
|
||||
usb-transfer-bulk 0= IF
|
||||
- FALSE EXIT
|
||||
+ drop FALSE EXIT
|
||||
THEN
|
||||
\ transfer CBW
|
||||
resp-size IF
|
||||
d# 125 us
|
||||
- udev USB_PIPE_IN td-buf td-buf-phys resp-buffer resp-size
|
||||
+ IF
|
||||
+ udev USB_PIPE_IN
|
||||
+ ELSE
|
||||
+ udev USB_PIPE_OUT
|
||||
+ THEN
|
||||
+ td-buf td-buf-phys resp-buffer resp-size
|
||||
usb-transfer-bulk 0= IF \ transfer data
|
||||
usb-disk-debug? IF ." Data phase failed " cr THEN
|
||||
\ FALSE EXIT
|
||||
\ in case of a stall/halted endpoint we clear the halt
|
||||
\ Fall through and try reading the CSW
|
||||
THEN
|
||||
+ ELSE
|
||||
+ drop
|
||||
THEN
|
||||
d# 125 us
|
||||
udev USB_PIPE_IN td-buf td-buf-phys dma-buf-phys usb>csw 0D
|
||||
@@ -182,18 +189,28 @@ CONSTANT cbw-length
|
||||
build-cbw
|
||||
1 tag + to tag
|
||||
|
||||
+ \ copy command
|
||||
usb-cmd-addr
|
||||
dma-buf usb>cmd SCSI-COMMAND-OFFSET +
|
||||
usb-cmd-len
|
||||
move
|
||||
|
||||
+ \ copy data to write
|
||||
+ usb-dir not IF
|
||||
+ usb-buf-addr dma-buf usb>data usb-buf-len move
|
||||
+ THEN
|
||||
+
|
||||
\ Send it
|
||||
- dma-buf-phys usb>data usb-buf-len
|
||||
+ usb-dir dma-buf-phys usb>data usb-buf-len
|
||||
do-bulk-command 0= IF
|
||||
." USB-DISK: Bulk command failed!" cr
|
||||
0 0 -1 EXIT
|
||||
THEN
|
||||
- dma-buf usb>data usb-buf-addr usb-buf-len move
|
||||
+
|
||||
+ \ copy read data
|
||||
+ usb-dir IF
|
||||
+ dma-buf usb>data usb-buf-addr usb-buf-len move
|
||||
+ THEN
|
||||
|
||||
dma-buf usb>csw to csw-addr
|
||||
csw-addr csw>sig l@ 55534253 <> IF
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -0,0 +1,88 @@
|
||||
From 74c062d40d0dcc68816b8bfef6940b8876ca635f Mon Sep 17 00:00:00 2001
|
||||
From: Laurent Vivier <lvivier@redhat.com>
|
||||
Date: Thu, 20 Dec 2018 11:33:00 +0000
|
||||
Subject: [PATCH 2/3] usb/storage: Invert the logic of the IF-statements
|
||||
|
||||
RH-Author: Laurent Vivier <lvivier@redhat.com>
|
||||
Message-id: <20181220113301.29914-2-lvivier@redhat.com>
|
||||
Patchwork-id: 83707
|
||||
O-Subject: [RHEL-8.0 SLOF PATCH 1/2] usb/storage: Invert the logic of the IF-statements
|
||||
Bugzilla: 1654196
|
||||
RH-Acked-by: Thomas Huth <thuth@redhat.com>
|
||||
RH-Acked-by: David Gibson <dgibson@redhat.com>
|
||||
RH-Acked-by: Serhii Popovych <spopovyc@redhat.com>
|
||||
|
||||
to prepare write implementation
|
||||
|
||||
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
|
||||
Reviewed-by: Thomas Huth <thuth@redhat.com>
|
||||
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
|
||||
(cherry picked from commit 7d72d327e231d8ae9f1e8bce9f20faeaa2278b24)
|
||||
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
|
||||
---
|
||||
slof/fs/usb/dev-storage.fs | 39 +++++++++++++++++++--------------------
|
||||
1 file changed, 19 insertions(+), 20 deletions(-)
|
||||
|
||||
diff --git a/slof/fs/usb/dev-storage.fs b/slof/fs/usb/dev-storage.fs
|
||||
index 94f8421..a0a0bac 100644
|
||||
--- a/slof/fs/usb/dev-storage.fs
|
||||
+++ b/slof/fs/usb/dev-storage.fs
|
||||
@@ -107,23 +107,23 @@ scsi-open
|
||||
TO resp-size
|
||||
TO resp-buffer
|
||||
udev USB_PIPE_OUT td-buf td-buf-phys dma-buf-phys usb>cmd 1F
|
||||
- usb-transfer-bulk IF \ transfer CBW
|
||||
- resp-size IF
|
||||
- d# 125 us
|
||||
- udev USB_PIPE_IN td-buf td-buf-phys resp-buffer resp-size
|
||||
- usb-transfer-bulk 1 = not IF \ transfer data
|
||||
- usb-disk-debug? IF ." Data phase failed " cr THEN
|
||||
- \ FALSE EXIT
|
||||
- \ in case of a stall/halted endpoint we clear the halt
|
||||
- \ Fall through and try reading the CSW
|
||||
- THEN
|
||||
- THEN
|
||||
- d# 125 us
|
||||
- udev USB_PIPE_IN td-buf td-buf-phys dma-buf-phys usb>csw 0D
|
||||
- usb-transfer-bulk \ transfer CSW
|
||||
- ELSE
|
||||
- FALSE EXIT
|
||||
+ usb-transfer-bulk 0= IF
|
||||
+ FALSE EXIT
|
||||
THEN
|
||||
+ \ transfer CBW
|
||||
+ resp-size IF
|
||||
+ d# 125 us
|
||||
+ udev USB_PIPE_IN td-buf td-buf-phys resp-buffer resp-size
|
||||
+ usb-transfer-bulk 0= IF \ transfer data
|
||||
+ usb-disk-debug? IF ." Data phase failed " cr THEN
|
||||
+ \ FALSE EXIT
|
||||
+ \ in case of a stall/halted endpoint we clear the halt
|
||||
+ \ Fall through and try reading the CSW
|
||||
+ THEN
|
||||
+ THEN
|
||||
+ d# 125 us
|
||||
+ udev USB_PIPE_IN td-buf td-buf-phys dma-buf-phys usb>csw 0D
|
||||
+ usb-transfer-bulk \ transfer CSW
|
||||
;
|
||||
|
||||
STRUCT \ cbw
|
||||
@@ -189,12 +189,11 @@ CONSTANT cbw-length
|
||||
|
||||
\ Send it
|
||||
dma-buf-phys usb>data usb-buf-len
|
||||
- do-bulk-command IF
|
||||
- dma-buf usb>data usb-buf-addr usb-buf-len move
|
||||
- ELSE
|
||||
- ." USB-DISK: Bulk commad failed!" cr
|
||||
+ do-bulk-command 0= IF
|
||||
+ ." USB-DISK: Bulk command failed!" cr
|
||||
0 0 -1 EXIT
|
||||
THEN
|
||||
+ dma-buf usb>data usb-buf-addr usb-buf-len move
|
||||
|
||||
dma-buf usb>csw to csw-addr
|
||||
csw-addr csw>sig l@ 55534253 <> IF
|
||||
--
|
||||
1.8.3.1
|
||||
|
258
SPECS/SLOF.spec
Normal file
258
SPECS/SLOF.spec
Normal file
@ -0,0 +1,258 @@
|
||||
%define GITDATE 20171214
|
||||
%define GITCOMMIT fa98132
|
||||
|
||||
%global debug_package %{nil}
|
||||
|
||||
Name: SLOF
|
||||
Version: %{GITDATE}
|
||||
Release: 5.git%{GITCOMMIT}%{?dist}
|
||||
Summary: Slimline Open Firmware
|
||||
Group: Applications/Emulators
|
||||
License: BSD
|
||||
URL: http://www.openfirmware.info/SLOF
|
||||
|
||||
Source0: https://github.com/aik/SLOF/archive/qemu-slof-20171214.tar.gz
|
||||
|
||||
Patch1: slof-Fix-output-word.patch
|
||||
Patch2: slof-resolve-ihandle-and-xt-handle-in-the-input-command-l.patch
|
||||
# For bz#1613619 - [RHEL8.0]Console contains error message (ERROR: Unhandled relocation (A) type 26) after continuing a guest
|
||||
Patch3: slof-libelf-Add-REL32-to-the-list-of-ignored-relocations.patch
|
||||
# For bz#1613619 - [RHEL8.0]Console contains error message (ERROR: Unhandled relocation (A) type 26) after continuing a guest
|
||||
Patch4: slof-Fix-bad-assembler-statements-for-compiling-with-gcc-.patch
|
||||
# For bz#1613619 - [RHEL8.0]Console contains error message (ERROR: Unhandled relocation (A) type 26) after continuing a guest
|
||||
Patch5: slof-make.rules-Compile-SLOF-with-fno-asynchronous-unwind.patch
|
||||
# For bz#1613619 - [RHEL8.0]Console contains error message (ERROR: Unhandled relocation (A) type 26) after continuing a guest
|
||||
Patch6: slof-romfs-tools-Remove-superfluous-union-around-the-rom-.patch
|
||||
# For bz#1613619 - [RHEL8.0]Console contains error message (ERROR: Unhandled relocation (A) type 26) after continuing a guest
|
||||
Patch7: slof-romfs-tools-Silence-GCC-8.1-compiler-warning-with-FL.patch
|
||||
# For bz#1613619 - [RHEL8.0]Console contains error message (ERROR: Unhandled relocation (A) type 26) after continuing a guest
|
||||
Patch8: slof-romfs-tools-Silence-more-compiler-warnings-with-GCC-.patch
|
||||
# For bz#1655649 - RHEL8.0 - ISST-LTE:KVM:Failed to boot the guest from cdrom drive
|
||||
Patch9: slof-board-qemu-slof-vio-vscsi-Scan-up-to-64-SCSI-IDs.patch
|
||||
# For bz#1654196 - [RHEL8.0][USB] guest failed to boot from emulated usb-storage
|
||||
Patch10: slof-usb-storage-Invert-the-logic-of-the-IF-statements.patch
|
||||
# For bz#1654196 - [RHEL8.0][USB] guest failed to boot from emulated usb-storage
|
||||
Patch11: slof-usb-storage-Implement-block-write-support.patch
|
||||
|
||||
BuildArch: noarch
|
||||
ExclusiveArch: %{power64}
|
||||
|
||||
BuildRequires: binutils
|
||||
BuildRequires: perl(Data::Dumper)
|
||||
|
||||
%description
|
||||
Slimline Open Firmware (SLOF) is initialization and boot source code
|
||||
based on the IEEE-1275 (Open Firmware) standard, developed by
|
||||
engineers of the IBM Corporation.
|
||||
|
||||
The SLOF source code provides illustrates what's needed to initialize
|
||||
and boot Linux or a hypervisor on the industry Open Firmware boot
|
||||
standard.
|
||||
|
||||
Note that you normally wouldn't need to install this package
|
||||
separately. It is a dependency of qemu-system-ppc64.
|
||||
|
||||
%prep
|
||||
%setup -q -n SLOF-qemu-slof-%{GITDATE}
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
%patch4 -p1
|
||||
%patch5 -p1
|
||||
%patch6 -p1
|
||||
%patch7 -p1
|
||||
%patch8 -p1
|
||||
%patch9 -p1
|
||||
%patch10 -p1
|
||||
%patch11 -p1
|
||||
|
||||
%build
|
||||
export CROSS=""
|
||||
|
||||
# Workaround for problems on the TPS machines. They have a
|
||||
# environment variable called "RELEASE" which somehow confuses the
|
||||
# SLOF Makefiles which also use a variable named RELEASE.
|
||||
unset RELEASE
|
||||
|
||||
make qemu %{?_smp_mflags} V=2
|
||||
|
||||
%install
|
||||
mkdir -p $RPM_BUILD_ROOT%{_datadir}/qemu-kvm
|
||||
install -c -m 0644 boot_rom.bin $RPM_BUILD_ROOT%{_datadir}/qemu-kvm/slof.bin
|
||||
|
||||
%files
|
||||
%doc LICENSE
|
||||
%doc README
|
||||
%dir %{_datadir}/qemu-kvm
|
||||
%{_datadir}/qemu-kvm/slof.bin
|
||||
|
||||
%changelog
|
||||
* Fri Jan 04 2019 Danilo Cesar Lemes de Paula <ddepaula@redhat.com> - 20171214-5.gitfa98132.el8
|
||||
- slof-board-qemu-slof-vio-vscsi-Scan-up-to-64-SCSI-IDs.patch [bz#1655649]
|
||||
- slof-usb-storage-Invert-the-logic-of-the-IF-statements.patch [bz#1654196]
|
||||
- slof-usb-storage-Implement-block-write-support.patch [bz#1654196]
|
||||
- Resolves: bz#1654196
|
||||
([RHEL8.0][USB] guest failed to boot from emulated usb-storage)
|
||||
- Resolves: bz#1655649
|
||||
(RHEL8.0 - ISST-LTE:KVM:Failed to boot the guest from cdrom drive)
|
||||
|
||||
* Fri Aug 10 2018 Danilo Cesar Lemes de Paula <ddepaula@redhat.com> - 20171214-4.gitfa98132.el8
|
||||
- slof-libelf-Add-REL32-to-the-list-of-ignored-relocations.patch [bz#1613619]
|
||||
- slof-Fix-bad-assembler-statements-for-compiling-with-gcc-.patch [bz#1613619]
|
||||
- slof-make.rules-Compile-SLOF-with-fno-asynchronous-unwind.patch [bz#1613619]
|
||||
- slof-romfs-tools-Remove-superfluous-union-around-the-rom-.patch [bz#1613619]
|
||||
- slof-romfs-tools-Silence-GCC-8.1-compiler-warning-with-FL.patch [bz#1613619]
|
||||
- slof-romfs-tools-Silence-more-compiler-warnings-with-GCC-.patch [bz#1613619]
|
||||
- Resolves: bz#1613619
|
||||
([RHEL8.0]Console contains error message (ERROR: Unhandled relocation (A) type 26) after continuing a guest)
|
||||
- Resolves: bz#1600154
|
||||
(SLOF needs to be build in power hosts)
|
||||
|
||||
|
||||
* Wed Jul 11 2018 Danilo Cesar Lemes de Paula - 20171214-3.gitfa98132.el8
|
||||
- Release to RHEL-8.0
|
||||
|
||||
* Fri Jun 01 2018 Miroslav Rezanina <mrezanin@redhat.com> - 20171214-2.gitfa98132.el7
|
||||
- slof-Fix-output-word.patch [bz#1495467]
|
||||
- slof-resolve-ihandle-and-xt-handle-in-the-input-command-l.patch [bz#1495467]
|
||||
- Resolves: bz#1495467
|
||||
(SLOF does not honour output-path environment variable)
|
||||
|
||||
* Wed Apr 18 2018 Miroslav Rezanina <mrezanin@redhat.com> - 20171214-1.gitfa98132.el7
|
||||
- Rebase to qemu-slof-20171214 [bz#1562106]
|
||||
- Resolves: bz#1562106
|
||||
(Rebase SLOF for RHEL-7.6)
|
||||
|
||||
* Mon Oct 09 2017 Miroslav Rezanina <mrezanin@redhat.com> - 20170724-2.git89f519f.el7
|
||||
- slof-virtio-net-rework-the-driver-to-support-multiple-ope.patch [bz#1477937]
|
||||
- Resolves: bz#1477937
|
||||
(VM fails to boot at SLOF prompt with "Out of internal memory." with lots of virtio-net-pci devices)
|
||||
|
||||
* Mon Oct 02 2017 Miroslav Rezanina <mrezanin@redhat.com> - 20170724-1.git89f519f.el7
|
||||
- Rebase to qemu-slof-20170724 [bz#1471284]
|
||||
- Resolves: bz#1471284
|
||||
(Rebase SLOF for RHEL-7.5)
|
||||
|
||||
* Fri May 19 2017 Miroslav Rezanina <mrezanin@redhat.com> - 20170303-4.git66d250e.el7
|
||||
- slof-pci-Reserve-free-space-at-the-end-of-bridge-windows-.patch [bz#1443433]
|
||||
- Resolves: bz#1443433
|
||||
([ppc64le] Guest failed to boot up with 8 nested pci-bridge)
|
||||
|
||||
* Fri May 05 2017 Miroslav Rezanina <mrezanin@redhat.com> - 20170303-3.git66d250e.el7
|
||||
- slof-pci-Put-non-prefetchable-64bit-BARs-into-32bit-MMIO-.patch [bz#1442930]
|
||||
- slof-pci-Fix-assigned-addresses-for-64bit-nonprefetchable.patch [bz#1442930]
|
||||
- slof-pci-phb-Set-pci-max-mem64-to-the-correct-value.patch [bz#1442930]
|
||||
- slof-pci-Generate-a-64-bit-range-property-if-necessary.patch [bz#1442930]
|
||||
- Resolves: bz#1442930
|
||||
([ppc64le] BARs are incorrectly assigned for some devices under P2P bridges)
|
||||
|
||||
* Fri Apr 28 2017 Miroslav Rezanina <mrezanin@redhat.com> - 20170303-2.git66d250e.el7
|
||||
- slof-logo-Update-the-logo.patch [bz#1443904]
|
||||
- slof-Rework-the-printing-of-the-banner-during-boot.patch [bz#1443904]
|
||||
- Resolves: bz#1443904
|
||||
(SLOF user interface display bootable device and "SLOF" words duplicate)
|
||||
|
||||
* Thu Mar 09 2017 Miroslav Rezanina <mrezanin@redhat.com> - 20170303-0.git66d250e.el7
|
||||
- Rebaes to SLOF version used by QEMU 2.9 [bz#1392055]
|
||||
- Resolves: bz#1392055
|
||||
(Rebase SLOF for RHEL-7.4)
|
||||
|
||||
* Fri Aug 05 2016 Miroslav Rezanina <mrezanin@redhat.com> - 20160223-6.gitdbbfda4.el7
|
||||
- slof-usb-Move-XHCI-port-state-arrays-from-header-to-.c-fi.patch [bz#1352765]
|
||||
- slof-usb-Increase-amount-of-maximum-slot-IDs-and-add-a-sa.patch [bz#1352765]
|
||||
- slof-usb-Initialize-USB3-devices-on-a-hub-and-keep-track-.patch [bz#1352765]
|
||||
- slof-usb-Build-correct-route-string-for-USB3-devices-behi.patch [bz#1352765]
|
||||
- slof-usb-Set-XHCI-slot-speed-according-to-port-status.patch [bz#1352765]
|
||||
- Resolves: bz#1352765
|
||||
(SLOF can not handle devices attached to an XHCI USB hub)
|
||||
|
||||
* Tue Jul 26 2016 Miroslav Rezanina <mrezanin@redhat.com> - 20160223-5.gitdbbfda4.el7
|
||||
- slof-usb-hid-Fix-non-working-comma-key.patch [bz#1352821]
|
||||
- Resolves: bz#1352821
|
||||
(Key "," can not be inputted during SLOF and yaboot stage)
|
||||
|
||||
* Tue Jun 07 2016 Miroslav Rezanina <mrezanin@redhat.com> - 20160223-4.gitdbbfda4.el7
|
||||
- slof-xhci-add-memory-barrier-after-filling-the-trb.patch [bz#1339528]
|
||||
- slof-xhci-fix-missing-keys-from-keyboard.patch [bz#1339528]
|
||||
- slof-Improve-F12-key-handling-in-boot-menu.patch [bz#1339528]
|
||||
- Resolves: bz#1339528
|
||||
(SLOF boot menu gets delayed if press 'F12' key for multiple times)
|
||||
|
||||
* Wed May 11 2016 Miroslav Rezanina <mrezanin@redhat.com> - 20160223-3.gitdbbfda4.el7
|
||||
- slof-ipv6-Do-not-use-unitialized-MAC-address-array.patch [bz#1287716]
|
||||
- slof-ipv6-send_ipv6-has-to-return-after-doing-NDP.patch [bz#1287716]
|
||||
- slof-ipv6-Fix-possible-NULL-pointer-dereference-in-send_i.patch [bz#1287716]
|
||||
- slof-ipv6-Clear-memory-after-malloc-if-necessary.patch [bz#1287716]
|
||||
- slof-ipv6-Fix-memory-leak-in-set_ipv6_address-ip6_create_.patch [bz#1287716]
|
||||
- slof-ipv6-Indent-code-with-tabs-not-with-spaces.patch [bz#1287716]
|
||||
- slof-ipv6-Fix-NULL-pointer-dereference-in-ip6addr_add.patch [bz#1287716]
|
||||
- slof-ipv6-Replace-magic-number-1500-with-ETH_MTU_SIZE-i.e.patch [bz#1287716]
|
||||
- Resolves: bz#1287716
|
||||
(IPv6 boot support in SLOF)
|
||||
|
||||
* Fri May 06 2016 Miroslav Rezanina <mrezanin@redhat.com> - 20160223-2.gitdbbfda4.el7
|
||||
- slof-dev-null-The-read-function-has-to-return-0-if-nothin.patch [bz#1310737]
|
||||
- slof-ipv6-Add-support-for-sending-packets-through-a-route.patch [bz#1301081]
|
||||
- slof-virtio-net-initialize-to-populate-mac-address.patch [bz#1331698]
|
||||
- Resolves: bz#1301081
|
||||
(IPv6 boot does not work in SLOF when TFTP server is behind a router)
|
||||
- Resolves: bz#1310737
|
||||
(SLOF cannot boot without a console)
|
||||
- Resolves: bz#1331698
|
||||
(Network booting in grub fails when using virtio-net and SLOF-20160223-0)
|
||||
|
||||
* Fri Sep 18 2015 Miroslav Rezanina <mrezanin@redhat.com> - 20150313-5.gitc89b0df.el7
|
||||
- slof-pci-Use-QEMU-created-PCI-device-nodes.patch [bz#1250326]
|
||||
- Resolves: bz#1250326
|
||||
(vfio device can't be hot unplugged on powerpc guest)
|
||||
|
||||
* Wed Sep 16 2015 Miroslav Rezanina <mrezanin@redhat.com> - 20150313-4.gitc89b0df.el7
|
||||
- slof-cas-Increase-FDT-buffer-size-to-accomodate-larger-ib.patch [bz#1263039]
|
||||
- slof-Downstream-only-Correctly-set-ibm-my-drc-index.patch [bz#1250326]
|
||||
- Resolves: bz#1250326
|
||||
(vfio device can't be hot unplugged on powerpc guest)
|
||||
- Resolves: bz#1263039
|
||||
(SLOF doesn't allow enough room for CAS response with large maxmem)
|
||||
|
||||
* Thu Aug 06 2015 Miroslav Rezanina <mrezanin@redhat.com> - 20150313-3.gitc89b0df.el7
|
||||
- slof-fbuffer-Improve-invert-region-helper.patch [bz#1237052]
|
||||
- slof-fbuffer-Use-a-smaller-cursor.patch [bz#1237052]
|
||||
- slof-terminal-Disable-the-terminal-write-trace-by-default.patch [bz#1237052]
|
||||
- slof-fbuffer-Precalculate-line-length-in-bytes.patch [bz#1237052]
|
||||
- slof-fbuffer-Implement-MRMOVE-as-an-accelerated-primitive.patch [bz#1237052]
|
||||
- slof-fbuffer-Implement-RFILL-as-an-accelerated-primitive.patch [bz#1237052]
|
||||
- slof-Add-missing-half-word-access-case-to-_FASTRMOVE-and-.patch [bz#1237052]
|
||||
- Resolves: bz#1237052
|
||||
(Curser movement issue - the curser would move right and left before get its position in grub interface of a qemu-kvm guest)
|
||||
|
||||
* Tue Jun 09 2015 Miroslav Rezanina <mrezanin@redhat.com> - 20150313-2.gitc89b0df.el7
|
||||
- slof-fbuffer-simplify-address-computations-in-fb8-toggle-.patch [bz#1212256]
|
||||
- slof-fbuffer-introduce-the-invert-region-helper.patch [bz#1212256]
|
||||
- slof-fbuffer-introduce-the-invert-region-x-helper.patch [bz#1212256]
|
||||
- slof-spec-Remove-FlashingSLOF.pdf.patch [bz#1226264]
|
||||
- Resolves: bz#1212256
|
||||
([Power KVM] Grub interface of guest response slow)
|
||||
- Resolves: bz#1226264
|
||||
(Remove FlashingSLOF.pdf)
|
||||
|
||||
* Thu May 28 2015 Miroslav Rezanina <mrezanin@redhat.com> - 20150313-1.gitc89b0df
|
||||
- rebase to 20150313 version
|
||||
- Resolves: bz#1225720
|
||||
(Update SLOF package to match current qemu-kvm-rhev package)
|
||||
|
||||
* Tue Jan 27 2015 Miroslav Rezanina <mrezanin@redhat.com> - 20140630-4.gitf284ab3
|
||||
- slof-Downstream-only-Workaround-for-TPS-environment-oddit.patch [bz#1183927]
|
||||
- Resolves: bz#1183927
|
||||
(TPS srpm rebuild test failure for SLOF)
|
||||
|
||||
* Fri Nov 14 2014 Miroslav Rezanina <mrezanin@redhat.com> - 20140630-3.gitf284ab3
|
||||
- slof-net-snk-use-socket-descriptor-in-the-network-stack.patch [bz#1158217]
|
||||
- slof-ipv4-Fix-send-packet-across-a-subnet.patch [bz#1158217]
|
||||
- Resolves: bz#1158217
|
||||
(SLOF can not reach tftp server on different subnet)
|
||||
|
||||
* Thu Aug 28 2014 Miroslav Rezanina <mrezanin@redhat.com> - 20140630-2.gitf284ab3
|
||||
- building as noarch
|
||||
|
||||
* Tue Jun 24 2014 Miroslav Rezanina <mrezanin@redhat.com> - 20140630-1.gitf284ab3
|
||||
- Initial version
|
Loading…
Reference in New Issue
Block a user