diff mbox series

[v2,6/8] distro: Extend with RISC-V defines

Message ID 20180419154923.70719-7-agraf@suse.de
State New
Headers show
Series riscv: Enable efi_loader support | expand

Commit Message

Alexander Graf April 19, 2018, 3:49 p.m. UTC
While we don't have VCI or UEFI naming conventions for RISC-V file paths yet,
we need to search for something. So let's make up a few defines that at least
allow us to get started until the specs officially include RISC-V.

Signed-off-by: Alexander Graf <agraf@suse.de>

---

v1 -> v2:

  - Use edk2 default boot file names
---
 include/config_distro_bootcmd.h | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

Comments

Heinrich Schuchardt April 19, 2018, 5:19 p.m. UTC | #1
On 04/19/2018 05:49 PM, Alexander Graf wrote:
> While we don't have VCI or UEFI naming conventions for RISC-V file paths yet,
> we need to search for something. So let's make up a few defines that at least
> allow us to get started until the specs officially include RISC-V.
> 
> Signed-off-by: Alexander Graf <agraf@suse.de>
> 
> ---
> 
> v1 -> v2:
> 
>    - Use edk2 default boot file names
> ---
>   include/config_distro_bootcmd.h | 14 +++++++++++++-
>   1 file changed, 13 insertions(+), 1 deletion(-)
> 
> diff --git a/include/config_distro_bootcmd.h b/include/config_distro_bootcmd.h
> index f567cebd38..eefdfb51cc 100644
> --- a/include/config_distro_bootcmd.h
> +++ b/include/config_distro_bootcmd.h
> @@ -100,6 +100,10 @@
>   #define BOOTEFI_NAME "bootia32.efi"
>   #elif defined(CONFIG_X86_RUN_64BIT)
>   #define BOOTEFI_NAME "bootx64.efi"
> +#elif defined(CONFIG_CPU_RISCV_32)
> +#define BOOTEFI_NAME "bootriscv32.efi"
> +#elif defined(CONFIG_CPU_RISCV_64)
> +#define BOOTEFI_NAME "bootriscv64.efi"

Thanks for updating this.

>   #endif
>   #endif
>   
> @@ -250,7 +254,15 @@
>   #elif defined(CONFIG_X86)
>   /* Always assume we're running 64bit */
>   #define BOOTENV_EFI_PXE_ARCH "0x7"
> -#define BOOTENV_EFI_PXE_VCI "PXEClient:Arch:00007:UNDI:003000"
> +#define BOOTENV_EFI_PXE_VCI "PXEClient:Arch:0000:UNDI:003000"

Did you inadvertently modify this line? The change does not relate to 
the commit message.

> +#elif defined(CONFIG_CPU_RISCV_32)
> +/* TODO: Register VCI identifier via RFC */
> +#define BOOTENV_EFI_PXE_ARCH "0x5032"
> +#define BOOTENV_EFI_PXE_VCI "PXEClient:Arch:5032:UNDI:003000"

Should this be 05032? X86 uses 5 digits.

> +#elif defined(CONFIG_CPU_RISCV_64)
> +/* TODO: Register VCI identifier via RFC */
> +#define BOOTENV_EFI_PXE_ARCH "0x5064"
> +#define BOOTENV_EFI_PXE_VCI "PXEClient:Arch:5064:UNDI:003000"

Same here.

Regards

Heinrich

>   #else
>   #error Please specify an EFI client identifier
>   #endif
>
Alexander Graf April 19, 2018, 5:23 p.m. UTC | #2
On 04/19/2018 07:19 PM, Heinrich Schuchardt wrote:
>
>
> On 04/19/2018 05:49 PM, Alexander Graf wrote:
>> While we don't have VCI or UEFI naming conventions for RISC-V file 
>> paths yet,
>> we need to search for something. So let's make up a few defines that 
>> at least
>> allow us to get started until the specs officially include RISC-V.
>>
>> Signed-off-by: Alexander Graf <agraf@suse.de>
>>
>> ---
>>
>> v1 -> v2:
>>
>>    - Use edk2 default boot file names
>> ---
>>   include/config_distro_bootcmd.h | 14 +++++++++++++-
>>   1 file changed, 13 insertions(+), 1 deletion(-)
>>
>> diff --git a/include/config_distro_bootcmd.h 
>> b/include/config_distro_bootcmd.h
>> index f567cebd38..eefdfb51cc 100644
>> --- a/include/config_distro_bootcmd.h
>> +++ b/include/config_distro_bootcmd.h
>> @@ -100,6 +100,10 @@
>>   #define BOOTEFI_NAME "bootia32.efi"
>>   #elif defined(CONFIG_X86_RUN_64BIT)
>>   #define BOOTEFI_NAME "bootx64.efi"
>> +#elif defined(CONFIG_CPU_RISCV_32)
>> +#define BOOTEFI_NAME "bootriscv32.efi"
>> +#elif defined(CONFIG_CPU_RISCV_64)
>> +#define BOOTEFI_NAME "bootriscv64.efi"
>
> Thanks for updating this.
>
>>   #endif
>>   #endif
>>   @@ -250,7 +254,15 @@
>>   #elif defined(CONFIG_X86)
>>   /* Always assume we're running 64bit */
>>   #define BOOTENV_EFI_PXE_ARCH "0x7"
>> -#define BOOTENV_EFI_PXE_VCI "PXEClient:Arch:00007:UNDI:003000"
>> +#define BOOTENV_EFI_PXE_VCI "PXEClient:Arch:0000:UNDI:003000"
>
> Did you inadvertently modify this line? The change does not relate to 
> the commit message.

Ouch, not intentional of course :). I've fixed it up for v3, but will 
wait for more comments before I send it.

>
>> +#elif defined(CONFIG_CPU_RISCV_32)
>> +/* TODO: Register VCI identifier via RFC */
>> +#define BOOTENV_EFI_PXE_ARCH "0x5032"
>> +#define BOOTENV_EFI_PXE_VCI "PXEClient:Arch:5032:UNDI:003000"
>
> Should this be 05032? X86 uses 5 digits.

Yes, thanks for the catch!


Alex
Heinrich Schuchardt April 19, 2018, 7:44 p.m. UTC | #3
On 04/19/2018 07:19 PM, Heinrich Schuchardt wrote:
> 
> 
> On 04/19/2018 05:49 PM, Alexander Graf wrote:
>> While we don't have VCI or UEFI naming conventions for RISC-V file 
>> paths yet,
>> we need to search for something. So let's make up a few defines that 
>> at least
>> allow us to get started until the specs officially include RISC-V.
>>
>> Signed-off-by: Alexander Graf <agraf@suse.de>
>>
>> ---
>>
>> v1 -> v2:
>>
>>    - Use edk2 default boot file names
>> ---
>>   include/config_distro_bootcmd.h | 14 +++++++++++++-
>>   1 file changed, 13 insertions(+), 1 deletion(-)
>>
>> diff --git a/include/config_distro_bootcmd.h 
>> b/include/config_distro_bootcmd.h
>> index f567cebd38..eefdfb51cc 100644
>> --- a/include/config_distro_bootcmd.h
>> +++ b/include/config_distro_bootcmd.h
>> @@ -100,6 +100,10 @@
>>   #define BOOTEFI_NAME "bootia32.efi"
>>   #elif defined(CONFIG_X86_RUN_64BIT)
>>   #define BOOTEFI_NAME "bootx64.efi"
>> +#elif defined(CONFIG_CPU_RISCV_32)
>> +#define BOOTEFI_NAME "bootriscv32.efi"
>> +#elif defined(CONFIG_CPU_RISCV_64)
>> +#define BOOTEFI_NAME "bootriscv64.efi"
> 
> Thanks for updating this.
> 
>>   #endif
>>   #endif
>> @@ -250,7 +254,15 @@
>>   #elif defined(CONFIG_X86)
>>   /* Always assume we're running 64bit */
>>   #define BOOTENV_EFI_PXE_ARCH "0x7"
>> -#define BOOTENV_EFI_PXE_VCI "PXEClient:Arch:00007:UNDI:003000"
>> +#define BOOTENV_EFI_PXE_VCI "PXEClient:Arch:0000:UNDI:003000"
> 
> Did you inadvertently modify this line? The change does not relate to 
> the commit message.
> 
>> +#elif defined(CONFIG_CPU_RISCV_32)
>> +/* TODO: Register VCI identifier via RFC */
>> +#define BOOTENV_EFI_PXE_ARCH "0x5032"
>> +#define BOOTENV_EFI_PXE_VCI "PXEClient:Arch:5032:UNDI:003000"
> 
> Should this be 05032? X86 uses 5 digits.

These are decimal numbers so this should be
PXEClient:Arch:20530:UNDI:003000

> 
>> +#elif defined(CONFIG_CPU_RISCV_64)
>> +/* TODO: Register VCI identifier via RFC */
>> +#define BOOTENV_EFI_PXE_ARCH "0x5064"
>> +#define BOOTENV_EFI_PXE_VCI "PXEClient:Arch:5064:UNDI:003000"
> 
> Same here.

PXEClient:Arch:20580:UNDI:003000

Regards

Heinrich

> 
> Regards
> 
> Heinrich
> 
>>   #else
>>   #error Please specify an EFI client identifier
>>   #endif
>>
>
Alexander Graf April 19, 2018, 9:53 p.m. UTC | #4
On 19.04.18 21:44, Heinrich Schuchardt wrote:
> 
> 
> On 04/19/2018 07:19 PM, Heinrich Schuchardt wrote:
>>
>>
>> On 04/19/2018 05:49 PM, Alexander Graf wrote:
>>> While we don't have VCI or UEFI naming conventions for RISC-V file
>>> paths yet,
>>> we need to search for something. So let's make up a few defines that
>>> at least
>>> allow us to get started until the specs officially include RISC-V.
>>>
>>> Signed-off-by: Alexander Graf <agraf@suse.de>
>>>
>>> ---
>>>
>>> v1 -> v2:
>>>
>>>    - Use edk2 default boot file names
>>> ---
>>>   include/config_distro_bootcmd.h | 14 +++++++++++++-
>>>   1 file changed, 13 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/include/config_distro_bootcmd.h
>>> b/include/config_distro_bootcmd.h
>>> index f567cebd38..eefdfb51cc 100644
>>> --- a/include/config_distro_bootcmd.h
>>> +++ b/include/config_distro_bootcmd.h
>>> @@ -100,6 +100,10 @@
>>>   #define BOOTEFI_NAME "bootia32.efi"
>>>   #elif defined(CONFIG_X86_RUN_64BIT)
>>>   #define BOOTEFI_NAME "bootx64.efi"
>>> +#elif defined(CONFIG_CPU_RISCV_32)
>>> +#define BOOTEFI_NAME "bootriscv32.efi"
>>> +#elif defined(CONFIG_CPU_RISCV_64)
>>> +#define BOOTEFI_NAME "bootriscv64.efi"
>>
>> Thanks for updating this.
>>
>>>   #endif
>>>   #endif
>>> @@ -250,7 +254,15 @@
>>>   #elif defined(CONFIG_X86)
>>>   /* Always assume we're running 64bit */
>>>   #define BOOTENV_EFI_PXE_ARCH "0x7"
>>> -#define BOOTENV_EFI_PXE_VCI "PXEClient:Arch:00007:UNDI:003000"
>>> +#define BOOTENV_EFI_PXE_VCI "PXEClient:Arch:0000:UNDI:003000"
>>
>> Did you inadvertently modify this line? The change does not relate to
>> the commit message.
>>
>>> +#elif defined(CONFIG_CPU_RISCV_32)
>>> +/* TODO: Register VCI identifier via RFC */
>>> +#define BOOTENV_EFI_PXE_ARCH "0x5032"
>>> +#define BOOTENV_EFI_PXE_VCI "PXEClient:Arch:5032:UNDI:003000"
>>
>> Should this be 05032? X86 uses 5 digits.
> 
> These are decimal numbers so this should be
> PXEClient:Arch:20530:UNDI:003000

Turns out there are values defined:

  http://www.iana.org/assignments/dhcpv6-parameters/dhcpv6-parameters.xml

I'll update it accordingly.


Alex
diff mbox series

Patch

diff --git a/include/config_distro_bootcmd.h b/include/config_distro_bootcmd.h
index f567cebd38..eefdfb51cc 100644
--- a/include/config_distro_bootcmd.h
+++ b/include/config_distro_bootcmd.h
@@ -100,6 +100,10 @@ 
 #define BOOTEFI_NAME "bootia32.efi"
 #elif defined(CONFIG_X86_RUN_64BIT)
 #define BOOTEFI_NAME "bootx64.efi"
+#elif defined(CONFIG_CPU_RISCV_32)
+#define BOOTEFI_NAME "bootriscv32.efi"
+#elif defined(CONFIG_CPU_RISCV_64)
+#define BOOTEFI_NAME "bootriscv64.efi"
 #endif
 #endif
 
@@ -250,7 +254,15 @@ 
 #elif defined(CONFIG_X86)
 /* Always assume we're running 64bit */
 #define BOOTENV_EFI_PXE_ARCH "0x7"
-#define BOOTENV_EFI_PXE_VCI "PXEClient:Arch:00007:UNDI:003000"
+#define BOOTENV_EFI_PXE_VCI "PXEClient:Arch:0000:UNDI:003000"
+#elif defined(CONFIG_CPU_RISCV_32)
+/* TODO: Register VCI identifier via RFC */
+#define BOOTENV_EFI_PXE_ARCH "0x5032"
+#define BOOTENV_EFI_PXE_VCI "PXEClient:Arch:5032:UNDI:003000"
+#elif defined(CONFIG_CPU_RISCV_64)
+/* TODO: Register VCI identifier via RFC */
+#define BOOTENV_EFI_PXE_ARCH "0x5064"
+#define BOOTENV_EFI_PXE_VCI "PXEClient:Arch:5064:UNDI:003000"
 #else
 #error Please specify an EFI client identifier
 #endif