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
qxz2 has joined #osdev
Turn_Left has joined #osdev
Turn_Left has quit [Read error: Connection reset by peer]
k0valski18891621 has quit [Quit: Peace out !]
_whitelogger has joined #osdev
Pixi has quit [Ping timeout: 272 seconds]
kata has quit [Read error: Connection reset by peer]
Pixi has joined #osdev
vdamewood has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
innegatives has quit [Quit: Connection closed for inactivity]
Pixi has quit [Ping timeout: 276 seconds]
Pixi has joined #osdev
Pixi has quit [Quit: Leaving]
\Test_User has quit [Ping timeout: 252 seconds]
\Test_User has joined #osdev
dude12312414 has quit [Quit: THE RAM IS TOO DAMN HIGH]
terrorjack has quit [Quit: The Lounge - https://thelounge.chat]
terrorjack has joined #osdev
Pixi has joined #osdev
n00by has joined #osdev
n00by has quit [Quit: leaving]
averymt has joined #osdev
itrsea has joined #osdev
<kof673> nortti, interesting they don't use elf. popovicu.com: 789 KB Linux Without MMU on RISC-V i wonder how many other arches have that, above page implies not necessarily documented :/
<kof673> i'm not sure it is a good feature or that i will use it, but https://0x0.st/s/uPBDj37VrIglz0gjvUCRAw/80n6.h marking up headers so a little script can easily extract function pointers......then with knit function renaming, i could have a script to make code that calls a function, instead call a function returning a function pointer, and rewrite function calls to do that instead lol
<kof673> in theory, you could then swap individual functions etc. at run-time lol
<kof673> or just override where the function pointer points :D
<geist> presumably they're generating a raw image that can run in place, as is common on embedded stuff
<kof673> kernel yes. it uses a uclibc toolchain, not sure about kernel, userland is !elf though some "flat" binary is what i meant
<kof673> the kernel load address is hardcoded i believe, not sure how userland all works, PIC and some "flat" binary format
<kof673> or "userland" maybe we should say :D
<kof673> userland and Userland /s Userland has an MMU, userland no MMU lol
GeDaMo has joined #osdev
vdamewood has joined #osdev
averymt has quit [Read error: Connection reset by peer]
Lucretia has joined #osdev
itrsea has quit [Remote host closed the connection]
itrsea has joined #osdev
itrsea has quit [Quit: leaving]
urandom__ has joined #osdev
urandom_ has quit [Ping timeout: 245 seconds]
k4m1 has quit [Ping timeout: 245 seconds]
n3t has quit [Ping timeout: 245 seconds]
n3t has joined #osdev
valerius_ is now known as valerius
k4m1 has joined #osdev
ThinkT510 has quit [Quit: ThinkT510]
ThinkT510 has joined #osdev
innegatives has joined #osdev
goliath has joined #osdev
parabirb has quit [Quit: WeeChat 4.5.2]
parabirb has joined #osdev
netbsduser` has joined #osdev
kata has joined #osdev
Teukka has quit [Read error: Connection reset by peer]
Teukka has joined #osdev
goliath has quit [Quit: SIGSEGV]
vdamewood has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
kata has quit [Read error: Connection reset by peer]
innegatives has quit [Quit: Connection closed for inactivity]
vdamewood has joined #osdev
Gamer000gaming has joined #osdev
innegatives has joined #osdev
Gamer000gaming has quit [Ping timeout: 245 seconds]
xenos1984 has quit [Quit: Leaving.]
kata has joined #osdev
Gamer000gaming has joined #osdev
Gamer000gaming has quit [Ping timeout: 245 seconds]
goliath has joined #osdev
kata has quit [Read error: Connection reset by peer]
kata has joined #osdev
<_Heat> geist: if (freq > UINT32_MAX) freq = UINT32_MAX;
<_Heat> Fixed.
<nikolar> Haxxor
vai has joined #osdev
<zid> what.. type is freq?
* zid doesn't believe numbers bigger than UINT32_MAX exist
netbsduser` has quit [Ping timeout: 268 seconds]
<_Heat> zid: u64
<_Heat> my CPU has a tsc frequency that doesn't fit in a u32 (4.4GHz)
<zid> and what if it doesnt' fit in u64!?
<zid> antirobust
<zid> Time to have TSC_MHZ_FREQ and divide by a million
netbsduser` has joined #osdev
Left_Turn has joined #osdev
vai is now known as Jari--
<zid> I has chimken boorgar
<Ermine> borgir!
kata has quit [Read error: Connection reset by peer]
kata has joined #osdev
<_Heat> yeah it seems that linux does tsc_khz
<_Heat> and then uses more weird tricks with divisors
<_Heat> terrible.
Leftas has quit [Quit: Whops!]
<zid> kek, winnar
<zid> khz over mhz makes sense I suppose when you've got support for really low speed shit
Leftas has joined #osdev
<zid> I've love to see a bunch of emulated u64 divides on that machine that needs the khz
Turn_Left has joined #osdev
Left_Turn has quit [Ping timeout: 244 seconds]
<Ermine> just use bignum arithmetics
<_Heat> kind of, yes
<_Heat> with the linux cyc2ns algo of mult + shift i need to use 128-bit math (__uint128_t ftw) for absolute timestamps
valerius has quit [Killed (NickServ (GHOST command used by theophilus!~corvus@user/theophilus))]
valerius_ has joined #osdev
kata has quit [Quit: ZNC 1.9.1+deb2+b3 - https://znc.in]
kata has joined #osdev
kata has quit [Client Quit]
itrsea has joined #osdev
itrsea has quit [Ping timeout: 276 seconds]
itrsea has joined #osdev
HumanG331 has quit [Ping timeout: 252 seconds]
HumanG331 has joined #osdev
<_Heat> welp my timing is all over the place
<_Heat> i've been testing with sntp time.google.com and watching the clock drift
<_Heat> and it drifts all over the place in a somewhat inconsistent fashion
<_Heat> although, of course, it's really not a fair fight since i'm under a VM
<zid> VM timers is always a nightmare
<bslsk05> ​hackaday.com: Running An Entire PS1 Emulator In A DS Cartridge | Hackaday
<zid> tom7 did the same for nes, but the NES is weird and slow so it couldn't actually form a coherent image very well
<zid> (also I don't think it was no$ who broke the DS slot protection, that was probably bushing or segher or someone)
<zid> The original attack is just funny, btw, the header has the entry point, hashes of the game rom etc
<zid> but never checks the entry point is *inside* the cartridge address space, so we just jumped to 0x80000000 and ran from the gba slot instead (originally)
<zid> Then they moved on to doing a sort of ROP attack instead, include a known game's rom and modify the entry point to point to a nice texture or whatever that did b 0xC00... past the end of the DS rom, to flash memory on the cart (emulated, later on)
<zid> The 'jump to gba slot' method got firmware update patched, but they couldn't stop the "jump to .data in the real cart"
<zid> There, some fun DS lore for you.
<zid> (I had GBA flash carts so I build tested a lot of the early stuff)
innegatives has quit [Quit: Connection closed for inactivity]
itrsea has quit [Remote host closed the connection]
itrsea has joined #osdev
<_Heat> zid: actually the conversion to khz (and not mhz) isn't really arbitrary
<_Heat> my CPU reports a khz-granularity frequency
<_Heat> 4400018000 Hz
vdamewood has quit [Quit: Life beckons]
<_Heat> actually it might just be noise, it seems that this CPU doesn't enumerate any of the fancy cpuid leafs
<mjg> is this grown up _Heat?
<mjg> with a job?
<_Heat> what
<mjg> quite a change from 'heat'
<GeDaMo> 'heat' was getting pinged in a conversation about Factorio
<_Heat> yeah this is reserved identifier heat
<nikolar> _Heat:
<_Heat> this idea doesn't account for nikolar being a wanker
<nikolar> you're welcome
<mjg> i take it back, it's the old heat
<mjg> or rather, young
<nikolar> yeah he's just _Heat
<mjg> take a chill pill
<_Heat> (mjg doesn't like that word because he sees himself in it)
karenw has joined #osdev
<mjg> facts
<geist> _Heat: yeah i was laying in bed last night thinking that doing something like tsc_khz might solve it
<geist> basically pre div/mul the things by 1000 before running it through
<geist> but then you have to do a /1000 which the whole point of the fixed point lib is to avoid
<geist> well, okay no it's not, it's really there to avoid floating point for unclean ratios, but the second effect that matters more on other arches is it avoids diving
<GeDaMo> Couldn't you div/mul by a power of 2 instead?
itrsea has quit [Ping timeout: 245 seconds]
itrsea has joined #osdev
GeDaMo has quit [Quit: 0wt 0f v0w3ls.]
<geist> yeah true, maybe pre-shift by 1024
tigerbrother has quit [Quit: Ping timeout (120 seconds)]
tigerbrother has joined #osdev
dude12312414 has joined #osdev
foxsecu has quit [Quit: ZNC 1.9.1 - https://znc.in]
netbsduser` has quit [Ping timeout: 260 seconds]
netbsduser` has joined #osdev
Left_Turn has joined #osdev
Turn_Left has quit [Ping timeout: 248 seconds]
fedaykin has quit [Ping timeout: 252 seconds]
parabirb has quit [Quit: WeeChat 4.5.2]
parabirb has joined #osdev
\Test_User has quit [Ping timeout: 244 seconds]
<_Heat> christ
<_Heat> if you add 16GB of ram to QEMU it places none of it in the lower 4GB
Turn_Left has joined #osdev
<zid> lower 4GB is for evil people
<_Heat> yeah. and device drivers
<_Heat> :)
<zid> That'd break my bootloader though ngl
<_Heat> ... wait
<_Heat> good point
<_Heat> ah. i think i'm devouring it all for the struct pages
Left_Turn has quit [Ping timeout: 244 seconds]
\Test_User has joined #osdev
<_Heat> yep. kasan + the page map devoured the whole thing
Left_Turn has joined #osdev
Turn_Left has quit [Ping timeout: 265 seconds]
itrsea has quit [Remote host closed the connection]
itrsea has joined #osdev
Lucretia has quit [Remote host closed the connection]
Left_Turn has quit [Read error: Connection reset by peer]
fedaykin has joined #osdev
m5zs7k has quit [Remote host closed the connection]
netbsduser` has quit [Ping timeout: 252 seconds]
goliath has quit [Quit: SIGSEGV]