Re: [PATCH RFC 2/4] powerpc: Add Microwatt platform

2020-05-09 Thread benh
We should do that here too. Time to replace our silly UART !On 9 May 2020 6:36 pm, Alistair Popple wrote:On Saturday, 9 May 2020 5:58:57 PM AEST Nicholas Piggin wrote: > Excerpts from Paul Mackerras's message of May 9, 2020 3:02 pm: > > Microwatt is a FPGA-based implementation of the Power ISA. 

[PATCH 06/13] powerpc/nvram: Shuffle code around in nvram_create_partition()

2010-11-29 Thread benh
From: Benjamin Herrenschmidt This error log stuff is really pseries specific. As a first step we move the initialization of these variables to the caller of nvram_create_partition(), which is also slightly reorganized so we setup the free partition before we clear the new partition, so the chance

[PATCH 08/13] powerpc/nvram: Add nvram_find_partition()

2010-11-29 Thread benh
From: Benjamin Herrenschmidt Signed-off-by: Benjamin Herrenschmidt --- arch/powerpc/kernel/nvram_64.c | 22 ++ 1 files changed, 22 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/kernel/nvram_64.c b/arch/powerpc/kernel/nvram_64.c index 6dd2700..01e6844 100644 ---

[PATCH 13/13] powerpc/nvram: Handle partition names >= 12 chars

2010-11-29 Thread benh
From: Jim Keniston The name field in the nvram_header can be < 12 chars, null-terminated, or 12 chars without the null. Handle this safely. Signed-off-by: Jim Keniston Signed-off-by: Benjamin Herrenschmidt --- arch/powerpc/kernel/nvram_64.c |5 +++-- 1 files changed, 3 insertions(+), 2 d

[PATCH 10/13] powerpc/nvram: Move the log partition stuff to pseries

2010-11-29 Thread benh
From: Benjamin Herrenschmidt The nvram log partition stuff currently in nvram_64.c is really pseries specific. It isn't actually used on anything else (despite the fact that we ran the code to setup the partition on anything except powermac) and the log format is specific to pseries RTAS implemen

[PATCH 12/13] powerpc/nvram: Fix NVRAM partition list setup

2010-11-29 Thread benh
From: Jim Keniston Simplify creation and use of the NVRAM partition list. Signed-off-by: Jim Keniston Signed-off-by: Benjamin Herrenschmidt --- arch/powerpc/kernel/nvram_64.c | 26 -- 1 files changed, 8 insertions(+), 18 deletions(-) diff --git a/arch/powerpc/kernel

[PATCH 11/13] powerpc/nvram: Rename ppc64, linux partition to ibm, rtas-log

2010-11-29 Thread benh
From: Benjamin Herrenschmidt I'm not aware of any userspace tool accessing it by its name anyways, it's read back by the kernel itself on the next boot to get back older log entries Signed-off-by: Benjamin Herrenschmidt --- arch/powerpc/platforms/pseries/nvram.c | 23 +--

[PATCH 09/13] powerpc/nvram: Change nvram_setup_partition() to use new helper

2010-11-29 Thread benh
From: Benjamin Herrenschmidt This changes the function to use nvram_find_partition() instead of doing the lookup "by hand". It also makes some of the logic clearer and prints out more useful diagnostic information. Signed-off-by: Benjamin Herrenschmidt --- arch/powerpc/kernel/nvram_64.c | 71

[PATCH 07/13] powerpc/nvram: Improve partition removal

2010-11-29 Thread benh
From: Benjamin Herrenschmidt Existing code is nasty, has bugs etc... rewrite the function more simply, and make it take the signature and optional name of the partitions to remove as arguments, thus making it a more generic utility. We also try to remove a log partition that we find and is too s

[PATCH 05/13] powerpc/nvram: Completely clear a new partition

2010-11-29 Thread benh
From: Benjamin Herrenschmidt When creating a partition, we clear it entirely rather than just the first two words since the previous code was rather specific to the pseries log partition format. Signed-off-by: Benjamin Herrenschmidt --- arch/powerpc/kernel/nvram_64.c | 19 ++-

[PATCH 03/13] powerpc/nvram: nvram_create_partitions() now uses bytes

2010-11-29 Thread benh
From: Benjamin Herrenschmidt This converts nvram_create_partition() to use a size in bytes rather than blocks. It does the appropriate alignment internally The size passed is also the data size (ie. doesn't include the header anymore). Signed-off-by: Benjamin Herrenschmidt --- arch/powerpc/ke

[PATCH 04/13] powerpc/nvram: Ensure that the partition header/block size is right

2010-11-29 Thread benh
From: Benjamin Herrenschmidt Use BUILD_BUG_ON to ensure the structure representing a partition header have the right size. Signed-off-by: Benjamin Herrenschmidt --- arch/powerpc/kernel/nvram_64.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/kernel/nvra

[PATCH 02/13] powerpc/nvram: More flexible nvram_create_partition()

2010-11-29 Thread benh
From: Benjamin Herrenschmidt Replace nvram_create_os_partition() with a variant that takes the partition name, signature and size as arguments. Signed-off-by: Benjamin Herrenschmidt --- arch/powerpc/kernel/nvram_64.c | 46 +++ arch/powerpc/platforms/pserie

[PATCH 01/13] powerpc/nvram: Move things out of asm/nvram.h

2010-11-29 Thread benh
From: Benjamin Herrenschmidt This moves a bunch of definitions out of asm/nvram.h to the files that use them or just outright remove completely unused stuff. We leave the partition signatures definitions, they will be useful Signed-off-by: Benjamin Herrenschmidt --- arch/powerpc/include/asm/n