[Skiboot] [PATCH] external/mambo: Update skiboot.tcl to add page-sizes nodes to device tree
Balbir Singh
bsingharora at gmail.com
Fri Sep 2 09:31:59 AEST 2016
On 31/08/16 16:45, Michael Neuling wrote:
> On Wed, 2016-08-31 at 16:01 +1000, Suraj Jitindar Singh wrote:
>> Currently skiboot.tcl doesn't add device tree nodes
>> ibm,processor-page-sizes or ibm,segment-page-sizes. This results in failure
>> when trying to boot a P8 guest using kvm in mambo.
>>
>> Update skiboot.tcl in order to have it add these device tree nodes.
>>
>> The values for these properties were taken from those hard-coded into
>> skiboot in hdata/cpu-common.c:78; the format was preserved for
>> readability and to make it obvious where these values came from.
>>
>> With this change it is possible to boot a P8 kvm guest in mambo.
>>
>> Signed-off-by: Suraj Jitindar Singh <sjitindarsingh at gmail.com>
>
> Works for me, thanks!
>
> Acked-By: Michael Neuling <mikey at neuling.org>
>
>> ---
>> external/mambo/skiboot.tcl | 14 ++++++++++++++
>> 1 file changed, 14 insertions(+)
>>
>> diff --git a/external/mambo/skiboot.tcl b/external/mambo/skiboot.tcl
>> index 526f9b2..b8e68c9 100644
>> --- a/external/mambo/skiboot.tcl
>> +++ b/external/mambo/skiboot.tcl
>> @@ -191,6 +191,20 @@ for { set c 0 } { $c < $mconf(cpus) } { incr c } {
>> mysim of addprop $cpu_node array64 "ibm,processor-segment-sizes" reg
>>
>> set reg {}
>> + lappend reg 0x0000000c 0x00000010 0x00000018 0x00000022
>> + mysim of addprop $cpu_node array "ibm,processor-page-sizes" reg
>> +
>> + set reg {}
>> + lappend reg 0x0c 0x000 3 0x0c 0x0000 ;# 4K seg 4k pages
>> + lappend reg 0x10 0x0007 ;# 4K seg 64k pages
>> + lappend reg 0x18 0x0038 ;# 4K seg 16M pages
>> + lappend reg 0x10 0x110 2 0x10 0x0001 ;# 64K seg 64k pages
>> + lappend reg 0x18 0x0008 ;# 64K seg 16M pages
>> + lappend reg 0x18 0x100 1 0x18 0x0000 ;# 16M seg 16M pages
>> + lappend reg 0x22 0x120 1 0x22 0x0003 ;# 16G seg 16G pages
>> + mysim of addprop $cpu_node array "ibm,segment-page-sizes" reg
>> +
I've had a similar patch in my local tree that I should havve posted -- sorry
+ set reg [list 0x0000000c00000010]
+ mysim of addprop $cpu_node array64 "ibm,processor-page-sizes" reg
+ set reg [list 0x0000000c00000000 0x000000030000000c 0x0000000000000010 0x0000000700000018 0x0000003800000010 0x0000011000000002 0x0000001000000001 0x0000001800000008 0x0000001800000100 0x0000000100000018 0x0000000000000022 0x0000012000000001 0x0000002200000003]
+ mysim of addprop $cpu_node array64 "ibm,segment-page-sizes" reg
Your patch is much better and well documented
Reviewed-by: Balbir Singh <bsingharora at gmail.com>
>> + set reg {}
>> if { $default_config == "P9" } {
>> # POWER9 PAPR defines upto bytes 62-63
>> # header + bytes 0-5
> _______________________________________________
> Skiboot mailing list
> Skiboot at lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/skiboot
>
More information about the Skiboot
mailing list