when running 'mk clean', we get a stray
libpanel.$O.a, because our 'mk clean'
rule expects libpanel.a$O.
This causes build failures after mk clean
on a symbol change.
> After some tinkering I managed to get igfx working on this device.
> hw cursor works.
> The only caveat is that I can only get video over hdmi...
> will revisit displayport later
- avoid print() format routines (saves alot of code)
- avoid useless opens of /dev/cons (already done by initcode)
- avoid useless binds of /env and /dev (already done by initcode)
- do bind of /shr in bootrc, it is not needed by us
- we'r pid 1 so kernel will print the exit message for us
currently, git/fetch prints the refs
to update before it fully fetches the
pack files; this can lead to updates
to the refs before we're 100% certain
that the objects are present.
This change prints the updates after
the packfile has been successfully
indexed.
We used to use performance cycle counter for cycles(),
but it is kind of useless in userspace as each core
has its own counter and hence not comparable between
cores. Also, the cycle counter stops counting when
the cores are idle.
Most callers expect cycles() to return a high resolution
timestamp instead, so do the best we can do here
and enable the userspace generic timer virtual counter.
sbrk(0) returns the current end address of the BSS segment,
not the base. This might have been confused with the behaviour
of segbrk(), which when given a zero address returns the base.
> String becomes stringbg so we have guaranteed max contrast in case the
> user changes the picture. (If you don't change the picture, it's
> white-on-black-on-black (sic) and you would never notice the change.)
When pulling into a git repository that is group
writable as a non-owner, the pack file is left
in place because we do not have permission to
remove it.
We also leave it behind if we bail out early due
to an error, or due to only listing the changes.
This pushes down the creation of the file, and
cleans it up on error.
thanks to Anthony Martin for spotting the bug.
git/fetch: ensure we clean packfiles on failure
When pulling into a git repository that is group
writable as a non-owner, the pack file is left
in place because we do not have permission to
remove it.
We also leave it behind if we bail out early due
to an error, or due to only listing the changes.
This pushes down the creation of the file, and
cleans it up on error.
Also, while we're here, clean up index caching,
and ensure we close the fd in all cases.
thanks to Anthony Martin for spotting the bug.
we have to protect the temporary buffer allocated by rwfield()
as rwreg() calls amlmapio() which might cause further aml code
execution causing gc() which frees it under us (as it is not
referenced from the interpreter state).
this fixes a panic on boot of a
Lenovo Thinkpad P17 Gen1 Professional Mobile Workstation
when a virtio device gets reset, we have to also reset the device
shadow indices: availableidx and usedidx. for extra safetly,
we also reset the buffer descriptor table addresses.
this is accomplished by adding a vioqreset(VIOQueue*) function
that brings the queue to its initial reset state.
this fixes non functional ethernet after reboot(8).
The new interface uses pci capability structures to locate the
registers in a rather fine granular way making it more complicated
as they can be located anywhere in any pci bar at any offset.
As far as i can see, qemu (6.0.50) never uses i/o bars in
non-legacy mode, so only mmio is implemented for now.
The previous virtio drivers implemented the legacy interface only
which uses i/o ports for all register accesses. This is still
the preferred method (and also qemu default) as it is easier to
emulate and most likely faster.
However, some vps providers like vultr force the legacy interface
to disabled with qemu -device option "disable-legacy=on" resulting
on a system without a disk and ethernet.
This used to be a internal function, but virtio
uses multiple structures with the same cap type
to indicate the location of various register
blocks in the pci bars so export it.
fn foo @{bar} is now equivalent to
fn foo {@{bar}}. As a side effect,
this disallows creating functions
named after keywords without first
quoting them.