Go to advanced search

by LdB
Wed Jul 17, 2019 11:23 pm
Forum: Bare metal, Assembly language
Topic: Reserving cores for bare-metal programs - interupts
Replies: 21
Views: 711

Re: Reserving cores for bare-metal programs - interupts

You don't have the core in baremetal at all, you need to stop referring to it as such. It's idling in linux with no tasks being scheduled to the core via affinity is all that is happening. The task switcher is clearly still active and the 1ms interrrupt is the reschedule tick. I just pulled up isolc...
by LdB
Wed Jul 17, 2019 1:47 am
Forum: Bare metal, Assembly language
Topic: Reserving cores for bare-metal programs - interupts
Replies: 21
Views: 711

Re: Reserving cores for bare-metal programs - interupts

Heater you still seem somewhat confused 1.) You need to understand how Interrupts work on linux can I recommend https://www.oreilly.com/library/view/linux-device-drivers/0596005903/ch10.html The irq signal itself and the processing of that irq are divorced in linux and you really need to understand ...
by LdB
Mon Jul 15, 2019 1:34 am
Forum: Bare metal, Assembly language
Topic: Kernel switcher... kernel?
Replies: 4
Views: 235

Re: Kernel switcher... kernel?

You are after a boot loader/manager they just install themselves in the master boot record and control things from there.. there are a truckload of them Wiki has a small list of what will be a very large list https://en.wikipedia.org/wiki/Comparison_of_boot_loaders The more modern way is UEFI https:...
by LdB
Mon Jul 15, 2019 1:26 am
Forum: Bare metal, Assembly language
Topic: Reserving cores for bare-metal programs - interupts
Replies: 21
Views: 711

Re: Reserving cores for bare-metal programs - interupts

I don't use linux a lot but according to the linux manual on boot parameters, so I apologize if wrong 'nosmp' and 'maxcpus=N' (Only when __SMP__ is defined.) A command-line option of 'nosmp' or 'maxcpus=0' will disable SMP activation entirely; an option 'maxcpus=N' limits the maximum number of CPUs ...
by LdB
Sun Jul 14, 2019 9:22 am
Forum: Bare metal, Assembly language
Topic: Reserving cores for bare-metal programs - interupts
Replies: 21
Views: 711

Re: Reserving cores for bare-metal programs - interupts

You obviously know how linux interrupts work so even if it routed to your baremetal core just take the interrupt ignore it and return, a few clock cycles. You control the core VBAR register so linux can go whistle dixie even if it did route you the interrupt. You usually have to provide coverage tab...
by LdB
Sun Jul 14, 2019 3:30 am
Forum: Bare metal, Assembly language
Topic: Reserving cores for bare-metal programs - interupts
Replies: 21
Views: 711

Re: Reserving cores for bare-metal programs - interupts

Sorry heater I missed that initial bit about the linux on the other cores, I just read the last couple of posts which were all baremetal and thought you were down the wrong path. But I suppose the main thing is not that so much removing any delays due to Linux but ensuring they don't affect the audi...
by LdB
Sun Jul 14, 2019 3:06 am
Forum: Bare metal, Assembly language
Topic: Virtual memory and linking
Replies: 21
Views: 6630

Re: Virtual memory and linking

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. I will agree to disagree it isn't worth worrying about because I would do it that way never, so I really do...
by LdB
Sun Jul 14, 2019 2:33 am
Forum: Bare metal, Assembly language
Topic: gcc-aarch64-linux-gnu on a RP4
Replies: 2
Views: 178

Re: gcc-aarch64-linux-gnu on a RP4

Not tried it but I would imagine the official ARM pre-compiled should do the trick
https://developer.arm.com/tools-and-sof ... /downloads
Right hand side download the linux 64 bit version
by LdB
Sat Jul 13, 2019 3:37 pm
Forum: Bare metal, Assembly language
Topic: Reserving cores for bare-metal programs - interupts
Replies: 21
Views: 711

Re: Reserving cores for bare-metal programs - interupts

Not following that heater.. what does any of that have to do with a Pi4 under baremetal (aka there is no liunx)?
by LdB
Sat Jul 13, 2019 3:32 pm
Forum: Bare metal, Assembly language
Topic: Virtual memory and linking
Replies: 21
Views: 6630

Re: Virtual memory and linking

I don't think it's correct. Checkout the kernel map file here (80009000 T __code_start) I had to sit and work that out and it works because the offset is a 32 bit integer and 0x80000000 is minus 2,147,483,648 That is why it's a subtraction minus a negative becomes a positive :-) So your section sta...
by LdB
Sat Jul 13, 2019 10:18 am
Forum: Bare metal, Assembly language
Topic: BCM2711B0
Replies: 30
Views: 1356

Re: BCM2711B0

Can 3 cores run 64bit and one run 32bit? Yes but that would be rare and sort of silly given any Core in 64 bit can run a 32bit O/S or APP anyhow Same as on an Intel any 686, Pentium or whatever can still run old 386 code. It can even get more sophisticated than that https://en.wikichip.org/w/images...
by LdB
Sat Jul 13, 2019 8:44 am
Forum: Bare metal, Assembly language
Topic: BCM2711B0
Replies: 30
Views: 1356

Re: BCM2711B0

I can add you do get hit occasionally by the "out of order execution" and you have WTF is that bug moments :-) The fun part is Disassembling https://static.raspberrypi.org/files/rpi-boot-eeprom-recovery-2019-05-10.zip The modified bootstub for the BC2711 is up in case anyone missed it https://github...
by LdB
Sat Jul 13, 2019 7:38 am
Forum: Bare metal, Assembly language
Topic: Virtual memory and linking
Replies: 21
Views: 6630

Re: Virtual memory and linking

I can't make sense of some of what or why you want to do some things but i will answer what I can ttbr0 and ttbr1 have to be physical addresses they are the start point for locating the virtual tables. At assembler level the address of __code_start is simply something like ldr r0, =__code_start I am...
by LdB
Mon Jul 08, 2019 5:08 pm
Forum: Bare metal, Assembly language
Topic: Problem with handling multiple functions
Replies: 22
Views: 634

Re: Problem with handling multiple functions

Yep so you have an original Pi3B not the newer Pi3B+.

So you can only flash onboard LED's thru mailbox if you want to use GPIO you have to have an actual LED on a GPIO port.
by LdB
Mon Jul 08, 2019 2:57 pm
Forum: General programming discussion
Topic: GUI Editor Code Challenge
Replies: 174
Views: 3455

Re: GUI Editor Code Challenge

I am with what heater said if you really were going to mess around with this you might as well go for VS-CODE which is pretty dam amazing. If you want a web only solution go to VS-CODE start point the monaco editor. https://microsoft.github.io/monaco-editor/ Scott Hanselman has the script for VSCODE...
by LdB
Mon Jul 08, 2019 2:38 pm
Forum: Bare metal, Assembly language
Topic: Problem with handling multiple functions
Replies: 22
Views: 634

Re: Problem with handling multiple functions

I started reading your posts from top ... you tried compiling for 64bit I take it you are on a Pi3 and you assembler has an address 0x3f200000 This is specifically Pi1, PiZero only ... it tells you on the text read it https://github.com/dwelch67/raspberrypi/tree/master/blinker01 If you open blinker0...
by LdB
Mon Jul 08, 2019 10:24 am
Forum: Bare metal, Assembly language
Topic: Problem with handling multiple functions
Replies: 22
Views: 634

Re: Problem with handling multiple functions

Problem bl main Main does no exist anywhere in your code. You have a notmain which is probably where you wanted to go (that is very David Welch he tends to use that rather than main like most). Change one or the other so it makes sense. You GPIO set routine is also fundementally flawed .. look at th...
by LdB
Fri Jul 05, 2019 5:54 pm
Forum: Bare metal, Assembly language
Topic: Spider-OS a new operating system
Replies: 102
Views: 11149

Re: Spider-OS a new operating system

Can we stop the confusion ... OpenGL and GLES are standards they say nothing for how you implement. https://en.wikipedia.org/wiki/OpenGL The OpenGL specification describes an abstract API for drawing 2D and 3D graphics. Although it is possible for the API to be implemented entirely in software , it ...
by LdB
Fri Jul 05, 2019 1:26 am
Forum: Bare metal, Assembly language
Topic: Turning on ACT led on RPi 3 B+
Replies: 10
Views: 737

Re: Turning on ACT led on RPi 3 B+

The ARM8 prefers natural alignment 8 bits can be any byte aligned 16bits it wants 16 bit alignment ( 2 byte) ... half word opcodes 32 bits it wants 32 bit alignment 64 bit can be 32 but it prefers 64 for speed Function arguments that are structs are padded to multiples of 8 bytes It can store and lo...
by LdB
Thu Jul 04, 2019 3:50 am
Forum: Bare metal, Assembly language
Topic: Raspbery Pi 3 Undefined instruction
Replies: 11
Views: 410

Re: Raspbery Pi 3 Undefined instruction

Code doesn't seem to do anything wrong on real Pi3, I get the message "made it this far" etc

What exactly goes wrong?
by LdB
Thu Jul 04, 2019 1:31 am
Forum: Bare metal, Assembly language
Topic: Spider-OS a new operating system
Replies: 102
Views: 11149

Re: Spider-OS a new operating system

Can I send you some other stuff on videocore to document :-) ... really nice writeup I can never make the time or effort.

I have worked out a pile of stuff with the Pi4 that I really need to do that sort of thing with but I am lazy.
by LdB
Wed Jul 03, 2019 12:53 pm
Forum: Bare metal, Assembly language
Topic: Help WIth GPIO C module
Replies: 11
Views: 441

Re: Help WIth GPIO C module

Looks right now ... mine aren't much different bool gpio_output (unsigned int gpio, bool on) { if (gpio < MAX_GPIO_NUM) // Check GPIO pin number valid { volatile uint32_t* p; uint32_t bit = 1 << (gpio % 32); // Create mask bit p = (on) ? &GPIO->GPSET[0] : &GPIO->GPCLR[0]; // Set pointer depending on...
by LdB
Wed Jul 03, 2019 7:25 am
Forum: Bare metal, Assembly language
Topic: Raspbery Pi 3 Undefined instruction
Replies: 11
Views: 410

Re: Raspbery Pi 3 Undefined instruction

I think 0x200 is simply the vector table address you add the VBAR to it ... let me have a look Probably try moving where you set the VBAR down to when you have switched to EL1 rather than up in EL2 just in case QEMU has a bug. That is just a random thought I will take a look tonight. VBAR_ELn + 0x00...
by LdB
Wed Jul 03, 2019 6:57 am
Forum: Bare metal, Assembly language
Topic: Turning on ACT led on RPi 3 B+
Replies: 10
Views: 737

Re: Turning on ACT led on RPi 3 B+

No you can store a 64 bit register directly in memory so anywhere outside the peripheral bus is fine. The only things hard set 32bit is the peripheral bus specifically on the Pi3 anything between 0x3f000000-0x40010000 That is all the peripherals on this datasheet https://www.raspberrypi.org/app/uplo...
by LdB
Wed Jul 03, 2019 6:55 am
Forum: Bare metal, Assembly language
Topic: Help WIth GPIO C module
Replies: 11
Views: 441

Re: Help WIth GPIO C module

I would assume so but your write and read have same C pointer bug did you fix them?
Basically anywhere you used this "BYTEDIFF" is bugged

Yes this makes more sense

Code: Select all

if (pin > GPIO_PIN_LAST)

Go to advanced search