All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [Bug 12521] New: RISCV RV32IA selected, RV64GC output
@ 2020-02-03  0:18 bugzilla at busybox.net
  2020-02-03  9:35 ` [Buildroot] [Bug 12521] " bugzilla at busybox.net
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: bugzilla at busybox.net @ 2020-02-03  0:18 UTC (permalink / raw)
  To: buildroot

https://bugs.busybox.net/show_bug.cgi?id=12521

            Bug ID: 12521
           Summary: RISCV RV32IA selected, RV64GC output
           Product: buildroot
           Version: 2019.11
          Hardware: Other
                OS: All
            Status: NEW
          Severity: major
          Priority: P5
         Component: Other
          Assignee: unassigned at buildroot.uclibc.org
          Reporter: lelassal at hushmail.com
                CC: buildroot at uclibc.org
  Target Milestone: ---

Hi,

I selected RV32IA (no option without A) and ILP32 as target. Output is ELF
format using VMLinux which has been disassembled using
riscv64-unknown-elf-objdump. I get this:


ffffffe000000000 <_start>:
ffffffe000000000:       10401073                csrw    sie,zero
ffffffe000000004:       007a6197                auipc   gp,0x7a6
ffffffe000000008:       d9418193                addi    gp,gp,-620 #
ffffffe0007a5d98 <__global_pointer$>
ffffffe00000000c:       6299                    lui     t0,0x6
ffffffe00000000e:       1002b073                csrc    sstatus,t0
ffffffe000000012:       21018693                addi    a3,gp,528 #
ffffffe0007a5fa8 <hart_lottery>
ffffffe000000016:       4605                    li      a2,1
ffffffe000000018:       00c6a6af                amoadd.w        a3,a2,(a3)
ffffffe00000001c:       e2e9                    bnez    a3,ffffffe0000000de
<relocate+0x64>
ffffffe00000001e:       007a8697                auipc   a3,0x7a8
ffffffe000000022:       fe268693                addi    a3,a3,-30 #
ffffffe0007a8000 <swapper_pmd>
ffffffe000000026:       00872717                auipc   a4,0x872
ffffffe00000002a:       e3a70713                addi    a4,a4,-454 #
ffffffe000871e60 <__bss_stop>
ffffffe00000002e:       00e6d763                bge     a3,a4,ffffffe00000003c
<clear_bss_done>

ffffffe000000032 <clear_bss>:
ffffffe000000032:       0006b023                sd      zero,0(a3)
ffffffe000000036:       06a1                    addi    a3,a3,8
ffffffe000000038:       fee6cde3                blt     a3,a4,ffffffe000000032
<clear_bss>

...

ffffffe00000079c:       6314                    ld      a3,0(a4)
ffffffe00000079e:       0074b617                auipc   a2,0x74b
ffffffe0000007a2:       53260613                addi    a2,a2,1330 #
ffffffe00074bcd0 <__start___param>
ffffffe0000007a6:       0074e797                auipc   a5,0x74e
ffffffe0000007aa:       d0278793                addi    a5,a5,-766 #
ffffffe00074e4a8 <__stop___param>
ffffffe0000007ae:       8f91                    sub     a5,a5,a2
ffffffe0000007b0:       878d                    srai    a5,a5,0x3
ffffffe0000007b2:       02d786bb                mulw    a3,a5,a3
ffffffe0000007b6:       19018793                addi    a5,gp,400 #
ffffffe0007a5f28 <static_command_line>
ffffffe0000007ba:       638c                    ld      a1,0(a5)
ffffffe0000007bc:       00000897                auipc   a7,0x0



As you can see, it uses compressed instructions, is 64 bit and more (like
multiplication).

Thank you.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] [Bug 12521] RISCV RV32IA selected, RV64GC output
  2020-02-03  0:18 [Buildroot] [Bug 12521] New: RISCV RV32IA selected, RV64GC output bugzilla at busybox.net
@ 2020-02-03  9:35 ` bugzilla at busybox.net
  2020-02-28 15:58 ` bugzilla at busybox.net
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: bugzilla at busybox.net @ 2020-02-03  9:35 UTC (permalink / raw)
  To: buildroot

https://bugs.busybox.net/show_bug.cgi?id=12521

--- Comment #1 from Thomas Petazzoni <thomas.petazzoni@free-electrons.com> ---
Thanks for your report. Instead of looking at the kernel code, could you
instead look at some user-space application or library ?

Indeed, the kernel build system very often overrides the toolchain
architecture/ABI flags, depending on the kernel configuration.

Also, could you share a Buildroot .config file that allows to reproduce the
issue ?

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] [Bug 12521] RISCV RV32IA selected, RV64GC output
  2020-02-03  0:18 [Buildroot] [Bug 12521] New: RISCV RV32IA selected, RV64GC output bugzilla at busybox.net
  2020-02-03  9:35 ` [Buildroot] [Bug 12521] " bugzilla at busybox.net
@ 2020-02-28 15:58 ` bugzilla at busybox.net
  2020-02-28 16:33 ` bugzilla at busybox.net
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: bugzilla at busybox.net @ 2020-02-28 15:58 UTC (permalink / raw)
  To: buildroot

https://bugs.busybox.net/show_bug.cgi?id=12521

Thomas Petazzoni <thomas.petazzoni@free-electrons.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |NEEDINFO

--- Comment #2 from Thomas Petazzoni <thomas.petazzoni@free-electrons.com> ---
I'm closing due to the lack of feedback, and missing information to properly
debug this.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] [Bug 12521] RISCV RV32IA selected, RV64GC output
  2020-02-03  0:18 [Buildroot] [Bug 12521] New: RISCV RV32IA selected, RV64GC output bugzilla at busybox.net
  2020-02-03  9:35 ` [Buildroot] [Bug 12521] " bugzilla at busybox.net
  2020-02-28 15:58 ` bugzilla at busybox.net
@ 2020-02-28 16:33 ` bugzilla at busybox.net
  2020-03-04 14:10 ` bugzilla at busybox.net
  2020-05-18  7:37 ` bugzilla at busybox.net
  4 siblings, 0 replies; 6+ messages in thread
From: bugzilla at busybox.net @ 2020-02-28 16:33 UTC (permalink / raw)
  To: buildroot

https://bugs.busybox.net/show_bug.cgi?id=12521

lelassal at hushmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|NEEDINFO                    |---
             Status|RESOLVED                    |REOPENED

--- Comment #3 from lelassal at hushmail.com ---
So sorry I didn't get a notification about your previous message!

> Thanks for your report. Instead of looking at the kernel code, could you instead look at some user-space application or library ?

I don't know how I can get you this...

> Also, could you share a Buildroot .config file that allows to reproduce the issue ?

Here you go: https://pastebin.com/VAri9WdE

Thank you and again apologies for the delay as I hadn't seen that you replied.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] [Bug 12521] RISCV RV32IA selected, RV64GC output
  2020-02-03  0:18 [Buildroot] [Bug 12521] New: RISCV RV32IA selected, RV64GC output bugzilla at busybox.net
                   ` (2 preceding siblings ...)
  2020-02-28 16:33 ` bugzilla at busybox.net
@ 2020-03-04 14:10 ` bugzilla at busybox.net
  2020-05-18  7:37 ` bugzilla at busybox.net
  4 siblings, 0 replies; 6+ messages in thread
From: bugzilla at busybox.net @ 2020-03-04 14:10 UTC (permalink / raw)
  To: buildroot

https://bugs.busybox.net/show_bug.cgi?id=12521

--- Comment #4 from Mark Corbin <mark@dibsco.co.uk> ---
Hello

The configuration that you posted won't build due to a missing entry for the
location of your kernel configuration file (BR2_LINUX_KERNEL_DEFCONFIG).

The default RISC-V configuration for the 5.0.13 kernel is for a 64-bit build,
so you would need to provide an appropriate kernel config fragment to change
this to 32-bit. Note that there is now an 'rv32_defconfig' in the kernel tree
(since the 5.1 release).

However, the minimum ISA requirement for the 5.0.13 kernel is RV32im and later
kernels require RV32ima (see arch/riscv/Makefile), so it seems that you
wouldn't actually be able to build an RV32ia (or RV32i) kernel anyway.

Regards

Mark

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] [Bug 12521] RISCV RV32IA selected, RV64GC output
  2020-02-03  0:18 [Buildroot] [Bug 12521] New: RISCV RV32IA selected, RV64GC output bugzilla at busybox.net
                   ` (3 preceding siblings ...)
  2020-03-04 14:10 ` bugzilla at busybox.net
@ 2020-05-18  7:37 ` bugzilla at busybox.net
  4 siblings, 0 replies; 6+ messages in thread
From: bugzilla at busybox.net @ 2020-05-18  7:37 UTC (permalink / raw)
  To: buildroot

https://bugs.busybox.net/show_bug.cgi?id=12521

Thomas Petazzoni <thomas.petazzoni@bootlin.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|---                         |INVALID

--- Comment #5 from Thomas Petazzoni <thomas.petazzoni@bootlin.com> ---
We still don't have any way of reproducing the issue, and both Mark and I
believe there is in fact no issue: whether the kernel is 64 bit or 32 bit is
not directly Buildroot's fault: it is up to having a correct Linux kernel
configuration.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-05-18  7:37 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-03  0:18 [Buildroot] [Bug 12521] New: RISCV RV32IA selected, RV64GC output bugzilla at busybox.net
2020-02-03  9:35 ` [Buildroot] [Bug 12521] " bugzilla at busybox.net
2020-02-28 15:58 ` bugzilla at busybox.net
2020-02-28 16:33 ` bugzilla at busybox.net
2020-03-04 14:10 ` bugzilla at busybox.net
2020-05-18  7:37 ` bugzilla at busybox.net

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.