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
AndroUser2 has quit [Ping timeout: 265 seconds]
AndroUser2 has joined #osdev
netbsduser has quit [Remote host closed the connection]
AndroUser2 has quit [Read error: Connection reset by peer]
AndroUser2 has joined #osdev
<mrvn> heat: bitfields work with volatile (or atomic in c++) just like anything else.
<mrvn> What you actually want is a context manager so you can open the bitfield (read it from hardware), manipulate it (changes the temp register) and then commit the change (exit scope)
gog has quit [Ping timeout: 252 seconds]
nyah has quit [Ping timeout: 268 seconds]
[itchyjunk] has joined #osdev
foudfou has quit [Ping timeout: 258 seconds]
foudfou has joined #osdev
archenoth has quit [Quit: Leaving]
FreeFull has quit []
gog has joined #osdev
JerOfPanic has joined #osdev
<JerOfPanic> hi
AndroUser2 is now known as c2a1
c2a1 has quit [Killed (NickServ (GHOST command used by androiser2!~androirc@2607:fb90:12cf:3128:6446:dd1d:c720:1065))]
potash has quit [Ping timeout: 265 seconds]
[itchyjunk] has quit [Remote host closed the connection]
frkazoid333 has joined #osdev
potash has joined #osdev
freakazoid332 has joined #osdev
frkazoid333 has quit [Ping timeout: 268 seconds]
foudfou has quit [Quit: Bye]
foudfou has joined #osdev
freakazoid332 has quit [Ping timeout: 244 seconds]
epony has joined #osdev
heat_ has joined #osdev
heat has quit [Ping timeout: 250 seconds]
frkzoid has joined #osdev
elastic_dog has quit [Ping timeout: 248 seconds]
elastic_dog has joined #osdev
heat has joined #osdev
heat_ has quit [Read error: Connection reset by peer]
frkzoid has quit [Ping timeout: 244 seconds]
_xor has joined #osdev
zaquest has quit [Remote host closed the connection]
zaquest has joined #osdev
heat_ has joined #osdev
heat has quit [Read error: Connection reset by peer]
foudfou has quit [Remote host closed the connection]
foudfou has joined #osdev
heat has joined #osdev
heat_ has quit [Read error: Connection reset by peer]
m5zs7k has quit [Ping timeout: 265 seconds]
m5zs7k has joined #osdev
carbonfiber has quit [Quit: Connection closed for inactivity]
joe9 has quit [Ping timeout: 265 seconds]
Matt|home has quit [Ping timeout: 244 seconds]
FatAlbert has joined #osdev
\Test_User has quit [Quit: .]
\Test_User has joined #osdev
archenoth has joined #osdev
GeDaMo has joined #osdev
<zid> https://protohackers.com This is kinda neat
<bslsk05> ​protohackers.com: Protohackers
<zid> I did level 0 and 2
<zid> I should make my OS do level 0 maybe
gog has quit [Read error: Connection reset by peer]
foudfou_ has joined #osdev
foudfou has quit [Ping timeout: 258 seconds]
heat has quit [Read error: Connection reset by peer]
heat has joined #osdev
<Ermine> Neato
[itchyjunk] has joined #osdev
isaacwoods has joined #osdev
foudfou_ has quit [Remote host closed the connection]
foudfou has joined #osdev
freakazoid332 has joined #osdev
nyah has joined #osdev
smach has joined #osdev
freakazoid332 has quit [Ping timeout: 244 seconds]
<mrvn> TCP Echo server? Is this a call to make a ton of DDoS clinets? The challenge could specify a traffic magnification and then they test it with a fake source IP.
heat_ has joined #osdev
heat has quit [Read error: Connection reset by peer]
Bonstra has quit [Ping timeout: 248 seconds]
Bonstra has joined #osdev
netbsduser has joined #osdev
vdamewood has joined #osdev
heat_ has quit [Remote host closed the connection]
heat has joined #osdev
heat has quit [Remote host closed the connection]
heat has joined #osdev
_xor has quit [Quit: brb]
<zid> hmm shouldn't be too hard right.. at least to fake it? :P
<zid> set an ack flag, swap some dests and srcs
<zid> I don't *actually* need to allocate things and make fds and stuff if I just wanna solve the level
<maksy> any ideas why my bootloader doesn't jump into the kernel? makefile: http://paste.debian.net/1253851/ the bootloader in vbr: http://paste.debian.net/1253855/
<bslsk05> ​paste.debian.net: debian Pastezone
<bslsk05> ​paste.debian.net: debian Pastezone
<maksy> kernel entry: http://paste.debian.net/1253854/
<bslsk05> ​paste.debian.net: debian Pastezone
<Mutabah> What does it do instead of jumping into the kernel?
<maksy> I know for sure the line "call KERNEL_OFFSET" is executed since I get an exception if I change KERNEL_OFFSET from 0x1000 to 0x10000
<maksy> it just stalls
<FatAlbert> maksy, Welcome to #osdev
<maksy> thanks
<klys> this is a bootloader; are you starting in real mode?
<klys> real mode has no access to anything beyond cs:0xffff
<FatAlbert> where are all the pro's ?
<FatAlbert> j`ey GeDaMo mrvn etc ...
<maksy> yea I am. This is the mbr code thats loads the bootloader: http://paste.debian.net/1253859/
<bslsk05> ​paste.debian.net: debian Pastezone
<FatAlbert> i just hope i didn't pinged them all
<Mutabah> You likely did
<FatAlbert> :O
<klys> oh i see. what is CODE_SEG?
<FatAlbert> one thing for sure ..
<GeDaMo> maksy: show gdt.asm
<FatAlbert> this channel is getting more and more beginner friendly
<FatAlbert> which for some reason doesn't make me feel any better
<Mutabah> maksy: I don't have the spare brainpower to debug this myself... but you'll want to sanity check the state with a debugger
<Mutabah> e.g. sigle-step through the call, and see what it starts running vs what you expect it to run
<bslsk05> ​paste.debian.net: debian Pastezone
<FatAlbert> maksy: you are in good hands ...
<FatAlbert> that's why i called the cavalery for you
<maksy> I appreaciate that :D
<maksy> Mutabah: can I use qemu to step it through?
<Mutabah> FatAlbert: Bulk pinging like that is a little rude
<Mutabah> maksy: You can, qemu can be connected to by `gdb`
<Mutabah> Pass `-s` to qemu and it'll listen for an incoming gdb connection
<FatAlbert> Mutabah: come on i wanted to give this guy a little bit of the High Council of #osdev
<klys> maksy, here's a cs: dw 0xffff,0x0000,0x9a00,0x008f
<klys> the 9a differs from your 92...
<klys> and the 8f from your cf, time to look those up...
<klys> yea make it executable
<klys> so use the 0x9a
<klys> anyway I just arrived at work. got to go. have fun!
<maksy> thanks for the help
<klys> sure thank you
<heat> zid, good shit
<heat> i'll do it on my OS for the funzies
gelatram has joined #osdev
heat has quit [Remote host closed the connection]
heat has joined #osdev
FatAlbert has quit [Quit: WeeChat 3.6]
<zid> heat: You should help me do it from mine
ALowther has joined #osdev
Matt|home has joined #osdev
vin has quit [Ping timeout: 268 seconds]
gareppa has joined #osdev
frkzoid has joined #osdev
lg has quit [Ping timeout: 248 seconds]
lg has joined #osdev
<heat> zid, ok, start by building a proper BSD sockets TCP/IP stack
<heat> with STREAMS for the funny
gareppa has quit [Quit: Leaving]
<zid> can I not
gelatram has quit [Quit: Client closed]
joe9 has joined #osdev
ALowther has quit [Remote host closed the connection]
<heat> no
<heat> funny streams or no help
<zid> okay find add streams
<zid> what's a streams
<zid> s/find/fine
<sbalmos> encode the packets in MS Comic Sans emojis
<zid> I knew bsd was weird, I didn't think it was that weird
<zid> (also, surely it's emoji not emojis?)
<heat> FreeBDSM
<heat> :hotface:
<zid> tcp seems fine except all the parts that are like.. weird heuristics for when to disconnect people etc
<zid> and all the crap you need to know to not be vulnerbale to 30 year old exploits for spoofing
<heat> what crap?
<zid> idk I'm not a router, arp spoofing, sequence number attacks, blah blah
<\Test_User> arp is unrelated to tcp
<zid> true
<zid> but also: idk
<zid> I am not a router
clever has quit [Ping timeout: 268 seconds]
gelatram has joined #osdev
gxt has quit [Ping timeout: 258 seconds]
gxt has joined #osdev
xenos1984 has quit [Ping timeout: 250 seconds]
xenos1984 has joined #osdev
clever has joined #osdev
skipwich has quit [Ping timeout: 264 seconds]
skipwich has joined #osdev
nyah has quit [Quit: leaving]
nyah has joined #osdev
CryptoDavid has joined #osdev
<linkdd> i'm starting to think nasm is a shit assembler
gelatram has quit [Ping timeout: 252 seconds]
xenos1984 has quit [Ping timeout: 264 seconds]
<pitust> why?
<heat> gnu assembler (and llvm as) are far better because they simply integrate with the toolchain and the C preprocessor
<heat> in my opinion, of course
<heat> you can't even add CFI directives in nasm AFAIK
xenos1984 has joined #osdev
alpha2023 has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
<pitust> on the other hand, nasm is arguably easier to use and has an arguably better syntax
<clever> pitust: but if you primarily work on non-x86, nasm isnt really even an option
<clever> and if you already know arm gnu as, why learn nasm?
<linkdd> pitust: i'm currently trying to make my kernel a higher-half kernel, nasm has no movabs/retf/etc... mnemonics that are useful to control precisely the size of your instructions. nasm will try to infer this stuff from the "easier syntax" and i end up having the following error all over the place during linking: relocation truncated to fit: R_X86_64_32 against `.text'
<linkdd> those happens on every single jumping instruction
jafarlihi has joined #osdev
<heat> pitust, why easier to use?
<heat> you just call nasm with some options, but you also just call gcc with some options
<heat> and the syntax question just depends on what you're used to. also GNU as supports intel syntax
<linkdd> cmp ecx, 80 * 25 * 2 // (.stab+0x14): relocation truncated to fit: R_X86_64_32 against `.text'
<linkdd> seriously, this would not happen with gas
<heat> huh?
<heat> where's the relocation?
<linkdd> exactly
<heat> .stab? you're using STABS?
<linkdd> no
<linkdd> nasm generates them
<linkdd> 80 * 25 * 2 i guess
<heat> nasm isn't supposed to generate anything
<linkdd> well, i have no section ".stab" in my code, so surely someone generates it
<heat> link the the sauces?
<heat> s/the the/to the/
<mrvn> There should be only one opcode that jumps to higher half and everything else should be small jumps. That you get that error shows you are linking wrong.
<mrvn> Did you set the LMA and VMA in the linker script?
<linkdd> i have "local" jumps, like: jne .local_label
<linkdd> yes i did
<linkdd> https://bpa.st/KWRQ this is my linker script, and i do pass -mcmodel=kernel to gcc for the C code
<bslsk05> ​bpa.st: View paste KWRQ
<heat> linkdd, you're missing an F
<linkdd> seriously
<linkdd> x)
<heat> should be 0xffffffff80000000
<j`ey> thats a lot of fs
<heat> imagine not having to run from -2GB
<heat> I heard thats what that new architecture aaaaaaaaarch64 does or whatever
<j`ey> :3
<heat> i wrote some rust a few hours ago
<heat> and i liked it
<heat> it feels... weird?
<heat> but it takes more brainpower to learn a language so I'll probably stay in C/C++ land
<j`ey> for work?
<heat> no, coding challenge thing
gog has joined #osdev
nvmd has joined #osdev
<linkdd> heat: yeah, so the Fs did not solve the relocation problems
<heat> you should push the actual project
<heat> it's hard to know what's wrong
<linkdd> it happens on some `call label` but not all, and on some jmp but not all
<linkdd> heat: well, it's not supposed to be open source
<heat> nobody gives a shit about your shitty bootstrap code
<heat> and don't take this in a bad way
<heat> there's no trade secrets in protected mode -> long mode code
<heat> particularly in code that's not working
<heat> it's hard to help if you're giving us almost 0 context apart from a linker script and the error
<heat> "nasm bad" doesn't apply here because nasm is used by plenty of people
<linkdd> i know, i was not expecting much, i was just venting/ranting against nasm initially :P i'm going to debug this on my own
<linkdd> the problematic assembly code is declared with [section .text] [bits 32] and it complains on jumping instructions (call, and jmp)
<linkdd> that's all the context i can give you
<heat> yeah :|
<linkdd> now, most examples i find on the net do not have a single jumping instruction appart from jumping to the 64 bits code, then jumping to the upper memory
<pitust> linkdd: some nasm builds generate STABS by default for some reasons, you can use -gdwarf to fix that
<GeDaMo> Does this have something to do with default rel ?
<linkdd> wait, the stabs are generated by the debugging symbols?
<linkdd> damnit it was
<linkdd> removing -g fixes it
<\Test_User> "when debugging causes bugs"
<linkdd> :/
<gog> who debugs the debugger
<linkdd> debugging code requires more skill than writing it, so writing the most clever code you canc imply you're writing code you can't debug :)
<mjg_> known and imo bullshit quote
<mjg_> most notably there are lolo bugs which become immediately apparent after you run into them
carbonfiber has joined #osdev
<linkdd> lolo bugs which become immediately apparent don't require debugging, since you find them immediately
Ali_A has joined #osdev
<mjg_> does not do this constitute debugging though? you run into a bug and figure out what happened?
<linkdd> finding a penny on the ground is not treasure hunting, is it?
<mjg_> i'm afarid that's not a valid analogy, is it
<\Test_User> writing code involves fixing the bugs in it, debugging code is merely a part of that ;)
<heat> i only quote theo de raadt
<heat> "If some of you people keep insisting on having backwards compatibitity with the stone age, we'll have stone tools forever"
<heat> damn right homie
<GeDaMo> The stone age didn't end because we ran out of stone :|
<mjg_> funny you mention open which has the most stone age tooling imaginable
<mjg_> modulo openssh
<heat> we used to have a guy (mischief?) which maintained a bot (glenda) that had theo quotes
<mjg_> :)
<heat> it had more quotes but I don't remember whose
<mjg_> there is a known quote repo somewhere on suckless or cat-v.org
<heat> yes, it's probably that? he was a 9front person
jafarlihi has quit [Quit: WeeChat 3.6]
skipwich has quit [Ping timeout: 268 seconds]
alpha2023 has joined #osdev
skipwich has joined #osdev
FreeFull has joined #osdev
frkzoid has quit [Ping timeout: 240 seconds]
GeDaMo has quit [Quit: Physics -> Chemistry -> Biology -> Intelligence -> ???]
Starfoxxes has joined #osdev
archenoth has quit [Quit: Leaving]
archenoth has joined #osdev
skipwich has quit [Ping timeout: 265 seconds]
skipwich has joined #osdev
frkazoid333 has joined #osdev
Ali_A has quit [Quit: Client closed]
skipwich has quit [Ping timeout: 268 seconds]
Oshawott has joined #osdev
Oshawott has quit [Read error: Connection reset by peer]
archenoth has quit [Ping timeout: 264 seconds]
sortie has quit [Quit: Leaving]
sortie has joined #osdev
skipwich has joined #osdev
carbonfiber has quit [Quit: Connection closed for inactivity]
rpnx_ has joined #osdev
<heat> sup intellectuals
<gog> hey nerd
<heat> fuk u want
<heat> csharp mofo
<heat> why dont you go do some OO patterns
<gog> hey now
<gog> i was mostly working on javashit
<gog> today anyway
rpnx_ has quit [Ping timeout: 250 seconds]
<heat> is your job "do things"?
<gog> basically
<gog> be gay, do ~~crime~~ things
<heat> is your crime being ✨fab✨
<mats1> what a buncha qts
<gog> eee
<heat> E
[itchyjunk] has quit [Ping timeout: 250 seconds]
[itchyjunk] has joined #osdev
sonny has joined #osdev
SpikeHeron has quit [Quit: WeeChat 3.6]
SpikeHeron has joined #osdev
sonny has quit [Ping timeout: 252 seconds]
epony has quit [Ping timeout: 252 seconds]
CryptoDavid has quit [Quit: Connection closed for inactivity]
joe9 has quit [Quit: leaving]
gog has quit [Ping timeout: 264 seconds]
isaacwoods has quit [Quit: WeeChat 3.6]