#Nyaux
1 messages ยท Page 41 of 1
just
- uacpi_kernel_schedule_work(UACPI_WORK_GPE_EXECUTION, ecevulatemethod, (void*)(uintptr_t)idx);
+ ecevulatemethod(idx);
^
okok
Wtf
you forget to reenable interrupts in the fail case
Why are u manually enabling interrupts in an irq handler
my bad
infy also has a good point
no event
Bruh
okay fiar
same, no events

More logs
it said those logs right
yes
I need to focus on smth else rn
all good
have you worked out why it panics on pressing the power button?
i dont know why either
can u try it
sure
no events, what information do you need
I can't take a photo of it at this time
no
same as always
0x21?
yep
tf
Are you not installing the handler at the correct index?
i am?
doesn't work @surreal path
as in, no events
Well not according to your panic message
yea
what does the power button do on your laptop?
in accoirdence to what panic message
nothing
looks like more UB

could be buggy IOAPIC code
0x21 sounds like the correct vector tho
mine says 127 GSIs I think
But u somehow don't have a handler for it
can u check dmesg
even tho i do install one
anything related to ioapic
Ub any%
sudo dmesg | grep ioapic
not in dmesg
what
I haven't booted linux on this laptop in a couple of months, so it might take me a moment to find it
running this returns nothing @finite summit ?
nah
Its all caps
my bad
not in journalctl either
grep is case insensitive by default, iirc
sudo dmesg | grep IOAPIC
nvm
yea its caps
nothing
wtf
nothing
^
Caps
ah
caps
or grep -i ioapic
fwiw,
$ sudo dmesg | grep IOAPIC
[ 0.035610] IOAPIC[0]: apic_id 2, version 32, address 0xfec00000, GSI 0-119
[ 0.105229] DMAR-IR: IOAPIC id 2 under DRHD base 0xfed91000 IOMMU 1
[ 0.422584] ACPI: Using IOAPIC for interrupt routing
what doesnt
wait no
thats correct
wait no
thats wrong
lmao
wait idk anymore
His slab now that monkuous fixed it
lmao
okok
2 lines of code btw
2 lines of ub*
IOAPIC for 120 interrupts???
nah it was a logic error
nevermind, it says max gsi is 119
yeah 0-119
no sadly
He doesn't even get an sci interrupt
So its way deeper ub
schedule work and wait for work completeion is not impld
When u press the power button it literally dies
in uacpi
Not used
k
I mean the OS was turning off anyway
If you make it turn off on panics it might achieve the result
there was some xkcd meme on it
no
Interesting
User's shouldn't be using their PCs when the lid is closed
nothing happens on lid close or ac adaptor changes
Yeah nyaux is fucked
im fucked
It's not even trying to produce those irqs
that would explain the different result
is there a way to verify that through linux?
Ye
I don't have iasl
what is the pacman package
Its just acpi-tools
I had that happen to me 
Do this then open fadt.dsl
acpixtract -a
It was sso which would corrupt heap with strings that are 16-31 bytes long
Which, in my kernel, were only produced by C++ exceptions
nevermind, I have it on my laptop for some reason
i think i know why
Alternatively u can boot pmos and see what it says about it
If the framebuffer decides to cooperate 
doesn't exist
pmOS unintentionally gatekeeping secrets of stable EC driver
no worries frosty just try this iso
is it facs.dat?
@plush hearth
I did
facp.dsl
ok
Show us
I'll copy the whole dump.txt to my PC, then I'll run that test
okok
my laptop screen is hard to read, I'm just copying it over to my PC
Control Method Power Button (V1) : 0
Control Method Power Button (V1) : 0
theree's only that
working on downloading the iso
dont forget about an sci interrupt hbadnler :^T)
in ze code
are u sure u reflashed the usb
i gave u an older iso my bad @plush hearth
Lid, ac, etc
makes sense
power button potentially
Not on frostys laptop but yeah
sorry, my mother just decided to come and annoy me at that moment
power button gives a different result now
with the older ISO
the newer iso tho?
uacpi says there is now fixed event handler
did ya flash it
I'll test in a moment
Oh cool
any events?
Your firmware has the same bug as monkuous
:(
Yeah because nyaux doesnt set one
i do
my firmware has a lot of bugs
Not the fixed one u don't
I'll try the new ISO
Your firmware basically enables the fixed event on its own at some random moment, even though its explicitly disabled by uacpi at init time
So it fires in this case
no events still
Monkuous laptop also does this
what happens when u press the power button
does it fault
same as the previous iso
as in?
uacpi prints an error
uacpi: fixed event 2 fired but no handler installed, disabling...
what was the last log before that
attempting to execute a uacpi irq method
should be ...an uacpi...
๐ก
last bug
no events
i will try to use obos's impl
of ec
again
so we can see if its a driver issue or smt else
it also has random undefined objects
That could be a nyaux skill issue as well
nah
how so
Linux reports them as well
oh nvm
Ah ok
Least retarded firmware
I think I've sent it before
I remember sending it then realising the MSDM table was there
Is it an approximately 2010 laptop?
I sent it at a similar time to when oberrow sent one
late 2010s 
hp pavilion x360 convertible 14-dh0151TU
๐
try this iso frosty
firmware is by insyde
alright
Do they not test this shit before releasing it or something
Just open the goddamn dmesg and see that it errors out lmao
they make it for a bunch of similar laptops all at once
the CPU varies
and RAM I think
Yeah perhaps idk
the firmware says the last bit of the model is 14-dh0xxx, because they are too lazy to make a specific build
different logging I see
events or no
no events
hold on forgot a kprintf
helo bad boy nyauxmaster
now try
hoi
same result

seems we have a bug outside
the
ec driver

idk what to do to debug this
@plush hearth U DID reflash the usb
right
can u reboot again
just reflash and try agian
yes
is there a reason why it pauses for a bit during initialising the PMM?
no change
gonna kms
if it helps, it prints ACPI: Initialized EC from namespace (post-namespace init)
good luck. I'm going to get back to what I was doing
im out of debugging ideas
@plush hearth
i came up with a big brain idea
dont enter the scheduler
see if u get events lol
@finite summit u free maybe?
I'll try it
he might be sleeping
okok
thanks
I'm awake, but I share a room with my little brothers
who need to sleep
so I don't wanna wake them
go to sleep then
lmso
laughing my software off
it appears to hang after printing the total memory in use?
no events
at all
no thats normal
i disabled the scheduler
power button?
I'll try the AC adaptor just to make sure
do that too
same
ac?
working on it
kk
nothing
๐ ๐
I'll reboot and try again just to make sure
yeah, it is the same
we might need the help of someone smarter then me like qwinci or wux idk
i am out of ideas to debug this
yep whatsup
i legit
need ur help
so fucking bad
we dont at ALL get ec events
like
sure lol
at all
no matter the ec impl even
i tried obos's impl
it didnt even work
so its not my impl
there has to be some kind of bug
can I test this in qemu
yeah thats what I feared
yes
Yep. I'll be awake for another 8 hours
fair
yea he will be able
When did you last sleep
the only issue is that I havent actually implemented EC myself before but ill give it a look
i woke up 5pm
i can give u some spec
That is concerning
I would really suggest you fix all the warnings
5/10 times I have UB there has been a warning
which is why I turned on -Werror
I suggest this
this looks concerning
well I looked at the code but I cannot debug since I cannot reproduce the bug
sorry, I really wish I could be of more help
mint said thats a bogus warning
but
u can add prints
and give frosty the iso
couldnt u
like idk what else i could print
but maybe u have ideas
idk
im losing myself
there has to be SOMETHING causing the ec not to work
i swear
i really dont know what to do
how to debug this
at all
i cant gdb real hw
like why
why am i subjected to this
why cant the ec just work
is it UB
somewhere
anywhere????
what is going on
why cant i get an event
and why doesnt obos's impl work either
why
thats the thing, with many things I might but I dont know much about EC so its difficult
no but even with OBOS's impl
of the ec driver
i even shoved his one
it didnt even work
and it didnt get any events
like wtf
@plush hearth i have one last idea
maybe indirectly uacpi is calling this
i dont know
so do u have any info from the EC
i can write to it
i can read its status cmd register
I'll try it
thats something i could do
maybe try that
so is the status register just zero?
I don't see it get called
maybe change uACPI log level to info
okok js lemme try printing the status everywhere
so I can see more
can't take a picture at this time, screen is too dim, and there is too much glare
I see one print
2 actually
just let me see it
idc
1 in install_ec_handlers, other in ec_init, both are 1000
idk depends whether you printed in hex or decimal
in all 4 ec_readuacpi, it is 11000, the install_ec_handlers one is gone, it is 1000 in ec_init
which means bust is enabled?
yea so burst mode was enabled correctly
yes
burst*
that is good
what is not good is that it doesnt want to give me fucking events
and this is making me bang my head againist the wlal
wall*
there has to be UB somewhere else in the kenrel then
idfk
can you push the latest code
yea k
I'll have a look
thats latest
these commit messages...
yea ik
vscode does not like your code
what is bear
so many warnings
mark hcf as noreturn?
that solves it
@surreal path fast slep ๐ก
im good thanks
u should do spinlocks different
wdym
rather than CAS'ing in a loop you should do it like
while !cas(spinlock, 0, 1):
while spinlock == 1:
loop;
like while its held you use a normal load
to wait for it to be freed
defining memcpy, memset, memmove and memcmp in main.c is weird
also includes in the middle of the file
clangd does those and idrc abt it
maybe you should spend some time improving code quality at some point soon
can we not roast my code lol
sure maybe later
but im currently mega focused on this no ec event issue
the quality may be questionable but it does make sense
I hate to be that person but frosty has a point
If you improve code quality you will have less problems in the future
And the problems will be a lot easier to debug
the sooner you do it, the better
Ok then do it latest after you fix this bug
rewriting the entire codebase
no thanks
Maaaybe it would be easier to debug if you spent some time looking over your code and improving it
maybe after userspace
Where did I say rewrite everything
i mean
No where did I say rewrite everything
do it in stages
Ok then do it in small portions
just slowly improve different parts of the code to make it more readable
you never know
to me its perfectly readable
because
It would almost certainly help you find the cause of the bug
im used to my code style
If anything because you are looking over everything
Ok but can you read it a year from now still
ive looked over ec.c a bunch, also looked at the kernelapi and such
And also if it's good code other people can help debug/investigate more easily
wdym
this should all be volatile:
G O T O B E D
hold on
the compiler could easily optimise that out
try
no events...

btw, you don't need to upload isos
I've got the source locally, so just let me know when you make changes
and I can just make a new iso
this is the sort of thing that concerns me
lol
yea just pull from git
I see you just return a HHDM address for uacpi_kernel_map, which is fine
kmalloc always memsets
i dont have a proper sleep
i just can stall with hpet
as for get ticks
i dont know what it means by get ticks
get the ticks from the HPET and then convert it to what uacpi wants
get_ticks doesn't exist anymore
just do that for now
microseconds
k
stdatomic ๐
alright
if you cant uacpi, use acpica ๐
no
no
doesn't work
no events?
yeah

idk I'll try to use acpica
I think you might need to get someone that knows more about EC to look
uacpi is page faults ๐ญ
i asked oberrow
he said he doesnt know
my kernel is cursed or smt
plus his impl also didnt work
no events
maybe I should see if his kernel gets events on my laptop
okok
in my os uacpi is starting 50/50 and if not page faults it stuck on initialization default spaces
sounds about as stable as linux
do you have a thread for your OS here?
just so we don't invade this thread talking about your kernel
yesss
@surreal path try to use acpica or u are bald bad boy
can you ping me in it
@surreal path I'm gonna take a look at the EC driver
okok
nyaux thread popping
it be popping
Did you try pmOS?
GitHub made copilot free 

But AI is quite good at rewriting code imo
Like if you give it shitty code and ask for better variable names
maybe
I just wouldnt ever trust it
Since sometimes it gives completely insane shit
Yeah I think I need to stop using it
Like it's fast at writing code, but then you spend the whole day debugging it
The problem I had with it is that instead of thinking of solutions, I would sit there and look through its suggestions etc
Because it's not understanding kernel code and start hallucinating
and this was for webdev mind you
I cant even imagine what garbage it spits out for low level C code
(if anyone wants to try my EC driver)
But idk VSCode gets really confused with my OS
Since it's kernel + libc + 10 userspace programs in monorepo, using patched clang
So within a mess of trying to remember how a function is called, it is of help I guess
fent
he needed to somehow get uacpi points
lmao
but like his EC driver that is using uacpi isnt working
not exactly surprising after looking at that
schedule work and wait for work completion is not required
and i did impl more then half
popping at dying 
iill try urs next ig
also 6 functions is not half
ec doesnt care about those functions
as well
that is not the point
๐คฆโโ๏ธ
@plush hearth are u awake, try his os
no that's points
bru
no difference
does anyone have anymore debugging ideas
i am out
implement missing functions
bro
schedule work doesnt matter
that shouldnt effect the ec
and signal_event doesnt rlly matter too
infy can verify this
plus also
not a debugging idea
PCI?
i already have PCI
go check source
yall assume things without reading the source sometimes
lol
who wants to join voice 0 ig
bro still has 2 space indents
too lazy to fix it
send patches
:^)
okay guys
im going to let yall choose what i do next
wait
i cant send polls here
it will be in #polls
no
In what way
Sorry I'm too busy playing Fortnite
are ya winning son?
@surreal path
nvm i got the pmos
impl in
can u or frosty try it
When I get EC event
The error is "normal"
okay
i thought i was having some deep bug with ze kernel
I think
Wdym
U don't actually execute the aml it asks you to
Literally says failed
schedule work is not impl'd
i can just run the function
this is pmos's imp[l
btw
.
What
to test if its a bug with the ec driver or a deeper bug in the kernel
i ran his ec driver in nyaux
to which works
so
i just realized why
the ec driver doesnt work
and ur not gonnna believe
schedule work is called as a result of an ec event
and u dont implement that
so no aml is actually being ran
^
yes i understand what hes saying
umm i do
im just talking about something else
because thats not the cause of ze issue
the cause was.,..
this one functino
๐
i had never called
this function
nice
at finalization

nyaux arm when
โข๏ธ
"I swear to by allah"
yea
that makes no sense
wallah billah
I swear to by allah is what you said if you were to translate "wallah" to english
alhamdulillah
yea
my bad
@flat nymph results?
it failed?
try this
it gets 1 event and hangs
cool
is it?
yes
@kind root look btw
Hell ya dude
I mean cool, but still it didn't run any aml
um no it does
look
thats running aml
No, it didnt
I don't know how, it didnt tho
It would say ignoring firmware notify
Since firmware didnt try to notify you
You did something wrong


hold on @flat nymph will add more prints on the actual running of the aml
Btw, are you planning to write an AHCI driver?
tmpfs exists
@kind root whats ur opinion on nyaux so far btw
Too early to tell
fair
If you continue and dont do tons of rewrites and actually put in effort I dont see why it wouldn't be good
i wont rewrite
im putting effort in
dw
:)
this is the rewrite to rule them all
finish nyaux then rewrite
finish nyaux then rewrite nyaux in nyaux
๐ญ
the goal should be to do osdev in your os
pmOS had no rewrites so far
gearbox had a couple rewrites
but a lot of code stayed
the "rewrites" were mostly me switching to C++ once
then switching back
and various rewrites only supported a single architecture
currently all those are merged in the latest rewrite
fent
fein
I think my OS is like 50/50 C and C++ 
it supports x86-64, aarch64 and riscv64
did ya test son
yea rust is better than cpp imo
are ya winning son
for gearbox
maybe managarm's phd code needs c++
@flat nymph ?

interesting
Panic! Reason: failed
try this chat
is qwinci a mango
But it still need a dhcp option
dnsmasq can supply that
