All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexander Graf <agraf@suse.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v4 04/16] sandbox: smbios: Update to support sandbox
Date: Sun, 3 Jun 2018 14:13:31 +0200	[thread overview]
Message-ID: <d2001f94-392d-a40f-e923-f2ae33f71250@suse.de> (raw)
In-Reply-To: <CAPnjgZ0er9KcZ53PyvkdkHCWWKWcUozwdRfV6Vt=wtiq6cmSHg@mail.gmail.com>



On 25.05.18 04:42, Simon Glass wrote:
> Hi Alex,
> 
> On 24 May 2018 at 06:24, Alexander Graf <agraf@suse.de> wrote:
>>
>>
>> On 16.05.18 17:42, Simon Glass wrote:
>>> At present this code casts addresses to pointers so cannot be used with
>>> sandbox. Update it to use mapmem instead.
>>>
>>> Signed-off-by: Simon Glass <sjg@chromium.org>
>>
>> I really dislike the whole fact that you have to call map_sysmem() at
>> all. I don't quite understand the whole point of it either - it just
>> seems to clutter the code and make it harder to follow.
> 
> The purpose is to map U-Boot addresses (e.g. 0x1234) to actual
> user-space addresses in sandbox (gd->arch.ram_buf + 0x1234).
> 
> Otherwise we cannot write tests which use particular addresses, and
> people have to worry about the host memory layout when using sandbox.

Not if we write a smart enough linker script. I can try to see when I
get around to give you an example. But basically all we need to do is
reserve a section for guest ram at a constant virtual address.

>> Can't we just simply make sandbox behave like any other target instead?
> 
> Actually that's the goal of the sandbox support. Memory is modelled as
> a contiguous chunk starting at 0x0, regardless of what the OS actually
> gives U-Boot in terms of addresses.

Most platforms don't have RAM start at 0x0 (and making sure nobody
assumes it does start at 0 is a good thing). The only bit we need to
make sure is that it always starts at *the same* address on every
invocation. But if that address is 256MB, things should still be fine.


Alex

  reply	other threads:[~2018-06-03 12:13 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-16 15:42 [U-Boot] [PATCH v4 00/16] efi: Enable basic sandbox support for EFI loader Simon Glass
2018-05-16 15:42 ` [U-Boot] [PATCH v4 01/16] efi: Init the 'rows' and 'cols' variables Simon Glass
2018-05-16 16:21   ` Heinrich Schuchardt
2018-05-16 15:42 ` [U-Boot] [PATCH v4 02/16] efi: Update some comments related to smbios tables Simon Glass
2018-05-16 16:30   ` Heinrich Schuchardt
2018-05-24 12:44   ` [U-Boot] [U-Boot, v4, " Alexander Graf
2018-05-16 15:42 ` [U-Boot] [PATCH v4 03/16] efi: sandbox: Adjust memory usage for sandbox Simon Glass
2018-05-16 17:02   ` Heinrich Schuchardt
2018-05-16 17:15   ` Heinrich Schuchardt
2018-05-24 19:16     ` Heinrich Schuchardt
2018-05-25  2:42       ` Simon Glass
2018-05-16 15:42 ` [U-Boot] [PATCH v4 04/16] sandbox: smbios: Update to support sandbox Simon Glass
2018-05-24 12:24   ` Alexander Graf
2018-05-25  2:42     ` Simon Glass
2018-06-03 12:13       ` Alexander Graf [this message]
2018-06-07 20:25         ` Simon Glass
2018-06-07 20:36           ` Alexander Graf
2018-06-07 20:41             ` Simon Glass
2018-06-07 20:47               ` Alexander Graf
2018-06-08 21:59                 ` Simon Glass
2018-05-16 15:42 ` [U-Boot] [PATCH v4 05/16] sandbox: Add a setjmp() implementation Simon Glass
2018-05-24 12:44   ` [U-Boot] [U-Boot, v4, " Alexander Graf
2018-06-15 12:01   ` [U-Boot] [PATCH v4 " Alexander Graf
2018-06-15 15:16     ` Simon Glass
2018-06-15 19:59       ` Alexander Graf
2018-05-16 15:42 ` [U-Boot] [PATCH v4 06/16] efi: sandbox: Add required linker sections Simon Glass
2018-05-24 12:43   ` [U-Boot] [U-Boot, v4, " Alexander Graf
2018-05-16 15:42 ` [U-Boot] [PATCH v4 07/16] efi: sandbox: Add distroboot support Simon Glass
2018-05-24 12:32   ` Alexander Graf
2018-06-12  5:27     ` Simon Glass
2018-06-12  5:42       ` Alexander Graf
2018-06-12  6:05         ` Simon Glass
2018-05-16 15:42 ` [U-Boot] [PATCH v4 08/16] Define board_quiesce_devices() in a shared location Simon Glass
2018-05-24 12:43   ` [U-Boot] [U-Boot, v4, " Alexander Graf
2018-05-16 15:42 ` [U-Boot] [PATCH v4 09/16] Add a comment for board_quiesce_devices() Simon Glass
2018-05-24 12:43   ` [U-Boot] [U-Boot, v4, " Alexander Graf
2018-05-16 15:42 ` [U-Boot] [PATCH v4 10/16] efi: sandbox: Add relocation constants Simon Glass
2018-05-24 12:34   ` Alexander Graf
2018-06-12  5:27     ` Simon Glass
2018-06-12  5:44       ` Alexander Graf
2018-06-12  6:05         ` Simon Glass
2018-05-16 15:42 ` [U-Boot] [PATCH v4 11/16] efi: Add a comment about duplicated ELF constants Simon Glass
2018-05-16 16:47   ` Heinrich Schuchardt
2018-05-16 15:42 ` [U-Boot] [PATCH v4 12/16] efi: sandbox: Enable EFI loader builder for sandbox Simon Glass
2018-05-16 15:42 ` [U-Boot] [PATCH v4 13/16] efi: Split out test init/uninit into functions Simon Glass
2018-05-16 15:42 ` [U-Boot] [PATCH v4 14/16] efi: sandbox: Add a simple 'bootefi test' command Simon Glass
2018-05-16 15:42 ` [U-Boot] [PATCH v4 15/16] efi: Create a function to set up for running EFI code Simon Glass
2018-05-16 15:42 ` [U-Boot] [PATCH v4 16/16] efi: Rename bootefi_test_finish() to bootefi_run_finish() Simon Glass
2018-05-16 17:13 ` [U-Boot] [PATCH v4 00/16] efi: Enable basic sandbox support for EFI loader Heinrich Schuchardt
2018-05-17  5:31   ` Heinrich Schuchardt
2018-06-12  5:27     ` Simon Glass
2018-05-24 12:40 ` Alexander Graf

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=d2001f94-392d-a40f-e923-f2ae33f71250@suse.de \
    --to=agraf@suse.de \
    --cc=u-boot@lists.denx.de \
    /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 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.