All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ilias Apalodimas <ilias.apalodimas@linaro.org>
To: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Cc: u-boot@lists.denx.de
Subject: Re: [PATCH 1/2] efi_loader: support for Ctrl() device path node
Date: Mon, 20 Mar 2023 09:39:48 +0200	[thread overview]
Message-ID: <ZBgNxDx9JncHVc3P@hera> (raw)
In-Reply-To: <20230319151809.185099-2-heinrich.schuchardt@canonical.com>

On Sun, Mar 19, 2023 at 04:18:08PM +0100, Heinrich Schuchardt wrote:
> * Add the definitions for Ctrl() device path nodes.
> * Implement Ctrl() nodes in the device path to text protocol.
>
> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
> ---
>  include/efi_api.h                        | 6 ++++++
>  lib/efi_loader/efi_device_path_to_text.c | 7 +++++++
>  2 files changed, 13 insertions(+)
>
> diff --git a/include/efi_api.h b/include/efi_api.h
> index 2d18d25a71..c57868abbd 100644
> --- a/include/efi_api.h
> +++ b/include/efi_api.h
> @@ -570,6 +570,7 @@ struct efi_mac_addr {
>  #define DEVICE_PATH_TYPE_HARDWARE_DEVICE	0x01
>  #  define DEVICE_PATH_SUB_TYPE_MEMORY		0x03
>  #  define DEVICE_PATH_SUB_TYPE_VENDOR		0x04
> +#  define DEVICE_PATH_SUB_TYPE_CONTROLLER	0x05
>
>  struct efi_device_path_memory {
>  	struct efi_device_path dp;
> @@ -584,6 +585,11 @@ struct efi_device_path_vendor {
>  	u8 vendor_data[];
>  } __packed;
>
> +struct efi_device_path_controller {
> +	struct efi_device_path dp;
> +	u32 controller_number;
> +} __packed;
> +
>  #define DEVICE_PATH_TYPE_ACPI_DEVICE		0x02
>  #  define DEVICE_PATH_SUB_TYPE_ACPI_DEVICE	0x01
>
> diff --git a/lib/efi_loader/efi_device_path_to_text.c b/lib/efi_loader/efi_device_path_to_text.c
> index 9062058ac2..9c0b39311a 100644
> --- a/lib/efi_loader/efi_device_path_to_text.c
> +++ b/lib/efi_loader/efi_device_path_to_text.c
> @@ -77,6 +77,13 @@ static char *dp_hardware(char *s, struct efi_device_path *dp)
>  		s += sprintf(s, ")");
>  		break;
>  	}
> +	case DEVICE_PATH_SUB_TYPE_CONTROLLER: {
> +		struct efi_device_path_controller *cdp =
> +			(struct efi_device_path_controller *)dp;
> +
> +		s += sprintf(s, "Ctrl(0x%0x)", cdp->controller_number);
> +		break;
> +	}
>  	default:
>  		s = dp_unknown(s, dp);
>  		break;
> --
> 2.39.2
>

Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>


  parent reply	other threads:[~2023-03-20  7:40 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-19 15:18 [PATCH 0/2] efi_loader: fix device-path for USB devices Heinrich Schuchardt
2023-03-19 15:18 ` [PATCH 1/2] efi_loader: support for Ctrl() device path node Heinrich Schuchardt
2023-03-19 19:29   ` Simon Glass
2023-03-20  7:39   ` Ilias Apalodimas [this message]
2023-03-19 15:18 ` [PATCH 2/2] efi_loader: fix device-path for USB devices Heinrich Schuchardt
2023-03-19 19:29   ` Simon Glass
2023-03-19 20:58     ` Heinrich Schuchardt
2023-03-20 18:39       ` Simon Glass
2023-03-21 13:21         ` Heinrich Schuchardt
2023-03-27  4:00           ` Simon Glass
2023-03-27  5:30             ` Heinrich Schuchardt
2023-03-27  8:24               ` Simon Glass
2023-03-20  7:58   ` Ilias Apalodimas

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=ZBgNxDx9JncHVc3P@hera \
    --to=ilias.apalodimas@linaro.org \
    --cc=heinrich.schuchardt@canonical.com \
    --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.