#Nyaux

1 messages · Page 37 of 1

kind root
#

Nax

kind root
#

@surreal path what features are next on the list

thorn bramble
#

what features are there right now

#

and features i mean features

#

not idt and gdt

surreal path
#

lol

thorn bramble
#

im making a joke cuz u see newbies printing [GDT] OK

surreal path
#

ik

#

i used to do that too

thorn bramble
#

liek it's some sort of an achievement

#

wel.l to them maybe it is

#

but in the big picture it's nothing

thorn bramble
#

i think i might have done that too

surreal path
#

APIC, vfs, ustar and tmpfs, devfs ig

#

and um

#

pci maybe

kind root
#

No ec nooo

surreal path
#

oh yeah ec

kind root
#

Be the fourth hobby os with an ec

surreal path
#

asi will

#

i will*

thorn bramble
#

my 3 year old code NOOOO

surreal path
#

😭

silver yarrow
#

lmao

thorn bramble
#

i thought i was better than that

#

but no

#

i am noob like everyone else

surreal path
#

nahh

silver yarrow
#

my v1 branch is lost to the ether

#

thank god

kind root
surreal path
#

very

molten grotto
#

I don't think I have ever had that many prints, I have had bad code basically copied from poncho tutorial tho

surreal path
#

same

silver yarrow
#

lmao

cinder plinth
kind root
#

Embedded controller

cinder plinth
#

this was my first OS

#

sucks so bad

#

but it's my most popular lol

surreal path
#

317 fucking stars

#

i hope you uninstall factorio

#

NOW

cinder plinth
#

wha

molten grotto
cinder plinth
#

I dont play factorio

surreal path
#

uhhh

cinder plinth
#

not regularly anyway

surreal path
#

then no more osdev

cinder plinth
#

my game rn is marvel rivals

surreal path
#

NOW

#

no more marvel rivals

#

NOW

molten grotto
kind root
cinder plinth
#

I'm famous

kind root
#

Got lucky on hackernews?

edgy pilot
cinder plinth
#

I think even hackernews would see this as useless

#

because it doesnt do anything

#

I think I posted it on reddit

#

it was like the most upvoted at one point lmao

kind root
#

Wth

#

Got a link?

cinder plinth
#

yea sec

#

love this sub

elder shoal
cinder plinth
#

huh my scratchOS is top3

kind root
cinder plinth
#

ok nvm it wasnt a big post

#

it's like

#

top 40

#

I may be misremembering then

cinder plinth
#

4 years ago

#

damn

#

I was like 13 lol gotta give me credit

elder shoal
#

I will post timelapse of astral building gcc it will be 10 years at 1000x

molten grotto
#

reddit sucks anyway

cinder plinth
kind root
cinder plinth
#

yes

surreal path
#

insane

#

should i post nyaux to r/osdev

#

get a trillion stars

elder shoal
cinder plinth
#

this was in the covid era so lots of stupid beginners

#

I got my code stolen a bunch lol

kind root
#

Bruh

molten grotto
#

I could post a sc of my vm running inside my os displaying seabios starting text troll tbf I should get back to it and make it actually boot it further

#

so I can boot nyaux inside there

surreal path
#

im posting nyaux to reddit

surreal path
#

DO IT

cinder plinth
#

you'll get nothing but empty statisfaction

surreal path
#

I APPROVE

#

QWINCI I APPROVE

kind root
#

Nothing as satisfying as clueless people that will never interact with your project leaving a star

surreal path
#

yes

#

ill make nyaux like more "cooler" to begineers

#

GDT [OK] type beat

#

💀

#

bout to get tons of stars

kind root
#

Add a loading screen for gdt installation

finite summit
surreal path
molten grotto
#

also print every task switch for extra log spam to make it look cool (and use a green font because why not)

surreal path
finite summit
#

nyaux the type of kernel to take 10 seconds to load gdt

surreal path
#

💀

finite summit
#

(using kvm)

elder shoal
surreal path
#

its the pmm

finite summit
#

💀

surreal path
#

fucking so af pmm

#

slow*

#

everything else in nyaux is pretty fast except for the allocator or whatever is making uacpi ops kinda slow

finite summit
#

obos without SMP is a lot faster than with

surreal path
#

lol

finite summit
#

I'm going to blame it on tlb shootdowns

molten grotto
#

just don't do them

#

that's how I do it

elder shoal
#

Never unmap or remap memory ez

surreal path
#

lol

molten grotto
# molten grotto that's how I do it

(though I should fix that, what I plan on doing is just not letting the pages get reused until all cpus where a process is in use have invalidated the tlb entries for them likely right before switching to a thread that's part of the process if there are pending invalidations), or alternatively just having a per cpu tlb invalidation queue that's checked there idk

#

then I can hopefully get away without needing ipis for the invalidations

elder shoal
#

I just send an ipi after every unmap or remap operation (not per page)

#

Its not good but much better than what I did

surreal path
#

yea this girl made me lose my kill streak in roblox

#

cringe

elder shoal
#

Hey bbg you so pretty you made me lose my kill streak in roblox wanna go out

silver yarrow
#

Roblox in nyaux before gta 6

finite summit
#

gta 6 in nyaux before gta 6

surreal path
#

SORRY CHAT IM VERY SLEEPY

silver yarrow
finite summit
#

hopefully never

silver yarrow
#

wanted to expand on this whole tss - 1 limit business

#

realized when reimplementing this for the rewrite im doing

#

there's actually 4 more bits for the limit

#

😄

#

not that it should really change anyones implementation unless they are using the iopb

#

but its def not -1 I dont think

thorn bramble
#

it still is -1, you just need to make sure that if it's over 16 bits that you actually put the other 4 bits where they are supposed to be

finite summit
#

since christmas is said to be a magical day, maybe today nyaux won't have as many bugs

crystal scarab
#

maybe

surreal path
#

INTRODUCE YOURSELF TO THE THREAD

#

😡

crystal scarab
# surreal path WHO IS YOU ???

I'm ChatGPT, an AI assistant created by OpenAI. I'm here to help with a wide range of tasks, whether it's answering questions, brainstorming ideas, providing advice, or assisting with creative projects. What can I do for you today?

crystal scarab
tender gorge
crystal scarab
#

Chocolate Chip Cookies Recipe

Ingredients

  • 2 1/4 cups (280 g) all-purpose flour
  • 1 tsp baking soda
  • 1/2 tsp salt
  • 1 cup (2 sticks or 226 g) unsalted butter, softened
  • 3/4 cup (150 g) granulated sugar
  • 3/4 cup (160 g) packed light brown sugar
  • 1 tsp vanilla extract
  • 2 large eggs
  • 2 cups (340 g) semisweet chocolate chips

Instructions

  1. Preheat Oven
    Preheat your oven to 375°F (190°C). Line baking sheets with parchment paper or silicone mats.

  2. Mix Dry Ingredients
    In a medium bowl, whisk together the flour, baking soda, and salt. Set aside.

  3. Cream Butter and Sugar
    In a large mixing bowl, beat the softened butter, granulated sugar, brown sugar, and vanilla extract until creamy.

  4. Add Eggs
    Add the eggs one at a time, beating well after each addition.

  5. Combine Wet and Dry Ingredients
    Gradually mix in the dry ingredients until well blended.

  6. Stir in Chocolate Chips
    Fold in the chocolate chips with a spatula or spoon.

  7. Scoop Dough
    Drop rounded tablespoons of dough onto the prepared baking sheets, spacing them about 2 inches apart.

  8. Bake
    Bake for 8–10 minutes, or until the edges are golden brown and the centers look slightly undercooked.

  9. Cool
    Let the cookies cool on the baking sheet for 2 minutes, then transfer to a wire rack to cool completely.


Notes

  • Store cookies in an airtight container at room temperature for up to a week.
  • For softer cookies, slightly underbake them.
  • You can freeze cookie dough balls for later baking—just add an extra minute or two to the baking time when baking from frozen.
tender gorge
crystal scarab
#

Nyaux Hobby Operating System Review

Nyaux is a hobby operating system developed from scratch by programmer Klange. The name "Nyaux" is a playful reference to the Japanese light novel series Toaru Majutsu no Index and Toaru Kagaku no Railgun, with system components named after characters from the series—Misaka as the kernel and Kuroko as the interpreter.

Design Philosophy and Features

Nyaux is designed to be a comprehensive, Unix-like operating system that offers a rich set of features:

  • Dynamically Linked Userspace: Unlike many hobby operating systems that rely solely on static linking, Nyaux supports dynamic linking. This allows for more efficient memory usage and easier updates to shared libraries.

  • POSIX Compatibility: Nyaux aims for POSIX compliance, which facilitates the porting of existing Unix applications and provides a familiar environment for developers.

  • Graphical User Interface (GUI): Nyaux includes a GUI with a windowing system, offering a user-friendly interface that sets it apart from many minimalist hobby operating systems.

Community and Development

Nyaux has garnered attention in the operating system development community for its ambitious scope and unique design choices. Discussions on platforms like Reddit and Hacker News highlight the project's complexity and the developer's dedication.

Comparison with Other Hobby Operating Systems

When compared to other hobby operating systems like SerenityOS, Nyaux distinguishes itself with its focus on POSIX compatibility and dynamic linking. While SerenityOS offers a Unix-like environment with a focus on user experience and performance, Nyaux's approach to system design and compatibility provides a different set of trade-offs.

Conclusion

#

Nyaux represents a significant effort in the realm of hobby operating systems, combining elements of Unix-like design with unique features and a rich user interface. Its development reflects a commitment to creating a functional and user-friendly system, making it a noteworthy project for enthusiasts interested in operating system development.

#

LMFAO

#

The name "Nyaux" is a playful reference to the Japanese light novel series Toaru Majutsu no Index and Toaru Kagaku no Railgun

silver yarrow
#

The amount of money you are costing openai by making them decipherparse the Nyaux source code

crystal scarab
#

yeah it is confusing it with toaruos lmfao 😭

finite summit
crystal scarab
#

Chocolate Cake Recipe

Ingredients

For the Cake:

  • 1 3/4 cups (220 g) all-purpose flour
  • 1 1/2 tsp baking powder
  • 1 1/2 tsp baking soda
  • 3/4 cup (65 g) unsweetened cocoa powder
  • 2 cups (400 g) granulated sugar
  • 1 tsp salt
  • 2 large eggs
  • 1 cup (240 ml) whole milk
  • 1/2 cup (120 ml) vegetable oil
  • 2 tsp vanilla extract
  • 1 cup (240 ml) boiling water

For the Chocolate Frosting:

  • 1/2 cup (115 g) unsalted butter, softened
  • 2/3 cup (55 g) unsweetened cocoa powder
  • 3 cups (360 g) powdered sugar
  • 1/3 cup (80 ml) whole milk
  • 1 tsp vanilla extract
  • Pinch of salt

Instructions

For the Cake:

  1. Preheat Oven
    Preheat your oven to 350°F (175°C). Grease and flour two 9-inch round cake pans.

  2. Mix Dry Ingredients
    In a large bowl, whisk together the flour, cocoa powder, baking powder, baking soda, sugar, and salt.

  3. Add Wet Ingredients
    Add the eggs, milk, oil, and vanilla extract. Beat on medium speed for about 2 minutes, until smooth and well combined.

  4. Add Boiling Water
    Gradually add the boiling water to the batter, mixing until the batter is thin and smooth (this is normal).

  5. Bake
    Divide the batter evenly between the two prepared pans. Bake for 30–35 minutes, or until a toothpick inserted into the center comes out clean.

  6. Cool
    Let the cakes cool in the pans for 10 minutes, then turn them out onto a wire rack to cool completely.

For the Frosting:

  1. Make the Frosting
    In a medium bowl, beat the softened butter and cocoa powder together until smooth. Add the powdered sugar, milk, vanilla extract, and salt. Beat until creamy and smooth.

  2. Frost the Cake
    Once the cakes have cooled, spread a layer of frosting on the top of one cake. Place the second cake on top and frost the entire cake with the remaining frosting.


#

Notes:

  • For an extra rich flavor, add 1/2 cup of sour cream to the cake batter.
  • You can decorate the cake with chocolate shavings, sprinkles, or fresh fruit if desired.
  • Store the cake in an airtight container at room temperature for up to 3 days or refrigerate for longer freshness.
silver yarrow
#

Might have avoided bankruptcy by mistaking it for ToaruOS

#

who knows what would've happened

crystal scarab
#

mmm

elder shoal
#

nyaux best os ever

surreal path
#

^^^

flat nymph
#

Now bash when

surreal path
#

after i eat ill impl vfs

#

so like 8pm im eating

crystal scarab
#

guys do you know how to understand osdev wiki on implementing x86 multitasking

flat nymph
#

Take you favorite open source OS and steal the code from it

crystal scarab
worldly condor
#

the two I found don't say much

#

so you basically don't understand

#

and idk

#

figure it out on your own and based on textbooks, I guess

flat nymph
#

Yeah wiki is bad sometimes (most of the times)

elder shoal
#

I actually dont know osdev I'm just here to troll while a little elf on my desk does all the programming for me

worldly condor
flat nymph
worldly condor
#

ah

#

tl;dr

flat nymph
worldly condor
#

do software context switching

flat nymph
#

And is completely irrelevant

worldly condor
#

not much more to it

crystal scarab
#

ah alr

worldly condor
#

not because it it 30 years old

elder shoal
#

context switching is just

flat nymph
#

Unless you're tageting 16 bits

elder shoal
#

save relevant cpu state

#

load relevant cpu state from another thread

flat nymph
#

yeah

#

But x86 had hardware task switching for no reason

worldly condor
#

it's still relevant for 32-bit OSes

elder shoal
#

cisc moment

crystal scarab
worldly condor
#

like

crystal scarab
#

why? dont ask

flat nymph
#

Is it actually faster than doing it in software?

worldly condor
#

no

#

you shouldn't use it nowadays

#

Linux used it initially

#

and I think it might be faster on a 386

#

not on anything modern tho

flat nymph
#

Linux was an end of degree project

crystal scarab
worldly condor
#

and you only have uh ... so many GDT slots

crystal scarab
#

oldest im targeting is 686

#

lmao

flat nymph
#

doesn't matter

#

ia32

worldly condor
#

well

flat nymph
#

without e

elder shoal
#

did windows 9x use it

worldly condor
#

uh ... idk

elder shoal
#

I'm curious now

flat nymph
#

ia32e best name for a 64 bit architecture

worldly condor
#

Windows—even the sort that ran on DOS for long after Microsoft said—has never made much use of the processor’s built-in support for multi-tasking.

elder shoal
#

oh damn

#

was there ever a commerical os that actually used it

#

commercial

flat nymph
#

This server needs to team up and make a commercial OS which does it

silver yarrow
#

We have one: Nyaux

#

Well it doesnt do hardware switching

#

but it might as well

flat nymph
#

Yeah

silver yarrow
#

nobody can tell what it does

worldly condor
worldly condor
#

it was 300 cycles on a 386

flat nymph
#

bruh

worldly condor
#

push cost 2 cycles

#

so

broken depot
#

300

surreal path
broken depot
#

cycles

worldly condor
#

plus the whole segment reloading bit

surreal path
#

dont try to roast nyaux

broken depot
#

300 cycles is ridiculously high

#

I've never heard of an instruction taking so long before

flat nymph
#

xsave or something like that?

worldly condor
#

300 cycles for context switching through jumping to a TSS

elder shoal
worldly condor
#

well

#

they did technically use it

#

to handle certain exceptions

#

like double faults and stack faults iirc

flat nymph
#

So still never

worldly condor
#

I guess division and multiplication on the 8086/8088 took quite long

#

or

#

uhm

#

on a modern system whenever there's a cache miss

finite summit
worldly condor
broken depot
flat nymph
worldly condor
#

yes

broken depot
#

And I can hardly believe that a 16-bit mul/div takes 300 cycles

flat nymph
surreal path
#

stop breathing

#

/j

finite summit
#

damn it

#

can't breath anymore

silver yarrow
worldly condor
#

division could take up to 184 cycles tho

finite summit
worldly condor
#

i.e. P6

#

P5 was in-order superscalar

#

P6 was out of order

flat nymph
#

Because I've learned that MMX was a failure, but changes the course of x86

#

(they're older than me)

surreal path
worldly condor
#

Pentium MMX was based on P5, i.e. was in-order

silver yarrow
#

@surreal path I got a logo for nyaux

worldly condor
#

and came after the Pentium Pro

surreal path
#

wanna see

silver yarrow
#

mine is better

surreal path
#

sure it is

rigid fable
silver yarrow
#

can I get that as a PNG pls

surreal path
#

sure

rigid fable
#

I never saw what someone put bgrt to their boot process

surreal path
silver yarrow
#

epic

surreal path
#

why do u want it

#

lol

rigid fable
#

@surreal path put bgrt to nyaux boot process 🦆

silver yarrow
surreal path
#

lmao

#

new emoji

silver yarrow
#

petition osdev server to make it one

surreal path
#

yes !!!!

silver yarrow
#

elysiumos > nyaux

surreal path
#

😡

silver yarrow
rigid fable
#

nyaux is best nyaux is best

#

quackos in future is better halfmemeright

silver yarrow
#

Nyaux unironically does more than my current rewrite

#

it is sad

#

elysiumos 😭

rigid fable
silver yarrow
#

same

rigid fable
#

😭

silver yarrow
#

I got one of my friends to make me mine

#

they are fucking awesome

#

made me this

rigid fable
#

I can only draw a very muscled stepfather

rigid fable
#

💪

crystal scarab
#

i dont bother with logos because i keep giving up on my oses 😭

silver yarrow
#

@surreal path actually though how are things going

surreal path
#

im waiting til its 8pm

#

to eat

#

then i have to make the apic driver

#

then

#

vfs

silver yarrow
#

coolio

broken depot
#

How far along are you with your kernel?

surreal path
#

uhhh like

#

quite far

#

but not userspace ready yet

broken depot
#

My question is basically:

  • Do you have a working scheduler?
  • Do you have any kind of filesystem (something about VFS)?
  • Do you have preemtive multitasking?
  • Do you have multiprocessor support?
#

That kind of thing

surreal path
#

yes for 1st 3rd and 4th

#

no 2nd tho

silver yarrow
#

caveat for 3rd is u cant do cooperative multitasking

surreal path
#

yea ik

#

i dont like cooperative multitasking

#

cringe

rigid fable
broken depot
#

No

silver yarrow
surreal path
#

how

silver yarrow
#

u need to yield

#

to not waste tons of cputime

broken depot
#

Scheduling is the thing that decides which threads to switch to when a context switch happens

surreal path
#

most modern girls do preemtive

#

KERNELS

silver yarrow
#

no, most if not all do BOTH

broken depot
surreal path
silver yarrow
#

by allowing yielding

#

bare minimum

broken depot
silver yarrow
#

then adding preemptive on top of that

surreal path
#

fucking hell is this something i need to implement

broken depot
#

BadgerOS supports preemptive and cooperative

silver yarrow
#

u can probably hack it in with an ipi

surreal path
silver yarrow
#

but yes u need to support it

surreal path
#

wont be too difficult

silver yarrow
#

the problem is that ur context switching off of an interrupt

surreal path
#

no dw

#

i can handle it fine

silver yarrow
#

so u need to either change that or issue an ipi

flat nymph
silver yarrow
#

real

surreal path
#

dw i can do it

#

soon

flat nymph
#

Just call your new function from a syscall

surreal path
#

yea

silver yarrow
surreal path
#

we can do it easily dw

broken depot
#

Are you planning to have a POSIX or POSIX-like userspace?

surreal path
#

yes

#

via mlibc

broken depot
#

Cool

#

So am I

surreal path
#

nice

broken depot
#

But with newlib

surreal path
#

ah oki cool

silver yarrow
#

mlibc supremacy

flat nymph
#

boring trl

broken depot
#

I didn't know about mlibc and also another contributor is the one who is/was porting newlib.

silver yarrow
#

im trolling dw

surreal path
#

i plan to have a nt subsystem in nyaux btw

#

one day

flat nymph
#

oof

#

Why

surreal path
#

cause its cool

flat nymph
#

There's Wine

surreal path
#

ik

silver yarrow
#

to be fair

surreal path
#

but its cooler

silver yarrow
#

there is also Linux

surreal path
#

plus more fun

#

💀

flat nymph
#

Even ReactOS is kinda failing at it atm

silver yarrow
#

real

flat nymph
#

And they share stuff with Wine afaik

surreal path
#

ok maybe not

#

then

#

idk

#

i js want my food rn

#

2 hours left

#

😭

silver yarrow
#

I believe in the NyauxNT supremacy

elder shoal
silver yarrow
#

lmao

flat nymph
#

TempleKT

surreal path
#

give me food

silver yarrow
#

I am gonna eat breakfast rn

flat nymph
#

If you start writing VFS, you won't even notice how time passes and you get food faster

elder shoal
#

Write a serial driver for astral that uses acpi troll

surreal path
flat nymph
#

Do you mean SPCR table stuff?

elder shoal
#

Like that uses acpi to discover it and not just hardcode a port

flat nymph
#

I have that

surreal path
#

wait can u do that

elder shoal
#

tho I will probably do that when I actually redo my devices

#

ughh so much to do so little time to do

elder shoal
surreal path
#

oh damn

#

howd u do that in uacpi

#

to discover something like a serial port

tawdry mirage
#

standard pc serial controllers have a standard eisa id

#

iirc

#

so you'd just look for devices with a specific hid/cid

#

then look at the resources of the device via _CRS to discover the irq and pio/mmio

surreal path
#

qookie can i eat you

#

since ur a cookie

#

i js want fucking food

#

i see a duck

#

ill eat the duck

silver yarrow
#

what is preventing u from just... eating

broken depot
flat nymph
#

What if you have a mouse connected to it, what would it think

silver yarrow
#

it would have a great time

flat nymph
#

Unless you use the spcr thingie

#

(I probably need to fix that on x86...)

finite summit
surreal path
#

hi chat

crystal scarab
#

hello

surreal path
#

time to work on ze apic

#

lemme pull out the sdm

#

to see how x2apic works

#

to see if its something we can do

edgy pilot
#

basically

surreal path
silver yarrow
#

I dont even use x2apic rn

#

Nyaux is passing me

edgy pilot
#

I don't even have ioapic

#

nyaux is passing me

#

I mean it's ready, just needs 15 mins of filling in with actual code

#

(copying from my old kernel)

silver yarrow
#

: )

#

we are falling behind in the dust

edgy pilot
#

(but "rewriting" of course)

silver yarrow
#

the iron rule of the Nyaux supremacy is beginning

edgy pilot
#

I have pci though coolmeme

#

(no ecam)

silver yarrow
#

Nyaux doesnt have pci?

edgy pilot
edgy pilot
finite summit
#

Mah

silver yarrow
#

who really knows

edgy pilot
#

(no msi/msi-x)

finite summit
#

He never implemented pci ever

edgy pilot
#

I have almost nothing smh

finite summit
#

Obos will surpass you all (except in speed)

#

((maybe I should fix that))

edgy pilot
#

you should fix that

silver yarrow
#

maybe he did in secret but we'd need to crack the encryption

edgy pilot
silver yarrow
#

real

edgy pilot
#

I have this btw

add_defines("ILOBILIX_MAX_UACPI_POINTS=1")

adds like 40k uacpi points

silver yarrow
#

lmao

silver yarrow
edgy pilot
#

yeah switches to phd memcpy and some stuff like that

silver yarrow
edgy pilot
#

yep

#

why don't I do it by default?

#

who knows

silver yarrow
#

¯_(ツ)_/¯

#

uacpi points are all that maters after all

#

the true rating of an OS

finite summit
#

So wait am I allowed to take PhD memcpy

silver yarrow
#

linux? pffff

finite summit
#

Without managarm bros being mad at me

edgy pilot
#

wait is mine compatible

finite summit
#

MIT

edgy pilot
#

I use 🇪🇺 EUPL 🇪🇺

finite summit
#

Freedom?

silver yarrow
#

I literally dont remember what I use

finite summit
#

I don't use anything but MIT

#

So there's that

silver yarrow
#

ah right my new branch doesnt have a license

#

maybe I should put one in there

edgy pilot
#

how do you people prefix your source files?

silver yarrow
#

hm?

edgy pilot
#

I just add

// Copyright (C) 2024  ilobilo
silver yarrow
#

I dont put anything

edgy pilot
#

hmmm

silver yarrow
#

just extra stuff I rather not have

#

I was gonna go look at what license my current branch has but apparently my server just died cuz nix failed to build

#

fun times

finite summit
#

for example

edgy pilot
#

why file name?

finite summit
#

because why not

silver yarrow
#

out of curiosity why do u guys put these notices

edgy pilot
#

also obosman name reveal??

#

:D

edgy pilot
finite summit
#

because I saw other people doing it

silver yarrow
#

as long as u have a license in the repo, should be enough

finite summit
#

duh

edgy pilot
finite summit
silver yarrow
#

lmao

molten grotto
#

and if you don't have a license then its automatically all rights reserved

finite summit
#

why would you want to take obos code though?

#

it is the messiest code I've ever read

edgy pilot
#

to make my kernel slower duh

#

:p

molten grotto
#

to bring obos curse to your own kernels

silver yarrow
#

oh I use BSD-3 license

finite summit
#

(idk if anyone will ever believe that)

molten grotto
#

nice

finite summit
#

at the sacrifice of speed

silver yarrow
#

the obos propaganda machine is at full speed I see

finite summit
#

obos doesn't crash

#

(take that, nyaux)

silver yarrow
#

take that obos

finite summit
#

fake news!!11!!

silver yarrow
#

it is clearly not doctored!!!!!

kind root
#

idk looks real

finite summit
#

obos never crashes!

#

ban him for spreading of misinformation

#

!!11!!111!

crystal scarab
#

/s

finite summit
#

tbh I forgot if obos even runs with kasan

#

without crashing

#

been a while since that was tested

surreal path
#

i had to

#

i had to fight with my parents

#

sorry

flat nymph
surreal path
flat nymph
#

ioapic is fun though

surreal path
#

im writing that

flat nymph
#

If you want PCI and don't want MSI

surreal path
#

i def want msi

#

in the future

flat nymph
#

And you need to talk to uACPI for it to tell you how to route interrupts

flat nymph
#

Look at other operating systems

surreal path
#

k

#

link to urs?

flat nymph
#

managram and pmos and maybe some others trl

#

I think obos also has it

flat nymph
#

What ? ?

silver yarrow
#

why do u need to talk to uacpi

flat nymph
#

Why do you not

surreal path
#

madt table

silver yarrow
#

you dont need uacpi for acpi tables

flat nymph
surreal path
#

not just that

flat nymph
silver yarrow
#

why

surreal path
silver yarrow
#

I havent needed aml

flat nymph
#

Do you have interrupts?

silver yarrow
#

yup

flat nymph
#

With ioapic?

silver yarrow
#

certainly

flat nymph
#

How did you route them?

kind root
#

not for pci devices

#

for pci devices u must use aml yeah

#

unless u do MSIs

flat nymph
#

If not less

surreal path
#

mutiple ioapics tho

flat nymph
#

And you get that from one of the tables

flat nymph
surreal path
#

yes

flat nymph
#

Doesn't matter

#

There's ISA interrupts

silver yarrow
flat nymph
#

For PS/2, serial, HPET and stuff like that

kind root
flat nymph
#

And they map to GSI

silver yarrow
#

I cant remember if I even have any pci interrupts

surreal path
#

there could be other source override

#

s

flat nymph
#

Which is IOAPIC pins

kind root
silver yarrow
#

sure

flat nymph
surreal path
#

yea so

#

im being safe

kind root
#

or u could just not support PCI devices without MSIs

#

that works too

surreal path
#

its only a few bytes

flat nymph
silver yarrow
#

actually I think I did use a couple MSI's

#

eh Ill find out when I get there in my rewrite

surreal path
#

i know what they are and yes there is in total 16

#

but there are weird quirks with real hw

#

i think some can have isos

#

for non isas

flat nymph
#

What

surreal path
#

i think

#

i remember reading acpi spec once

#

and there was something about that

flat nymph
surreal path
#

impl'd some things for ze hashmap

flat nymph
#

5.2.12.5 Interrupt Source Override Structure
Interrupt Source Overrides are necessary to describe variances between the IA-PC standard dual 8259 interrupt defi-
nition and the platform’s implementation.

surreal path
#

oh

#

so its only 16 ig

#

ur right

#

ill change it to 16

flat nymph
#

Redirection registers?

surreal path
#

no

#

16 isos

flat nymph
#

Each IOAPIC has typically 24 inputs

flat nymph
surreal path
surreal path
surreal path
#

theres even a register for checking it

flat nymph
#

I said typically

surreal path
#

fair

#

i like following spec to a teeth

flat nymph
#

The interrupt overrides are from ISA to GSI

surreal path
#

yea

#

i know this

flat nymph
#

I.e. theoretically not bound to a single IOAPIC

surreal path
#

exactly

#

also if ur gonna say hashmap is overkill

#

ik

#

and i dont care

flat nymph
#

No

#

It's not gonna work

surreal path
#

how

flat nymph
#

You want lower_bound type function

surreal path
#

wdym

#

explain please

#

???

#

@flat nymph

flat nymph
surreal path
#

also where is that, looks like a newer spec

flat nymph
#

Your interrupts are GSIs

surreal path
#

mhm

flat nymph
#

IOAPIC is GSI base + count

surreal path
#

what about that

flat nymph
#

Which starts at 0, 24, 48, etc. (for example, idr)

surreal path
#

yea i get that

flat nymph
#

How are you finding interrupt 40 in the hash table

surreal path
#

so instead of this i will need to check its gsi base

#

yea

#

i know what u mean

#

hold on while i make changes

#

something like this @flat nymph

#

wait wrong way

flat nymph
#

Do you know how hash maps work?

surreal path
#

yes

#

they seed the key

#

and modulate it

#

to get the index

#

i believe

flat nymph
surreal path
#

btw

#

also that compare function will probs fail

flat nymph
#

yeah

surreal path
#

i need to think of a way

#

to get that working

flat nymph
#

Use sorted array instead if a hash table spun

surreal path
#

hold on

#

ill test an idea chatgpt throwed at me

#

if it doesnt work we will do a sorted array

#

like any sane person

#

i will do it in a userspace progrma

surreal path
#

yeaaa ummm

#

maybe a sorted array would be better

surreal path
#

i dont know whats happening..

kind root
#

that might be an old bug

#

(or your skill issue)

surreal path
#

its latest tho

kind root
#

ah then its a skill issue

surreal path
#

what have i done wrong

#

no 1

kind root
#

ur doing the exact same fucking

#

thing

#

as before

#

remove the goddamn * from uacpi_table

surreal path
kind root
surreal path
#

i changed it to this

kind root
#

....

#

look at what that struct contains

surreal path
#

contains a acpi hdr

kind root
#

not this struct

#

uacpi_table that u casted

surreal path
#

uacpi_table?

#

okay

#

yea im a fucking idiot

#

thanks

kind root
#

its literally a stack variable, how do u expect to fit an entire madt into it LULW

surreal path
#

i am a fucking idiot

#

sometimes

#

well now that works but

#

the fact that some cringe happens when u page fault in a thread

#

like wtf

#

why is this a 0xd

#

js let me create a page fault god damn it

#

like come on

#

that is SUPPOSED to cause a page fault right???

kind root
#

not if the address is not canonical

surreal path
#

is 0x0 non canonical

#

im looking at the disassembly here

kind root
#

how do u know it pfed on 0

surreal path
#

no it didnt pf

#

it 0xd'd

kind root
#

it probably died in your ubsan impl

#

or (if u dont abort) somewhere later

surreal path
#

hold on

#

i do return

kind root
#

yeah

surreal path
#

should i not return?

kind root
#

it probably reaches a ud2 or something after that

#

up to u

kind root
#

compilers put ud2 in places that shouldnt be reachable

kind root
#

no

#

it depends on where it died

#

cant u just dump the stack

surreal path
#

fine

#

hold on

#

thats the trace

#

@kind root

kind root
#

disassemble populate_ioapic

surreal path
#

it was the entire thing

#

???

#

im smelling UB

kind root
#

what is the rip it GPFs at

surreal path
#

there

kind root
#

so whats at that rip

#

which function is that

surreal path
#

hold on

#

doesnt exist

kind root
#

objdump

surreal path
#

k

#

doesnt exist

molten grotto
#

do you have kaslr enabled

surreal path
#

no

#

disabled

molten grotto
#

well yeah then that address isn't even a part of the kernel, its somewhere within the hhdm or heap or whatever else

surreal path
#

weird

#

wtf

#

hold on ill try to print the memory contexts of that

#

address

#

tf

#

?????

#

??????????????????????????????????????

#

i tried casting it to various data types

#

this makes no sense

#

tff

#

i dont know how to debug this further

#

help nooo

molten grotto
#

do you have the code in git

surreal path
molten grotto
#

the compiler can optimize the store to a null pointer away as its UB like in the disassembly you posted

#

then idk what happens after that, maybe the compiler creates weird code

#

try making int* x = 0 be volatile int* x = 0

surreal path
#

hold on

#

now we have this stupid issue

#

i cli

#

the MOMENT i enter my page fault handler

#

and then this happens

molten grotto
#

interrupts are disabled before entering the handler by the cpu anyway unless you used a trap gate

surreal path
#

yea

#

so wtf

molten grotto
#

disabling interrupts doesn't disable exceptions tho

surreal path
#

ik

#

thats not what im trying to disable

#

why is it

#

dying like this

#

okay so

#

its the stack tracing

#

but

#

why tho

#

this should work fine

#

this is how i find the rip

#

maybe i should check if it came from the kernel address space itself

#

hold on

molten grotto
#

also if you don't find a symbol then you are going to get ub

surreal path
#

how to fix that

molten grotto
#

you don't return anything at the end

#

just return some kind of symbol saying "unknown" or whatever

surreal path
#

okay

#

anddd it died

molten grotto
#

did you return a symbol with some string attached? if that's reaching the end of find_from_rip that is

surreal path
#

okay doing it now

#

still dies

#

wait

#

still @molten grotto

molten grotto
#

do you have -fno-omit-frame-pointer in CFLAGS

surreal path
#

yes

molten grotto
#

at least in the git version you don't (unless you didn't commit some makefile changes)

surreal path
#

okay so

#

something happened in between here and that

#

i will try to see in gdb

#

@molten grotto

#

cr2 is this

#

my read cr2 function is bogus

#

for some reason???

#

tf??????????????????????????????

#

something happens

#

that makes the cr2 0xa

#

idfk what

molten grotto
#

you have the operands in the wrong order

surreal path
#

right

#

that is the cr2

#

it faults doing the stacktrace

#

obviously

#

idk whats going on

molten grotto
#

you don't have a null rbp at kentry

surreal path
#

so

#

how do i avoid going further

molten grotto
#

you make sure that rbp is null there

surreal path
#

how

molten grotto
#

by setting it to zero within the thread start frame?

surreal path
#

okay

#

wait is it a good idea

#

to set a threads rbp

#

to null

#

is that good qwinci

cinder plinth
#

No

surreal path
#

for a scheduler to do

cinder plinth
#

Doesn't matter

surreal path
#

oh

molten grotto
#

it is fine

cinder plinth
#

And not the scheduler's job

surreal path
#

oh

#

so how do i get around this

#

without making rbp null

#

@cinder plinth

cinder plinth
#

Idk what's your issue

surreal path
#

infinite page faults

#

because well

#

rbp is set to the kstack

#

for the thread

#

and uhh

surreal path
#

it goes on infinitely

cinder plinth
#

What's at fff...3107

#

The first page fault

surreal path
#

i made some intentionl page fault

#

in populate ioapic

cinder plinth
#

Why

surreal path
#

to show the issue?

cinder plinth
finite summit
#

a new day, a new nyaux bug

cinder plinth
#

What's your issue if you're causing the page fault

cinder plinth
surreal path
cinder plinth
#

So the faulting rip is there?

#

cr2 tells me you forgot to map something

finite summit
surreal path
#

its because we are infeintely going down the stack trace

#

thats not what i meant

#

rbp is not set to 0 for the kentry thread

cinder plinth
surreal path
#

anyways i have an idea to fix this

cinder plinth
surreal path
#

the intentional page fault

cinder plinth
#

And do you know what caused it

surreal path
#

yes

cinder plinth
#

But why did you cause a page fault bruh

surreal path
#

so show this infinite shit

#

bru

cinder plinth
#

??

surreal path
#

nvm i have an idea

#

i will get the thread

#

if we are in a thread

#

i will check its intial rbp

#

if we find that intial rbp

#

get out of the stack tracing loop

cinder plinth
#

rbp doesn't matter

#

It's a general register

surreal path
#

ur not understanding anything im saying

#

😭

cinder plinth
#

Whether rbp is set to anything on entry doesn't matter at all

#

It is set by the thread itself

surreal path
#

no its set by the scheduler

#

in creating the context frame

cinder plinth
#

That is the initial context, but the value doesn't matter at all

#

RBP is a GPR

surreal path
#

yes i know

cinder plinth
#

The program has to set it to use it

surreal path
#

im going to set rbp to 0 initally

#

so my stack tracer will work

#

nvm this solved nothing @molten grotto

#

this line

#

it faults

#

yea no idea how to solve this

shut laurel
surreal path
shut laurel
#

no, the address you fault on

surreal path
#

after the inital page fault