[RFC,v5,04/16] Add uv-entry dt property for starting ultravisor
diff mbox series

Message ID 20200227204023.22125-5-grimm@linux.ibm.com
State New
Headers show
Series
  • Ultravisor support in skiboot
Related show

Checks

Context Check Description
snowpatch_ozlabs/snowpatch_job_snowpatch-skiboot-dco success Signed-off-by present
snowpatch_ozlabs/snowpatch_job_snowpatch-skiboot success Test snowpatch/job/snowpatch-skiboot on branch master
snowpatch_ozlabs/apply_patch success Successfully applied on branch master (82aed17a5468aff6b600ee1694a10a60f942c018)

Commit Message

Ryan Grimm Feb. 27, 2020, 8:40 p.m. UTC
We can jump into any location in the uv image for testing.

Signed-off-by: Ryan Grimm <grimm@linux.ibm.com>
---
 hw/ultravisor.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

Comments

Alexey Kardashevskiy March 4, 2020, 6:44 a.m. UTC | #1
On 28/02/2020 07:40, Ryan Grimm wrote:
> We can jump into any location in the uv image for testing.


and how can a user set this "uv-entry"? I am guessing cronus (which most
of us do not have). I'd rather have this merged into 2/16 or dropped
(for debugging imho it is lot easier to fix the line, compile and copy
the uv lid over to the bmc).


> 
> Signed-off-by: Ryan Grimm <grimm@linux.ibm.com>
> ---
>  hw/ultravisor.c | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/hw/ultravisor.c b/hw/ultravisor.c
> index 7f263e3e..8dea456a 100644
> --- a/hw/ultravisor.c
> +++ b/hw/ultravisor.c
> @@ -14,8 +14,13 @@ static uint64_t uv_base_addr;
>  
>  static void cpu_start_ultravisor(void *fdt)
>  {
> +	uint64_t uv_entry = 0;
> +
> +	if (dt_find_property(uv_fw_node, "uv-entry"))
> +		uv_entry = dt_prop_get_u64(uv_fw_node, "uv-entry");
> +
>  	prlog(PR_DEBUG, "UV: Starting on CPU 0x%04x\n", this_cpu()->pir);
> -	start_uv(uv_base_addr, fdt);
> +	start_uv(uv_base_addr + uv_entry, fdt);
>  }
>  
>  int start_ultravisor(void *fdt)
>
Ryan Grimm March 23, 2020, 3:35 p.m. UTC | #2
On Wed, 2020-03-04 at 17:44 +1100, Alexey Kardashevskiy wrote:
> 
> On 28/02/2020 07:40, Ryan Grimm wrote:
> > We can jump into any location in the uv image for testing.
> 
> 
> and how can a user set this "uv-entry"? I am guessing cronus (which
> most
> of us do not have). I'd rather have this merged into 2/16 or dropped
> (for debugging imho it is lot easier to fix the line, compile and
> copy
> the uv lid over to the bmc).
> 

You can use Mambo too.  My intent was to be able to actually test
something in Mambo without having the ultravisor tree.  

We can use skiboot.lid and set uv-entry to disable_pef and it boots,
so, I found that useful.

But, yeah, squashed to earlier patch.

-Ryan

> 
> > 
> > Signed-off-by: Ryan Grimm <grimm@linux.ibm.com>
> > ---
> >  hw/ultravisor.c | 7 ++++++-
> >  1 file changed, 6 insertions(+), 1 deletion(-)
> > 
> > diff --git a/hw/ultravisor.c b/hw/ultravisor.c
> > index 7f263e3e..8dea456a 100644
> > --- a/hw/ultravisor.c
> > +++ b/hw/ultravisor.c
> > @@ -14,8 +14,13 @@ static uint64_t uv_base_addr;
> >  
> >  static void cpu_start_ultravisor(void *fdt)
> >  {
> > +	uint64_t uv_entry = 0;
> > +
> > +	if (dt_find_property(uv_fw_node, "uv-entry"))
> > +		uv_entry = dt_prop_get_u64(uv_fw_node, "uv-entry");
> > +
> >  	prlog(PR_DEBUG, "UV: Starting on CPU 0x%04x\n", this_cpu()-
> > >pir);
> > -	start_uv(uv_base_addr, fdt);
> > +	start_uv(uv_base_addr + uv_entry, fdt);
> >  }
> >  
> >  int start_ultravisor(void *fdt)
> > 
> 
>

Patch
diff mbox series

diff --git a/hw/ultravisor.c b/hw/ultravisor.c
index 7f263e3e..8dea456a 100644
--- a/hw/ultravisor.c
+++ b/hw/ultravisor.c
@@ -14,8 +14,13 @@  static uint64_t uv_base_addr;
 
 static void cpu_start_ultravisor(void *fdt)
 {
+	uint64_t uv_entry = 0;
+
+	if (dt_find_property(uv_fw_node, "uv-entry"))
+		uv_entry = dt_prop_get_u64(uv_fw_node, "uv-entry");
+
 	prlog(PR_DEBUG, "UV: Starting on CPU 0x%04x\n", this_cpu()->pir);
-	start_uv(uv_base_addr, fdt);
+	start_uv(uv_base_addr + uv_entry, fdt);
 }
 
 int start_ultravisor(void *fdt)