mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Lucas Stach <l.stach@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 01/10] efi: add proper reset hook
Date: Wed, 5 Nov 2014 08:21:00 +0100	[thread overview]
Message-ID: <20141105072100.GH30369@pengutronix.de> (raw)
In-Reply-To: <1415094176-26435-1-git-send-email-l.stach@pengutronix.de>

On Tue, Nov 04, 2014 at 10:42:47AM +0100, Lucas Stach wrote:
> This allows to actually reset the system from barebox
> instead of dropping back into the EFI firmware.

Now we can reset the system, but not go back into the EFI firmware
anymore. Should we introduce a command to make that possible?

Sascha

> 
> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
> ---
>  arch/efi/efi/efi.c |  2 +-
>  include/efi.h      | 11 +++++++----
>  2 files changed, 8 insertions(+), 5 deletions(-)
> 
> diff --git a/arch/efi/efi/efi.c b/arch/efi/efi/efi.c
> index 7de8ec82e8fa..af3fc4366ba1 100644
> --- a/arch/efi/efi/efi.c
> +++ b/arch/efi/efi/efi.c
> @@ -248,7 +248,7 @@ console_initcall(efi_console_init);
>  
>  void reset_cpu(unsigned long addr)
>  {
> -	BS->exit(efi_parent_image, EFI_SUCCESS, 0, NULL);
> +	RT->reset_system(EFI_RESET_WARM, EFI_SUCCESS, 0, NULL);
>  
>  	while(1);
>  }
> diff --git a/include/efi.h b/include/efi.h
> index 4ad9f69237e7..70fe254dbafa 100644
> --- a/include/efi.h
> +++ b/include/efi.h
> @@ -255,9 +255,11 @@ extern efi_boot_services_t *BS;
>  /*
>   * Types and defines for EFI ResetSystem
>   */
> -#define EFI_RESET_COLD 0
> -#define EFI_RESET_WARM 1
> -#define EFI_RESET_SHUTDOWN 2
> +typedef enum {
> +	EFI_RESET_COLD = 0,
> +	EFI_RESET_WARM = 1,
> +	EFI_RESET_SHUTDOWN = 2
> +} efi_reset_type_t;
>  
>  /*
>   * EFI Runtime Services table
> @@ -279,7 +281,8 @@ typedef struct {
>  			s16 *variable_name, efi_guid_t *vendor);
>  	void *set_variable;
>  	void *get_next_high_mono_count;
> -	void *reset_system;
> +	void (EFIAPI *reset_system)(efi_reset_type_t reset_type, efi_status_t reset_status,
> +			unsigned long data_size, void *reset_data);
>  	void *update_capsule;
>  	void *query_capsule_caps;
>  	void *query_variable_info;
> -- 
> 2.1.1
> 
> 
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  parent reply	other threads:[~2014-11-05  7:21 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-04  9:42 Lucas Stach
2014-11-04  9:42 ` [PATCH 02/10] efi: add Barebox GUID Lucas Stach
2014-11-05  7:21   ` Sascha Hauer
2014-11-05  9:03     ` Lucas Stach
2014-11-04  9:42 ` [PATCH 03/10] fs: efivar: cosmetic changes Lucas Stach
2014-11-04  9:42 ` [PATCH 04/10] fs: efivar: switch to standard list implementation Lucas Stach
2014-11-04  9:42 ` [PATCH 05/10] fs: efivar: move variable discovery into probe Lucas Stach
2014-11-04  9:42 ` [PATCH 06/10] lib: add wchar strdup Lucas Stach
2014-11-04  9:42 ` [PATCH 07/10] fs: efivar: preserve more info in inode Lucas Stach
2014-11-04  9:42 ` [PATCH 08/10] fs: efivar: don't store attributes in file Lucas Stach
2014-11-04  9:42 ` [PATCH 09/10] fs: efivar: implement write support Lucas Stach
2014-11-04  9:42 ` [PATCH 10/10] efi: mount efivarfs by default if enabled Lucas Stach
2014-11-05  7:21 ` Sascha Hauer [this message]
2014-11-05  9:00   ` [PATCH 01/10] efi: add proper reset hook Lucas Stach

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=20141105072100.GH30369@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=l.stach@pengutronix.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox