xinu-os / xinu

Repository for Xinu source code
http://xinu-os.org/
Other
432 stars 128 forks source link

Adding support for all Raspberry Pi models #17

Open vanvught opened 6 years ago

vanvught commented 6 years ago

In order to support all Raspberry Pi models, what would be the best naming convention for defines? Any other considerations? We need to different memory barriers based on RPi model. The same for the GPIO base address.

LdB-ECM commented 6 years ago

I have actually completed the port for all the Pi models there is no requirement for any additional defines you can detect them all and correct for them in platformint.c. For example for the GPIO address just first check if address 0x20980040 has the value 0x4F54280A (that is the USB vendor ID) .. if you don't see it then the IOBase is 0x3F000000 and you can confirm it by reading 0x3F980040 and it should have that value. From there you have access to the Pi mailbox and you can request memory split etc. You load all the stuff you need into your drivers usually using the csr pointer and when initialize.c does an open on the drivers they have the right settings.

vanvught commented 6 years ago

@LdB-ECM Thanks. Are you going to push the code to this GitHub repository?

LdB-ECM commented 6 years ago

yes just need to format for directories If anyone would like to confirm we have no bugs I have compiled version https://github.com/LdB-ECM/Exchange/tree/master/Xinu A quick overview of my attack on the code to get that out is given here. https://github.com/LdB-ECM/Docs_and_Images/blob/master/Documentation/Xinu.md