public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] MIPS: Loongson64: Remove ROM Size in LEFI boardinfo
@ 2025-01-10 17:22 Kexy Biscuit
  2025-01-10 17:22 ` [PATCH 1/2] MIPS: Loongson64: remove ROM Size unit in boardinfo Kexy Biscuit
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Kexy Biscuit @ 2025-01-10 17:22 UTC (permalink / raw)
  To: Huacai Chen, Jiaxun Yang, Thomas Bogendoerfer, Tiezhu Yang
  Cc: linux-mips, linux-kernel, Kexy Biscuit, Mingcong Bai,
	Icenowy Zheng, stable

In "MIPS: Loongson64: Add /sys/firmware/lefi/boardinfo", "ROM Size" was
added under section "BIOS Info". However, that is incorrect per Appendix
A.7 in Q/LS 0013-2014 (龙芯CPU开发系统固件与内核接口规范 V2.2,
lit. Loongson DevSys Firmware Kernel Interface Specification V2.2),
which defines the size to be the size of this interface itself.

Removing "ROM Size" from boardinfo, and also adding comments to the
struct interface_info to clarify meanings of its members.

Signed-off-by: Kexy Biscuit <kexybiscuit@aosc.io>
---
Kexy Biscuit (2):
      MIPS: Loongson64: remove ROM Size unit in boardinfo
      MIPS: Loongson: Add comments for interface_info

 arch/mips/include/asm/mach-loongson64/boot_param.h | 8 ++++----
 arch/mips/loongson64/boardinfo.c                   | 2 --
 2 files changed, 4 insertions(+), 6 deletions(-)
---
base-commit: 2144da25584eb10b84252230319b5783f6a83041
change-id: 20250111-loongson64-boardinfo-no-size-a25dd2a03a8b

Best regards,
-- 
Kexy Biscuit <kexybiscuit@aosc.io>


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/2] MIPS: Loongson64: remove ROM Size unit in boardinfo
  2025-01-10 17:22 [PATCH 0/2] MIPS: Loongson64: Remove ROM Size in LEFI boardinfo Kexy Biscuit
@ 2025-01-10 17:22 ` Kexy Biscuit
  2025-01-10 17:22 ` [PATCH 2/2] MIPS: Loongson: Add comments for interface_info Kexy Biscuit
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Kexy Biscuit @ 2025-01-10 17:22 UTC (permalink / raw)
  To: Huacai Chen, Jiaxun Yang, Thomas Bogendoerfer, Tiezhu Yang
  Cc: linux-mips, linux-kernel, Kexy Biscuit, Mingcong Bai,
	Icenowy Zheng, stable

Per Appendix A.7 in Q/LS 0013-2014 (龙芯CPU开发系统固件与内核接口规范 V2.2,
lit. Loongson DevSys Firmware Kernel Interface Specification V2.2),
interface_info.size is size of this interface, not size of the LEFI BIOS
ROM.

In any case, the BIOS ROM Size just cannot be several kilobytes (KB) on
Loongson64 LEFI platforms.

Reported-by: Mingcong Bai <jeffbai@aosc.io>
Suggested-by: Icenowy Zheng <uwu@icenowy.me>
Fixes: 6c1bfbd9df8c ("MIPS: Loongson64: Add /sys/firmware/lefi/boardinfo")
Cc: stable@vger.kernel.org
Signed-off-by: Kexy Biscuit <kexybiscuit@aosc.io>
---
 arch/mips/loongson64/boardinfo.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/arch/mips/loongson64/boardinfo.c b/arch/mips/loongson64/boardinfo.c
index 280989c5a137b5f32708b21331b48bc581745130..8bb275c93ac0991c77827404d0c76cf97201a1a8 100644
--- a/arch/mips/loongson64/boardinfo.c
+++ b/arch/mips/loongson64/boardinfo.c
@@ -21,13 +21,11 @@ static ssize_t boardinfo_show(struct kobject *kobj,
 		       "BIOS Info\n"
 		       "Vendor\t\t\t: %s\n"
 		       "Version\t\t\t: %s\n"
-		       "ROM Size\t\t: %d KB\n"
 		       "Release Date\t\t: %s\n",
 		       strsep(&tmp_board_manufacturer, "-"),
 		       eboard->name,
 		       strsep(&tmp_bios_vendor, "-"),
 		       einter->description,
-		       einter->size,
 		       especial->special_name);
 }
 static struct kobj_attribute boardinfo_attr = __ATTR(boardinfo, 0444,

-- 
2.48.0.rc2


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/2] MIPS: Loongson: Add comments for interface_info
  2025-01-10 17:22 [PATCH 0/2] MIPS: Loongson64: Remove ROM Size in LEFI boardinfo Kexy Biscuit
  2025-01-10 17:22 ` [PATCH 1/2] MIPS: Loongson64: remove ROM Size unit in boardinfo Kexy Biscuit
@ 2025-01-10 17:22 ` Kexy Biscuit
  2025-01-10 18:01 ` [PATCH 0/2] MIPS: Loongson64: Remove ROM Size in LEFI boardinfo Jiaxun Yang
  2025-01-11 12:01 ` Thomas Bogendoerfer
  3 siblings, 0 replies; 5+ messages in thread
From: Kexy Biscuit @ 2025-01-10 17:22 UTC (permalink / raw)
  To: Huacai Chen, Jiaxun Yang, Thomas Bogendoerfer, Tiezhu Yang
  Cc: linux-mips, linux-kernel, Kexy Biscuit, Icenowy Zheng

Clarify meanings of members of interface_info, especially for .size,
which does not define the ROM size.

Suggested-by: Icenowy Zheng <uwu@icenowy.me>
Signed-off-by: Kexy Biscuit <kexybiscuit@aosc.io>
---
 arch/mips/include/asm/mach-loongson64/boot_param.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/mips/include/asm/mach-loongson64/boot_param.h b/arch/mips/include/asm/mach-loongson64/boot_param.h
index 9218b3ae338322d3cce47421c48d737c93858398..3a11ce85762be626a557ae867e5ee427ea355524 100644
--- a/arch/mips/include/asm/mach-loongson64/boot_param.h
+++ b/arch/mips/include/asm/mach-loongson64/boot_param.h
@@ -128,10 +128,10 @@ struct irq_source_routing_table {
 } __packed;
 
 struct interface_info {
-	u16 vers; /* version of the specificition */
-	u16 size;
-	u8  flag;
-	char description[64];
+	u16 vers; /* version of the specification */
+	u16 size; /* size of this interface */
+	u8  flag; /* used or unused */
+	char description[64]; /* description for each change */
 } __packed;
 
 #define MAX_RESOURCE_NUMBER 128

-- 
2.48.0.rc2


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 0/2] MIPS: Loongson64: Remove ROM Size in LEFI boardinfo
  2025-01-10 17:22 [PATCH 0/2] MIPS: Loongson64: Remove ROM Size in LEFI boardinfo Kexy Biscuit
  2025-01-10 17:22 ` [PATCH 1/2] MIPS: Loongson64: remove ROM Size unit in boardinfo Kexy Biscuit
  2025-01-10 17:22 ` [PATCH 2/2] MIPS: Loongson: Add comments for interface_info Kexy Biscuit
@ 2025-01-10 18:01 ` Jiaxun Yang
  2025-01-11 12:01 ` Thomas Bogendoerfer
  3 siblings, 0 replies; 5+ messages in thread
From: Jiaxun Yang @ 2025-01-10 18:01 UTC (permalink / raw)
  To: Kexy Biscuit, Huacai Chen, Thomas Bogendoerfer, Tiezhu Yang
  Cc: linux-mips@vger.kernel.org, linux-kernel, Mingcong Bai,
	Icenowy Zheng, stable@vger.kernel.org



在2025年1月10日一月 下午5:22,Kexy Biscuit写道:
> In "MIPS: Loongson64: Add /sys/firmware/lefi/boardinfo", "ROM Size" was
> added under section "BIOS Info". However, that is incorrect per Appendix
> A.7 in Q/LS 0013-2014 (龙芯CPU开发系统固件与内核接口规范 V2.2,
> lit. Loongson DevSys Firmware Kernel Interface Specification V2.2),
> which defines the size to be the size of this interface itself.
>
> Removing "ROM Size" from boardinfo, and also adding comments to the
> struct interface_info to clarify meanings of its members.
>
> Signed-off-by: Kexy Biscuit <kexybiscuit@aosc.io>

For the series:

Acked-by: Jiaxun Yang <jiaxun.yang@flygoat.com>

Good catch, thanks!

> ---
> Kexy Biscuit (2):
>       MIPS: Loongson64: remove ROM Size unit in boardinfo
>       MIPS: Loongson: Add comments for interface_info
>
>  arch/mips/include/asm/mach-loongson64/boot_param.h | 8 ++++----
>  arch/mips/loongson64/boardinfo.c                   | 2 --
>  2 files changed, 4 insertions(+), 6 deletions(-)
> ---
> base-commit: 2144da25584eb10b84252230319b5783f6a83041
> change-id: 20250111-loongson64-boardinfo-no-size-a25dd2a03a8b
>
> Best regards,
> -- 
> Kexy Biscuit <kexybiscuit@aosc.io>

-- 
- Jiaxun

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 0/2] MIPS: Loongson64: Remove ROM Size in LEFI boardinfo
  2025-01-10 17:22 [PATCH 0/2] MIPS: Loongson64: Remove ROM Size in LEFI boardinfo Kexy Biscuit
                   ` (2 preceding siblings ...)
  2025-01-10 18:01 ` [PATCH 0/2] MIPS: Loongson64: Remove ROM Size in LEFI boardinfo Jiaxun Yang
@ 2025-01-11 12:01 ` Thomas Bogendoerfer
  3 siblings, 0 replies; 5+ messages in thread
From: Thomas Bogendoerfer @ 2025-01-11 12:01 UTC (permalink / raw)
  To: Kexy Biscuit
  Cc: Huacai Chen, Jiaxun Yang, Tiezhu Yang, linux-mips, linux-kernel,
	Mingcong Bai, Icenowy Zheng, stable

On Sat, Jan 11, 2025 at 01:22:07AM +0800, Kexy Biscuit wrote:
> In "MIPS: Loongson64: Add /sys/firmware/lefi/boardinfo", "ROM Size" was
> added under section "BIOS Info". However, that is incorrect per Appendix
> A.7 in Q/LS 0013-2014 (龙芯CPU开发系统固件与内核接口规范 V2.2,
> lit. Loongson DevSys Firmware Kernel Interface Specification V2.2),
> which defines the size to be the size of this interface itself.
> 
> Removing "ROM Size" from boardinfo, and also adding comments to the
> struct interface_info to clarify meanings of its members.
> 
> Signed-off-by: Kexy Biscuit <kexybiscuit@aosc.io>
> ---
> Kexy Biscuit (2):
>       MIPS: Loongson64: remove ROM Size unit in boardinfo
>       MIPS: Loongson: Add comments for interface_info
> 
>  arch/mips/include/asm/mach-loongson64/boot_param.h | 8 ++++----
>  arch/mips/loongson64/boardinfo.c                   | 2 --
>  2 files changed, 4 insertions(+), 6 deletions(-)
> ---
> base-commit: 2144da25584eb10b84252230319b5783f6a83041
> change-id: 20250111-loongson64-boardinfo-no-size-a25dd2a03a8b

series applied to mips-next.

Thomas.

-- 
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea.                                                [ RFC1925, 2.3 ]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-01-11 12:18 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-10 17:22 [PATCH 0/2] MIPS: Loongson64: Remove ROM Size in LEFI boardinfo Kexy Biscuit
2025-01-10 17:22 ` [PATCH 1/2] MIPS: Loongson64: remove ROM Size unit in boardinfo Kexy Biscuit
2025-01-10 17:22 ` [PATCH 2/2] MIPS: Loongson: Add comments for interface_info Kexy Biscuit
2025-01-10 18:01 ` [PATCH 0/2] MIPS: Loongson64: Remove ROM Size in LEFI boardinfo Jiaxun Yang
2025-01-11 12:01 ` Thomas Bogendoerfer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox