OpenSBI Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Ivan Orlov <ivan.orlov0322@gmail.com>
To: opensbi@lists.infradead.org
Subject: [PATCH 1/4] docs: Add documentation about tests and SBIUnit
Date: Tue, 13 Feb 2024 15:29:40 +0000	[thread overview]
Message-ID: <e9192a2b-c493-4c50-bdcb-699fd0df4454@gmail.com> (raw)
In-Reply-To: <20240213-1b27a0bbd79dd323daf5757e@orel>

On 2/13/24 15:21, Andrew Jones wrote:
>> Hmmm, I've never heard about this thing before, could you please point me to
>> a reference or source where I could read about it?
> 
> It's used in OpenSBI code for arrays such as sbi_ecall_exts. See commit
> 56bed1a0fe39 ("lib: sbi_ecall: Generate extensions list with carray") for
> that example.
> 

Thanks, I'll take a look and use them in the V2 if it is possible!

>>
>> In this case we would have to update the makefile logic, because now OpenSBI
>> uses 'compile_elf' makefile procedure for the test payload and the firmware
>> elf files both, and we would not like to use --whole-archive for the test
>> payload. I guess it is an overcomplication...
> 
> Maybe, but I'm not sure how much we'd care about having bloated binaries
> when building with CONFIG_SBIUNIT.
>

The problem is not with the bloated payload binaries: if we use 
--whole-archive when linking the test payload, it starts giving the 
'undefined reference' errors, because some of the object files refer to 
symbols which don't exist in the test payload. Like:

```
opensbi/platform/generic/andes/sleep.S:63: undefined reference to 
`_start_warm'
```

_start_warm is defined in fw_base, but it's not accessible when building 
the test payload (firmware/payloads/).

Probably, we could just disable the test payload building when 
CONFIG_SBIUNIT is enabled, but I'm not sure if it is a correct 
approach... Another option would be optional --whole-archive use, so we 
would use it for linking the fw_* ELF files only.

-- 
Kind regards,
Ivan Orlov



      reply	other threads:[~2024-02-13 15:29 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-08  9:50 [PATCH 1/4] docs: Add documentation about tests and SBIUnit Ivan Orlov
2024-02-08  9:50 ` [PATCH 2/4] lib: Add SBIUnit testing macros and functions Ivan Orlov
2024-02-12 17:36   ` Andrew Jones
2024-02-12 22:03     ` Ivan Orlov
2024-02-13 14:00       ` Andrew Jones
2024-02-13 14:55         ` Ivan Orlov
2024-02-08  9:50 ` [PATCH 3/4] lib: tests: Add a test for sbi_bitmap Ivan Orlov
2024-02-12 18:11   ` Andrew Jones
2024-02-08  9:50 ` [PATCH 4/4] lib: tests: Add sbi_console test Ivan Orlov
2024-02-12 18:24   ` Andrew Jones
2024-02-15 14:44     ` Ivan Orlov
2024-02-15 15:13       ` Andrew Jones
2024-02-15 15:45         ` Ivan Orlov
2024-02-12 17:20 ` [PATCH 1/4] docs: Add documentation about tests and SBIUnit Andrew Jones
2024-02-12 21:48   ` Ivan Orlov
2024-02-13 13:51     ` Andrew Jones
2024-02-13 14:54       ` Ivan Orlov
2024-02-13 15:21         ` Andrew Jones
2024-02-13 15:29           ` Ivan Orlov [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e9192a2b-c493-4c50-bdcb-699fd0df4454@gmail.com \
    --to=ivan.orlov0322@gmail.com \
    --cc=opensbi@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox