<Belxjander>
early computing was based in an era when business with interest in automata all wanted market dominance
<Belxjander>
the whole market dominance thing is still true... but things have improved somewhat...despite the market having been dumped on a bit
<Belxjander>
at least for my own opinion anyway
uplime has left #osdev [/me scurries away]
Belxjander has quit [Ping timeout: 264 seconds]
Belxjander has joined #osdev
mctpyt has joined #osdev
mahmutov has quit [Ping timeout: 252 seconds]
<kazinsal>
consider linux distros
<kazinsal>
each is a different pile of linux and gnu software and sometimes their own proprietary bits
<kazinsal>
but they are all linuxes
<kazinsal>
in ye olde days there were a bunch of system v unixes, all of which were at&t unix code and some BSD bits more often than not with their own proprietary software on top
<kazinsal>
there are still like four or five svr4 unixes out there still
<Belxjander>
thats part of the reason why Linux has had such a large server penetration actually
<kazinsal>
yep, red hat got in early and got in deep
<johnjay>
why svr4? i thought it wasn't commercial until later
<johnjay>
like7
<kazinsal>
i wonder what kind of market share canonical holds for paid enterprise linux
<kazinsal>
system v was the successor to system iii which was an amagamation of V7 and the various 32-bit vmunixes
isaacwoods has quit [Quit: WeeChat 3.2]
NieDzejkob has quit [Ping timeout: 244 seconds]
NieDzejkob has joined #osdev
skipwich has quit [Ping timeout: 244 seconds]
skipwich has joined #osdev
freakazoid333 has quit [Read error: Connection reset by peer]
<geist>
<insert usual unix history tree>
<geist>
but yeah SV was an attempt to standardize I believe
<geist>
one of many that came later
freakazoid333 has joined #osdev
<geist>
ah looks like more of an org chart thing: system 3 and system 5 were another arm of AT&T, outside of bell labs. closed source
<remexre>
how do people usually set up testing for their kernel? I have some code I can test by linking it to userspace stuff, some that is kernel-only, and some that I suppose I can test from userspace, but it'd be more effort to put a test harness there
<moon-child>
make sure that your userspace tests hit all of your kernel stuff that needs to be hit
<moon-child>
imo end-to-end tests are generally preferrable to unit tests when you're not making a library, because they test that your code is actually doing what it should; not that specific modules maintain their APIs
<remexre>
so that's the philosophy we do at work, and IMO it sucks because it's way easier to exhaustively test at the unit level, so when you weight too much towards the integ level, code paths not in the tests tend to decay quickly
<remexre>
I guess the tests at hand are more things like
<remexre>
I want to be sure the disk drivers are indeed making a filesystem that can be read back in, and it feels really gross to e.g. do that test by making a bunch of files then rebooting, rather than being able to do something in-kernel
<geist>
combination of both really, but in lieu of either i'd generally go for end to end to make sure you basically work
<geist>
and then unit test things that are easily unit testable
<geist>
but yes, uilding in things like being able to simulate failures would be a good thing
<geist>
like a faulty disk driver, etc
<moon-child>
remexre: I mean, I think there is something to be said for unit tests, but broadly I think integration tests are better. And in this case it's much easier to do end-to-end
<moon-child>
for fs, you can just unmount and remount, no need to reboot
<moon-child>
I mean, at some point if you want to make sure that your fs is reliable, you need to see what happens if you physically unplug the power supply and reboot. There's no quantity of unit tests that will give the same level of confidence that an fs is working as intended
<remexre>
geist: yeah, I haven't built that yet, but for disks in particular I was considering doing testing like sqlite does for OOM, where I run the whole test suite with it instrumented to have a disk failure at write number N for all N
<remexre>
moon-child: I guess when I say unit tests, I usually mean "semi-exhaustive tests at the unit level," e.g. property tests
<remexre>
I agree that if you're only exercising one code path, might as well make it an integration test and save spinning up an extra VM, exercise the memory management code too, etc
<remexre>
I *think* my only single-codepath unit tests atm are conformance tests for various algs (e.g. chacha20)
<remexre>
My question is more, how should these get wired up outside of the VM
<remexre>
right now, it's "for each test, a certain line ends up getting written to the serial port somehow"
<remexre>
but I'm not really a fan of that
<geist>
indeed. though it's a good start
<geist>
especially if you can guarantee lines dont get chopped or whatnot
<remexre>
chopped?
jimbzy has joined #osdev
jimbzy has quit [Changing host]
<johnjay>
moon-child: what is the distinction between a unit test and an integration test?
zoey has quit [Quit: Leaving]
<jimbzy>
I read that as "unit test and an imagination test?" I think I need more coffee, or less coffee. Probably more.
<remexre>
johnjay: a unit test tests one logical unit (e.g. the disk driver), an integration test tests the whole integrated system
<johnjay>
i guessed it was something like that.
<klange>
Integration tests are fundamentally about testing components working together.
<johnjay>
i guess the obvious qu estion is how do you write automated test for that
<johnjay>
or is it just you use it live
<remexre>
usually I see using it live
Sos has quit [Quit: Leaving]
<remexre>
e.g. capturing user sessions or making synthetic ones and playing them back against a staging system
<klange>
The classic integration test is the smoke test: Run the whole thing, do some stuff, see if smoke comes out.
vin has quit [Read error: Connection reset by peer]
jjuran has joined #osdev
jjuran has quit [Remote host closed the connection]
<kazinsal>
layer 3 filtering is in play and is... surprisingly fast
<kazinsal>
slowly getting closer to being able to use this as an actual router/firewall
GeDaMo has joined #osdev
doug16k has joined #osdev
Belxjander has joined #osdev
vdamewood has joined #osdev
iorem has joined #osdev
<doug16k>
they added a bit of gdbstub magic, allowing you to read/write physical memory from gdb: maintenance packet Qqemu.PhyMemMode:1
<doug16k>
0 puts it back to normal virtual addresses
<klange>
mbedtls packaged up again, still had to turn off the socket module because I'm missing a few things in my libc, but it's working nicely
<klange>
my cert chain is... probably a bit outdated
<klange>
also why the hell am I embedding my cert chain in this app
freakazoid333 has quit [Read error: Connection reset by peer]
sortie has joined #osdev
Vercas has quit [Remote host closed the connection]
Vercas has joined #osdev
warlock has quit [Ping timeout: 268 seconds]
<klange>
I ... should work on my package format cleanup again.
<klange>
toaru "legacy" had very deb-esque packages with integrated metadata, but when I did the NIH project I had an assortment of different things until I had a tar extractor, and later a deflate inflater, and that weird stuff is still supported and I should throw it away
<klange>
current set of packages are tarballs that expect to be extracted into /, much like a deb data archive would be, but I want to add the metadata back
sortie has quit [Quit: Leaving]
<klange>
original format used json blobs, and... I have a _two_ json parsers now, and it's really easy to write a JSON dumper in Kuroko (there's one hidden in my wasm IDE)
sortie has joined #osdev
mctpyt has quit [Ping timeout: 244 seconds]
mahmutov has joined #osdev
srjek_ has quit [Ping timeout: 240 seconds]
dennis95 has joined #osdev
Affliction has quit [Quit: Read error: Connection reset by beer]
<meisaka>
I made a dhcp client, and it works :D
Affliction has joined #osdev
sortie has quit [Quit: Leaving]
<jjuran>
I made my first commit to my git.git fork since 2014 :-)
<jjuran>
A subprocess was calling exit() instead of _exit(), which causes problems with the bastardized substitute for fork() I cooked up specifically to get git working
<jjuran>
It's basically vfork() except with certain things like fds unshared
<jjuran>
exit() destroys the mutable environ storage, which the parent continues to use
<jjuran>
(Hilarity ensues)
<jjuran>
But it only started crashing after I refactored the environ storage to avoid throwing exceptions
Sos has joined #osdev
ElementW has joined #osdev
iorem has quit [Quit: Connection closed]
<klange>
tcp rx is working pretty well in VMs with slirp, not completely failing directly against the real network... and I've got mbedTLS working again.
<doug16k>
TCG doesn't do segment limit checks on LGDT
<klange>
So, should work on the tx side, get redelivery implemented, maybe do the right windowing stuff...
Burgundy has joined #osdev
Oshawott has quit [Ping timeout: 244 seconds]
<klange>
Want to get screenshots uploaded natively again, but it's extra hard now when they're, uh, uncompressed targas.
<klange>
The Cairo-backed compositor used libpng and could just dump pngs directly.
mingdao has quit [*.net *.split]
warlock has joined #osdev
Arthuria has joined #osdev
Arthuria has quit [Remote host closed the connection]
Arthuria has joined #osdev
tacco has joined #osdev
Arthuria has quit [Read error: Connection reset by peer]
Arthuria has joined #osdev
unmanbearpig has quit [Ping timeout: 272 seconds]
brynet has quit [Ping timeout: 272 seconds]
<doug16k>
neat: failed to convert GOTPCREL relocation; relink with --no-relax
Arthuria has quit [Read error: Connection reset by peer]
Arthuria has joined #osdev
<doug16k>
ld is an eternal fountain of surprises
<doug16k>
nothing to do with GOT, whatsoever. it's moving an immediate absolute address and the symbol for it is is defined in the same assembly source
<doug16k>
ah! I need .hidden
<doug16k>
nope
<j`ey>
lol eternal fountain
<doug16k>
I see why - it can't generate a reference to the GOT because relaxation is thinking about making a GOT entry for it, and it can't reach where the GOT would be in this link
<doug16k>
even though it wouldn't end up using GOT
<doug16k>
can't reach in code32*
<doug16k>
--no-relax works
mahmutov has quit [Ping timeout: 264 seconds]
<doug16k>
it errored because it *could* have changed it to be a GOT reference that can't link, even though wouldn't have
<doug16k>
lol
<klange>
I blame interposing for most of my ld nightmares.
sol-86 has joined #osdev
<sol-86>
hi all
<GeDaMo>
Hi sol-86 :P
<sol-86>
lol
<sol-86>
here you are
<sol-86>
i am writing an operating system from scratch
<sol-86>
for a cpu i made
<sol-86>
all in assembly as I don't have a compiler yet
<sol-86>
it is connected to the internet too
chrysanthematic has joined #osdev
<sol-86>
its website is sol-1.org
<sol-86>
have a look
Arthuria has quit [Read error: Connection reset by peer]
<sol-86>
i am looking for people who want to get involved
<sol-86>
its all just for fun
Arthuria has joined #osdev
theruran has quit [Quit: Connection closed for inactivity]
Arthuria has quit [Read error: Connection reset by peer]
<nur>
I dunno what it's doing.
<nur>
I compiled it with "debug mode"
gog has joined #osdev
Arthuria has joined #osdev
<nur>
maybe that makes it go slower?
<geist>
it should, but that seems exceptionally slow. if you compile it without debug mode does it work?
<geist>
i honestly haven't run bochs in probably 10 years so i dont have handy the details
<nur>
well I guess I'll have to make another bochs binary and install it somewhere else
<geist>
usually the precompiled ones call it bochs and bochsdbg
<geist>
but i do remember the debug builds being somewhat slower
<geist>
though nothing particularly bad
<geist>
anyway, good luck, but having both copies is probably a good thing
<nur>
thanks
<geist>
build it twice, one with and without debug
<geist>
gotta go do some yard work
* geist
waves
Arthuria has quit [Read error: Connection reset by peer]
<nur>
bye geist
<nur>
thank you
Arthuria has joined #osdev
f11 has joined #osdev
Arthuria has quit [Ping timeout: 265 seconds]
GeDaMo has quit [Quit: Leaving.]
jeaye has quit [Quit: WeeChat 2.7.1]
sol-86 has left #osdev [#osdev]
jeaye has joined #osdev
flx has quit [Quit: Leaving]
flx has joined #osdev
jeaye has quit [Quit: WeeChat 2.9]
jeaye has joined #osdev
sts-q has joined #osdev
srjek_ has quit [Ping timeout: 265 seconds]
ostrich has joined #osdev
wootehfoot has quit [Quit: Leaving]
wootehfoot has joined #osdev
vdamewood has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<doug16k>
nur, building bochs for debug will make it run much slower. bochs is completely cpu bound
<doug16k>
very much slower, I should say
chrysanthematic has quit [Quit: chrysanthematic]
wootehfoot has quit [Quit: Leaving]
ostrich has quit [Quit: WeeChat 3.2]
ostrich has joined #osdev
ostrich has quit [Client Quit]
<geist>
doug16k: that being said 10 minutes to still be in grub seems a bit much
<geist>
unless i guess it's a compressed image they're trying to load?
<geist>
something that requires a lot of cpu
<warlock>
doug16k: hey, just wanted to remind ya, that you're the man! thanks for all the help the other day
carmysilna has left #osdev [#osdev]
sortie has joined #osdev
<riverdc>
the bootloader I'm using expects the kernel entry point to be at address 0x80000, which I'm setting up with a linker script. when I compile to an elf with gcc and look at the disassembly, the starting instruction is indeed at 0x80000. but when I objcopy it to a plain binary, the starting instruction is the first byte. I expected there to have to be 0x80000 nops first, or something like that. can
<riverdc>
(this runs fine, I just want to understand better what's going on)
elastic_dog has quit [Ping timeout: 272 seconds]
elastic_dog has joined #osdev
Burgundy has left #osdev [#osdev]
f11 has quit [Quit: Leaving]
<riverdc>
nevermind, figured it out, sorry for the noise!
<warlock>
even though you say you got it figured out, since you said 0x80000, I guess you're doing arm, anyway, it loads the image directly at that location
<riverdc>
yeah, I thought the bootloader *expected* it to be at that location within the image, but as you say, it loads the image *to* that location
<warlock>
so the first byte into the file, is aligned at that address
sortie has quit [Quit: Leaving]
<doug16k>
nur, extreme slowness can be caused by excessively high or low MIPS setting. if you set it too high, it can help make less interrupts be taken per unit of work completed, but it will also cause loops that spin to pass the time to take extremely long
<doug16k>
if you set the mips really low, then loops that spin until time elapses will complete very quickly, but the machine will spend a lot of time in interrupts, due to a lot of time passing per instruction
<doug16k>
so you have to set a happy medium
<doug16k>
try 1 MIPS to see if it is because there is a loop spinning until some amount of time elapses. that will be very quick on 1 MIPS
<doug16k>
try 5-20 MIPS to see if it is because it is spending all of its time in timer interrupts
pretty_dumm_guy has quit [Quit: WeeChat 3.3-dev]
<doug16k>
if you thought putting 5000 mips would make it fast, it won't, it will take 7 minutes of real cpu to emulate one second of guest time
<doug16k>
guessing your computer can run about 12MIPS of emulation. you can see the rate in the bottom left corner of the bochs window
<doug16k>
bochs emulates a magical cpu, where it can execute an instruction every "cycle", and the instruction is one cycle, no matter how difficult it is
<doug16k>
nop and fbstp are the same speed
<doug16k>
from guest frame of reference
<doug16k>
if you measure how many nop and how many fbstp you could do in one second, it's identical to the guest
<doug16k>
fbstp is hideously slow, in case you haven't already guessed that
<doug16k>
normally
sm2n has quit [Ping timeout: 264 seconds]
<doug16k>
riverdc, what you want is actually what you get when the linker screws it up
<doug16k>
if you are making a ROM that your address decoder puts at 0xc00000 then the byte at 0xc00000 is at 0 in the rom image
<doug16k>
right?
<doug16k>
if you want it to screw up catastrophically like that, use gold linker
<doug16k>
gold linker is a laugh when you try to make a rom image
sm2n has joined #osdev
<riverdc>
> then the byte at 0xc00000 is at 0 in the rom image
<riverdc>
yep, that's what I want. but I'm not sure what you mean by the linker "screwing it up". gnu linker seems to be doing exactly what I want
<doug16k>
show your objdump -h
<riverdc>
just replacing the addresses such that they're correct when loaded at 0x80000
<doug16k>
the LMA and VMA work together to tell you why it did that
<doug16k>
the LMA for the initialized parts need to be laid out so there aren't any wild gaps
<warlock>
basicly, you got different things, you got the address you're at in memory, and an address in the file, and an address your assembler/compiler believes you to be at
<doug16k>
what I mean by "screwing it up" is this: the first initialized byte in your ROM is at offset 2MB, so there are 2MB of zeros at the start of the binary image
<doug16k>
but yeah, now I know you want the sane thing
<riverdc>
yeah sorry I didn't actually want that ^
<riverdc>
I thought that's what the bootloader wanted but I was confused
ghwerig_ has joined #osdev
<doug16k>
that looks fine
<doug16k>
VMA where the code thinks it is. LMA is where it ends up in the bin file
<doug16k>
where beginning of bin file == lowest LMA
ghwerig has quit [Ping timeout: 272 seconds]
<doug16k>
so in linker script, .text : { *(.text); ... } >ram AT >rom
<warlock>
yea I'm not that good at explaining or using the correct terms but I understand it, cause I'm doing assembler and always building different files by hand
<doug16k>
you can cook up total weirdness where it puts .text in some odd place in the rom, puts data in some other odd place, and be able to copy those to some third place (typically ram), with some symbols in the load address space, and others in the final relocated place (ram)
<doug16k>
you can have stuff in the load image that you keep using, and stuff you never use again after using the initial image (.data)