Skip to content
Leon de Boer edited this page Sep 23, 2018 · 31 revisions

Welcome to the Xinu 3.0 Alpha wiki!

20th Sept 2018:

I was trying to bring the multiple cores of the Pi2/3 online into xinu and ran into an issue. On the existing system you execute a critical section stopping the task switcher via the disable() call, you then come back to normal operation via a restore. Strangely disable gives you the interrupt masks, meaning you could play around with them locally before restoring. I am not sure if an implementation did it but for what I am going to do that implementation would be dead. The other part is in my opinion a bug you can do multiple disables and multiple restores one after another, there is no required pairing.

My preferred option I am going to try is make two functions ENTER_KERNEL_CRITICAL_SECTION and EXIT_KERNEL_CRITICAL_SECTION which will have an internal pairing mechanism. Call two of either in a row will assert an error. On the existing implementation ENTER_KERNEL_CRITICAL_SECTION will simply call disable() but hold the interrupt mask internally. The calling EXIT_KERNEL_CRITICAL_SECTION will restore the held mask.

On the multicore platform obviously there is a very different implementation of these calls which stops the scheduler and cores doing bad things.

I have also found the problem with testsuite on the LAN78xx ethernet driver I created for the Pi3B+. The loopback mode is failing to set, reading the datasheet I may have to take the TX & RX enable lines down while I enter the mode. Anyhow it is something quirky with a couple of registers so it should be able to be fixed. It is creating an error on the testsuite but that is about the extent because you do not have the LAN7800 in loopback when using normally.

18th Sept 2018:

Initial changes to USB buffer memory allocation started which has some shortcomings. These are actually noted in the comments in Usbcore.c and rather than just notice the comments I set about fixing them.

15th Sept 2018:

With feedback from cwsreck from the PI forum there was an issue with PiZeroW. This actually turned out to be a problem with all Pi models not featuring the ethernet being PiZero, PiZeroW, Compute Module, Compute Module3. Having debugged the issue with his help and then purchasing a PiZeroW I have checked all code is compatible. I also changed several files which were incorrect with linux make with his help.

12th Sept 2018:

Queue code done. So I ended up changing the code to a simple stack based queue system. Still not sure about it as it does bubble sorting on the way in and out. The original queue system used more traditional double link list (all be it used array index rather than pointers).

9th Sept 2018:

I have started the process to bring the other cores online on multicore Pi boards. The first hurdle I have ran into is the queue system which is a hideous macro code setup in "queue.h". I guess at the time it was considered neat and compact but it makes trying to get multicore thread safety thru that section hard. I am looking at what linux does but there seems to be change even there but I will choose 1 and implement ... others may choose to do there own.

6th Sept 2018:

Added HARD/SOFT FPU compiling. The original soft FPU only implementation was extended with the option to use hard floats. background is available on

https://github.com/LdB-ECM/Docs_and_Images/blob/master/Documentation/HardSoft_fpu.md

4th Sept 2018:

Makefile was adjusted to build to a single build directory to speed up the clean process which was frustrating. I hopefully added linux support at the same time but it is untested.

1st Sept 2018:

LAN78xx driver of the Pi3B+ is working nicely but enumeration of the USB is slow. It is actually the USB code enumeration nothing to do with the LAN78xx. It is no faster if you leave the LAN driver out. There is two onboard hubs on the Pi3B+ and it is possible something to do with that I will leave it as a note to look at if I am in the DWC code again.

I now have drivers for the SD Card and USB drives working but no point in worrying about them at the moment until I sort out what I am going to do with block devices in terms of management. I have got a rough VC4 driver working so I might animate a logo on the screen at startup just as a show off.

24th Aug 2018:

non C standard <stddef.h> is dead now inserting all the standard defintions.

The pl011 serial driver has the FIFO buffer off, the code explains they had issues but I need to look at it. You get rather heavy irq use for transmission as in 1 irq per byte

794 Characters Output

  10 Characters Input

   0 Characters Overrun

   0 Receiver Error Count

 794 Output IRQ Count

  10 Input IRQ Count

Compare that to Pi's that use the miniuart output for the same transmission

 794 Characters Output

10 Characters Input

 0 Characters Overrun

 0 Receiver Error Count

111 Output IRQ Count

10 Input IRQ Count

I have added that to my list to do.