klange changed the topic of #osdev to: Operating System Development || Don't ask to ask---just ask! || For 3+ LoC, use a pastebin (for example https://gist.github.com/) || Stats + Old logs: http://osdev-logs.qzx.com New Logs: https://libera.irclog.whitequark.org/osdev || Visit https://wiki.osdev.org and https://forum.osdev.org || Books: https://wiki.osdev.org/Books
zaquest has quit [Read error: Connection reset by peer]
<geist> ah well ifyoure reading the logs the other thing you probably have to piddle with is `-mcmodel=medany` if/when you fiddle with riscv64
<geist> i had to tweak my gcc compile to include that as a multilib
<geist> otherwise i think the default multilib stuff on gcc already gets one
<bslsk05> ​IRCCloud pastebin | Raw link: https://irccloud.com/pastebin/raw/r3JBzL2y
zaquest has joined #osdev
<geist> etc. the only addition in my scripts is the medany stuff for rv64
mimmy has joined #osdev
mimmy has quit [Ping timeout: 240 seconds]
mahmutov has quit [Ping timeout: 268 seconds]
wootehfoot has quit [Quit: Leaving]
mimmy has joined #osdev
mimmy has quit [Ping timeout: 264 seconds]
freakazoid12345 has quit [Ping timeout: 265 seconds]
CryptoDavid has quit [Quit: Connection closed for inactivity]
freakazoid343 has joined #osdev
c2a1 has quit [Ping timeout: 250 seconds]
zaquest has quit [Remote host closed the connection]
zaquest has joined #osdev
heat has joined #osdev
<heat> geist, I disabled multilib because it was giving me grief with rv32 multilibs and not having a 32-bit sysroot
<heat> that was probably not a good idea now that I think of it lol
PapaFrog has quit [Quit: ZNC 1.7.2+deb3 - https://znc.in]
PapaFrog has joined #osdev
mimmy has joined #osdev
mimmy has quit [Ping timeout: 268 seconds]
gog has quit [Ping timeout: 256 seconds]
mimmy has joined #osdev
mimmy has quit [Ping timeout: 268 seconds]
aquijoule_ has joined #osdev
aquijoule__ has quit [Ping timeout: 256 seconds]
pretty_dumm_guy has quit [Quit: WeeChat 3.3]
ElectronApps has joined #osdev
srjek|home has quit [Ping timeout: 250 seconds]
Oli has quit [Quit: leaving]
mimmy has joined #osdev
<zid> baba is baba and move and you and hello
* vdamewood pushes you
<heat> zid has gone crazy
mimmy has quit [Ping timeout: 264 seconds]
<kazinsal> BABA is PISSED and HAS KNIFE
<zid> knife is defeat
<vdamewood> rock is you baba is push
<heat> BABA owns LIBERALS with FACTS and LOGIC
<zid> stop making up words
<heat> y'know when I said I was going to "port my OS to riscv" I really didn't mean fiddle with multilib and re-think parts of my toolchains
andydude has joined #osdev
mimmy has joined #osdev
mimmy has quit [Ping timeout: 265 seconds]
nyah has quit [Ping timeout: 256 seconds]
andydude has quit [Quit: andydude]
<heat> i've accidentally erased a few hours of work
<heat> fml
* vdamewood fucks heat's life.
<vdamewood> Reminds me of a time when I ran rm -Rf * thinking I was in /dev/build/myproject when I was really in /dev/src/myproject
<heat> i've done that too
<heat> curiously I only do shit like this when working in my toolchains
<vdamewood> Fortunately, the * glob didn't match .git
GeDaMo has joined #osdev
mimmy has joined #osdev
mimmy has quit [Ping timeout: 264 seconds]
mimmy has joined #osdev
[itchyjunk] has quit [Remote host closed the connection]
mimmy has quit [Ping timeout: 260 seconds]
mahmutov has joined #osdev
mimmy has joined #osdev
bradd has quit [Changing host]
bradd has joined #osdev
mimmy has quit [Ping timeout: 265 seconds]
pg12 has quit [Ping timeout: 256 seconds]
<geist> heat: sadly rethinking toolchains is frequently a lot of it
pg12 has joined #osdev
<heat> geist: something I meant to tell you a few horus ago: you should patch your toolchains to build libgcc as pic
<heat> that lets you avoid the mcmodel multilibs
<geist> oh yeah?
<geist> hmm, not so sure though. medany is a code gen thing
<geist> as in does it assume that pointers are signed 32bit, etc
<heat> mcmodel=kernel is also code gen no?
<geist> unless also building as pic also effectively disables that
<geist> i dont think so on riscv. the only real one is medlow (default) vs medany
<geist> and it doesn't matter on 32bit because all pointers are within +/-2GB of something there
<heat> well shouldn't pic just assume pointers can be anywhere?
<geist> possiblky it effectively forces medany
<heat> like a medany but even more position independent
<heat> i compile the x86_64 and riscv64 libgcc/crtstuff as PIC and everything works for x86_64 (and probably for riscv unless relocations are very very weird in riscv)
<geist> well that may be true, but be careful about applying one arch to the other
<geist> that may commonly be the case, but when it comes to stuff like memory models and codegen things can be quite different between arches
<geist> especially relocations
<heat> i'm assuming that if something is horribly wrong then linker goes boom
<geist> oh absolutely
<geist> where the medany stuff comes into play is explicitly linking things to run outside of the 2GB window
<geist> ie, high 64bit
<geist> then boom happens. hence why you never see it with riscv32
bauen1 has quit [Ping timeout: 260 seconds]
<heat> doesn't medlow also cover high 64bit?
<heat> the -2GB region
<geist> i dont know
<heat> The program and its statically defined symbols must lie within a single 2 GiB address range and must lie between absolute addresses -2 GiB and +2 GiB.
<geist> there you go
<heat> sounds like a mcmodel=small + mcmodel=kernel
<geist> yah. so the main issue iirc is that on sifive hardware the starting physical addresses are 0x8000.0000+
<geist> so. if you boot on a 64bit machine your'e already in medany territory
<heat> shouldn't be an issue if you run in virtual memory right?
<geist> right, but LK can run in all of the modes. with and without virtual memory
<heat> ah
<geist> and then with VM it runs not within -2GB, but it could be
<geist> there's a build option for machine mode 64bit (no mmu) so in that case it has to be linked at the final address, which can be >2GB, so medany
<geist> that was actually what forced it, sicne that's what i had working first
<geist> i added the mmu code and virtual memory mode (supervisor 64bit) later
<heat> what's the default march?
<heat> --print-multi-os-directory gives me ../lib/lp64d with no arguments which is weird unless riscv doesn't put stuff in /lib but rather /lib/lp64 and /lib/lp64d
<geist> that's usually relative to their root
<heat> also applies to the sysroot I think
<geist> dunno what default march is, i'd highly suggest fully specifying it
<geist> also the mabi
xenos1984 has quit [Quit: Leaving.]
mimmy has joined #osdev
heat has quit [Ping timeout: 256 seconds]
mimmy has quit [Ping timeout: 250 seconds]
aquijoule_ has quit [Remote host closed the connection]
vdamewood has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
c2a1 has joined #osdev
Brnocrist has quit [Ping timeout: 256 seconds]
mimmy has joined #osdev
mimmy has quit [Ping timeout: 265 seconds]
mimmy has joined #osdev
mimmy has quit [Ping timeout: 240 seconds]
<geist> hah once again struck by the 'AMD treats G bit as MBZ on inner page tables' problem
<geist> actually just debugged that this core (3950x) doesn't seem to follow their manual precisely
<geist> the manual seems tos tate that on x86-64 4 level paging the G bit (bit 8) is MBZ *only* on the top level PML4 entry
<kazinsal> oh that's annoying
<geist> but it seems to also fire with a PDP level
<geist> perhaps i haven't enabled 1GB page tables somewhere else so it now fires there?
<geist> one way of reading it is their logic is if the page table entry cannot be interpreted as a terminal entry then the G bit MBZ
<geist> and in all of the variants of page tables (2 3 or 4 level) only the PML4 entries fit that with usual 4 level paging + 1GB pages enabled
<geist> though also oddly i was only able to see this on virtualbox. so i'm not entirely sure what's going on there
<geist> was getting a weird page table with a 0 error code, but then clearing the G bit made it go away. so i'm not entirely sure what i fixed
<zid> MBZ?
<zid> oh must be zero
<zid> amd's manual for the page tables is weird
<zid> double diagrams showing both the pml4e and pdpe, showing that the pml4e must be zero, but pdpe's G bit works
<zid> and worse for things like 4k
<zid> Intel's single stacked diagram <3
<zid> Okay so intel says Ign. and amd says must be zero, that seems like an easy bug to accidentally happen
CryptoDavid has joined #osdev
Brnocrist has joined #osdev
<geist> zid: yeah and i know about it because we bumped into it on zircon
<geist> but i never back ported that fix to LK, so i knew immediately what was wrong
<geist> but actually was reading the docs to verify what i remember was right, and it's a little funny, but makes some sense
mimmy has joined #osdev
the_lanetly_052 has joined #osdev
mimmy has quit [Ping timeout: 265 seconds]
Arthuria has joined #osdev
Burgundy has joined #osdev
mahmutov has quit [Ping timeout: 256 seconds]
mimmy has joined #osdev
mimmy has quit [Ping timeout: 268 seconds]
mctpyt has joined #osdev
nyah has joined #osdev
bauen1 has joined #osdev
eau has quit [Ping timeout: 268 seconds]
eau has joined #osdev
the_lanetly_052 has quit [Ping timeout: 264 seconds]
mimmy has joined #osdev
mimmy has quit [Ping timeout: 265 seconds]
pretty_dumm_guy has joined #osdev
pretty_dumm_guy has quit [Client Quit]
pretty_dumm_guy has joined #osdev
Arthuria has quit [Ping timeout: 264 seconds]
mimmy has joined #osdev
CryptoDavid has quit [Quit: Connection closed for inactivity]
mimmy has quit [Ping timeout: 268 seconds]
mimmy has joined #osdev
[itchyjunk] has joined #osdev
Oli has joined #osdev
mimmy_ has joined #osdev
mahmutov has joined #osdev
mimmy has quit [Ping timeout: 268 seconds]
mimmy_ has quit [Ping timeout: 264 seconds]
mimmy_ has joined #osdev
srjek|home has joined #osdev
mimmy_ has quit [Ping timeout: 250 seconds]
Mutabah has quit [Quit: Reconnecting]
Mutabah has joined #osdev
bauen1 has quit [Ping timeout: 264 seconds]
bauen1 has joined #osdev
gog has joined #osdev
ElectronApps has quit [Remote host closed the connection]
Effilry has joined #osdev
FireFly has quit [Quit: WeeChat 2.0.1]
Effilry is now known as FireFly
c2a1 has quit [Ping timeout: 268 seconds]
mahmutov_ has joined #osdev
mahmutov has quit [Ping timeout: 256 seconds]
mimmy_ has joined #osdev
bauen1 has quit [Ping timeout: 240 seconds]
mimmy_ has quit [Ping timeout: 240 seconds]
mimmy_ has joined #osdev
Raito_Bezarius has joined #osdev
mimmy_ has quit [Ping timeout: 265 seconds]
mimmy_ has joined #osdev
mimmy_ has quit [Ping timeout: 264 seconds]
bauen1 has joined #osdev
bauen1 has quit [Ping timeout: 268 seconds]
bauen1 has joined #osdev
nohit has quit [Remote host closed the connection]
mimmy_ has joined #osdev
mimmy_ has quit [Ping timeout: 260 seconds]
Benjojo has quit [Remote host closed the connection]
geist has quit [Remote host closed the connection]
janemba has quit [Ping timeout: 256 seconds]
mxshift has quit [Ping timeout: 246 seconds]
seds has quit [Ping timeout: 260 seconds]
[itchyjunk] has quit [Read error: Connection reset by peer]
paulbarker has quit [Ping timeout: 250 seconds]
kazinsal has quit [Ping timeout: 250 seconds]
janemba has joined #osdev
freakazoid343 has quit [Read error: Connection reset by peer]
mimmy_ has joined #osdev
mimmy_ has quit [Ping timeout: 250 seconds]
janemba has quit [Ping timeout: 260 seconds]
mimmy_ has joined #osdev
mimmy_ has quit [Ping timeout: 260 seconds]
heat has joined #osdev
c2a1 has joined #osdev
<heat> 8am to 6pm is a based sleeping schedule
<sham1> If only I could have a sleep schedule of 1 AM to 10 AM
<sham1> That seems to be my natural sleep cycle. But alas, it's not possible because work starts at 8 and I also have courses sometimes at 8. It's crappy
<heat> that sounds
<heat> boring af
<heat> funnily enough I mostly seem to get into these "work til 7am" moods when doing toolchain work
mahmutov_ has quit [Ping timeout: 256 seconds]
<heat> probably because I can't get bored writing code
<sham1> Technically I could start my work at 9 but that'd mean that I would only be able to leave an hour later. Although Tuesdays are especially brutal since I have to wake up at 7 just so I can prepare myself mentally to cycle through the late autumn darkness to the campus to work
xenos1984 has joined #osdev
isaacwoods has joined #osdev
c2a1 has quit [Ping timeout: 246 seconds]
freakazoid343 has joined #osdev
mimmy_ has joined #osdev
dude12312414 has joined #osdev
mimmy_ has quit [Ping timeout: 250 seconds]
<zid> heat: about the same as me atm
Benjojo has joined #osdev
Benjojo_ has joined #osdev
Benjojo has quit [Ping timeout: 260 seconds]
xenos1984 has quit [Read error: Connection reset by peer]
xenos1984 has joined #osdev
mahmutov_ has joined #osdev
Benjojo_ has quit [Ping timeout: 250 seconds]
geist has joined #osdev
mxshift has joined #osdev
c2a1 has joined #osdev
seds has joined #osdev
nohit has joined #osdev
kazinsal has joined #osdev
paulbarker has joined #osdev
energizer has joined #osdev
arahael has quit [Ping timeout: 256 seconds]
Benjojo has joined #osdev
heat has quit [Remote host closed the connection]
mimmy_ has joined #osdev
janemba has joined #osdev
mimmy_ has quit [Ping timeout: 260 seconds]
janemba has quit [Read error: No route to host]
janemba has joined #osdev
Arthuria has joined #osdev
Dreg has quit [Read error: Connection reset by peer]
Dreg has joined #osdev
<bslsk05> ​old.reddit.com: Linux user starterpack : starterpacks
<mjg> > There are lots of operating systems that would be usable. The BSDs, Plan9, Haiku... maybe even something like SerenityOS or ToaruOS if you're feeling adventurous :D
<mjg> did niche systems become mainsteam?
<mjg> i mean knowledge about their existence
<moon-child> tbf I feel like there's a more prominent contingency of openbsd users on thinkpads than linux users
<mjg> i can tell you red hat was all thinkpads and that probably accounts for majority of linux on a laptop
<mjg> ;)
<mjg> [not a serious comment]
mimmy_ has joined #osdev
srjek_ has joined #osdev
mimmy_ has quit [Ping timeout: 260 seconds]
srjek|home has quit [Ping timeout: 240 seconds]
freakazoid343 has quit [Ping timeout: 240 seconds]
[itchyjunk] has joined #osdev
<geist> indeed, seems that most of the folks at my work that are using linux (you have an option of linux, mac, or chromebook) go for the thinkpad options
<geist> i'm not a tremendous thinkpad fan but if i had to have a linux laptop, which i generally dont want to futz with if i can avoid it, a thinkpad is probably the most solid choice
mimmy_ has joined #osdev
mimmy_ has quit [Ping timeout: 260 seconds]
X-Scale has quit [Ping timeout: 260 seconds]
X-Scale` has joined #osdev
X-Scale` is now known as X-Scale
freakazoid12345 has joined #osdev
mimmy_ has joined #osdev
nyah has quit [Quit: leaving]
mimmy_ has quit [Ping timeout: 250 seconds]
nyah has joined #osdev
wootehfoot has joined #osdev
GeDaMo has quit [Remote host closed the connection]
mimmy_ has joined #osdev
X-Scale has quit [Ping timeout: 240 seconds]
X-Scale` has joined #osdev
X-Scale` is now known as X-Scale
mimmy_ has quit [Ping timeout: 260 seconds]
c2a1 has quit [Read error: Connection reset by peer]
mimmy_ has joined #osdev
c2a1 has joined #osdev
mimmy_ has quit [Ping timeout: 250 seconds]
dude12312414 has quit [Quit: THE RAM IS TOO DAMN HIGH]
wootehfoot has quit [Quit: Leaving]
<immibis> off-topic but several people will certainly find it amusing:
<immibis> "Instead of a Turing Machine that determines whether or not another Turing Machine will halt we construct a DFA lexical analyzer that recognizes the single literal string of “the”."
<immibis> this is how to solve the halting problem. (1) write a program that recognizes the word "the". (2) adapt it so instead of recognizing the word "the", it recognizes Turing machines that halt.
<geist> these are words i recognize
lkronnus has joined #osdev
mahmutov_ has quit [Ping timeout: 256 seconds]
sonny has joined #osdev
sonny has left #osdev [#osdev]
mimmy_ has joined #osdev
mimmy_ has quit [Ping timeout: 250 seconds]
<Mutabah> immibis: 2. draw the rest of the owl :)
elastic_dog has quit [Read error: Connection reset by peer]
elastic_dog has joined #osdev