<osmten>
In cache, If we got the cache line and know the offset of the cache line to read from through some bits in address then how it will know how much data to read from that offset?
<Mutabah>
osmten: Who is "we" here? Anything underneath the ISA tends to be a black box to developers
<Mutabah>
(until you get to the electrical interfaces - the domain of hardware developers)
<osmten>
cache controller, I want to know from the view of how it is handled internally
<Mutabah>
That's some hardware specifics - you might find details of that in CPU manuals?
<Mutabah>
but... I could guess a little bit at the answer
<Mutabah>
A cache line is just a `n` byte chunk of memory, and is most likely aligned - so the portion of the line to read is specified by the operation size (e.g. 32-bit) and the lower bits of the address
<osmten>
I am confused e.g in case of direct mapping lets say 16 bits 10 bits are used as tag , 2 bits for index from the 2 bits of index it gets the cache line and the remaining bits will specify offset in the cache line lets say last 4 bits were 0001 so it should read from offset 1 to the end of cache line or some predefined bytes
gog has joined #osdev
<moon-child>
osmten: on modern designs, generally, a cache line is 64 bytes, but it's broken up into 8-byte sections, and a given load/store is served from up to 2 sections
<zid`>
cache lines are fixed width
<moon-child>
this allows unaligned accesses to be fast
<moon-child>
having selected the two sections you're interested in, you'll have a cascade of muxes in order to get the bytes you want where you want them
<moon-child>
no real way around that in general--lots and lots of muxes
<bslsk05>
drewdevault.com: rc: a new shell for Unix
<ddevault>
shell I've been working on (for Linux) and intend to port to my OS
elastic_dog has quit [Read error: Connection reset by peer]
elastic_dog has joined #osdev
gabi-250 has joined #osdev
gabi-250 has quit [Client Quit]
gabi-250 has joined #osdev
xenos1984 has quit [Read error: Connection reset by peer]
Brnocrist has quit [Read error: Connection reset by peer]
sinvet has joined #osdev
xenos1984 has joined #osdev
bauen1 has quit [Ping timeout: 240 seconds]
<sham1>
Is that related to plan9's rc in anything but name
osmten has quit [Quit: Client closed]
<ddevault>
yes, it's inspired by it in many ways
<pitust>
it looks interesting
<pitust>
would certainly be more interesting if it didnt require one to port hare
<ddevault>
porting hare should be pretty straightforward
<ddevault>
assuming you have libc and its trimmings, e.g. stdio
<ddevault>
and one of the supported targets, e.g. x86-64
<pitust>
does it have some special target where it can use the libc instead of direct system calls?
<ddevault>
yes
<ddevault>
but I would advise you just port your syscalls, it's straightforward
<ddevault>
and +libc does not support cross compiling or sysroots properly
<ddevault>
so you'd need a toolchain on the host to use it
<pitust>
ohhhkay
<pitust>
so you need hare to support the host
<ddevault>
in order to cross-compile with libc support
<ddevault>
to cross-compile without libc is straightforward though
<pitust>
sure
<ddevault>
hare build -X^ -T+your_target ...
<ddevault>
plus -t aarch64 or whatever if appropriate
<pitust>
sure
<ddevault>
assuming ELF
<pitust>
and you need a linker script that defines the proper symbols as well i guess
<ddevault>
yeah, rt/hare+target.sc
<ddevault>
and hare has been ported to at least one non-mainstream OS :)
<pitust>
but it does seem that a lot of the standard library (e. g. `net` or `os`) don't have +libc versions
<ddevault>
ah, err
<ddevault>
+libc still uses syscalls
<ddevault>
it just links with libc so you can incorporate C libraries and such
<pitust>
ohhhkay
<pitust>
so you still need a port
<ddevault>
yeah
<ddevault>
but again, fairly easy to write one
<pitust>
fair enough
<ddevault>
happy to help anyone who wants to bring up Hare on their OS
<ddevault>
if you have ELF and something resembling a Unix syscall API, you can port the stdlib, if you have libc and a C11 compiler you can port the toolchain, if you have something else you can start from freestanding hare and build whatever you want
Brnocrist has joined #osdev
bauen1 has joined #osdev
Jari-- has joined #osdev
bnchs has joined #osdev
bradd has quit [Ping timeout: 250 seconds]
pmaz has quit [Ping timeout: 246 seconds]
Burgundy has joined #osdev
vdamewood has joined #osdev
tiggster has quit [Ping timeout: 255 seconds]
Jari-- has quit [Ping timeout: 276 seconds]
zxrom has joined #osdev
gabi-250 has quit [Remote host closed the connection]
gabi-250 has joined #osdev
dutch has quit [Quit: WeeChat 3.8]
slidercrank has quit [Quit: Why not ask me about Sevastopol's safety protocols?]
dutch has joined #osdev
bauen1 has quit [Ping timeout: 240 seconds]
bauen1 has joined #osdev
ChadGPT is now known as mjg
Left_Turn has joined #osdev
bnchs has quit [Read error: Connection reset by peer]
bauen1 has quit [Ping timeout: 260 seconds]
Ameisen has quit [Quit: Quitting]
goliath has quit [Quit: SIGSEGV]
Ameisen has joined #osdev
vdamewood has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<puck>
i'm also not entirely sure how POSIX this os is
<heat>
very
<puck>
oh it has a set of what was probably POSIX back in .. well, 1994
<heat>
yes, and that's perfect
<heat>
that's pre-"lets return error codes in some functions, and in others lets return -1 and set errno"
<ddevault>
the POSIX bits of harec are probably relatively easily worked around and/or patched into your libc
wlemuel has quit [Ping timeout: 252 seconds]
<geist>
sortix is definitely big and professional
<geist>
i hear sortie even has a job
<heat>
yes, the GNU hippy commies don't have jobs, but big professional sortix devs have
<GeDaMo>
There's always employment in the fast food industry :P
wlemuel has joined #osdev
<kof123>
i dunno, without a sortie foundation how can it be trusted?
<sortie>
You get your OS used in the real estate and fast food industries and you never have to work a day in your life again
<sortie>
kof123, I assure you it's being run by sortix.org
<kof123>
and the programmers get nothing and marketing gets everything? i thought not. you got a long ways to go towards the pros
<kof123>
self-hosting? this is all the wrong direction
<sortie>
As for the ethical oversight and accountability of Sortix, I live that to nortti. If there's ever one day where nortti disapproves and believes a line to have been crossed, that's when people should go nope
<geist>
all is decided in the sortix communal sauna
<sortie>
You can walk into a café in Helsinki and order a coffee, get the complimentary Nokia, and play games on the Sortix laptop
sebonirc has quit [Remote host closed the connection]