All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Glass <sjg@chromium.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v8 02/30] efi: sandbox: Adjust memory usage for sandbox
Date: Wed, 20 Jun 2018 20:02:24 -0600	[thread overview]
Message-ID: <CAPnjgZ2N+gdvbXyvg7P4J5OFKWQCbs84sff7oXSEzbRZ=HFV7g@mail.gmail.com> (raw)
In-Reply-To: <38b05bfd-a0b6-cb7d-d499-3c8e9ad9fb8c@suse.de>

Hi Alex,

On 20 June 2018 at 02:54, Alexander Graf <agraf@suse.de> wrote:
> On 06/20/2018 08:10 AM, Heinrich Schuchardt wrote:
>>
>> On 06/18/2018 04:08 PM, Simon Glass wrote:
>>>
>>> With sandbox the U-Boot code is not mapped into the sandbox memory range
>>> so does not need to be excluded when allocating EFI memory. Update the
>>> EFI
>>> memory init code to take account of that.
>>>
>>> Also use mapmem instead of a cast to convert a memory address to a
>>> pointer.
>>
>> This is not reflected in the patch.
>>
>>> Signed-off-by: Simon Glass <sjg@chromium.org>
>>> ---
>>>
>>> Changes in v8: None
>>> Changes in v7:
>>> - Move some of the code from efi_memory_init() into a separate function
>>>
>>> Changes in v6: None
>>> Changes in v5: None
>>> Changes in v4: None
>>> Changes in v3: None
>>> Changes in v2:
>>> - Update to use mapmem instead of a cast
>>>
>>>   lib/efi_loader/efi_memory.c | 16 ++++++++++++----
>>>   1 file changed, 12 insertions(+), 4 deletions(-)
>>>
>>> diff --git a/lib/efi_loader/efi_memory.c b/lib/efi_loader/efi_memory.c
>>> index ec66af98ea..c6410613c7 100644
>>> --- a/lib/efi_loader/efi_memory.c
>>> +++ b/lib/efi_loader/efi_memory.c
>>> @@ -9,6 +9,7 @@
>>>   #include <efi_loader.h>
>>>   #include <inttypes.h>
>>>   #include <malloc.h>
>>> +#include <mapmem.h>
>>
>> I cannot see any use of this include in the patch.
>>
>>>   #include <watchdog.h>
>>>   #include <linux/list_sort.h>
>>>   @@ -393,7 +394,7 @@ efi_status_t efi_allocate_pool(int pool_type,
>>> efi_uintn_t size, void **buffer)
>>>                                &t);
>>>         if (r == EFI_SUCCESS) {
>>> -               struct efi_pool_allocation *alloc = (void *)(uintptr_t)t;
>>> +               struct efi_pool_allocation *alloc = map_sysmem(t, size);
>
>
> ^^^
>
> This is where mapmem.h gets used. And yes, it's the wrong place. So NAK on
> the patch as-is.

What is wrong with it?

Regards,
Simon

  reply	other threads:[~2018-06-21  2:02 UTC|newest]

Thread overview: 106+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-18 14:08 [U-Boot] [PATCH v8 00/30] efi: Enable sandbox support for EFI loader Simon Glass
2018-06-18 14:08 ` [U-Boot] [PATCH v8 01/30] efi: Don't allow CMD_BOOTEFI_SELFTEST on sandbox Simon Glass
2018-06-20  6:03   ` Heinrich Schuchardt
2018-06-20 17:51     ` Simon Glass
2018-06-18 14:08 ` [U-Boot] [PATCH v8 02/30] efi: sandbox: Adjust memory usage for sandbox Simon Glass
2018-06-20  6:10   ` Heinrich Schuchardt
2018-06-20  8:54     ` Alexander Graf
2018-06-21  2:02       ` Simon Glass [this message]
2018-06-21  9:52         ` Alexander Graf
2018-06-21 19:45           ` Simon Glass
2018-06-22 12:08             ` Alexander Graf
2018-06-22 19:28               ` Simon Glass
2018-06-23  7:31                 ` Alexander Graf
2018-06-25  3:02                   ` Simon Glass
2018-06-21  2:02     ` Simon Glass
2018-06-18 14:08 ` [U-Boot] [PATCH v8 03/30] sandbox: smbios: Update to support sandbox Simon Glass
2018-06-18 14:08 ` [U-Boot] [PATCH v8 04/30] efi: sandbox: Add distroboot support Simon Glass
2018-06-18 14:08 ` [U-Boot] [PATCH v8 05/30] efi: sandbox: Add relocation constants Simon Glass
2018-06-18 14:08 ` [U-Boot] [PATCH v8 06/30] efi: sandbox: Enable EFI loader build for sandbox Simon Glass
2018-06-18 14:08 ` [U-Boot] [PATCH v8 07/30] efi: Split out test init/uninit into functions Simon Glass
2018-06-20  6:26   ` Heinrich Schuchardt
2018-06-21  2:21     ` Simon Glass
2018-06-18 14:08 ` [U-Boot] [PATCH v8 08/30] efi: sandbox: Add a simple 'bootefi test' command Simon Glass
2018-06-18 14:08 ` [U-Boot] [PATCH v8 09/30] efi: Create a function to set up for running EFI code Simon Glass
2018-06-18 14:08 ` [U-Boot] [PATCH v8 10/30] efi: Rename bootefi_test_finish() to bootefi_run_finish() Simon Glass
2018-06-18 14:08 ` [U-Boot] [PATCH v8 11/30] sandbox: Align RAM buffer to the machine page size Simon Glass
2018-06-18 14:08 ` [U-Boot] [PATCH v8 12/30] sandbox: Try to start the RAM buffer at a particular address Simon Glass
2018-06-18 14:45   ` Alexander Graf
2018-06-19 22:02     ` Simon Glass
2018-06-20  8:51       ` Alexander Graf
2018-06-21  2:02         ` Simon Glass
2018-06-21  9:58           ` Alexander Graf
2018-06-21 19:45             ` Simon Glass
2018-06-22 12:10               ` Alexander Graf
2018-06-22 19:28                 ` Simon Glass
2018-06-22 21:29                   ` Alexander Graf
2018-06-25  2:59                     ` Simon Glass
2018-06-18 14:08 ` [U-Boot] [PATCH v8 13/30] sandbox: Add support for calling abort() Simon Glass
2018-06-18 14:08 ` [U-Boot] [PATCH v8 14/30] efi: Don't build sandbox with __attribute__((ms_abi)) Simon Glass
2018-06-18 14:46   ` Alexander Graf
2018-06-19 22:02     ` Simon Glass
2018-06-20  8:56       ` Alexander Graf
2018-06-21  2:02         ` Simon Glass
2018-06-21  9:59           ` Alexander Graf
2018-06-21 19:45             ` Simon Glass
2018-06-22 12:11               ` Alexander Graf
2018-06-22 19:28                 ` Simon Glass
2018-06-23  7:28                   ` Alexander Graf
2018-06-23 14:16                     ` Simon Glass
2018-06-25 11:23                       ` Alexander Graf
2018-06-26  3:58                         ` Simon Glass
2018-06-18 14:08 ` [U-Boot] [PATCH v8 15/30] vsprintf: Handle NULL with %pU Simon Glass
2018-06-18 14:47   ` Alexander Graf
2018-06-21 15:48   ` [U-Boot] [U-Boot,v8,15/30] " Alexander Graf
2018-06-27 19:00   ` Heinrich Schuchardt
2018-06-18 14:08 ` [U-Boot] [PATCH v8 16/30] efi_selftest: Clean up a few comments and messages Simon Glass
2018-06-21 17:31   ` [U-Boot] [U-Boot, v8, " Alexander Graf
2018-06-18 14:08 ` [U-Boot] [PATCH v8 17/30] sandbox: Enhance map_to_sysmem() to handle foreign pointers Simon Glass
2018-06-18 14:50   ` Alexander Graf
2018-06-21  2:01     ` Simon Glass
2018-06-21 10:00       ` Alexander Graf
2018-06-21 19:45         ` Simon Glass
2018-06-22 12:12           ` Alexander Graf
2018-06-22 19:31             ` Simon Glass
2018-06-21 10:10       ` Alexander Graf
2018-06-21 19:45         ` Simon Glass
2018-06-18 14:08 ` [U-Boot] [PATCH v8 18/30] efi: Add a call to exit() along with why we can't use it Simon Glass
2018-06-18 14:51   ` Alexander Graf
2018-06-21  2:01     ` Simon Glass
2018-06-18 14:08 ` [U-Boot] [PATCH v8 19/30] efi: Relocate FDT to 127MB instead of 128MB Simon Glass
2018-06-18 14:52   ` Alexander Graf
2018-06-21  2:01     ` Simon Glass
2018-06-21 10:01       ` Alexander Graf
2018-06-21 19:45         ` Simon Glass
2018-06-22 12:13           ` Alexander Graf
2018-06-18 14:08 ` [U-Boot] [PATCH v8 20/30] efi: Tidy up device-tree-size calculation in copy_fdt() Simon Glass
2018-06-21 17:31   ` [U-Boot] [U-Boot, v8, " Alexander Graf
2018-06-18 14:08 ` [U-Boot] [PATCH v8 21/30] efi_loader: Use map_sysmem() in bootefi command Simon Glass
2018-06-18 14:08 ` [U-Boot] [PATCH v8 22/30] efi: sandbox: Tidy up copy_fdt() to work with sandbox Simon Glass
2018-06-18 15:00   ` Alexander Graf
2018-06-21  2:01     ` Simon Glass
2018-06-21 10:13       ` Alexander Graf
2018-06-21 19:45         ` Simon Glass
2018-06-22 12:26           ` Alexander Graf
2018-06-22 19:31             ` Simon Glass
2018-06-23  7:24               ` Alexander Graf
2018-06-25  3:00                 ` Simon Glass
2018-06-18 14:08 ` [U-Boot] [PATCH v8 23/30] efi: Drop error return in efi_carve_out_dt_rsv() Simon Glass
2018-06-18 15:01   ` Alexander Graf
2018-06-21 17:31   ` [U-Boot] [U-Boot, v8, " Alexander Graf
2018-06-18 14:08 ` [U-Boot] [PATCH v8 24/30] efi: Adjust memory handling to support sandbox Simon Glass
2018-06-18 15:03   ` Alexander Graf
2018-06-21  2:01     ` Simon Glass
2018-06-21 10:14       ` Alexander Graf
2018-06-21 19:45         ` Simon Glass
2018-06-18 14:08 ` [U-Boot] [PATCH v8 25/30] efi: Add more debugging for memory allocations Simon Glass
2018-06-18 15:04   ` Alexander Graf
2018-06-21 16:45   ` Alexander Graf
2018-06-22 19:31     ` Simon Glass
2018-06-18 14:08 ` [U-Boot] [PATCH v8 26/30] efi_loader: Use compiler constants for image loader Simon Glass
2018-06-18 14:08 ` [U-Boot] [PATCH v8 27/30] efi_loader: efi_allocate_pages is too restrictive Simon Glass
2018-06-18 14:08 ` [U-Boot] [PATCH v8 28/30] efi_loader: Disable miniapps on sandbox Simon Glass
2018-06-18 14:08 ` [U-Boot] [PATCH v8 29/30] efi_loader: Pass address to fs_read() Simon Glass
2018-06-18 15:08   ` Alexander Graf
2018-06-21  2:01     ` Simon Glass
2018-06-18 14:08 ` [U-Boot] [PATCH v8 30/30] efi: sandbox: Enable selftest command Simon Glass

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='CAPnjgZ2N+gdvbXyvg7P4J5OFKWQCbs84sff7oXSEzbRZ=HFV7g@mail.gmail.com' \
    --to=sjg@chromium.org \
    --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.