On 11/10/2025 01:49, Damien Zammit wrote:
On 10/11/25 5:42 AM, Michael Kelly wrote:
1) If I run my modified acpi server against an unmodified gnumach
kernel, there doesn't seem to be a way of detecting that your new
feature is absent. The old 'get_stat' for "irq" was nulldev_getstat()
which returns D_SUCCESS and an unmodified 'count'. I would have thought
that function would return either a failure result or at least a count
of zero? In any case, it doesn't help detect an old kernel. The actual
value returned for pic_mode in these circumstances was consistently 46
but I'm assuming that is a meaningless or uninitialised value.
Set count = 0 and then check that count was set to 1,
if it remains 0 then the feature is not available.
Yes, that works. It means having to call device_get_status() twice but
this is only on initialisation so it doesn't matter really.
Thanks,
Mike.