Go to advanced search

by zeoneo
Sun Jul 14, 2019 6:13 am
Forum: Bare metal, Assembly language
Topic: Virtual memory and linking
Replies: 21
Views: 6666

Re: Virtual memory and linking

However I am still trying to get a clear picture of what you are thinking is in and out of the virtualization on the kernel, even things like where do your interrupts go and perhaps where do they get processed? I am planning to run all the EL1 stuff from 2GB on wards. Userspace code will run in vir...
by zeoneo
Sun Jul 14, 2019 5:56 am
Forum: Bare metal, Assembly language
Topic: Virtual memory and linking
Replies: 21
Views: 6666

Re: Virtual memory and linking

I will agree to disagree it isn't worth worrying about because I would do it that way never, so I really don't care :) Same here. I am just posting the answer to my original question on how to use a linker script to generate single kernel binary file (boot section = 0x8000 and higher kernel half at...
by zeoneo
Sat Jul 13, 2019 4:02 pm
Forum: Bare metal, Assembly language
Topic: Virtual memory and linking
Replies: 21
Views: 6666

Re: Virtual memory and linking

Then it does subtracts -2,147,483,648 which adds 0x80000000 so you get your 0x80009000 It will be always positive no matter if it is 32 or 64 bits. Label __code_start comes after virt_start hence it is placed at a higher address than virt_start that's what I understand from it. Any clues on how to ...
by zeoneo
Sat Jul 13, 2019 12:48 pm
Forum: Bare metal, Assembly language
Topic: Virtual memory and linking
Replies: 21
Views: 6666

Re: Virtual memory and linking

Hi bzt,/LdB, I was trying to get away from this two-stage loading process, but now I think that was the mistake since I am trying tightly couple bootloader with kernel image. Only problem is how do I debug/test such kernel on qemu? On real hardware bootloader will set up the paging for kernel, what ...
by zeoneo
Sat Jul 13, 2019 10:37 am
Forum: Bare metal, Assembly language
Topic: Virtual memory and linking
Replies: 21
Views: 6666

Re: Virtual memory and linking

virt address is 0x80000000, and _code_start has to be less than 0x3F000000 the last address possible. I don't think it's correct. Checkout the kernel map file here (80009000 T __code_start) 0000804c t .NotInHypMode 8001a5ac t .udivsi3_skip_div0_test 00000040 a ARM_F_BIT 00000080 a ARM_I_BIT 0000001...
by zeoneo
Sat Jul 13, 2019 4:17 am
Forum: Bare metal, Assembly language
Topic: Virtual memory and linking
Replies: 21
Views: 6666

Re: Virtual memory and linking

Guys I am trying implement higher half kernel, but I think I am stuck in chicken egg problem. AFAK ttbr0 and ttbr1 needs physical addresses. I am using following linker script to link boot code at 0x8000 and kernel code at 2GB. I don't know how to find out the physical address of labels __first_lvl_...
by zeoneo
Sat Jun 01, 2019 4:44 am
Forum: Bare metal, Assembly language
Topic: Loading the kernel without the SD card
Replies: 5
Views: 1730

Re: Loading the kernel without the SD card

I can suggest the steps to debug. When I started using raspbootin 32 bit bootloader first I checked if serial UART is working? So i tried to send characters and hex data. When I verified data received from rpi is correct, then I compiled raspbootcom and sent some hex data from host computer, I would...
by zeoneo
Tue May 28, 2019 2:01 pm
Forum: Bare metal, Assembly language
Topic: Displaying fonts
Replies: 6
Views: 846

Re: Displaying fonts

Awesome..!

I will try your solution on pi 3b OPENVG.

Thanks bzt.
--zeo
by zeoneo
Sat May 25, 2019 7:37 am
Forum: Bare metal, Assembly language
Topic: A little Progress on my little OS Project:
Replies: 23
Views: 1947

Re: A little Progress on my little OS Project:

@Ldb it is interesting. I will go through it and see if I can make it work. I need to do lot of reading on TTF formats, how to create font texture from ttf and finally how to render it using VC4. I was searching for FreeType bare metal port but I guess I need to have basic user land support to cross...
by zeoneo
Fri May 24, 2019 9:56 am
Forum: Bare metal, Assembly language
Topic: A little Progress on my little OS Project:
Replies: 23
Views: 1947

Re: A little Progress on my little OS Project:

Hi David, FontMan module for font handling is working for most purposes. Does pretty well for most bitmapped font applications (missing a few transformations), vector font support is still very minimal. Does it load true type font ? Have you tried FreeType library to load fonts and render it using O...
by zeoneo
Mon May 20, 2019 5:08 am
Forum: Bare metal, Assembly language
Topic: Virtual memory and linking
Replies: 21
Views: 6666

Re: Virtual memory and linking

VBAR register sets it anywhere you like on a 4K byte aligned boundary, reset value is 0x0 I assume you are after EL1 http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0500j/CIHECBDH.html Yeah that's what I was exactly looking for. Thanks Ldb. Wow, that's a nearly 7 year thread necro. A...
by zeoneo
Sun May 19, 2019 10:36 am
Forum: Bare metal, Assembly language
Topic: Virtual memory and linking
Replies: 21
Views: 6666

Re: Virtual memory and linking

@romell, what did you do about exception vector table?

Currently I have exception table setup at 0x0. Can we change the exception table base address ?
by zeoneo
Sat May 11, 2019 2:36 pm
Forum: Bare metal, Assembly language
Topic: Bare metal BCM43438 Driver
Replies: 5
Views: 580

Re: Bare metal BCM43438 Driver

Thanks all for the replies. I will at least read the code and understand how it works.
by zeoneo
Sat May 11, 2019 4:09 am
Forum: Bare metal, Assembly language
Topic: Bare metal BCM43438 Driver
Replies: 5
Views: 580

Bare metal BCM43438 Driver

Hi,

I aim to port bare metal wifi driver for bcm43438. I did search in raspberrypi/linux repository but couldn't find any mention of bcm43438. Can any one point me to the correct source? I checked net/wireless/broadcom/ directory.
by zeoneo
Sun Apr 21, 2019 4:54 am
Forum: Bare metal, Assembly language
Topic: Alignment issues in porting CSUD for RPI 3B (32 Bit) with minimal changes
Replies: 45
Views: 3894

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

When you get a NAK it just gives you the last 4 bytes from the previous report back the spec says that. I do not parse the report when I get NAK, NYET, hence we do not worry about garbage input report. I think what you said in one of the update is true I finally realized. Interrupt transfer has onl...
by zeoneo
Sat Apr 20, 2019 5:50 pm
Forum: Bare metal, Assembly language
Topic: Alignment issues in porting CSUD for RPI 3B (32 Bit) with minimal changes
Replies: 45
Views: 3894

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

Hey I believe I made some progress. Earlier we were using HCDChannelSendWait and HCDChannelSendWaitOne routine in CSUD. But when we get NACK from Interrupt Endpoint it was retrying , as it was written that ACK is only acceptable. So I modified it when we get first NACK we return from HCDChannelSendW...
by zeoneo
Sat Apr 20, 2019 11:35 am
Forum: Bare metal, Assembly language
Topic: Alignment issues in porting CSUD for RPI 3B (32 Bit) with minimal changes
Replies: 45
Views: 3894

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

Result HcdSumbitInterruptOutMessage(struct UsbDevice *device, struct UsbPipeAddress pipe, void *buffer, uint32_t bufferLength, struct UsbDeviceRequest *request) { Result result; struct UsbPipeAddress tempPipe; if (pipe.Device == RootHubDeviceNumber) { return HcdProcessRootHubMessage(device, pipe, b...
by zeoneo
Sat Apr 20, 2019 9:56 am
Forum: Bare metal, Assembly language
Topic: Alignment issues in porting CSUD for RPI 3B (32 Bit) with minimal changes
Replies: 45
Views: 3894

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

I tried with OUT packet it didn't work. I didn't mean to offend you earlier, excuse me If you felt that way.
by zeoneo
Sat Apr 20, 2019 4:01 am
Forum: Bare metal, Assembly language
Topic: Alignment issues in porting CSUD for RPI 3B (32 Bit) with minimal changes
Replies: 45
Views: 3894

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

I agree with you that the STALL on the HID is saying it does not support HID report getting from control message. The fact you are getting an ACK after a couple of polls tells you that your poll code is correct. Now change the request after ACK to OUT not IN (IN = POLL) ... I know it's the wrong di...
by zeoneo
Fri Apr 19, 2019 9:12 am
Forum: Bare metal, Assembly language
Topic: Alignment issues in porting CSUD for RPI 3B (32 Bit) with minimal changes
Replies: 45
Views: 3894

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

Following code is working I think so because I got mouse X Y position I am not sure about the accuracy. 1. Send IN packet with 0 bufferLength in loop just to check if there is any interrupt. 2. Send IN packet with actual bufferLength which is equal to size of HID Report which reads data in buffer. R...
by zeoneo
Fri Apr 19, 2019 8:42 am
Forum: Bare metal, Assembly language
Topic: Alignment issues in porting CSUD for RPI 3B (32 Bit) with minimal changes
Replies: 45
Views: 3894

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

Endpoint address versus device address ... they are not the same. A device address can have many many endpoint addresses :-) . Or can we directly use existing HidGetReport function? You can try that first when you get an ACK .. if it doesn't then do the OUT method. I am not sure and it isn't covere...
by zeoneo
Thu Apr 18, 2019 5:36 am
Forum: Bare metal, Assembly language
Topic: Alignment issues in porting CSUD for RPI 3B (32 Bit) with minimal changes
Replies: 45
Views: 3894

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

I got what you are saying. Set up loop either using system timer with specified interval in endpoint descriptor. If any of the IN poll returns ACK then query HID report using control message with OUT phase having DATA= Usb request to get HID Report. Or can we directly use existing HidGetReport funct...
by zeoneo
Wed Apr 17, 2019 5:37 pm
Forum: Bare metal, Assembly language
Topic: Alignment issues in porting CSUD for RPI 3B (32 Bit) with minimal changes
Replies: 45
Views: 3894

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

/// HCD.c Result HcdSumbitInterruptMessage(struct UsbDevice *device, struct UsbPipeAddress pipe, void *buffer, uint32_t bufferLength, struct UsbDeviceRequest *request) { Result result; struct UsbPipeAddress tempPipe; if (pipe.Device == RootHubDeviceNumber) { return HcdProcessRootHubMessage(device, ...
by zeoneo
Tue Apr 16, 2019 5:19 pm
Forum: Bare metal, Assembly language
Topic: Alignment issues in porting CSUD for RPI 3B (32 Bit) with minimal changes
Replies: 45
Views: 3894

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

Hey I checked there is no support for polling Interrupt Endpoint in CSUD. All that we have is we can send control messages. Everything is hardcoded to control endpoint. I found it very difficult to add interrupt transfer code there. I am again reading docs :(. There is no end to complexity of USB sp...
by zeoneo
Mon Apr 15, 2019 4:31 pm
Forum: Bare metal, Assembly language
Topic: Alignment issues in porting CSUD for RPI 3B (32 Bit) with minimal changes
Replies: 45
Views: 3894

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

LdB wrote:
Mon Apr 15, 2019 9:35 am
Otherwise going to need to setup a timer to generate the suggested fixed period IN polls so it feels loved.

:D :D

Hi I didn't get chance to work on this past 4,5 days. I will definitely try out your solution sometime tomorrow.

Thanks

Go to advanced search