#Nyaux
1 messages ยท Page 40 of 1
yes hpet ```
[ 0.005544] ACPI: HPET 0x00000000C723E000 000038 (v01 HPQOEM 8707 01072009 HP 00000005)
[ 0.005598] ACPI: Reserving HPET table memory at [mem 0xc723e000-0xc723e037]
[ 0.035746] ACPI: HPET id: 0x10228201 base: 0xfed00000
[ 0.108900] clocksource: hpet: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 133484873504 ns
[ 0.998988] hpet0: at MMIO 0xfed00000, IRQs 2, 8, 0
[ 0.998991] hpet0: 3 comparators, 32-bit 14.318180 MHz counter
no 64 bit one tho

that seems to be a running theme on amd platforms
try this iso tho
i have an athlon 64 x2 machine and it also has a 32-bit hpet
if it founds a ecdt table and successfully installs ec handlers it will say
so i think it probs did find an ecdt table on ur laptop
just try it tho
WAIT
@tawdry mirage HOLD ON
try this isntead
flash it like rq
and try it
i had to move some functions aroun
but it should say now
okay well uhhh i could disable the hpet
will i disable the hpet
i will do so
you could just impl 32 bit hpet support
nahh
@tawdry mirage okay i disabled hpet in this iso
try
let me know anything that comes from ec
what are you using for sleeps etc?
hpet
in this iso i mena
i commented out all "sleeps"
mean
in this iso
there is no sleep call at all
so uacpi will incorrectly report the amount of ops per second
which i dont care about
thats wrong btw
its your code
uhhhh
i scan for it
WAIT
hold on @tawdry mirage
forgot ONE line of code lmao
try now
this is why we test code btw
stuck now and doesnt print that it even found the ec
wdym
what was the last log
uacpi: namespace initialization done
that is bad

i scan for devices
and i install the ec handlers
then print device has ec
install ec handlers does this
is there something wrong with this while loop
i dont think so
wait
..
yea that should be fine
wtf
do u have an idea @tawdry mirage as to whats getting stuck?
no idea
it shouldnt get stuck
you could compare it to the managarm code, that works on this laptop
its quite similar to that
well the obos impl
let me double check everything tho
@tawdry mirage i have double checked
everything looks similar

are u SURE
the last log was uacpi: namespace init done
like
did it not print kmain
or init_acpi
or that it installed GPEs
nop
damn

thats the code ig
idk what to do
chat
its prob stuck in this function
i dont know where tho
i will add more printcs
@tawdry mirage try this iso
tell me the last log it printed
inb4 it gets stuck evulating the integer
what
what the fuck
huh???????????
maybe its because i forgot to return something
causing ub or smthin
@tawdry mirage
added more prints
and returned something
i think its stuck installing the address space
uacpi_install_address_space_handler(uacpi_namespace_root(), UACPI_ADDRESS_SPACE_EMBEDDED_CONTROLLER, ecamlhandler,
NULL);
@tawdry mirage arugments to this should look fine
thats all ecamlhandler does
so 
why is it stuck installing an address space handler

that was not a proper iteratition decision from uacpi ๐ก
/j
@tawdry mirage try this, last one i promise
so im guessing it was the break statement on UACPI_REGION_OP_ATTACH
but now its stuck evulating the gpe integer???
this very much sounds like UB
idk about you
lol
but getting stuck evulating the gpe idx is not
you could set the uacpi log level to trace
okay
wait how do i do that with uacpi
theres no set log level with uacpi
wait nvm
@tawdry mirage try
tf????
i think ur laptop is trolling me
he did not evulate the gpe
actually cringe
WAIT
no
nvm
@tawdry mirage its still stuck trying to install the address space handler
was looking at the logs wrong
are your mutexes or spinlocks broken
no
they shouldnt be
WAIT
i forgot an unlock
somewhere
hold on
okay @tawdry mirage
try this
i forgot some unlock lines in 2 functions
still stuck in the same spot
damn
๐
that is what my spinlocks look like btw
stole them from somewhere
i think ill go to bed now
goodnight
gn
ventoy on top ๐ฏ
why you need ec
like
what devices you can find with it
its just cool
plus 4th hobby os to do it
anyways im going sleep now
we will debug why ec driver fails to install an address space handler tmrw
test this rq if u dont mind
flash to a usb and test on real hw
@plush hearth u awake
test this pls if u are
yep. It's only 3:43 pm for me
do I just dd it to a usb?
this won't brick my laptop?
no it wont
it says all the CPUs are online
can u screenshot
and device as an ec
that is weird, it hangs on qookies laptop but not urs???
yea do so please
ok
does closing ur laptop lid and reopening it do anything
@surreal path why only 32 bit hpet
this is weird
okay I'll test on my old laptop
i only support that sorry
why tf does it hang on @tawdry mirage 's laptop
it have 32 bit hpet

unplugging and replugging the charger does nothing
@plush hearth try this new iso
@surreal path
u dont have ec lol
also, pressing the power button causes a panic
triple fault or what?
support 64 bit hpet
I'll try the new iso
unhandled interrupt 0x21
I have it too
new ISO yields the same result
okay lets keep a list as to the issues we are currently having
- on qookies laptop, the install address space function just hangs
- on frostys and ducks machine, pressing the power button yields a panic even though the sci handler is installed
this will be very difficult to debug

don't forget that nothing happens for lid or power cable changes
and then u get to be even more proud when u get it to work
and can put "highly skilled at debugging in difficult environments" on your resume and have it be true and not word salad
yep. It really doesn't help that QEMU doesn't support EC
@surreal path ```c
void kmain() {
while (true) {
__try {
nyaux_kmain();
}
__except (1) {
kprintf("nyaux null deref, restarting");
}
}
}
anyway hows nyaux, what are you going to do next
what is that sorcery
SEH
^
I think its pretty cool, I can just wrap my entire syscall handler in a try block to catch faults lol (and the unwind info is more sane than dwarf afaik)
it requires runtime support tho
it's not cool at all
just an msvc standardized abomination
sure like any exceptions but I don't think its that bad
shouldn't fault, ideally, at all
user access should be done through a special mechanism that catches it for you in a more lightweight way
and if your kernel code faults then just write better code or smth
how do you catch it without faulting lol
yeah but you can write it in a more lightweight way than using seh in your kernel
idk I want to at least try it for the fun of it lol
like sorry, dont get me wrong - do whatever you want in your kernel, but i just simply think that adding seh support is a bit overkill :^)
especially since faults shouldn't happen anyway lol
that's just an indicator of bad code and you should fix it instead of slapping a band aid on it
we are currently stuck on the embedded controller
driver hangs
when installing the address space
behavior is inconsisent depending on hw

on streaks computer it just deadlocks here
@molten grotto are u awake
i need your help so bad
serial shows nothing so it didnt fault
it just shows the last thing on the term
yes
please help i beg
i have multiple ub bugs happening on real hw
- freezes on scroll on streaks computer
- gets stuck installing the address space on qookies
- no ec events on frostys
if you push the code I can take a look
you didn't modify it in the last 13h?
ah, Ill take a look at it then
you don't set ec_node to anything when getting the ec from the ecdt
there is a string path in the ecdt table that you can give to some uacpi function to find the node
fair but even then
that shouldnt cause nyaux to die trying to scroll on streaks laptop
anyways u can pull again i added the change so it gets the ec node from the ec id from uacpi
you don't wait for the burst mode status bit to get set when enabling the burst mode
but yeah other than that idk
wait where do i do that
in ec_burst_time after getting the burst ack I think
at least that's where I do it in my kernel
I said that you don't do it
should i do it after getting the ack
yes
ok i do it now
but
that wont solve anything sadly
๐
im going to actually cry
@flat nymph please test i broke both usbs somehow
I'll be home in 20 minutes
okok
yea
@surreal path go to local computer shop and test EC driver
actually no don't do it in a local shop
do it in a multinational megacorporation shop
don't harm local businesses
Also, school PCs? 
Although better not, you can get expelled and it's not good when you're about to finish
(telling from personal experience)
please do so
wtf
i do install the interrupt tho
wtf
qwinci
does this not look like
that last oopsie happened when i pressed the power button
i do not know whats going on
at all
also the lack of pci might cause some issues
wdym
does uacpi hate me
i INSTALLED
the interrupt
REGISTERHANDLER
RAHHHH
you don't implement uacpi pci stuff right?
no not atm no
yeah that can cause issues
It's not ub
This is probably bad programming habits and assuming things which aren't true
uhhh
not if its inconsisent behavior
ik
So you don't support AMD
what
ugh fine ill support 32 bit hpet
And no events
Because no PCI support probably
and power button crashes it
laptop number 3
And laptop 4 is not turning on
No image 
what
MY BAD
commented out flanterm
hold on
NOW TRY
i thought that was an apple thing
i commented in flanterm
Apple is screen notch
๐
he had flanterm init commented out
cut him some slack
this time it'll SURELY work

My laptop's not turning on ๐
most stable ec driver
what
It definitely has EC
yea most likely on the pci bus
We've been debugging it with infy
Not on PCI bus, it has a normal EC
great 4 bugs now
And power button connected to GPIO
Which is only supported by pmOS out of all hobby OSes ๐
void ec_init()
{
kprintf("ec(): initing from namespace\n");
if (ec_inited)
{
return;
}
kprintf("ec(): finding device\n");
uacpi_find_devices("PNP0C09", ec_match, NULL);
if (ec_inited)
{
kprintf("installing handlers\n");
install_ec_handlers();
kprintf("ec(): device has ec!!\n");
return;
}
else
{
kprintf("ec(): device does not have ec\n");
return;
}
}
void initecfromecdt()
{
struct uacpi_table chat = {};
uacpi_status stat = uacpi_table_find_by_signature("ECDT", &chat);
if (stat != UACPI_STATUS_OK)
{
kprintf("ec(): no ecdt table found, will init from namespace\n");
return;
}
struct acpi_ecdt* ok = (struct acpi_ecdt*)chat.virt_addr;
ec_control_register = ok->ec_control;
ec_data_register = ok->ec_data;
ec_gpe_idx = ok->gpe_bit;
uacpi_namespace_node_find(NULL, ok->ec_id, &ec_node);
ec_inited = true;
install_ec_handlers();
kprintf("ec(): found ecdt table, installed and inited ec successfully\n");
return;
}
this is what i do
like tf
Idk check what pmOS does
Because it works there
But it might be that AML freaks out because it can't find some PCI devices
i told you yesterday (or rather, today at 5 am) that amd platforms all have 32-bit hpet
for a long while now
i support it now
where is ur ec code
u have a github mirror?
we lit do the same shit
i wanna kms

@tawdry mirage can u check if it still hangs at installing address space handler, i support 32 bit hpets now so it should work without any hacks now
if ur free ofc
@flat nymph does ur laptop have an ecdt?
No
fair i figured
One of them does
But not that particular one
Yeah Lenovo doesn't
The one that does is not turning on
this iso
bro was returning iter_decision_break on error in ec_match ๐ญ๐ญ
which iso do i try then
latest one prob
this one
if ur laptop has an ecdt then it probably doesn't matter
interesting
also god bless this laptop
i think the ec sometimes gets confused due to partial init or whatever and after rebooting into linux some keys don't work
try this iso
and the fix i've found to consistently fix this is to reboot into windows and then immediately into linux
i print what ops it does now
i think the first op was ec attach
Does that happen for managarm/pmos as well?
i've had it happen sometimes when testing managarm
but not consistently
it also doesn't consistently happen with nyaux
Interesting
the keys don't work in uefi already btw
Least brainrotted firmware
or rather, things that use the uefi input apis
least insane ec
if it was some useless keys i wouldn't be that mad
most functional laptop firmware
okay try this
is it just random keys???
idk but it's always consistent
almost as if it was trying to stop you from using your computer
Your ec driver just sucks
It probably hangs in read
Obos had this as well
why did obos hang
i cant wait for my ec driver to hang randomly too
Skill issue
like sir
It will cause problems only if you do completely insane things
And will need a powercycle
okay
i really like poking random values into random registers and seeing what happens
Welcome to aml lmao
isnt that how you make drivers for undocumented devices anyway
added more prints
refer to my last photo
so it didnt print anything new?
so its stuck at ec_readreal
hmst
Yeah thats the plan
Every igpu hopefully
i can be the guinea pig if u wanna poke random values into the raptor lake-s igpu
Lmao
whats the worst that can happen
hopefully my monitors can handle invalid displayport parameters :^)
@tawdry mirage added a billion prints
also re this I though about it a bit more and come to the same conclusion that its not good at least not wrapping an entire syscall handler call with it (its going to leak mutexes and memory and whatever else). I also though about just using an elf kernel with mabi=ms to get sane debug info (I don't really need seh in the kernel), though clang doesn't support that for some reason so I'd first have to implement it but it can't be that hard
"clang doesn't support" "can't be that hard" last famous words
at least the clang code base is saner than gcc lol
i mean yeah i guess it is
void foo(x, y)
int x;
int y;
{
return x + y;
}```
goes crazy
did u test this yet
no
okay
and sometimes there are also random misaligned lines because they expect people to use 8 wide tabs and replace every 8 spaces with a tab character 
anyway this is unrelated to nyaux
no queries happen though
nothing if i close/open lid, un/plug the charger, press the brightness up/down keys
I don't think I got queries on the laptop that I tried either
I tried to close/open the lid and nothing came up
try this
i removed most prints
if it gets stuck here
we have UB or smthing
if it doesnt
idfk
what happened
last image i try for now
okay
stuck after the attach event
yea its UB
it has to be UB
adding prints shouldnt change its behavior
or it could be timing related in another way
timers is disabled until way later
timing related does not mean timers
wdym
@finite summit also how
me and ur code is like very similar
i took reference from ur code so like tf
very helpful lol
check places where I raise IRQL (mask interrupts in your terms) and make sure you do the same there
ig
oh u mean here
right
yes
okay ill disable interrupts here
@finite summit added them but i dont think it will make an effect
at all
kk
upcoming kernel?
If I were to start it 
pmOS doesn't mask interrupts 
PLEASEEE do
if u do i won't even work on my own
i will contribute to urs

why are u so confident it wont be a pile of crap lol
because you're infy
how to even debug this
it's gonna be ur kernel
i mean
uacpi ain't shit
also this is called being an early investorโข๏ธ
/s
Lmfao
half joke half not
but i absolutely can not work on a project on my own
and ur goals arent exactly to have a good kernel, rather ur interested in driver dev
so that could be fun
Yeah I hate algorithm related stuff like vmm and allocators and schedulers
Im just bad at those
same but like i try sometimes ๐ญ
You're doing pretty well id say
:(
Hey I'm bad at these and I can still make a shit os
microkernels supposedly make it easy to write drivers
@hexed mango had the deal of sending ipi to cpu 0 to figure out whats wrong
WAIT
@kind root i havent impled schedule work
๐
hold on
i need to make a thread that runs the uacpi init
nyauxmaster
guess who beat your score
yes!!
u havent even impled pci
im going to impl scheduler work
first
ugh fine ill impl pci
is queueing a dpc for the work item a valid implementation?
or does it need to run at a certain point idk
yes
what should i call my pci source file
and wheres the spec for pci
you just need to have a way to wait until all scheduled work finishes
because a kernel api does that
i can just have a linked list of dpcs queued by uacpi kernel api
actually that's kinda bad
because there is no way to sleep on a list
i mean unless you also add an event
while (nWork > 0);
lol
also > * 1. All in-flight interrupts installed via uacpi_kernel_install_interrupt_handler
Are your dpcs allowed to sleep and block
If yes then yes
i mean yeah, they are also allowed to be preempted
so idk if that's gonna be a problem
Yeah like no one does that
Although its only important if u do uninstalls
To prevent race conditions
there's a bit more to it than that, but ya p much
nuh uh
page faults that fault file contents in or whatever are fine imo
theres also no other good way to access userspace
than to access it directly and allow page faults to happen and just catch bad ones, either with something like SEH or with special handling by something like copy_to_user or whatever
the latter is preferred now because of SMAP or whatever its called
bc it provides a central choke point to disable it, do the access, re-enable it
yeah, that's what we do in managarm
toaru is an example of a kernel that tries to do it differently by checking for validity before doing the access but its littered with toctou because thats incorrect without also taking some big address space lock that prevents mappings from changing
which it doesnt do
well thats what i meant, something like copy_from/to_user
the managarm impl is basically ```
handle_pf:
...
if ip >= copy_from_user_start && ip <= copy_from_user_end && is_read_fault
ip = copy_from_user_fail
return
...
of course, but the unexpected page faults shouldn't happen obviously
i felt like you implied it shouldnt be taking any page faults and should be explicitly checking for validity
no sorry for wording it badly lol
ofc a bit more abstracted (copy_from_user sets a cpu-local pointer to an info struct that has the start/end/fail pointers in it)
is it sufficient for it to be per-cpu rather than per-thread?
even if your kernel isnt preemptible, what if you take a page fault and reschedule and the thread comes back on another cpu
it should be per thread yeah
hmm that's a good point
well currently it's not a problem because we don't migrate threads between cores, but the fault could lead to a different process being scheduled (to fault in the page via the fs server)
and that also does the user copy
i could also just be missing something obvious
cc @quick quiver see above
actually, the pf doesn't even need to block the current thread
since the kernel is preemptible
least inconsistent nyaux code
lmao
nyaux has pci config support now
@tawdry mirage i have added pci config support to nyaux, if u arent busy please test it, ill only test it once and thats it
i don't think i saw any errors about it aborting execution of aml due to lack of pci io
yes because
i added pci io now
if ur free please test
i mean when testing earlier
report what
why is it that slow?
My kernel does it, but I though it's very slow to do
tcg
i have pci now
@kind root what's the asl keyword for a pci opregion
but qookie tested an older version without pci
PciConfig?
PCI_Config
re read what i said
what
why
is that something i need to impl now
how do i impl that
bruh
i just said that if it didnt abort before it didnt need pci during the namespace laod
so u adding it changed absolutely nothing
its not a bug nor a problem
yeah on my laptop only the dsdt has pci config opregions, and there's only two of them, and only one field ends up being used in total
and it only seems to be used for power management?
or not even actually
one of them is accessed from _DSM only
yeah i guess your firmware just doesnt need pci in general that much
maybe it talks over smbus instead 
or at all, i don't see any references to any of the fields except for one from _DSM of some device
in the dsdt or ssdts
last time i checked ive seen handrolled smbus code in an amd aml dump
qookie@selenium /tmp/x ฮป rg -i Pci_Config -A7
dsdt.dsl
17464: OperationRegion (PCFG, PCI_Config, Zero, 0x80)
17465- Field (PCFG, AnyAcc, NoLock, Preserve)
17466- {
17467- DVID, 32,
17468- PCMS, 32,
17469- Offset (0x45),
17470- LPSW, 1
17471- }
--
18073: OperationRegion (RPRT, PCI_Config, Zero, 0x30)
18074- Field (RPRT, AnyAcc, NoLock, Preserve)
18075- {
18076- VDID, 32,
18077- Offset (0x2C),
18078- SVID, 32
18079- }
18080-
qookie@selenium /tmp/x ฮป rg "(DVID|PCMS|LPSW|VDID|SVID)"
dsdt.dsl
17467: DVID, 32,
17468: PCMS, 32,
17470: LPSW, 1
18076: VDID, 32,
18078: SVID, 32
18083: If (WIST (VDID))
qookie@selenium /tmp/x ฮป rg PCFG
dsdt.dsl
17464: OperationRegion (PCFG, PCI_Config, Zero, 0x80)
17465: Field (PCFG, AnyAcc, NoLock, Preserve)
qookie@selenium /tmp/x ฮป rg RPRT
dsdt.dsl
18073: OperationRegion (RPRT, PCI_Config, Zero, 0x30)
18074: Field (RPRT, AnyAcc, NoLock, Preserve)
qookie@selenium /tmp/x ฮป
lmao
it gets to the hello world from scheduled thread, but still no EC events
so just hardcoded lmao
yeah PICM is an integer that represents the pic mode
there is a bunch of firmware notify requests with no listeners though. and there is an error during _REG exectution for EmbeddedControl due to AML referencing an undefined object
_CRS is also all hardcoded for link devices
```
Method (CRS, 0, NotSerialized) // CRS: Current Resource Settings
{
CreateWordField (BUFA, One, IRQX)
IRQX = (One << PIRA) /* _SB.PIRA /
Return (BUFA) / _SB.BUFA */
}
what is PIRA?
actually
yea weird
OperationRegion (PIRQ, SystemIO, 0x0C00, 0x02)
Field (PIRQ, ByteAcc, NoLock, Preserve)
{
PIDX, 8,
PDAT, 8
}
IndexField (PIDX, PDAT, ByteAcc, NoLock, Preserve)
{
PIRA, 8,
PIRB, 8,
PIRC, 8,
PIRD, 8,
PIRE, 8,
PIRF, 8,
PIRG, 8,
PIRH, 8,
according to /proc/ioports ```
0c00-0c01 : pnp 00:03
oh and pressing the power button yields the same unhandled interrupt 0x21 at CS:RIP of 0x28:0xffffffff8002ec91
hmm i dont even know where that pnp thing comes from
no idea what pnp 00:03 means
at least we have 2 types of behavior
did it perhaps just grab some _CRS output and built ioports from that?
i guess
also, I recommend renaming the CPUs to more normal numbers. Currently it is 0, 2, 4, and 6
or maybe PNP0003 APIC
its just the lapic id
is that a thing in your blob?
ports 0x0C00-0x0C01 are in _CRS of ```
Name (_HID, EisaId ("PNP0C02") /* PNP Motherboard Resources */) // _HID: Hardware ID
makes sense that its there, but wtf is 00:03
i guess 00:03 refers to some linux numbering?
perhaps
im just looking at other dumps that i have, some come up with the IRQ number by reading random memory addresses
Name (IBAS, 0xFED08000)
whatever that is
lmao
i know qemu just reads from the pci config space to get those
try this iso
exact same outcome
yep
i see
also, why this many partitions?
you can probably strip down this makefile
no thanks
you don't have aarch64, riscv64 or loongarch64
might just be the BIOS stuff
i want to see nyaux on loongarch
it will soon dw
โข๏ธ
just need to figure out why
some hardware freezes when reading ec
some hardware goes fine but no query events happen
you probably need to make it stable on x86_64 first...
exactly
if you have another test for me to run on my laptop, ping me
kk
@kind root could it be timing related issues
like omar said
just ub

*quadruple
read it yourself lol
๐ก
nyaux code is too phd for me
no actually try
this code isnt THAT bad
i promise
i did ec a very long time ago so i dont remmeber anything
only good nyaux code is nyaux code that has inspiration from other kernels 
oberrow did it very recently so he knows better
I looked at mangarm and was like "shi cool I should do that too"
then when I had bugs I actually tried understanding it
@finite summit read it

I am
kk
and this code is like the exact same as mine but without underscores
in the function names
and with fnuy function names
i didnt yoink it tho
i did actually write the code by hand
well the stuff that was yoinked
it commited
and its license is there
everything else i wrote
I think the stuff you didn't yoink have the bugs
๐
i will yoink the entire obos ec driver
and try it
if it fails
we have a bug somewhere else
else
its my skill issues
hmm ```
OperationRegion (FPIC, SystemIO, 0x0C00, 0x02)
Field (FPIC, AnyAcc, NoLock, Preserve)
{
FPII, 8,
FPID, 8
}
this one is used for interrupts of COM{1,2,3,4}
no different offsets
it skips a bunch of bytes in the indexfield that uses this copy
@finite summit try this now
wait
the first example was also accessed as selector + data
i mean the indexfield has different offsets
yeah yeah makes sense
not the field with the data + index regs
what i mean is
this is like ioapic
FPII is FPI Index and FPID is FPI Data
so u write the index and read from data
what FPI stands for im not sure
FP Interrupt probably
wtf
that is a start
show logs
i guess your chipset has a device at 0xC00 which decides where irqs are routed
i can't find anything online about these ports except for people sharing dmesg dumps that say 0xc00-0xc01 is reserved
u can query it by writing the selector value at 0xc00 and reading back at 0xc01
@finite summit
wtfff
i wonder if the data field is writable as well 
can u route irqs to random indices

is there a _SRS for e.g. COM?
no but there is one for pci link devices
does it actually write at 0xc01? 
via a helper method yeah 
lesgo
@finite summit try this i replaced a few functions with obos ones, im gonna manually replace each function til we find the function that caused it
IndexField (PIDX, PDAT, ByteAcc, NoLock, Preserve)
{
PIRA, 8,
PIRB, 8,
PIRC, 8,
PIRD, 8,
...
Method (INTD, 1, NotSerialized)
{
PIRD = Arg0
SATA = Arg0
}
...
Method (_CRS, 0, NotSerialized) // _CRS: Current Resource Settings
{
CreateWordField (BUFA, One, IRQX)
IRQX = (One << PIRD) /* \_SB_.PIRD */
Return (BUFA) /* \_SB_.BUFA */
}
Method (_SRS, 1, NotSerialized) // _SRS: Set Resource Settings
{
CreateWordField (Arg0, One, IRA)
FindSetRightBit (IRA, Local0)
Local0--
INTD (Local0)
}
lol
@surreal path it don't work
hangs?
yes
IT WAS EC_WAIT_FOR_BIT????
it booted normally
WTF
same on my laptop @surreal path
did u think it was do while as opposed to while for no reason at all
no i thought it was no reason?
bruh
I mean it executes once without checking the condition
exactly
OHHHHHHHHHHH
thats like entirely different behavior

do once, and then keep doing as long as the condition is true
okay solved now
nyaux ec corruption any%
lmao
do u have logging in your gpe callbacks??
flags would just get restored on interrupt exit wouldn't it?
ye
@kind root
static bool ec_querytime(uint8_t* idx)
{
uint8_t status = ec_read(&ec_control_register);
if (~status & EC_SCI_EVT)
{
return false;
}
bool ack = ec_burst_time();
ec_write(&ec_control_register, QR_EC);
*idx = ec_read(&ec_data_register);
ec_burst_nomoretime(ack);
return (bool)*idx;
}
least convoluted code
so u copy paste without even thinking that your thing is not implemented 
how do u expect to get events
i did not copy paste wtf
if you didn't
why did u call this function
i forgot to check if it was impld
my bad
forgot to check if it was impld
๐
but wallah
i did not copy paste
u dont have to call it even, u can run the query right there, its just bad to do in an irq context
no need to swear by Allah
just in case u dont believe me
like
so i dont even need to call uacpi schedule work?
it doesnt matter if u press ctrl+c ctrl+v
i did not tho