#Nyaux

1 messages Β· Page 5 of 1

kind root
#

are u implying its a flanterm bug

surreal path
#

no

#

im getting annoyed at myself cause i always write shitty code

kind root
#

nah u just dont test it enough

surreal path
#

i cant make something good

#

i wish i could just see the memory

#

like SEE them

#

see their values and see whats happening

shut laurel
#

something like that

surreal path
#

im getting like

#

really frustrated so im gonna take a break for like an hour

desert haven
#

taking a break is good too πŸ™‚

rigid fable
ionic jetty
surreal path
#

okay im back

#

i fell asleep

#

time to debug now ig!

#

OKAY IMAGE LOOKS VALID RIGHT?

#

IT LOOKS LIKE A VALID ADDRESS

#

lemme dereference the data

#

yep 0xbb as EXPECTED

#

OKAY AND THE ENDING ADDRESS

#

LOOKS VALID

#

LOOKS CORRECT RIGHT?

#

thats the limit

#

hmmm doing this causes this

#

how???

#

so memsetting causes this

#

for some reason memsetting img is causing something to happen to the framebuffer

#

huh????

#

like what?????

wicked loom
#

are you sure your pmm isn't perhaps allocating pages of the framebuffer as free?

#

or more generally, anything not usable

surreal path
#

CAUSE THIS SHOULDNT HAPPEN AT ALL

#

same thing when calculating the hhdm?

#

so something weird is very much happening

#

VERY weird

wicked loom
#

idk

#

i miss too much code to tell

surreal path
wicked loom
#

your screenshots are incomplete

surreal path
#

for calculating the hhdm limit in my vmm ^

wicked loom
#

mate

#

that's still incomplete

#

just upload all your code somewhere

surreal path
#

se

#

cc

#

sec

surreal path
#

it has to be how im calculating my vmm hhdm limit

#

because the framebuffer address wouldnt be outside the hhdm right????

#

RIGHT????

#

UMM???

#

yea thats correct???

#

so why is it calculating the hhdm limit wrong

ionic jetty
#

Whats hhdm limit

#

Highest mapped address?

surreal path
#

in the virtual address space

#

this is what should be expected

#

but for some reason

#

calculating the hhdm limit seems to not be working properly

ionic jetty
#

I noticed that you dont count reserved pages in vmm.c:vmm_init(void)

#

Is that related maybe?

surreal path
#

For base revision 0, the above-4GiB identity and HHDM mappings cover any memory map region.

For base revision 1, the above-4GiB HHDM mappings do not comprise memory map regions of types:

Reserved
Bad memory

#

limine spec says

#

the hhdm mappings in base revision 1 do NOT include reversed

ionic jetty
#

I thought thats supposed to mean limine doesn’t map them

ionic jetty
#

/ doesnt setup page map entries for these areas

#

if theres usable - reserved - usable areas the end of the second usable area is still at usable1.length + reserved.length + usable2.length

#

reserved just means that theres acpi tables there for example

#

instead of ram

tawdry mirage
#

well acpi tables are usually acpi reclaimable or acpi nvs :^)

surreal path
tawdry mirage
#

reserved is stuff like bad ram, stolen memory, mmio, etc

ionic jetty
#

but yeah mb

surreal path
ionic jetty
#

yes

surreal path
#

okay makes sense

ionic jetty
#

its just a memory hole

#

basically

surreal path
#

that solved everything

#

no weird framebuffer fuckery

#

time to test with flanterm now

#

!

ionic jetty
tawdry mirage
#

igpu stolen memory

surreal path
#

GUYS IT DOESNT GPF ANYMORE

#

GUYS !!!!

#

LOOK AT THAT

#

ITS WORKING

#

TIME TO PUT IN THE IMAGE 😎

#

THANK YOU QOOKIE AND @ionic jetty

#

YALL ARE SO PRO

#

😎 😎

ionic jetty
#

calm down

#

youre gonna get a heart attack

surreal path
#

beautiful

#

look at that 😎

#

im so happy

surreal path
#

in figma

#

#graphicsdesignismypassion 😎

kind root
ionic jetty
#

ballz

surreal path
#

ligma

rigid fable
#

maybe this?

#

we got naenae in here too?

#

haha

surreal path
#

give it a proper logo and everything

#

if im gonna go home from school everyday to work on this project

#

i need to give it some like respect

#

@kind root isnt that right?

kind root
#

no

#

thats not how u give it respect

#

remove shit variables and clean up the code

surreal path
#

ill clean up the code rn i suppose

kind root
#

do that

surreal path
#

yep

rigid fable
#

he just had the oberrow nighmare

wicked loom
#

nice

surreal path
wicked loom
#

the fact that you fixed it

#

anyways uh

surreal path
wicked loom
#

i think i am going to add a new feature to the Limine protocol that will allow the loader to pass back the flanterm parameters used by the loader interface

#

including the wallpaper

#

including the shaded box and everything

cinder plinth
#

what about just a parsed config feature

wicked loom
#

nah

kind root
#

isnt that a bit like

#

outside of the scope

rigid fable
#

is it really necessary tho? For one it would remove the fun

cinder plinth
#

bring back limine terminal meme

kind root
#

limine graphics driver

surreal path
#

limine does its job, the OS has to figure the rest of the shit out. if the OS wants a wallpaper it can load it itself

#

that shouldnt rlly be up to the bootloader to figure out

#

even if it looks cool

#

limine already does so much

elder shoal
rigid fable
surreal path
rigid fable
surreal path
#

anyways i've cleaned up most of the code

#

variables names actually make sense now

#

added some comments to explain a few things

wicked loom
#

no one forces you to use it lol

#

if anything i'd do it for my sole personal gain because it would be handy to me lol

kind root
#

ext2 support? no, thats bloat
load a wallpaper for u? here

#

idk man LULW

surreal path
wicked loom
#

it already loads all of that, it's not bloat to just pass info over to the kernel (on demand)

#

nothing compared to ext support

kind root
#

and like any serious kernel will have wallpapers loaded and displayed by userspace, so why facilitate this

#

i guess for like boot time log?

#

but idk

wicked loom
#

for whatever people use a kernel console for

rigid fable
#

might as well add the option to load an image into the framebuffer before passing control to the kernel

surreal path
rigid fable
#

but since you can load a kernel module and do it yourself in 5 lines of code idk

rigid fable
rigid fable
#

but whatever

kind root
#

but yeah why not have some fun in between

surreal path
#

maybe for u halfmemeright

surreal path
wicked loom
#

yeah, the point is to have a seamless transition between the bootloader's console and the kernel console, preserving the wallpaper, margins, font, scaling, and everything; all the parameters flanterm needs

elder shoal
#

the real benefit I'd imagine is that you won't need to resize the image data to use for the background since the bootloader already did that

kind root
#

why is this transition needed?

wicked loom
#

it isn't

#

it's entirely optional

elder shoal
#

but then you can also set for the bootloader and kernel to boot into different resolutions so

wicked loom
#

your kernel can have no kernel console, no one would force you to use it lol

wicked loom
surreal path
#

ok anyways time to design a Nyaux logo !!!!

#

#ihaveneverdonegraphicsdesign

wicked loom
#

add the IPA right below the logo

surreal path
wicked loom
#

phonetic spelling

surreal path
#

sure

kind root
#

mint only u know how to read it

wicked loom
#

not true

rigid fable
wicked loom
#

if anything i am quite bad at it

rigid fable
#

or us

wicked loom
#

regardless

#

it would look stylish

#

i think

#

like big logo, and then in small font below it the IPA

ionic jetty
#

to like put them to sleep

#

and make them interruptible

#

to wake em

wicked loom
#

no

#

that would involve loading an IDT on the parked cores

#

plus they don't "go crazy"

#

like sure they hit 100% but realistically only for a split second, and the pause mitigates any real power draw spike

ionic jetty
wicked loom
#

no

#

i am just saying that that would be needed

#

and also pondering what would anyone gain from this feature

ionic jetty
#

i mean it would be a cool optional feature to enable if you want to test on smp systems without having smp support for example

surreal path
#

man i suck at designing logos

ionic jetty
#

i mean it doesnt really provide anything

#

but i just thought it could be nice

#

up to you : )

wicked loom
#

not have the SMP feature

#

lol

#

if you don't support SMP why would you have the feature, right?

#

and if you have the feature and simply never spin the cores up for whatever reason, at that point it's kinda on you

ionic jetty
#

okok stop being right i just thought it may be nice

#

obviously its not gonna add a lot of value

wicked loom
#

hey i am not trying to be right

#

i am trying to understand the use case

#

before i go and add it

#

and here it seems pretty redundant

ionic jetty
#

i dont know any excpet for reducing cpu load while not having provided the cores with their function pointer

#

it just bothered me a bit when I ran on real hw wihtout smp

#

that my pc went to like 60% power usage

#

which surprised me since I thought that pause calms it down more

wicked loom
#

it depends on the uarch

elder shoal
#

cant you just tell them to go to a cli hlt loop or something

wicked loom
#

and you also have to keep in mind that it's only meant for small durations

elder shoal
#

inside the kernel

ionic jetty
#

sure

wicked loom
#

or like as i said, not have the feature

#

that won't boot the cores up at all

ionic jetty
#

it was just an idea i'll just admit it isn't very useful okay halfmemeright

wicked loom
#

it's okay

#

i actually love discussing this

#

and trying to figure out if there may be a reason to do things differently or add new features

#

forgive me if i sound like i am trying to shoot the idea down, i kinda am

#

that's the whole point, shoot ideas that don't add much value down (after considering them of course)

#

else we'd end up with a trillion features and 99% of them redundant

elder shoal
#

ntfs on limine pls

kind root
wicked loom
#

which is also why i am happy when people try to shoot my ideas down like what i mentioned earlier with the thing

kind root
#

anyway pause is not enough lol

#

p/c state management is what u need

#

thats a lot of complex code

ionic jetty
wicked loom
#

pause is better than no pause

surreal path
#

man i suck at logo design

wicked loom
#

it's only meant for a very short duration of time

ionic jetty
kind root
#

thats my opinion about smp in a loader anyway, but yes

wicked loom
#

like realistically, even without pause altogether it shouldn't be relevant when the kernel is supposed to spin cores up in a split second

#

but pause does actually reduce power consumption quite a bit

kind root
#

ye

surreal path
kind root
#

nya user experience?

surreal path
#

no

#

idk

wicked loom
#

nya unix

#

not actually unix please don't sue

surreal path
#

i suck at making logos halfmemeright

wicked loom
#

(add that as part of the logo)

#

i think it's fine

#

like

surreal path
wicked loom
#

i designed this

#

you can't do much worse

kind root
#

i can take this logo

wicked loom
#

make a uacpi logo

ionic jetty
#

yes good idea

kind root
#

oh im ridiculously bad at anythign art

surreal path
wicked loom
#

perfect

kind root
#

lol

wicked loom
#

and then add the IPA spelling in the ball

ionic jetty
kind root
#

why are you asking me lol

ionic jetty
#

sorry wrong mention

surreal path
#

what it actually looks

ionic jetty
#

oh ok

#

still weird that it does that

#

looks cursed

surreal path
wicked loom
#

/Ι²Ι”ks/

kind root
#

looks like its not copyrighted after 2021

#

can i take it

worldly condor
worldly condor
surreal path
#

ehhh

surreal path
wicked loom
#

i like this one more

surreal path
wicked loom
#

perfect

wicked loom
#

and not running it bare metal on a Zen 4 CPU

wicked loom
#

liar

worldly condor
#

but original Zen APU

#

i.e. 2200G

wicked loom
#

i can run it on Zen 4 for you

#

if you want lol

wicked loom
#

Shitel Cringetom

#

daily reminder

surreal path
worldly condor
wicked loom
#

it was a joke

surreal path
worldly condor
wicked loom
#

ux isn't a trademark

worldly condor
#

but one may argue ux is easily confused with unix

surreal path
#

i think this looks good

worldly condor
wicked loom
#

too generic

wicked loom
wicked loom
surreal path
wicked loom
#

i like it being minimalist

#

so i wouldn't add much else

surreal path
#

Alr

worldly condor
wicked loom
#

it happens on VGA

worldly condor
#

yeah

wicked loom
#

which is why VGA sucks

#

one of the reasons

worldly condor
#

the monitor was connected through VGA to the 2004 Athlon XP desktop with a real floppy drive

worldly condor
#

to the Ryzen 3 2200G machine

#

oh

wicked loom
#

well no shit

worldly condor
#

just noticed both the machines are AMD, lol

wicked loom
#

AMD good

worldly condor
wicked loom
#

it's mostly likely gonna work anyways

worldly condor
#

but anyways, @surreal path sorry for filling up your thread with discussion about another OS

wicked loom
#

make the text another shade than pure white

#

imho

#

it's hard to read

surreal path
surreal path
#

i did try to make it more readable

wicked loom
#

i honestly more so meant the UX part over the ball part

#

this doesn't fix that

surreal path
#

okay

kind root
#

it looks like a slider

finite summit
#

Why the actual fuck is there 4375 messages in this

#

ALREADY

surreal path
rigid fable
rigid fable
surreal path
#

looking better?

#

i think i will add the gradient to the nya text too

rigid fable
#

make sure the background image is royalty free

surreal path
#

yea it is

#

final design iteration

#

fire or not ? πŸ”₯

kind root
#

good logo for a js framework

surreal path
#

😭

cinder plinth
#

yeah what he said

surreal path
#

is that good or bad

finite summit
#

it's JS

#

so prob not

surreal path
#

not good?

#

damn πŸ˜”

kind root
#

its not about the logo tbh

#

its just that ux part

#

somehow tells me this is gui related

surreal path
#

okay so i will need to change the name then

#

(for the third time)

#

Nya-Something

#

HMmm

#

actually nah im not changing the name

#

i have idea to fix the logo

#

better?

#

i think this is better

kind root
#

what if u take aux in the circle

surreal path
#

nah doesnt rlly work

#

i think better

#

man graphics design is hard

wicked loom
#

just like

#

add the shading to the IPA part too :p

#

and yes, put the circle around aux like infy said

surreal path
#

this or this

#

pick

#

@wicked loom

wicked loom
#

yeah but center the circle on the u

#

also shade the IPA a bit more

#

it's barely legible

surreal path
surreal path
#

perfect?

wicked loom
#

yeah

#

it's good, i approve

surreal path
#

looks nice

#

sadly its low resolution because limine gives me a resolution of 1024x768

#

for the framebuffer

#

is there a way to force limine to give you a higher resolution or

#

not possible

cinder plinth
#

yeah in the config

#

read the docs i forgot the name

#

I think it's RESOLUTION=1920x1080

surreal path
#

yea okay that worked

#

thanks

#

it works!!!

#

cool 😎

#

now one small problem

#

wslg sucks

#

poo poo

#

i have a usb with arch on it

#

maybe arch or gentoo

rigid fable
#

you are using it wrong somehow

surreal path
wicked loom
#

what in tarnation

surreal path
#

I know I’m great at singing

finite summit
#

Did

#

I

#

Just

#

Listen

#

To

#

?

surreal path
#

Most pro singing ever

finite summit
#

APIC

#

is pronouned

#

A P I C

#

Not apic

tawdry mirage
#

what

surreal path
#

what

#

I’m gonna go to intel and ask them how they pronounce apic in fact I’ll write an email to intel rn

#

😑

ionic jetty
# surreal path

If that ever becomes public you’re gonna be jobless for the rest of your life

finite summit
kind root
wicked loom
#

he pronounced APIC right

kind root
#

no one pronounces it A P I C

surreal path
#

We should email intel about it

#

ask them how they pronounce it

#

Bet they’d say apic

wicked loom
#

intel can suck my fat APIC

#

they made X86S and for that deserve nothing but their stocks to crash

surreal path
#

oh yeah x86s

#

ew

kind root
#

also its just a concept that doesnt exist

wicked loom
#

yes

#

correct

#

X86S is a stupid proposal, i hope i never live to see the day a real X86S CPU is manufactured

#

if your CPU can't run MS-DOS 4 natively it is not worthy of the title "x86"

kind root
#

soo anything specific u dont like?

wicked loom
#

breaks compat for no reason, compat is the biggest + of x86

kind root
#

well i dont work in die manufacturing so i dont know how much that backwards compat hurts the chip size

#

or costs

#

netiher do u i think

wicked loom
#

i talked to people in the industry

#

they say the main thing it could do is alleviate validation cost/time; but whatever it is i do not believe it is worth breaking backwards compat for

tawdry mirage
#

if they really wanted to go all out they should just redo the encoding :^)

kind root
#

well again i dont think they're retarded

#

and they do things for a reason

wicked loom
#

they are

#

Intel is a highly dysfunctional company

wicked loom
#

the proposal could have easily originated from some people without the input of 90% of the rest of the company

#

i believe it was more of a marketing stunt than anything else

#

but that's my personal belief

wicked loom
#

if you're gonna do X86S then ditch x86 entirely

#

i'd rather see Intel move to making ARM chips or whatever

tawdry mirage
#

i mean you can keep the source-level asm syntax but just reorganize the encoding so things aren't as long

#

e.g. REX

wicked loom
#

REX isn't too bad

#

look at EVEX

tawdry mirage
#

i mean an extra byte because you want a 64-bit operation and not a 32-bit one kinda stings

#

esp because byte/{,d}word is baked into the opcode for some instructions

wicked loom
#

it's still comparable in density to aarch64

tawdry mirage
#

yeah the average density is about the same as on aarch64

#

i've seen 4 vs 4.5 bytes/instruction for aarch64 and x86 respectively mentioned, but i have a feeling that those figures fail to account for constant pools you end up needing on aarch64

#

for 32-bit value constant loads or whatever

wicked loom
#

X86S is literally just "x86 but we now hate legacy OSes so we refuse to run them despite the CPU still needing the same exact decoder anyways because we don't actually drop 32-bit compat mode"

#

it stinks

tawdry mirage
cinder plinth
kind root
#

any guesses as to why?

kind root
#

x86s is still less DOA than riscv

wicked loom
#

well of course

#

if Intel wants to push it by force, little can be done

#

this is why Intel must fail

#

go bankrupt

#

disappear

kind root
#

well arm is not much better

wicked loom
#

we're getting there chat

kind root
#

in terms of evil

#

if not more

wicked loom
#

well yeah

#

but arm is not X86S

#

so that's a plus to me

#

also AMD exists

cinder plinth
#

the mint intel lore is crazy

wicked loom
#

mintel

cinder plinth
#

went from #1 fan to #1 hater

kind root
#

yeah amd is better

wicked loom
#

that's what the CPUID used to be

#

AMDIsBetter!

kind root
#

why did they change it

wicked loom
#

idk

#

AuthenticAMD is definitely lamer

kind root
#

was it like super early amds?

wicked loom
#

yeah

kind root
#

cuz it feels like kind of important abi break lol

wicked loom
#

well, relatively super early

#

i don't remember exactly when they changed it, i'd have to look it up

kind root
#

linux probably wont even boot if brand string contains random garbage

wicked loom
#

too much?

#

too much

wide nexus
surreal path
#

Sorry I haven’t been doing anything I have just been trying out different Linux distros for the past few hours, I’m just gonna stick to arch cause at this point idrc

#

I need get shit done

surreal path
rigid fable
#

wondering why

#

who knows

surreal path
rigid fable
#

someome might naenae you you must know

surreal path
#

what????

rigid fable
#

no one ever dares to say that

surreal path
#

why???

rigid fable
#

you either maintain your distro feelings to yourself or start a war over distros

#

and debian is superior anyways gnuslashtroll

surreal path
#

I’m just saying my situation that’s it

rigid fable
surreal path
rigid fable
#

arch is too unstable without spending half a week making sure everything is fine

surreal path
#

arch is fine it’s just too much configuration and I want a working system rn

rigid fable
surreal path
#

#installingfedora cause all I fucking want is a system that isn’t buggy, stable, and works with my NVIDIA gpu well

#

is that too much to ask

kind root
#

thats called windows

surreal path
tawdry mirage
#

install gentoo

surreal path
#

it sucked

rigid fable
#

I told you we would start a war, but you did not listen

#

and that you was actually me

#

πŸ˜€

tawdry mirage
surreal path
# tawdry mirage how so

Compiled the kernel, rebooted, couldn’t find my root partition (probs screwed the make .config), tried using a distribution kernel. Couldn’t get my WiFi card to work because I had forgotten to install something like network manager, tried again, didn’t even boot

#

it’s pain

#

you spend hours installing not to mention the 20 minutes compiling the kernel

kind root
# surreal path πŸ’€

unironically works out of the box and doesnt need 10 hours of config and package manager massaging

surreal path
finite summit
#

also no need to worry about dumb ACPI breaking ACPICA

surreal path
finite summit
#

or dumb ACPICA breaking ACPI

finite summit
surreal path
kind root
#

but its a lot of work as so many linux files use acpica api calls directly

surreal path
# surreal path bruh

Ok maybe if I had like a week, I’d be able to install gentoo. But I don’t have a lot of time and school and I need to like actually work on my OS

kind root
#

although uacpi and acpica api is mostly same level of abstraction so not too hard to convert

kind root
#

its like months worth of work

surreal path
#

The payoff would be huge tho to be fair

kind root
#

whats the payoff

#

besides github points

surreal path
#

linux would be much better

#

you know how shit acpica is

kind root
#

besides clunky api and interpreter unsafety + nt incompatibility its mostly fine

finite summit
#

The obvious solution to this is to make NT use ACPICA, so then firmware developers have to follow how ACPICA parses AML to get windows to work /j

kind root
#

nt interpreter is way more advanced than acpica but simpler at the same time

#

no global interpreter lock

#

no two pass aml parse

#

no (trivial) use-after-frees

finite summit
#

also "doesn't actually follow the spec in some cases"

kind root
#

some LULW

finite summit
#

when making uACPI how much did you actually look into the spec

#

the interpreter part

tawdry mirage
#

every interpreter can have some spec incompatibility as a treat

surreal path
kind root
#

and even that is broken for some opcodes

#

aka spec tells u e.g ByteData

#

but its actually an integer object

#

so u parse bogus data

finite summit
#

How'd you even find out how NT parses AML

surreal path
#

btw do u run gentoo qookie?

kind root
surreal path
kind root
#

the no two pass?

finite summit
#

Well you said it follows how NT parses aml opcodes

#

unlike ACPICA

kind root
#

yeah when i was looking into how packages store named objects for example

kind root
#

u know how i have nt hooked up in a debugger

surreal path
finite summit
surreal path
#

And the same cpu I used to have with my old laptop

kind root
#

i dumped the packages and instead of storing the actual named objects they store the path as a string

tawdry mirage
surreal path
tawdry mirage
#

i like it

kind root
#

as a result aml blobs often have packages pointing to random garbage

#

because its just unused code

#

but it trips up acpica as it attempts to resolve those

surreal path
tawdry mirage
#

idk i didn't use the livecd

#

i installed it from my old arch install

surreal path
#

You can do it from an arch install????

kind root
tawdry mirage
#

i set up partitions and the fs, extracted the rootfs tarball onto it, chrooted into it, and did the rest of the installation

tawdry mirage
kind root
#

i see

finite summit
#

I finally ran sudo apt update on my wsl install and 229 packages can be upgraded. Run 'apt list --upgradable' to see them.

tawdry mirage
#

as long as you can chroot into it

#

i did have to reboot into a liveiso to shrink the arch partition originally, but after that i just rebooted back into arch to do the actual install

surreal path
tawdry mirage
#

i mean just use whatever works for you

#

i was joking

surreal path
finite summit
#

The best linux distro is obviously debian

surreal path
#

I think honestly what I’m gonna like do

#

is just try setting up gentoo cause I rlly like gentoo

#

Even if it takes me days

finite summit
#

another one bites the dust...

surreal path
#

wdym

finite summit
#

you'll see...

surreal path
#

???

finite summit
#

it's gentoo

#

right

#

so you'll end up getting so busy on compiling packages

kind root
#

fedora works okay

surreal path
#

I compiled the entire Linux kernel in like

#

20 minutes

kind root
#

u didnt compile the entire kernel

#

u compiled whatever subset of drivers was selected in your config

surreal path
#

yea not the ENTIRE kernel

#

But it compiles pretty fast

kind root
#

anyway i wouldnt waste days on this

finite summit
#

Obvious thing to do

#

is to make your own distro

#

of linux

surreal path
#

😎

kind root
#

cant think of a more boring thing

finite summit
#

making a distro of the NT kernel is probably more amusing if you like reverse engineering

#

Actually

#

finish NyaUX

#

and make your PC run it

surreal path
#

ah yes

kind root
finite summit
#

anyway

#

I got dumb stack corruption bugs to deal with

#

and memory corruption

#

and scheduler bugs

kind root
#

i thought u had asan

surreal path
#

Go fix em

finite summit
#

Turning on ASAN causes them to happen KEKW

kind root
#

bro

finite summit
#

except for the scheduler bug

kind root
#

how do u even manage to produce so many bugs

finite summit
#

I'll boot into my kernel, and debug the first of the bugs that comes at me

finite summit
kind root
#

lol

finite summit
#

stack traces are also fucked so I can only know up to one frame of the stack

#

a lot of my debugging now is guess work

kind root
#

fix them

finite summit
#

I will

#

(I hope)

kind root
#

yes

finite summit
#

If I can't

#

Rewrite five is coming

kind root
#

lmao

#

what are you changing in this rewrite

finite summit
#

This time

kind root
#

have you grown as a coder

finite summit
#

I'll actually test my shit

#

and test it more aggressively

kind root
#

good idea

finite summit
#

I'll try to get a UBSan and ASAN as soon as possible

#

So I have more possible ways of testing

#

and detecting bugs

#

anyway enough cluterring this thread

#

I'll say any progress on the bug in my thread

kind root
#

ye

wicked loom
thorn bramble
finite summit
#

also microsoft probably wouldn't be very happy if you did that

thorn bramble
#

why

#

im just writing code

#

im not publishing their code or doing anything illegal

#

i am almost 100% sure that it would be just fine

#

it would probably be very useless but whatever

cinder plinth
surreal path
#

Turns out the laptop I’m using has terrible Linux support so back to windows I go :)

tawdry mirage
#

classic

surreal path
#

Truly a Microsoft moment

#

Never buy acer laptops

unkempt relic
#

but the linixs told me linux works on every laptop now

surreal path
#

Does it run Linux yes? Is it a horrible experience with fans at constant speed and the drivers being hell? Yes

#

acer sucks

#

shouldve bought uhhhh

#

Asus or who tf

sleek gazelle
#

preferably thinkpad

worldly condor
surreal path
#

Sorry i have an exam this week

#

my dads forcing me to study 😭

#

by the weekend ill be back and we'll be able to create some epic gamer progress

#

😎

#

APIC driver!!!!

#

😱

#

and maybe the lapic timer too if i can cram it into the weekend

#

schools lame πŸ˜”

elder shoal
#

When I still was at school I used to not do anything and spend my entire time there either playing on my phone or studying osdev related things and trying to figure out how Im gonna implement things

surreal path
#

cant rlly do that

wide nexus
wide nexus
surreal path
#

I KNOW ITS BEEN A FEW DAYS BUT IM BACK !!!!!

#

I ONLY HAVE LIKE 1 EXAM LEFT !!!

#

TOMOROOW AND THEN I CAN WORK ON NYAUX

#

πŸ’ƒ

#

also i got gentoo working as well

#

😎

#

(idk why it uses so much ram at idle, even with just the tty it takes like 300-400mb of ram? must be because i didnt compile the kernel and just used the gentoo dist bin kernel)

surreal path
#

gonna try booting nyaux on real hardware for the lols

rigid fable
surreal path
#

πŸ€·β€β™‚οΈ

rigid fable
#

you might as well use Windows 10 with wsl if you are fine with such memory consumptions

surreal path
#

ima fix by compiling my kernel

rigid fable
surreal path
#

why wont uacpi compile 😠 undefined reference to `__popcountdi2'

#

grrr

#

it worked on wsl!

#

what tf does this mean

kind root
#

Search this server

#

This has been asked before

surreal path
#

im looking

#

like wait

#

ok fixed 😎

#

adding the option -march=x86-64-v2

#

fixed it

#

bro...

#

it worked on fkn wsl

#

what tf is going on

#

what da flip

#

why is it giving me an address from the hhdm

#

what the flippers

tawdry mirage
#

lol

#

presumably you have a different compiler version than you had on wsl?

surreal path
#

i dont know why this is happenin tho

#

this makes no sense !

#

what???

#

what the fuck?

#

interesting

#

umm why is uacpi giving me this bogus size

kind root
#

did u enable sized frees or are u just reading an uninitialized register

kind root
#

u have a function with that signature, that doesnt mean u enabeld it

#

thats not how this works

surreal path
#

right there

kind root
#

in a C file?

surreal path
#

yea

kind root
#

do u know how C works?

surreal path
#

oh i forgor

#

again

#

i know C works i just remembered this

#

again

#

im stupid

#

woopsies

#

oopsie

#

yea it works now

#

!!!

#

thanks copyobject abuser for reminding me of the same exact issue i had before i had completely forgot about !

kind root
#

np

surreal path
#

ok im gonna work on an apic driver now

#

ig

#

in which i dont know where to start!

kind root
#

the APIC table

#

aka MADT

surreal path
#

so get the madt?

kind root
#

yes

#

since u have uacpi uacpi_table_find_by_signature(UACPI_MADT_SIGNATURE)

surreal path
#

ok easy i will

#

do that

#

just lemme make a apic.c file rq

surreal path
kind root
#

same place where all other tables are defined

#

acpi.h

surreal path
#

thanks

thorn bramble
#

when were the acpi table structures added?

#

i was looking for it a few days ago because i swear ive seen it

#

but i couldn't find it

kind root
#

just yesterday lol

surreal path
thorn bramble
#

just a pointer to a pointer

kind root
#

^

surreal path
#

so i need to create a uacpi_table

thorn bramble
#
uacpi_table *table;
uacpi_table_find_by_signature(..., &table);```
#

or whatever

kind root
#

yup

surreal path
#

ok cool

thorn bramble
#

i don't think you're supposed to free those btw

kind root
#

you dont

thorn bramble
#

as i thought, just something to keep in mind

kind root
#

yea

surreal path
#

looks like

#

a table

#

😱

thorn bramble
#

it most likely is one

surreal path
#

i never knew!

kind root
#

I would check the return value but oh well

surreal path
#

who cares !

#

!!!

#

imagine checking for errors

tawdry mirage
thorn bramble
#

kassert(uacpi_table_find_by_signature(...) == UACPI_STATUS_OK);

#

perfect

surreal path
tawdry mirage
surreal path
#

i also have nano printf but i dont rlly use it

#

only for uacpi

tawdry mirage
kind root
#

Use it

surreal path
thorn bramble
#

i restarted my project today and first thing i did was add nanoprintf

#

lol

#

i should start a thread for my thing soon too i guess

surreal path
#

it says that after the header theres the local apic address

thorn bramble
#

nah i dont have nearly enough to show

kind root
thorn bramble
#

uacpi gives you all the structures in acpi.h

kind root
#

And cast the table->virt_address

surreal path
#

ah okay 😎

thorn bramble
kind root
#

That table is variable length and has a list of entries you will need to walk and record

surreal path
#

thats an address

kind root
#

Yea

tawdry mirage
thorn bramble
#

btw don't use that lapic address, it doesn't reflect the actual value that's in the msr that's per core and might have been overwritten, shouldn't matter in most cases but it's probably the best to read it from there and mask off first 12 bits since it also contains some flags iirc

steady flume
#

nya :3

tawdry mirage
#

the madt is a packed array of entries

#

which has lapic entries, ioapic entries, ISOs

surreal path
#

isos?

kind root
#

Interrupt source overrides

surreal path
#

what does that mean

kind root
#

Read the spec

tawdry mirage
#

pic irq number -> gsi

surreal path
kind root
#

Acpi 6.5

#

And the sdm

#

And ioapic spec is a separate document

surreal path
#

ACPI represents all interrupts as β€œflat” values known as global system interrupts.

#

i am not following

#

this is quite confusing but thats 5 lapics and 2 io apics

#

and whatever 192 is which acording to ACPI spec is a GIC Distributor (GICD)?

#

idk what that is

kind root
#

You fucked up the parsing lol

surreal path
#

wdym i fucked up the parsing

thorn bramble
#

make sure to increment the pointer by the size of the structure you're reading

kind root
#

Gic stuff is arm only

tawdry mirage
#

the combination x86 and arm machine

thorn bramble
#

lol

#

no

kind root
#

Bruh

tawdry mirage
surreal path
#

im probs doing something stupid

thorn bramble
#

yes very wrong

surreal path
#

☠️

#

is madt->entries->length in bytes?

#

or

thorn bramble
#

yes

#

it's the size of the entire table

surreal path
#

okay

thorn bramble
#

including all the entries and the header itself

kind root
#

The length of the table is table.hdr.length

thorn bramble
#

aren't the entries inline?

kind root
#

Yeah

#

So that length field is the length of the entry

thorn bramble
#

yeah but the length of the madt is the size of the header + all of the entries, right?

kind root
#

Yeah

thorn bramble
#

right that's what they asked

kind root
thorn bramble
#

oh

#

☠️

#

my baddd

surreal path
#

okay

kind root
#

Noo

#

Bruh

surreal path
#

okay sorry 😭

#

im trying my best to understand

kind root
#

entries is an array lol

#

Use hdr.length

surreal path
#

please tell me this is correct 😭

thorn bramble
#

yes that is correct

surreal path
#

okay

thorn bramble
#

it gives you the lengths of all entries in bytes

surreal path
#

now using this i need to somehow walk through this array

thorn bramble
#

now you need to iterate through them, the array starts at madt->entries and ends at (char*)madt->entries + length_of_entries

#

each iteration you need to advance by entry->length bytes

#

until you reach the end of course

surreal path
#

alr

thorn bramble
#

you can do something like this

size_t offset = 0;
while (offset < length_of_entries) {
  struct acpi_entry_hdr *entry = (void*)madt->entries + offset;
  // ...
  offset += entry->length;
}```
#

i guess i'm spoon feeding but eh

surreal path
#

i was doing something VERY cursed lol

kind root
#

Yup

surreal path
#

so we got 1 lapic

#

an ioapic

#

a bunch of "interrupt source overrides"

#

and a "local apic nmi"

#

whatever that and interrupt source override are

kind root
#

175 is probably wrong

thorn bramble
#

that oem entry kinda sus

#

but the rest sounds correct for qemu

surreal path
#
uint64_t length_of_entries = madt->hdr.length - sizeof(madt->hdr);
    size_t offset = 0;
    while (offset < length_of_entries)
    {
        struct acpi_entry_hdr *ent = (void*)madt->entries + offset;
        serial_print("WE GOT AN ENTRY!: TYPE!: ");
        serial_print(itoa(wow, ent->type));
        serial_print("\n");
        offset += ent->length;
    }

this is all im doing lol

thorn bramble
#

- sizeof(*madt)

#

not - sizeof(madt->hdr)

surreal path
#

oh ☠️

#

wait lmao