jjuran has quit [Remote host closed the connection]
jjuran has joined #osdev
pebble has joined #osdev
<pie_>
how does a 16550a uart, and peripherals in general know when like..an operation has finished and they need to do something, or something like that?
<pie_>
the cpu gets an IRQ, but the UART doesnt seem to get an irq from the cpu
<GeDaMo>
There will be a signal line or possibly a command sent to acknowledge the interrupt
<heat>
i don't understand the question
<heat>
what is "an operation"
<heat>
and why would the UART need an irq
<heat>
(from the CPU)
autarkied has joined #osdev
<pie_>
heat: i dont know how this works at all
<pie_>
trying a different way; how does the cpu send a byte over the UART?
<heat>
ok
<heat>
there's this thing called"IO ports"
<heat>
which is basically something you write to with a magic instruction
<pie_>
right
<heat>
and writing sets off a bunch of magical electrical signals that end up telling the peripheral "hey someone write X to port Y"
<heat>
s/write/wrote/
<bslsk05>
<heat*> and writing sets off a bunch of magical electrical signals that end up telling the peripheral "hey someone wrote X to port Y"
<heat>
so it effectively works interrupt-like, by default, because there's no such thing as polling in the electrical world
<nikolar>
Alternatively, the peripheral could be memory mapped, so instead of a special instruction, you use a normal memory store
<pie_>
ok but what does that look like between the cpu and the uart
netbsduser` has joined #osdev
<heat>
memory mapped IO is similar, but the "memory" you're accessing isn't memory, but rather the CPU decodes that into electrical signals and messages and sends it down to the peripheral
<GeDaMo>
Wires. Lots of wires. :|
<heat>
it depeds.
<pie_>
theres a clock pin, but i assume thats always clocking because something needs to drive the tx/rx side?
<pie_>
though the whole point is that its Asynchronous so...?
<heat>
idk man i'm not an electrical guy
<heat>
the device can be connected in various ways
<GeDaMo>
You also have read and write wires so the CPU can tell the device what's happening
<heat>
sometimes it's part of the southbridge (so tightly integrated with the motherboard)
<heat>
sometimes it's on the PCIe bus (read the PCIe spec for details on all sorts of electrical wiring and protocols it uses)
<GeDaMo>
pie_: you might be interested in some of Ben Eater's videos
<GeDaMo>
Particularly the ones where he makes a 6502 computer
<autarkied>
What do you think about making a Linux kernel based operating system? Maybe it's not a 'complete' OSDev from the ground up but the idea of using just Linux kernel and nothing else interests me, while I struggle to understand how to compose it really.