Go to advanced search

by zeoneo
Tue Apr 09, 2019 6:04 am
Forum: Bare metal, Assembly language
Topic: Alignment issues in porting CSUD for RPI 3B (32 Bit) with minimal changes
Replies: 45
Views: 6137

Re: Alignment issues in porting CSUD for RPI 3B (32 Bit) with minimal changes

Ohh great. I will add it in my code and check if it works. My focus was there is something wrong with split transaction implementation of CSUD. Clearly that is not the case as it is working for keyboard. Also while fetching device configuration for usb/kbd it uses split transaction and that step is ...
by zeoneo
Mon Apr 08, 2019 12:00 pm
Forum: Bare metal, Assembly language
Topic: Alignment issues in porting CSUD for RPI 3B (32 Bit) with minimal changes
Replies: 45
Views: 6137

Re: Alignment issues in porting CSUD for RPI 3B (32 Bit) with minimal changes

Thanks for clarifying. Indeed I mistook your thoughts. I am reading circle code to debug this issue.
by zeoneo
Sun Apr 07, 2019 10:55 am
Forum: Bare metal, Assembly language
Topic: Alignment issues in porting CSUD for RPI 3B (32 Bit) with minimal changes
Replies: 45
Views: 6137

Re: Alignment issues in porting CSUD for RPI 3B (32 Bit) with minimal changes

I tried use Circle USB library and it works. Although this code doesn't work https://github.com/LdB-ECM/Raspberry-Pi/tree/master/Arm32_64_USB for the same mouse. A lesson for those getting started, once you get beyond the basics those simple examples don't cut it. Spend your precious time learning ...
by zeoneo
Sun Apr 07, 2019 4:22 am
Forum: Bare metal, Assembly language
Topic: Alignment issues in porting CSUD for RPI 3B (32 Bit) with minimal changes
Replies: 45
Views: 6137

Re: Alignment issues in porting CSUD for RPI 3B (32 Bit) with minimal changes

I tried use Circle USB library and it works.

Although this code doesn't work https://github.com/LdB-ECM/Raspberry-Pi ... m32_64_USB
for the same mouse.

I am still trying to find what's going wrong. Is it related split transactions?
by zeoneo
Sat Apr 06, 2019 12:04 pm
Forum: Bare metal, Assembly language
Topic: Alignment issues in porting CSUD for RPI 3B (32 Bit) with minimal changes
Replies: 45
Views: 6137

Re: Alignment issues in porting CSUD for RPI 3B (32 Bit) with minimal changes

@Ldb I got keyboard working. I can read the characters and set leds But I am facing some issue with mouse. It is detected and configured. But when I try to read HIDReport host controller throws error like this: MOUSE: Mouse report index: 0 1 Platform: malloc(8) = 23e78. (11320/32768) Getting report ...
by zeoneo
Tue Apr 02, 2019 1:43 am
Forum: Bare metal, Assembly language
Topic: Alignment issues in porting CSUD for RPI 3B (32 Bit) with minimal changes
Replies: 45
Views: 6137

Re: Alignment issues in porting CSUD for RPI 3B (32 Bit) with minimal changes

@Ldb thank you sir. This is the first time I got into real arm level alignment issue. While setting up paging and dma I could read the manual explicitly talking about aligned addresses. This was the new learning. I am very close to completing CSUD. It was my dream to write/understand USB driver 😂. @...
by zeoneo
Mon Apr 01, 2019 5:22 am
Forum: Bare metal, Assembly language
Topic: Alignment issues in porting CSUD for RPI 3B (32 Bit) with minimal changes
Replies: 45
Views: 6137

Alignment issues in porting CSUD for RPI 3B (32 Bit) with minimal changes

Hi, I am trying to use CSUD usb driver found here https://github.com/Chadderz121/csud. Current status: It is able to attach fake root hub. It is able to detect reat USB Hub 2.0 It is able to detect all the children i.e LAN port which is non removable and other devices connected to 4 ports of raspber...
by zeoneo
Fri Jan 04, 2019 9:34 am
Forum: Bare metal, Assembly language
Topic: Need debugging help for setting up paging/VMSAv8-32 on RPI 3B (32 bit)
Replies: 8
Views: 1308

Re: Need debugging help for setting up paging/VMSAv8-32 on RPI 3B (32 bit)

Ohh I got it after lot of debugging its stack pointer I have initialized in boot.S. So stupid

Code: Select all

    ;@ (PSR_SVC_MODE|PSR_FIQ_DIS|PSR_IRQ_DIS)
    mov r0,#0xD3
    msr cpsr_c,r0
    mov sp,#0x8000000

Sorry for trouble and thanks I could debug it with your help.

:D
by zeoneo
Fri Jan 04, 2019 8:53 am
Forum: Bare metal, Assembly language
Topic: Need debugging help for setting up paging/VMSAv8-32 on RPI 3B (32 bit)
Replies: 8
Views: 1308

Re: Need debugging help for setting up paging/VMSAv8-32 on RPI 3B (32 bit)

No I do not have any reference to 0x07F00000 according to nm. 0000808c t .NotInHypMode 00000040 a ARM_F_BIT 00000080 a ARM_I_BIT 00000011 a ARM_MODE_FIQ 0000001a a ARM_MODE_HYP 00000012 a ARM_MODE_IRQ 0000001f a ARM_MODE_MASK 00000013 a ARM_MODE_SVC 0000001f a ARM_MODE_SYS 0000001b a ARM_MODE_UND 00...
by zeoneo
Fri Jan 04, 2019 6:18 am
Forum: Bare metal, Assembly language
Topic: Need debugging help for setting up paging/VMSAv8-32 on RPI 3B (32 bit)
Replies: 8
Views: 1308

Re: Need debugging help for setting up paging/VMSAv8-32 on RPI 3B (32 bit)

@LdB I have found something interesting here. I do identity mapping as follows then it works void initialize_virtual_memory(void) { /* Not needed now unsigned int ra; for (ra = 0;; ra += 0x00100000) { mmu_section(ra, ra, 0x0000); if (ra == 0x08000000) break; } */ // This mapping works. mmu_section(0...
by zeoneo
Wed Jan 02, 2019 7:25 am
Forum: Bare metal, Assembly language
Topic: Need debugging help for setting up paging/VMSAv8-32 on RPI 3B (32 bit)
Replies: 8
Views: 1308

Re: Need debugging help for setting up paging/VMSAv8-32 on RPI 3B (32 bit)

Hi, Thanks for replying. Happy new year to you too :) . Hmm looking at your code .. strange thing what is all the initial code about parking cores doing in startup the cores will never be released by the boot stub. I don't get that but moving on. It was pain while debugging with Qemu so I halted the...
by zeoneo
Wed Jan 02, 2019 3:25 am
Forum: Bare metal, Assembly language
Topic: Need debugging help for setting up paging/VMSAv8-32 on RPI 3B (32 bit)
Replies: 8
Views: 1308

Re: Need debugging help for setting up paging/VMSAv8-32 on RPI 3B (32 bit)

@LdB you seem to have implemented paging in AARCH64 mode would you be able to point in some direction sir?
by zeoneo
Mon Dec 31, 2018 4:50 pm
Forum: Bare metal, Assembly language
Topic: Need debugging help for setting up paging/VMSAv8-32 on RPI 3B (32 bit)
Replies: 8
Views: 1308

Need debugging help for setting up paging/VMSAv8-32 on RPI 3B (32 bit)

Hi guys I have been trying to enable paging on my RPI 3B in 32 bit mode. I have followed dwelch67 tutorial and then read ARM ARM, TRM about how to do it. I store First level descriptors starting from 0x4000 which is 16KB aligned. I am using short descriptor format. Manager domain. When I map VA to P...
by zeoneo
Sat Dec 01, 2018 7:29 pm
Forum: Bare metal, Assembly language
Topic: RPI 3B UNDEF exception handler is not called.
Replies: 0
Views: 1323

RPI 3B UNDEF exception handler is not called.

Hi guys, I am trying (bare metal) exception handling tutorials on RPI 3B. Here is my code. ---boot.S------- // To keep this in the first portion of the binary. .section ".text.boot" // Make _start global. .globl _start .global _get_stack_pointer .global _exception_table .global _enable_interrupts .e...
by zeoneo
Fri Nov 30, 2018 7:12 pm
Forum: Bare metal, Assembly language
Topic: RPI 3b (not b+) Bootloader in 32 bit mode.
Replies: 5
Views: 2207

Re: RPI 3b (not b+) Bootloader in 32 bit mode.

Hi bzt,

I think it's other wise miniUart(AuxUart) has variable frequency problems, PL011 (UART0) doesn't. Please refer https://www.raspberrypi.org/documentati ... on/uart.md. MiniUart section.

Thanks,
zeo
by zeoneo
Thu Nov 29, 2018 6:20 pm
Forum: Bare metal, Assembly language
Topic: RPI 3b (not b+) Bootloader in 32 bit mode.
Replies: 5
Views: 2207

Re: RPI 3b (not b+) Bootloader in 32 bit mode.

Thanks @DavidS. When I debugged below line in original source(raspbootcom.cc) was throwing compilation error. size = htole32(off); So I googled and found random solution that I didn't understand. Solution was to replace above line with following size = OSSwapBigToHostConstInt32(off); which was the r...
by zeoneo
Wed Nov 28, 2018 6:52 pm
Forum: Bare metal, Assembly language
Topic: Pi 3B+ Activity LED
Replies: 23
Views: 11975

Re: Pi 3B+ Activity LED

Thanks,

It worked out well.
by zeoneo
Wed Nov 28, 2018 6:47 pm
Forum: Bare metal, Assembly language
Topic: RPI 3b (not b+) Bootloader in 32 bit mode.
Replies: 5
Views: 2207

RPI 3b (not b+) Bootloader in 32 bit mode.

Hi guys, I am trying boot loader mentioned here ( https://github.com/mrvn/raspbootin ) on RPI3b. It didn't work even after Base address modification. So I decided to give it try using UART0 code mentioned here https://wiki.osdev.org/Raspberry_Pi_Bare_Bones . The serial program works and I am able to...
by zeoneo
Tue Oct 30, 2018 7:47 am
Forum: Bare metal, Assembly language
Topic: Pi 3B+ Activity LED
Replies: 23
Views: 11975

Re: Pi 3B+ Activity LED

Hi

I am trying to start with bare metal programming on RPI 3B+.

https://github.com/dwelch67/raspberrypi ... /blinker01

This is supposed to blink ACT led on 29th(Broadcom) GPIO pin, but it doesn't work. Anybody tried this?
by zeoneo
Sun Sep 30, 2018 7:01 am
Forum: Bare metal, Assembly language
Topic: Bare Metal RPI 3b UART not working
Replies: 2
Views: 662

Bare Metal RPI 3b UART not working

Hi guys, I have been trying to get basic uart working from 3 4 days. It just doesn't work. I am confused about 2 UARTs in raspberry pi 3b and how to activate them using config.txt. All the documentation talks about linux console etc. I am trying to get 32 bit kernel working which can send and receiv...

Go to advanced search