<klange>
needed to support one more reloc, but got a few more generic driver modules building and loading, ext2 iso9660 and the dos/mbr partition table mapper
<klange>
meanwhile, far away from that, trying to write a better edge stroker and make my "system monitor" graphs more dynamic
nyah has quit [Ping timeout: 240 seconds]
Likorn has quit [Quit: WeeChat 3.4.1]
epony has quit [Ping timeout: 260 seconds]
mahmutov has joined #osdev
sonny has joined #osdev
sonny has quit [Ping timeout: 250 seconds]
gog has quit [Read error: Connection reset by peer]
dude12312414 has quit [Quit: THE RAM IS TOO DAMN HIGH]
Vercas has quit [Remote host closed the connection]
Vercas has joined #osdev
bradd has quit [Remote host closed the connection]
bradd has joined #osdev
gxt has quit [Ping timeout: 240 seconds]
gxt has joined #osdev
the_lanetly_052_ has quit [Ping timeout: 240 seconds]
<Clockface>
does GCC C compiled to PIE always use BX to store the base address?
<moon-child>
I don't know. But why do you care?
<Clockface>
mixing assembly and C in position indipendent kernel modules
<zid>
If you're mixing them within a TU, the compiler does the register allocation for both
<zid>
if you're mixing them between TUs you have to follow the ABI
<zid>
it's not a problem you have to think about
Mikaku has quit [Quit: server maintenance ...]
Mikaku has joined #osdev
jjuran has quit [Ping timeout: 256 seconds]
jjuran has joined #osdev
gog has joined #osdev
vimal has joined #osdev
arvimal has joined #osdev
vimal has quit [Ping timeout: 248 seconds]
gog has quit [Read error: Connection reset by peer]
haliucinas has quit [Ping timeout: 250 seconds]
epony has joined #osdev
gildasio has quit [Ping timeout: 240 seconds]
Oshawott has quit [Ping timeout: 240 seconds]
archenoth has joined #osdev
Burgundy has joined #osdev
Likorn has joined #osdev
zid has quit [Ping timeout: 276 seconds]
GeDaMo has joined #osdev
pretty_dumm_guy has joined #osdev
pretty_dumm_guy has quit [Client Quit]
pretty_dumm_guy has joined #osdev
netbsduser has quit [Read error: Connection reset by peer]
netbsduser has joined #osdev
scoobydoo has quit [Ping timeout: 256 seconds]
scoobydoo has joined #osdev
nyah has joined #osdev
knusbaum has quit [Ping timeout: 250 seconds]
knusbaum has joined #osdev
pg12 has quit [Ping timeout: 246 seconds]
pg12 has joined #osdev
aejsmith has quit [Ping timeout: 256 seconds]
aejsmith has joined #osdev
zid has joined #osdev
<zid>
oopsie
<zid>
knocked a mug off my desk and killed my router, no lights and it wouldn't give me any back after a power cycle
<zid>
left it to dry for a couple of hours and I'm back
<zid>
managed to corrupt mirc's settings somehow messing with things though which is fun, it's a dick to reconfigure
Mutabah has quit [Ping timeout: 250 seconds]
Mutabah has joined #osdev
<mjg>
it may still die
<mjg>
what did you spill on it
<zid>
dregs of a coffee
<zid>
I assume it developed a minor short, power rails dipped too low for it to stay powered up
<zid>
dried out, no more short
<mjg>
well several yeras back i spilled some pepsi on a thinkpad
<mjg>
worked fine
<mjg>
apart from some keys malfunctioning
<mjg>
died the next day
<zid>
keyboards are a bugger to get moisture out of
<zid>
the plastic with the traces drawn on it wets and wicks the moisture
<mjg>
i mean the laptop died :-P
<zid>
may have literally just been a persistent short in the keyboard
<mjg>
so you know, i would be online browsing for a new laptop
<zid>
and it wouldn't post because of it, something really inoccuous
<mjg>
it did not want to pwer on afair
<mjg>
i mean turbo dead
<zid>
it won't "power on" until it's posted enough though if it's a PC, which I assume it was
<mjg>
s/new latop/new router/
<zid>
my mobo has fancy POST code output and the board is 'dead' until it gets far enough
<mjg>
by that i meant diods were also off
<mjg>
no nothing
<zid>
other than the 7-segment output
<mjg>
may as well be unplugged from power
<zid>
then a bunch of lights come on etc
<zid>
power management over a mobo is super complex
<zid>
laptops don't use atx power connectors though so it may be slightly simpler, but it has to short various pins to ask for various rails to even be turned on etc
<mjg>
my previously damaged laptops at least had the power indicator on
<zid>
just depends how they're designed, half the mobo might be powered up without any lights on to save juice in standy, or it might light up like a christmas tree
<zid>
I've had various mobos do various things on a desktop
<zid>
some that are completely silent but still drawing power (running the CMOS clock off the mains instead of the battery, keeping the ethernet controller alive waiting for wake on lan packets etc)
<zid>
and some with a bunch of LEDs on despite being 'off'
<mrvn>
It's a wonder nobody has invented power-on-voice-command to disguise that the NSA is always listening on your microphone and watching your webcam. :)
<zid>
alexa
gildasio has joined #osdev
philcox has joined #osdev
Teukka has quit [Read error: Connection reset by peer]
Teukka has joined #osdev
philcox has left #osdev [#osdev]
Starfoxxes has quit [Ping timeout: 248 seconds]
mahmutov has joined #osdev
heat has joined #osdev
<heat>
i remembered why i wanted an old gcc
<heat>
modern gcc can kinda compile k&r pretty smoothly, but it doesn't have writable strings anymore
<bauen1>
heat: can't you achieve that by ignoring the warning and modifying the linking script to make rodata writable ?
<heat>
quite possibly yeah
<mrvn>
heat: won't it do it when youj make .data r-w?
<heat>
you used to have -fwritable-strings
<heat>
but that option went away around gcc 3 and something
<heat>
funnily enough the first program i got from an old unix, cal, tried to write into strings and segfaulted
<heat>
and this was like bsd/svr4 old
<heat>
not v6 old
<mrvn>
wasn't that when gcc learned to share string constants?
<mrvn>
fortran had mutable literals
<heat>
oh good point
<heat>
yeah the linker script won't work then
<mrvn>
c++ now has mutable strings again, just use the string suffix
<heat>
there's no c++ where we're going, mister
Starfoxxes has joined #osdev
<kingoffrance>
i never would've thought heat would go retro
<mrvn>
once you go retro you never come back *paraphrase*
* kingoffrance
places nextcube on heat's head you're one of us now
<heat>
nextcube? hahaha
<heat>
go unix or go home
<kingoffrance>
i couldnt think of any other graduation hat
<kingoffrance>
im open to suggestions
<heat>
the hat SCO puts on your heat in court after you helped write finnish unix and slowly take away SCO's business
<heat>
head*
<mrvn>
I want one of those machines with two 68020 CPUs where they run the second half a cycle offset so they could recover from a bus error on the first.
Teukka has left #osdev [No boundaries on the net!]
Teukka has joined #osdev
Likorn has quit [Quit: WeeChat 3.4.1]
Ali_A has joined #osdev
wootehfoot has joined #osdev
gog has joined #osdev
Ali_A has quit [Quit: Connection closed]
dude12312414 has joined #osdev
Likorn has joined #osdev
haliucinas has joined #osdev
gdd has quit [Ping timeout: 272 seconds]
gdd has joined #osdev
<geist>
mrvn: side note i ordered a few more off ebay. so now i have a pile of 020s in addition to 030s
<geist>
one day....
wootehfoot has quit [Read error: Connection reset by peer]
* gog
pets geist and drinks coffee
wootehfoot has joined #osdev
roan has joined #osdev
clever has quit [Ping timeout: 240 seconds]
clever has joined #osdev
rustyy has quit [Ping timeout: 250 seconds]
rustyy has joined #osdev
heat has quit [Read error: Connection reset by peer]
heat has joined #osdev
rustyy has quit [Quit: leaving]
heat has quit [Ping timeout: 248 seconds]
rustyy has joined #osdev
rustyy has quit [Client Quit]
rustyy has joined #osdev
<Bitweasil>
CPUs or machines?
* Bitweasil
drinks coffee too.
nj0rd has quit [Ping timeout: 256 seconds]
nj0rd has joined #osdev
* gog
mews mechanically
* Bitweasil
pulls gog's tail a few times, adds a drum beat, remixes, and publishes to YouTube.
<bslsk05>
www.phoronix.com: Virtual Motorola 68000 "m68k" Machine With Up To 3.2GB RAM Expected For Linux 5.19 - Phoronix
GeDaMo has quit [Remote host closed the connection]
nj0rd has joined #osdev
heat has joined #osdev
Likorn has quit [Quit: WeeChat 3.4.1]
Likorn has joined #osdev
mahmutov has quit [Ping timeout: 246 seconds]
dude12312414 has quit [Quit: THE RAM IS TOO DAMN HIGH]
<mrvn>
how do you get 3.2GB?
<heat>
it's a virtual machine
<mrvn>
so?
<heat>
you could get 1TB if the vm and the kernel can handle it
<mrvn>
nah, only 32bit addresses
<heat>
never too late for PAE
<mrvn>
The question is what the remaining 800MB are used for
<heat>
mmio?
<mrvn>
6.25MB per virtio device hardcoded in?
<heat>
pretty sure goldfish devices are all mmio-based, then they say it also has 128 virtio-mmio buses
<mrvn>
they should have allowed 4GB ram - number of devices you configure.
<mrvn>
same thing with 128 devices. Who comes up with such an odd number?
<heat>
it's a power of two
<heat>
i think a better solution would've been to add device tree support for this stuff
<heat>
but i guess that substancially deviates from current m68k booting
<mrvn>
it's a virtual machine, it's not going to work like a real m68k
Likorn has quit [Quit: WeeChat 3.4.1]
<mrvn>
I wonder if they have 512MB for big devices and 256MB for smaller devices and 3.25GB ram. Would make at least some sense.
<mrvn>
I wonder how much c++ code can't be compiled for m68k simply because you can't have more than 4GB ram.
<mrvn>
s/for m68k/on m68k/
<heat>
big LTO builds would be tough
<mrvn>
forget LTO, just single compilation units can be huge
<heat>
late stage C++ism :)
<kingoffrance>
lol
Matt|home has quit [Ping timeout: 248 seconds]
nyah has quit [Quit: leaving]
rustyy has quit [Quit: Lost terminal]
rustyy has joined #osdev
nyah has joined #osdev
wootehfoot has quit [Quit: Leaving]
<j`ey>
when building a gcc cross compiler.. do you need binutils for that target built first? (aka does the gcc build require it in some way)
<heat>
j`ey, i think it tries to use its ld first before falling back to /bin/ld
<klange>
I think if you want libgcc or whatever to work, you need a targeted binutils beforehand, but you can do weird things with the ordering if you do it by hand.
<heat>
same for as
<heat>
yeah basically if you need to use it it's better to have your binutils built
<heat>
doing make all-gcc won't cause issues because you're not actually using your new compiler
<j`ey>
i would build binutils first, was just wondering if it was necessary or if the path to binutils was hardcoded or something
<heat>
I think it looks under its mini-sysroot for binutils before falling back to /bin/
<heat>
yup
<heat>
if you strace it, it does a bunch of compiler-relative access(2)/stat(2) before falling back to a PATH-based execl of as
<heat>
for x86_64-onyx, if it finds /data/toolchains/x86_64-onyx/x86_64-onyx/bin/as, it execs that, else /usr/bin/as as the first 'as' on the PATH
<j`ey>
cool
<heat>
so to answer your question, it kinda probably totally works if the target is similar enough
<geist>
yah this m68k virt machine is what i already wrote the LK port against
<geist>
it's basically 68k + a bunch of virtio-mmio interfaces
<bslsk05>
github.com: lk/platform.c at master · littlekernel/lk · GitHub
<geist>
seems to just be a list of tag/size/data structures
<mrvn>
sounds like Linux has a bug and instead of fixing it they just limit memory to 3.2G
<geist>
yep. so instead of bitching to qemu about it not working just make sure it works no matter what folks put o the command line
<heat>
true software engineering
<mrvn>
reasonable on qemus side. I would whish for it to allow it with --force or something
<geist>
it's probably some mmu/memory map limitation in the 68k code in linux i suspect
<geist>
lots of 32bit machines had to jump through hoops for that
<mrvn>
odd number for it though
<geist>
yah would be interesting o figure out what it is
<heat>
waiiit
<heat>
hmm I think i know what it is
<heat>
its probably something to do with higher/lower memory in linux
<geist>
yah that'd be my guess
<mrvn>
that would be a 2:2 or 3:1 split
<geist>
.8 seems like some sort of carveout style thing
<heat>
i know that x86 linux has like 700 and something MB mapped directly (lower memory)
<geist>
though usually it's the other way around: first 896MB gets a free pass, etc
<geist>
i did read through the page table logic for 040 and it's not *too* dissimilar to x86 or riscv
<geist>
a bit more flexible, but fairly similar
<mrvn>
don't think it has anything to do with hardware
<geist>
no but probably 68k
<mrvn>
It's probably something linux mapps at a fixed address and if you have too much ram that conflicts.
<geist>
yah
<mrvn>
Like it has page tables at a fixed address and at the end of the range it puts some other stuff because no m68k ever has more than 128MB ram anyway.
<mrvn>
Does i386 have a similar limit?
Burgundy has quit [Ping timeout: 240 seconds]
<geist>
possible it's doing something like a 3.5:.5 split maybe?
<geist>
and everything is directly mapped into the kernel
<heat>
mrvn, limit of what? ram?
<heat>
probably not since with PAE you get 64GiB of physical address space
<geist>
x86 i know splits it into low and high mem, stuff > 896MB it dynamically maps
<heat>
yeah exactly
<heat>
i find the high mem mapping subsystem really interesting
<heat>
they even have percpu entries to avoid contention
wxwisiasdf has joined #osdev
<wxwisiasdf>
hello
<geist>
hiya
<wxwisiasdf>
i've been making a japanesse operating system for the ibm mainframe
<zid>
ganbatte
<wxwisiasdf>
not japanese, just uses the jp ebcdic codepage, but still supports japanese so ye
<heat>
nice
<heat>
very unique
<wxwisiasdf>
ganbatte?
<wxwisiasdf>
heat: thanks :p
<heat>
i've been writing a poor man's linux in english + utf-8
<wxwisiasdf>
i mean my os is nothing special it's just yet another DOS clone that happens to run on le ibm thingy
<wxwisiasdf>
anyways i came here asking what is the general steps i need to take to port gcc
<wxwisiasdf>
to ask*
<kazinsal>
conveniently I have been writing a poor man's IOS