Re: [U-Boot] Question regarding cpu_get_count(..)

2018-04-09 Thread Christian Gmeiner
2018-04-09 10:26 GMT+02:00 Bin Meng :
> Hi Christian,
>
> On Mon, Apr 9, 2018 at 3:52 PM, Christian Gmeiner
>  wrote:
>> Hi Bin
>>
>> 2018-04-06 10:30 GMT+02:00 Christian Gmeiner :
>>> Hi Bin
>>>
>>> 2018-04-06 9:47 GMT+02:00 Bin Meng :
 Hi Christian,

 On Fri, Apr 6, 2018 at 2:55 PM, Christian Gmeiner
  wrote:
> Hi
>
> I tried my luck on the u-boot irc channel but nobody cared so I am
> asking this here again.
> Does cpu_get_count(..) return the number of physical CPUs or the
> number of logical CPUs?
>
> I am currently preparing a patch set which adds
> arch/x86/cpu/queensbay/cpu.c and there I need
> to specify a struct cpu_ops with a function called get_count(). But
> what must I return (physical vs. logical CPU count)?
>

 It's logical CPUs, say you have one physical CPU, each with
 dual-threads, so get_count() returns 2.

>>>
>>> Good to know. I am looking into an issue where vxworks 7 intel gen is not 
>>> able
>>> to detect the correct amount of physical and logical CPUs (on a blob 
>>> UEFI-Bios).
>>> I compared the new platform with an older queensbay based one the there are 
>>> some
>>> discrepancies. As vx7 makes use of a handful of BIOS tables I thought I 
>>> start at
>>> the root (get_count()) and move up. So as a result of this that means that 
>>> the
>>> MP table has one "Processor Entry" per logical CPU - or? I tired to get that
>>> information for the spec but failed.
>>>
 But Intel CrownBay already supports SMP in U-Boot. What patch are you
 working on?
>>>
>>> I am out of office today and do not have access to my wip git rep :(
>>> But I needed
>>> to set some speed frequency registers.. but can tell you more on Monday.
>>>
>>
>> Okay.. yeah I need to configure speed: https://hastebin.com/toqihobali.cpp
>>
>> So the end result is to get all BIOS tables standard conform and vx7 should
>> be happy - I hope.
>>
>
> I am not sure I understand the mods here. Are you saying that vx7 is
> not happy due to U-Boot is missing some core speed register
> configuration?
>

No - I am happy with the code basis as is. In order to fix some
performance issues
regarding cache I ended adding cpu.c. That was some months ago.

Now some guys and me need to bring up vx7 smp on a handful of targets and we are
seeing some wired vxCpuIdTopology() outputs on different targets.
Looks like u-boot
is okay but a vendor binary bios has problems

https://hastebin.com/qojenuqoge.js

To sum it up:
* cpu_get_count(..) needs to return the number of logical CPUs.
* The generated MP-Table has one "Processor Entry" per logical CPU

I will prepare a proper patch for the cpu.c addition during the week.
-- 
greets
--
Christian Gmeiner, MSc

https://christian-gmeiner.info
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] Question regarding cpu_get_count(..)

2018-04-09 Thread Bin Meng
Hi Christian,

On Mon, Apr 9, 2018 at 3:52 PM, Christian Gmeiner
 wrote:
> Hi Bin
>
> 2018-04-06 10:30 GMT+02:00 Christian Gmeiner :
>> Hi Bin
>>
>> 2018-04-06 9:47 GMT+02:00 Bin Meng :
>>> Hi Christian,
>>>
>>> On Fri, Apr 6, 2018 at 2:55 PM, Christian Gmeiner
>>>  wrote:
 Hi

 I tried my luck on the u-boot irc channel but nobody cared so I am
 asking this here again.
 Does cpu_get_count(..) return the number of physical CPUs or the
 number of logical CPUs?

 I am currently preparing a patch set which adds
 arch/x86/cpu/queensbay/cpu.c and there I need
 to specify a struct cpu_ops with a function called get_count(). But
 what must I return (physical vs. logical CPU count)?

>>>
>>> It's logical CPUs, say you have one physical CPU, each with
>>> dual-threads, so get_count() returns 2.
>>>
>>
>> Good to know. I am looking into an issue where vxworks 7 intel gen is not 
>> able
>> to detect the correct amount of physical and logical CPUs (on a blob 
>> UEFI-Bios).
>> I compared the new platform with an older queensbay based one the there are 
>> some
>> discrepancies. As vx7 makes use of a handful of BIOS tables I thought I 
>> start at
>> the root (get_count()) and move up. So as a result of this that means that 
>> the
>> MP table has one "Processor Entry" per logical CPU - or? I tired to get that
>> information for the spec but failed.
>>
>>> But Intel CrownBay already supports SMP in U-Boot. What patch are you
>>> working on?
>>
>> I am out of office today and do not have access to my wip git rep :(
>> But I needed
>> to set some speed frequency registers.. but can tell you more on Monday.
>>
>
> Okay.. yeah I need to configure speed: https://hastebin.com/toqihobali.cpp
>
> So the end result is to get all BIOS tables standard conform and vx7 should
> be happy - I hope.
>

I am not sure I understand the mods here. Are you saying that vx7 is
not happy due to U-Boot is missing some core speed register
configuration?

Regards,
Bin
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] Question regarding cpu_get_count(..)

2018-04-09 Thread Christian Gmeiner
Hi Bin

2018-04-06 10:30 GMT+02:00 Christian Gmeiner :
> Hi Bin
>
> 2018-04-06 9:47 GMT+02:00 Bin Meng :
>> Hi Christian,
>>
>> On Fri, Apr 6, 2018 at 2:55 PM, Christian Gmeiner
>>  wrote:
>>> Hi
>>>
>>> I tried my luck on the u-boot irc channel but nobody cared so I am
>>> asking this here again.
>>> Does cpu_get_count(..) return the number of physical CPUs or the
>>> number of logical CPUs?
>>>
>>> I am currently preparing a patch set which adds
>>> arch/x86/cpu/queensbay/cpu.c and there I need
>>> to specify a struct cpu_ops with a function called get_count(). But
>>> what must I return (physical vs. logical CPU count)?
>>>
>>
>> It's logical CPUs, say you have one physical CPU, each with
>> dual-threads, so get_count() returns 2.
>>
>
> Good to know. I am looking into an issue where vxworks 7 intel gen is not able
> to detect the correct amount of physical and logical CPUs (on a blob 
> UEFI-Bios).
> I compared the new platform with an older queensbay based one the there are 
> some
> discrepancies. As vx7 makes use of a handful of BIOS tables I thought I start 
> at
> the root (get_count()) and move up. So as a result of this that means that the
> MP table has one "Processor Entry" per logical CPU - or? I tired to get that
> information for the spec but failed.
>
>> But Intel CrownBay already supports SMP in U-Boot. What patch are you
>> working on?
>
> I am out of office today and do not have access to my wip git rep :(
> But I needed
> to set some speed frequency registers.. but can tell you more on Monday.
>

Okay.. yeah I need to configure speed: https://hastebin.com/toqihobali.cpp

So the end result is to get all BIOS tables standard conform and vx7 should
be happy - I hope.

-- 
greets
--
Christian Gmeiner, MSc

https://christian-gmeiner.info
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] Question regarding cpu_get_count(..)

2018-04-06 Thread Christian Gmeiner
Hi Bin

2018-04-06 9:47 GMT+02:00 Bin Meng :
> Hi Christian,
>
> On Fri, Apr 6, 2018 at 2:55 PM, Christian Gmeiner
>  wrote:
>> Hi
>>
>> I tried my luck on the u-boot irc channel but nobody cared so I am
>> asking this here again.
>> Does cpu_get_count(..) return the number of physical CPUs or the
>> number of logical CPUs?
>>
>> I am currently preparing a patch set which adds
>> arch/x86/cpu/queensbay/cpu.c and there I need
>> to specify a struct cpu_ops with a function called get_count(). But
>> what must I return (physical vs. logical CPU count)?
>>
>
> It's logical CPUs, say you have one physical CPU, each with
> dual-threads, so get_count() returns 2.
>

Good to know. I am looking into an issue where vxworks 7 intel gen is not able
to detect the correct amount of physical and logical CPUs (on a blob UEFI-Bios).
I compared the new platform with an older queensbay based one the there are some
discrepancies. As vx7 makes use of a handful of BIOS tables I thought I start at
the root (get_count()) and move up. So as a result of this that means that the
MP table has one "Processor Entry" per logical CPU - or? I tired to get that
information for the spec but failed.

> But Intel CrownBay already supports SMP in U-Boot. What patch are you
> working on?

I am out of office today and do not have access to my wip git rep :(
But I needed
to set some speed frequency registers.. but can tell you more on Monday.

-- 
greets
--
Christian Gmeiner, MSc

https://christian-gmeiner.info
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] Question regarding cpu_get_count(..)

2018-04-06 Thread Bin Meng
Hi Christian,

On Fri, Apr 6, 2018 at 2:55 PM, Christian Gmeiner
 wrote:
> Hi
>
> I tried my luck on the u-boot irc channel but nobody cared so I am
> asking this here again.
> Does cpu_get_count(..) return the number of physical CPUs or the
> number of logical CPUs?
>
> I am currently preparing a patch set which adds
> arch/x86/cpu/queensbay/cpu.c and there I need
> to specify a struct cpu_ops with a function called get_count(). But
> what must I return (physical vs. logical CPU count)?
>

It's logical CPUs, say you have one physical CPU, each with
dual-threads, so get_count() returns 2.

But Intel CrownBay already supports SMP in U-Boot. What patch are you
working on?

Regards,
Bin
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot