Re: Nova on a bit old CPU

2018-07-15 Thread Alexander Boettcher
Hi Paul,

On 13.07.2018 17:07, Paul Dufresne wrote:
> simple in include/mtrr.hpp, also stop the computer from rebooting.
> I have added in mtrr.hpp:
> in private:     static Quota    paulcache[200];
>     public:
>     ALWAYS_INLINE
>     explicit inline Mtrr (uint64 b, uint64 m) : List (list),
> base (b), mask (m) {}
> 
>     ALWAYS_INLINE
>     static inline void *operator new (size_t, Quota "a) {
>   static Quota *paulptr;
>   //return cache.alloc(quota);
>   *paulptr=quota;
>   return(paulptr++);

whatever you try to do here, it is wrong.

You take a reference as input (Quota "a), store it in a static and
later on just increment the static. Whatever lies behind Quota "a
stored in the static will wrongly read and/or overridden/corrupted !?
(If you tried to use paulcache, it is not used.)

-- 
Alexander Boettcher
Genode Labs

https://www.genode-labs.com - https://www.genode.org

Genode Labs GmbH - Amtsgericht Dresden - HRB 28424 - Sitz Dresden
Geschäftsführer: Dr.-Ing. Norman Feske, Christian Helmuth

___
Genode users mailing list
users@lists.genode.org
https://lists.genode.org/listinfo/users

Re: Nova on a bit old CPU

2018-07-13 Thread Paul Dufresne
I have now test and discovered that if I removed the image.elf file 
(Genode kernel+rom modules) in
Grub, that then there is no exceptions 0xe or 06 going on in Nova (on 
'c' press).


So I now think that Nova loads and run Genode, but that there is so much 
errors going on on my

machine that nothing shows up on the screen.

I intend to find Genode entry point and see how I can investigate this.


___
Genode users mailing list
users@lists.genode.org
https://lists.genode.org/listinfo/users

Re: Nova on a bit old CPU

2018-07-13 Thread Paul Dufresne

Le 2018-07-12 à 15:04, Alexander Boettcher a écrit :

   On 12.07.2018 17:41, Paul Dufresne wrote: I have figure out that the
   computer would reboot unless I commented out: In si.cpp constructor,
   the TRACE line have to be commented out.
   This should not happen nor necessary to comment it out, as long as
   you did not enable TRACE_SYSCALL (which is by default off).

No I did not enable it.

Rather than commenting out the call to Mtr::init() in pd.cpp, I have 
found that writing my own hyper

simple in include/mtrr.hpp, also stop the computer from rebooting.
I have added in mtrr.hpp:
in private:     static Quota    paulcache[200];
    public:
    ALWAYS_INLINE
    explicit inline Mtrr (uint64 b, uint64 m) : List (list), 
base (b), mask (m) {}


    ALWAYS_INLINE
    static inline void *operator new (size_t, Quota "a) {
  static Quota *paulptr;
  //return cache.alloc(quota);
  *paulptr=quota;
  return(paulptr++);
    }

That stop the computer from rebooting. But it does not make different 
results than before, it will

show up to showing my 2 cores info, then apparently nothing.

Until I apply your trick of adding keyb parameter to the hypervisor 
command parameter in Grub.

In genode/tool/run/boot_dir/nova file for people not knowing where.
From there, I am indeed able to see a kind of list of the number of 
interrupts done since the

last time I pressed the 'c' character.

Well, there is billions of Timer interrupts done.
After a while almost so much Idle one.
I can see often about 100k or 200k of 0xe exception.
Sometime 2 0x6 exception (bad opcode I think).
Some GSI, often just 2, but there is other number linked to that, I 
still don't know what they are.
Yeah, I will probably read in the Nova paper like you suggested to know 
if they say what they are.


At that stage, the system feeling is that it is stable enough to 
investigate further... but I would have

to know better what to check for.

At first I thought that the problem with the slab allocator would be 
only at Constructor time.
But now, I am beginning to think that maybe this is it that generate the 
numerous 0xe exceptions.



___
Genode users mailing list
users@lists.genode.org
https://lists.genode.org/listinfo/users

Re: Nova on a bit old CPU

2018-07-12 Thread Alexander Boettcher
On 12.07.2018 17:41, Paul Dufresne wrote:
> Id pd.cpp constructor, the Mtrr::init(); have to be commented out.

According to the Intel Architectures
Software Developer’s Manual, not all CPUs may implement MTRR. (Chapter
MTRR Feature Identification).

Looking at the Mtrr:init() code, there seem to be a feature check
missing. If you adhere to the Intel manual documentation, you should be
able to implement and test this check.


-- 
Alexander Boettcher
Genode Labs

https://www.genode-labs.com - https://www.genode.org

Genode Labs GmbH - Amtsgericht Dresden - HRB 28424 - Sitz Dresden
Geschäftsführer: Dr.-Ing. Norman Feske, Christian Helmuth

___
Genode users mailing list
users@lists.genode.org
https://lists.genode.org/listinfo/users

Re: Nova on a bit old CPU

2018-07-12 Thread Alexander Boettcher
On 12.07.2018 17:41, Paul Dufresne wrote:
> I spent many hours trying to figure out what is going wrong when running
> Nova on my
> Optiplex 745 machine.
> 
> I have figure out that the computer would reboot unless I commented out:
> In si.cpp constructor, the TRACE line have to be commented out.

This should not happen nor necessary to comment it out, as long as you
did not enable TRACE_SYSCALL (which is by default off).

> Id pd.cpp constructor, the Mtrr::init(); have to be commented out.
> 
> Also, to see what is going on on the screen, in:
> genode/tool/run/boot_dir/nova, I have removed novga from:
> #proc kernel_output { } { return "novga serial" }
> This allow to see some info on the screen.
> 
> My 2 CPUS are shown on the screen.
> But that's the last thing that is shown.
> It looks like the schedule call at the end of bootstrap.cpp does not
> seems to kick in.
> I am unsure where is the code that is supposed to be run from there...
> or/and why it is not run.

Check, whether the timer interrupt (local APIC) is working on your CPUs.
If they are not, the scheduling will not work properly.

You may try to add "spinner" to the kernel commandline. This gives you
some diagnostic information about all kind of events and interrupts
coming in (see chapter "Console" at the end in
contrib/nova-/src/kernel/nova/doc/specification.pdf)

Another commandline option is "keyb", which gives you (if the keyb
interrupt is working properly) on each "c" key press additional
information on the vga screen and/or serial.

Good luck,

-- 
Alexander Boettcher
Genode Labs

https://www.genode-labs.com - https://www.genode.org

Genode Labs GmbH - Amtsgericht Dresden - HRB 28424 - Sitz Dresden
Geschäftsführer: Dr.-Ing. Norman Feske, Christian Helmuth

___
Genode users mailing list
users@lists.genode.org
https://lists.genode.org/listinfo/users

Re: Nova on a bit old CPU

2018-07-12 Thread Paul Dufresne
I spent many hours trying to figure out what is going wrong when running 
Nova on my

Optiplex 745 machine.

I have figure out that the computer would reboot unless I commented out:
In si.cpp constructor, the TRACE line have to be commented out.
Id pd.cpp constructor, the Mtrr::init(); have to be commented out.

Also, to see what is going on on the screen, in:
genode/tool/run/boot_dir/nova, I have removed novga from:
#proc kernel_output { } { return "novga serial" }
This allow to see some info on the screen.

My 2 CPUS are shown on the screen.
But that's the last thing that is shown.
It looks like the schedule call at the end of bootstrap.cpp does not 
seems to kick in.
I am unsure where is the code that is supposed to be run from there... 
or/and why it is not run.




___
Genode users mailing list
users@lists.genode.org
https://lists.genode.org/listinfo/users

Re: Nova on a bit old CPU

2018-07-11 Thread Nobody III
For the record, I have used NOVA on KVM without any issues. However, as of
Genode 18.02, Genode/seL4 doesn't boot on KVM.

On Wed, Jul 11, 2018 at 2:21 PM, Alexander Boettcher <
alexander.boettc...@genode-labs.com> wrote:

> On 11.07.2018 18:24, Paul Dufresne wrote:
> > I have realized that if I set the CPU to coreDuo in QEMU rather than
> > core2Duo, my run/bomb
> > program would not give any output at all.
>
> We know, thats why the default CPU for NOVA on Qemu is Core2Duo (and
> nothing older) in our run tool.
>
> > My real CPU is a dual core. But the BIOS does not enable virtualization
> > model name: Intel(R) Core(TM)2 CPU  6300  @ 1.86GHz
>
> Theoretically, this is sufficient for the NOVA kernel.
>
> > I had the idea to test run/bomb in QEMU with my host CPU, but after
> > installing a KVM linux kernel,
>
> You are at your own. KVM caused in the past trouble and we did abandon
> the idea to use it with the NOVA kernel.
>
>
> Paul,
>
> if you really really really want to get this running on this very very
> very old CPU, we need to have serial output. We can't work with guesses
> or any attempts to run it virtualized. On the other hand, why you want it ?
>
> For Genode Sculpt TC we don't envision to run on such old hardware. Even
> if you get it booted, it will make no fun to use with Sculpt (to few
> memory, to slow CPU, not supported network card, no IOMMU support,
> virtualization support is unclear etc etc...)
>
> What about our suggested hardware [0,1] for Sculpt TC ? Refurbished
> versions of the machines are not that expensive - or at least some more
> _recent_ Intel machine - if you are really interested. If you just want
> to give it a spin without the desire to run it on a daily basis, running
> Sculpt TC in a VM should be sufficient.
>
> [0]
> https://genode.org/documentation/articles/sculpt-
> tc#Hardware_requirements_and_preparations
> [1] http://usr.sysret.de/jws/genode/hcl.html
>
> Cheers,
>
> --
> Alexander Boettcher
> Genode Labs
>
> http://www.genode-labs.com - http://www.genode.org
>
> Genode Labs GmbH - Amtsgericht Dresden - HRB 28424 - Sitz Dresden
> Geschäftsführer: Dr.-Ing. Norman Feske, Christian Helmuth
>
> ___
> Genode users mailing list
> users@lists.genode.org
> https://lists.genode.org/listinfo/users
>
___
Genode users mailing list
users@lists.genode.org
https://lists.genode.org/listinfo/users

Re: Nova on a bit old CPU

2018-07-11 Thread Alexander Boettcher
On 11.07.2018 18:24, Paul Dufresne wrote:
> I have realized that if I set the CPU to coreDuo in QEMU rather than
> core2Duo, my run/bomb
> program would not give any output at all.

We know, thats why the default CPU for NOVA on Qemu is Core2Duo (and
nothing older) in our run tool.

> My real CPU is a dual core. But the BIOS does not enable virtualization
> model name    : Intel(R) Core(TM)2 CPU  6300  @ 1.86GHz

Theoretically, this is sufficient for the NOVA kernel.

> I had the idea to test run/bomb in QEMU with my host CPU, but after
> installing a KVM linux kernel,

You are at your own. KVM caused in the past trouble and we did abandon
the idea to use it with the NOVA kernel.


Paul,

if you really really really want to get this running on this very very
very old CPU, we need to have serial output. We can't work with guesses
or any attempts to run it virtualized. On the other hand, why you want it ?

For Genode Sculpt TC we don't envision to run on such old hardware. Even
if you get it booted, it will make no fun to use with Sculpt (to few
memory, to slow CPU, not supported network card, no IOMMU support,
virtualization support is unclear etc etc...)

What about our suggested hardware [0,1] for Sculpt TC ? Refurbished
versions of the machines are not that expensive - or at least some more
_recent_ Intel machine - if you are really interested. If you just want
to give it a spin without the desire to run it on a daily basis, running
Sculpt TC in a VM should be sufficient.

[0]
https://genode.org/documentation/articles/sculpt-tc#Hardware_requirements_and_preparations
[1] http://usr.sysret.de/jws/genode/hcl.html

Cheers,

-- 
Alexander Boettcher
Genode Labs

http://www.genode-labs.com - http://www.genode.org

Genode Labs GmbH - Amtsgericht Dresden - HRB 28424 - Sitz Dresden
Geschäftsführer: Dr.-Ing. Norman Feske, Christian Helmuth

___
Genode users mailing list
users@lists.genode.org
https://lists.genode.org/listinfo/users

Re: Nova on a bit old CPU

2018-07-11 Thread Paul Dufresne
I have realized that if I set the CPU to coreDuo in QEMU rather than 
core2Duo, my run/bomb

program would not give any output at all.

My real CPU is a dual core. But the BIOS does not enable virtualization 
per default.
I believe I have a CPU with vmx flag, that does not have IOMMU 
(dmidecode does not show

a DMAR (DMA relocalistion) table).

Here is my /proc/cpuinfo:
processor    : 0
vendor_id    : GenuineIntel
cpu family    : 6
model        : 15
model name    : Intel(R) Core(TM)2 CPU  6300  @ 1.86GHz
stepping    : 6
microcode    : 0xd0
cpu MHz        : 1821.338
cache size    : 2048 KB
physical id    : 0
siblings    : 2
core id        : 0
cpu cores    : 2
apicid        : 0
initial apicid    : 0
fpu        : yes
fpu_exception    : yes
cpuid level    : 10
wp        : yes
flags        : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca 
cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall 
nx lm constant_tsc arch_perfmon pebs bts nopl cpuid aperfmperf pni 
dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm lahf_lm pti 
tpr_shadow dtherm

bugs        : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass
bogomips    : 3721.03
clflush size    : 64
cache_alignment    : 64
address sizes    : 36 bits physical, 48 bits virtual
power management:

I had the idea to test run/bomb in QEMU with my host CPU, but after 
installing a KVM linux kernel,
it was not booting (if BIOS have virtualization enabled, would hang on 
loading boot image kind

of message).

I do remember that a few years ago, the author of Nova, had it modified 
so that it booted on
my Pentium 4. But I guess something went wrong with the years. He sure 
did not really happy
back then to know that people where still using CPU that does not 
support IOMMU.


I tried with Pentium3 emulation and QEMU after 3 to 5 mins, said that 
the program had try to
write outside memory, and that it probably means I was running an image 
not compatible with

my machine.

Now, I suppose that the fact QEMU cannot handle some older CPUs on Nova 
well...

that there is some way to debug it in an easier way than on real hardware?
I am still trying to figure how ... however.



___
Genode users mailing list
users@lists.genode.org
https://lists.genode.org/listinfo/users