<bslsk05>
github.com: linux/bcm283x.dtsi at aeaa2460db088fb2c97ae56dec6d7d0058c68294 · raspberrypi/linux · GitHub
<clever>
this then has platform specific data, that 1 understands
<ddevault>
namely if /:compatible == raspberrypi then the pl011 driver will overreach and configure other things as well
<clever>
so when the uart driver wants to enable the uart, it can just pass this object to the gpio driver
<ddevault>
I see
<clever>
clocks = <&clocks BCM2835_CLOCK_UART>,
<clever>
and this line within uart0, says to talk to the clock driver
<clever>
and ask for the uart clock
<clever>
clocks = <&clocks BCM2835_CLOCK_UART>,
<clever>
clocks: cprman@7e101000 {
<clever>
compatible = "brcm,bcm2835-cprman";
<clever>
and this then says which clock driver to use
<ddevault>
right
<clever>
so you need a brcm,bcm2835-cprman driver, that understands that BCM2835_CLOCK_UART refers to CM_UART{DIV,CTL}
<ddevault>
another thing which is frustrating here is that I have a micro-kernel and it really shouldn't contain any drivers other than the serial port for debug logging
<ddevault>
but to make this not hacky I will need more drivers
<clever>
either assume the uart is pre-configured by a previous stage, or just dnt do uart until userland has setup the hw for you
<ddevault>
hm, maybe I can just assume that the uart just werks
<ddevault>
edk2 sets it up after all
<ddevault>
let's try just writing to UARTDR and seeing what happens
<clever>
i do similar in several of my stages
<clever>
the 1st stage brings the uart up, and the later stages just blindly write to the data fifo
<clever>
the start.S i linked above, is bringing the uart up before the bloody stack or dram!!
<clever>
so i can then print debug while setting up the ram
<clever>
and thats why its not using DT or anything smart
<clever>
but its also written in an assembly language only the pi can run
<clever>
so it cant run on the wrong device!
<ddevault>
precisely what I want to avoid
<ddevault>
making an earlier stage set it up is a good idea
<clever>
when i was debugging eret code before, i wrote a .S macro, that would use some unused regs, and print a single char to the uart, ignoring all setup
<clever>
and thats how i was able to debug that i was in the wrong EL
<clever>
originally, the rpi firmware ran kernel.img in EL1
<clever>
but then people wanted hypervisor support in linux, so it was modified to run kernel.img in EL2
<ddevault>
I am happy that the world has collectively agreed upon the same set of sane default serial settings
<clever>
and lk-overlay wasnt able to drop from EL2->EL1
<clever>
and crapped the bed, when it setup EL1's mmu, then jumped to a virtual addr, while still in EL2!
<clever>
i need to revisit that firmware code more, and try to get uboot and efi going
bgs has joined #osdev
<ddevault>
hah, another pebkac
<ddevault>
been spending so much time on my bootloader that I kept copying /only/ the bootloader to the microSD card when I wanted to test new kernels instead
<clever>
tried netboot or usb-device boot?
<clever>
it speeds up development massively
<ddevault>
usb has issues
<ddevault>
might do netboot at some point
<ddevault>
or update my bootloader to pull the kernel over serial
<bslsk05>
www.raspberrypi.com: Raspberry Pi Documentation - Raspberry Pi hardware
<ddevault>
by issues I mean I put my EFI bits on a flash drive and booted it up and it didn't even make it to edk2 and I spent no further time debugging it
<clever>
2 is network boot
<ddevault>
other fish require frying at this stage
<clever>
3 is usb-device boot, the usb-c port, to another pc!
<clever>
4 is usb-host via an xhci card, the main 4 usb-a ports on a pi4
<clever>
but now that you say efi, that reminds me, the efi firmware has its own range of supported sources, and may not agree with all of those fancy options
<clever>
and edk2 has its own http based netboot
<ddevault>
http netboot?
<clever>
most of my dev cycles involve either tftp or usb-device
<clever>
so i just run `make`, whack the reset button, and it runs
<clever>
no need to copy any files, or juggle cards
<ddevault>
that sounds comfy
<ddevault>
except that the rpi4 does not have a reset button, the bastards
<clever>
it does
<clever>
the RUN header
<ddevault>
it has some pins I can short
<clever>
yep
<ddevault>
requires work(TM)
<clever>
i put the reset button from an old PC case onto those pins
<bslsk05>
github.com: lk-overlay/slideshow.c at master · librerpi/lk-overlay · GitHub
<clever>
this is an arm-less demo of the 2d stack
<ddevault>
hehe
<ddevault>
seems you had the same idea, eh
<clever>
it loads a dir of tga files from an SD card
<clever>
and then cycles thru them
<clever>
its heavily async in its design
<clever>
there is one array of loaded images, and a thread flips thru them at regular intervals on vsync
<clever>
a different thread then decodes the images and inserts them into the array
<clever>
so there isnt any stuttering from loading images
<ddevault>
nice
<clever>
and once loaded, every image is a 2d bitmap in ram, and never loads again
<ddevault>
I don't have anything quite so fancy in mind
<clever>
but that limits the total image count, because it caches them all uncompressed
<ddevault>
I will probably at least do vsync to avoid tearing because that'd be embarassing
<clever>
for the 2d core, you give it a list of images
xenos1984 has quit [Read error: Connection reset by peer]
<ddevault>
I'm doing a talk about Hare in february and I want to present the slide deck from a device running an OS written in Hare
<ddevault>
just doing dumb framebuffers, I only have five weeks lol
<clever>
for each image, you give it a dest XY, a source WH, a dest WH, a stride, a pixel format, and the addr in ram
<clever>
the hw will dynamically fetch image data and composite it on the fly, racing against the electron beam
<clever>
if designed right, you can have zero-copy rendering
<clever>
on vsync, you just change the pointer to the latest frame
<ddevault>
aye
<ddevault>
I may experiment with cleverer approaches depending on how soon I have the kernel port done
<clever>
but there are some complications in the pi4 case
<clever>
the 2d core, can only read the lower 1gig of physical ram
<clever>
so you must allocate your framebuffers from that region
<ddevault>
I'm reasonably confident I can have a framebuffer online and can just blit slides into it within five weeks
<ddevault>
anything more than that is a bonus
<clever>
and they must be physicall contigious
<ddevault>
good to know, thanks
<ddevault>
might have to rejigger some stuff
<clever>
linux solves that with the CMA heap, a dedicated region of ram for large buffers
<clever>
but it can still suffer from fragmentation
rorx has joined #osdev
<clever>
the official firmware solves it with a relocatable heap (also seen on no-mmu palmos)
<clever>
where all objects are referenced by a handle, not a pointer
<clever>
and they can be dynamically moved to defrag the heap
<ddevault>
in demo mode, not good long-term solutions mode
<ddevault>
will get there
<clever>
the lock() function will return the current phys addr, and stop it from moving
<clever>
unlock() allows it to move again, and you must forget the phys addr
<ddevault>
in fact after the demo I'm likely to forget about aarch64 entirely for a while and go back to focusing on x86_64
<ddevault>
will probably set up CI so I don't break it, though
<clever>
my CI produces a zip file, that you can just unpack to a freshly formatted fat32
<clever>
and that will then boot
<clever>
includes everything, firmware, config, kernel, dtb
Burgundy has joined #osdev
<ddevault>
not doing SoC-specific builds
<ddevault>
my build outputs the kernel as an ELF file and the bootloader as an EFI PE/COFF executable
<ddevault>
rest is on you
<clever>
ah
<clever>
in m case, my whole project is to replace the rpi firmware
<ddevault>
to be fair, "the rest" is not much
<ddevault>
drop edk2 bits on an SD card
<clever>
so the firmware is the primary output of CI
<ddevault>
stick bootloader at /EFI/boot/bootaa64.efi
<ddevault>
drop kernel at /
<ddevault>
and that's it
<ddevault>
add a dtb at /helios.dtb or (better) turn on device tree mode in the edk2 settings
freemint has joined #osdev
<clever>
ddevault: one thought i just had, make an x86_64 efi bootloader, that reads acpi, turns it into DT, and then runs your kernel
<clever>
then the kernel can expect DT even on x86
<clever>
that would also allow it to work on non-dtb arm
<ddevault>
I do want to make an x86_64 bootloader at some point
<ddevault>
but DT is foreign enough on x86_64 that I'd rather not include it
<clever>
its either that, or some custom bootloader<->kernel api
<ddevault>
I do have something like a custom bootloader<>kernel API
<ddevault>
my kernel is just an ELF file because fuck anything else
<ddevault>
first ABI parameter includes boot details
<ddevault>
on aarch64 this is some custom stuff including kernel load address and device tree address
<ddevault>
on x86_64 this is the multiboot header
<clever>
ive also made my own protocol, but for cases where i cant control the initial values of registers
<clever>
there is a magic# within the sections the ELF loads
<clever>
and after that is a pointer to some dtb
<clever>
the bootloader searches for the magic, and fills in the pointer
<clever>
but its also not standard device-tree
<clever>
i'm just abusing the dtb libs to ferry over a custom tree of props
<clever>
like how you might use json to feed whatever to something
<freemint>
I am using RockyLinux 8.6 but this community might have the expertise to help with my question. I got an PCIe card with 24GB on board memory ( https://en.wikichip.org/wiki/nec/vector_engine/type_10c ). The driver fails to initialize it. From getting the same card working before in a different PC i know that the issue is that the Region 0 according lspci is smaller than it should be, once that is fixed the card worked. In a
<freemint>
Fujitsu Primergy TX140 S2 (xeon e3-1230v3, 16 GB RAM) Region 0 is 128 MB when it should be >=24 Gigabytes. I got above 4g decoding enable in BIOS. Does someone have suggestions how to debug this?
<bslsk05>
en.wikichip.org: Vector Engine Type 10C - NEC - WikiChip
xenos1984 has joined #osdev
<ddevault>
the debug build of edk2 is unironically better than the release build even for "production", I think
ZipCPU has quit [Ping timeout: 252 seconds]
ZipCPU has joined #osdev
ZipCPU has quit [Ping timeout: 272 seconds]
ZipCPU has joined #osdev
poisone has quit [Ping timeout: 268 seconds]
gog has joined #osdev
ZipCPU has quit [Ping timeout: 248 seconds]
ZipCPU has joined #osdev
<kaichiuchi>
merry christmas eve losers
<gog>
thanks
<Mutabah>
Said at 9PM for me... it's the 25th for most Australians, and all of NX
<Mutabah>
*NZ
gxt has quit [Remote host closed the connection]
gxt has joined #osdev
kof123 has quit [Quit: Leaving.]
<kaichiuchi>
amazing
<kaichiuchi>
since the lastpass breach, someone has tried to get into my github and my gmail
<zid>
someone's been trying to log into my spotify for the past 10 years
<zid>
I'm too lazy to actually log into spotify and change the password
<Mutabah>
zid: Is that somebody you?
<zid>
no, ludde gave me alpha access directly and I've not really used it since
Left_Turn has joined #osdev
bauen1 has quit [Ping timeout: 255 seconds]
Krypta has joined #osdev
poisone has joined #osdev
merry has joined #osdev
poisone has quit [Read error: Connection reset by peer]
poisone has joined #osdev
foudfou has quit [Remote host closed the connection]
foudfou has joined #osdev
[itchyjunk] has joined #osdev
Burgundy has quit [Ping timeout: 268 seconds]
foudfou_ has joined #osdev
foudfou has quit [Ping timeout: 255 seconds]
joe9 has joined #osdev
poisone has quit [Read error: Connection reset by peer]
invalidopcode has quit [Remote host closed the connection]
<zid>
relating to the place or time of one's birth.
<heat>
nata = cream
<zid>
yes
<heat>
pastel = pastry
<zid>
natal = cream
<heat>
no
<zid>
creampie -> pastel de nata
<heat>
natal = relating to the place or time of one's birth
<heat>
OMFG
xenos1984 has quit [Ping timeout: 256 seconds]
<heat>
natal also means christmas
<heat>
go figure
<zid>
birthmas
<zid>
felix navidad, the birth of my cat
<heat>
pastel would be "lápis pastel" in portuguese
<heat>
for maximum confusion
<zid>
yes, pastel is pastry, but blue pastry is 'any light colour', got it
<heat>
no
<heat>
lápis = pencil
<zid>
no, lapis = blue
<heat>
are you even taking notes zid
<heat>
I said lápis, not lapis
<zid>
I am trying, but the portageese keep making false friends
<heat>
shut up
<heat>
i read a red book and it was a great read
<zid>
There's a classic joke about that
<zid>
"What's black and white and re(a)d all over?" "A newspaper"
<zid>
and on the theme of colours, "What's brown and sticky?" "A stick"
GeDaMo has quit [Quit: That's it, you people have stood in my way long enough! I'm going to clown college!]
<gog>
heat: we have jólinn and annað jólinn
vdamewood has joined #osdev
<gog>
jólin*
<zid>
what does annath mean
k0valski18891 has joined #osdev
xenos1984 has joined #osdev
rorx has quit [Ping timeout: 268 seconds]
<kof123>
irony, its like bronzey and silvery
<heat>
2hard2type
<heat>
gog, merry jóadlajdand
* vdamewood
gives gog a fishmas
<gog>
annað means second
<gog>
boxing day is second christmas
<zid>
which kind of secon- oh that kind
<zid>
biterary type
<vdamewood>
"We've already had Christmas." "We've had one, but what about second Christmas?"
<zid>
(although the other meaning if second still means the same thing, literally is the 1 less than third hand of a clock)
* gog
chomp fishmas
<vdamewood>
zid: FWIW, seconds are so called because they used to be called 'second minutes', or the second division of a degree or hour.
<zid>
basically what I said yea
<zid>
english has no words to measure time either they're all co-opted from distance
<zid>
"a long time" "A short while"
<vdamewood>
AH, I meant that do support the idea that it's likely that the other meaning applies in other languages as well.
<vdamewood>
s/that do/that to/
<zid>
other languages don't exist sorry
<zid>
There's english, and people who can't speak english yet
<vdamewood>
What about Klingon?
<vdamewood>
Or rather tlingan Hol
<zid>
I checked japanese, I'm a weeb not a nerd
<Ermine>
gog: are you from Sweden?
<gog>
no i'm american
<zid>
seconds of time are just <a kanji> second(ary) is just 2order
<zid>
2ary world war
<zid>
2ary world big battle
<gog>
L + ratio + you fell off + yalta conference is gonna fuck you over
<zid>
Ermine: You can't just go around insulting people like that
<zid>
gog: Get the drífa
<Ermine>
zid: did I say something insulting?
<zid>
The previous thing you said
<gog>
i'm pan-nordic
<zid>
I'm pro make denmark great again
<gog>
eveerybody talks to me in icelandic
<gog>
and i gotta be like ég tala ekki
<vdamewood>
gog: Because it's fun!
<zid>
"Let's just both speak english eh?" is the correct response to being talked at in swedish
<gog>
i have imposter syndrome about it
<vdamewood>
What about Sourish?
<vdamewood>
All the taste languages: Sweedish, Sourish, Bittrish, Saltian, and Umamigo
<Ermine>
Hm, sorry if anybody got offended by that question...
<FireFly>
zid: allegedly people just switch to english anyway if there's a slight accent
<vdamewood>
Ermine: (It was a joke.)
<zid>
FireFly: yea fairly normal in the netherlands/germany/etc
<zid>
if you try speak german they will just english you back, better than your german
<FireFly>
I wish lol
<FireFly>
usually theystick to german, usually younger folks know english tho :p
<heat>
zid, 2ary earth big shooty shooty
<vdamewood>
A Persian guy once told me I don't have an accent.
<zid>
My main german friend speaks spanish english and russian as well >_<
<zid>
My main portugeese friend is a goose
<heat>
whew
<heat>
thank god i'm not a goose
<vdamewood>
I want to get a pet goose and name it untitled.
<zid>
(heat is british)
<FireFly>
I guess it's a bit unreasonable but I kinda mentally expect english as a meet-in-the-middle option..
<heat>
zid, does that mean i'm a successful scottish?
<vdamewood>
FireFly: Yeah, it's equally hard for everyone.
<zid>
heat: no, british is english, unless you're scottish but did something amazing
<zid>
scottish doing bad thing -> scottish, english doing bad thing -> british, scottish doing good thing -> british, english doing good thing -> english
<zid>
those are the rules
<vdamewood>
zid: So, you're saying the Scots aren't brittish, they're just brit-ish.
<FireFly>
when I got to belgium-then-uk last summer it took a bit of time to mentally switch away from german as default language
<zid>
getting to belgium is always confusing mentally
<vdamewood>
FireFly; How dare you say such a vulgarity in the channel?
<zid>
"Why does this country exist?"
<FireFly>
zid: :v
<FireFly>
like ordering at a restaurant or sth and defaulting to german
<vdamewood>
Don't you know that Belgium is the rudest word in the Universe?
<zid>
I am thankful to god for belgium
<zid>
It gives somewhere for france and germany to bomb each other
<FireFly>
"the battleground of europe"
<vdamewood>
There's also Poland
<zid>
poland exists to stop lithuanian taking over the world
<zid>
s/an/a
<FireFly>
:o
<vdamewood>
ithuaian?
<vdamewood>
lithuaian?
<zid>
PLC stronk
<vdamewood>
Actually, it would have been Polad
<zid>
yes, polash and lithuanian commonwealth
<gog>
meow
Burgundy has joined #osdev
gareppa has quit [Quit: Leaving]
<MelMalik>
zid, the rules sound like a colonial playbook
<MelMalik>
also belgium exists because feudalism. The same reason most small countries in Europe exist, and why Prussia was a thing until the '30s, and finally abolished de iure in the '40s.
<zid>
you know none of that was serious right?
<zid>
wasn't politic it was bant
<MelMalik>
it could easily have been interpreted as a serious call for scottish independence
* gog
bants zid
<zid>
only if one were to have no sense of humor
<zid>
and then struggled to find an alternate meaning
<MelMalik>
which, by the way, yes. dissolving the acts of union, at least the schedules that aren't in desuetude due to the end of feudalism or other reasons, is an idea whose time has come
<zid>
kay so you're literally here just to espouse political beliefs, that's easy enough to deal with
<MelMalik>
i am not
<MelMalik>
temptation is hard to resist, however
<MelMalik>
i take it that's the sound of a fish being put in an empty barrel
<gog>
it's a fish being put into my empty mouth
* gog
chomp fishy
* MelMalik
shakes her entire head
<zid>
Disregard fishy, acquire mini sausage rolls
<zid>
and hot sauce
<MelMalik>
you were never fun to watch talk anyway
<gog>
best i can do is fishy
<gog>
also i stan scottish independence fwiw
<zid>
your hotsauce is made of literal lava
<zid>
tom scott isn't allowed any though
<gog>
lol
<gog>
poor tom
<MelMalik>
that escalated quickly
rorx has joined #osdev
elastic_dog has quit [Ping timeout: 252 seconds]
elastic_dog has joined #osdev
<heat>
zid would never say anything anti-union
<heat>
he still wants to get knighted by le charles and get a cushy spot in the house of lords
<heat>
Sir zid OBE sounds siiiiiiiiiiiiiiiiick
<zid>
I can't afford to buy an OBE!
bauen1 has joined #osdev
<heat>
being born poor doesn't mean you can't get an OBE
<heat>
just get rich and win 7 F1 world championships
<heat>
they'll forget you were poor after the 4th and they'll consider it after the 6th
<zid>
(There was a scandal where it was discovered, that shock horror, the conservative party was giving decorations to heavy donors)