Hi, I've been reading through these tutorials ensuring that i understand every bit of logic and for the most part i'm doing fine.
I've reached 03_uart1 and i've reached a bit of a block. Where did you find the memory addresses for the MMIO_BASE and all the offsets (all the AUX offsets for example).
I've been looking at all the documentation for the board and they hint that the MMIO_BASE should be 0x7E..... https://www.raspberrypi.com/documentation/computers/processors.html#bcm2837 says that the 2837 has the same archicture as the 2836 which has the same architecture as 2835, only the 2835 has documentation that (i can find) that mentions the AUX adresses https://datasheets.raspberrypi.com/bcm2835/bcm2835-peripherals.pdf (page 8) (the 2836 docs https://datasheets.raspberrypi.com/bcm2836/bcm2836-peripherals.pdf don't mention those addresses). The os dev wiki does agree with your MMIO_BASE address https://wiki.osdev.org/Detecting_Raspberry_Pi_Board but doesn't then provide the offsets for the AUX and other addresses, also i'd still be interested in the documentation they found these values from.
Additionally in https://github.com/bztsrc/raspi3-tutorial/blob/master/03_uart1/uart.c I'd like to understand the documentation for how uart_init was written, e.g. why does it busy wait for 150 cycles twice, is that in the specification or is that a random large enough value you chose. Where is it specified which register does what, where are the flag definitions? I have a feeling the flag values come from https://datasheets.raspberrypi.com/bcm2835/bcm2835-peripherals.pdf page 15 where it describes the AUX_MU_LSR_REG Register's bits.
(I've also checked https://github.com/raspberrypi/firmware/wiki and don't see it in there)
Hi, I've been reading through these tutorials ensuring that i understand every bit of logic and for the most part i'm doing fine.
I've reached 03_uart1 and i've reached a bit of a block. Where did you find the memory addresses for the MMIO_BASE and all the offsets (all the AUX offsets for example).
I've been looking at all the documentation for the board and they hint that the MMIO_BASE should be 0x7E..... https://www.raspberrypi.com/documentation/computers/processors.html#bcm2837 says that the 2837 has the same archicture as the 2836 which has the same architecture as 2835, only the 2835 has documentation that (i can find) that mentions the AUX adresses https://datasheets.raspberrypi.com/bcm2835/bcm2835-peripherals.pdf (page 8) (the 2836 docs https://datasheets.raspberrypi.com/bcm2836/bcm2836-peripherals.pdf don't mention those addresses). The os dev wiki does agree with your MMIO_BASE address https://wiki.osdev.org/Detecting_Raspberry_Pi_Board but doesn't then provide the offsets for the AUX and other addresses, also i'd still be interested in the documentation they found these values from.
Additionally in https://github.com/bztsrc/raspi3-tutorial/blob/master/03_uart1/uart.c I'd like to understand the documentation for how uart_init was written, e.g. why does it busy wait for 150 cycles twice, is that in the specification or is that a random large enough value you chose. Where is it specified which register does what, where are the flag definitions? I have a feeling the flag values come from https://datasheets.raspberrypi.com/bcm2835/bcm2835-peripherals.pdf page 15 where it describes the AUX_MU_LSR_REG Register's bits.
(I've also checked https://github.com/raspberrypi/firmware/wiki and don't see it in there)