Commit graph

226 commits

Author SHA1 Message Date
Jacob Moody 15140dcce2 kernel: add dev dtracy provider. 2022-06-17 02:25:15 +00:00
Jacob Moody c12022fd8c skel(3) → skelfs(4)
The original intention was to put devskel in to the
kernel to detach what it provides from devsrv.
That is not a good reason, just move it to userspace.

auth/box has been changed to exec skelfs instead
of relying on '#z'.
2022-06-15 06:42:05 +00:00
Jacob Moody f4840cdba5 kernel: add devskel for pc and pc64 2022-06-07 05:25:44 +00:00
cinap_lenrek 6f9838a6a5 kernel: make Page.txtflush into an array
To avoid a MAXMACH limit of 32 and make
txtflush into an array for the bitmap.

Provide portable macros for testing and clearing
the bits: needtxtflush(), donetxtflush().

On pc/pc64, define inittxtflush()/settxtflush()
as no-op macros, avoiding the storage overhead of
the txtflush array alltogether.
2022-01-16 19:25:11 +00:00
Ori Bernstein 7efbea82c6 devssl, cpu, import, oexportfs: delete
SSL is implemented by devssl. It's extremely
obsolete by now, and is not used anywhere but
cpu, import, and oexportfs.

This change strips out the devssl bits, but
does not (yet) remove the code from libsec.
2021-12-13 02:17:02 +00:00
cinap_lenrek 20ea113790 kernel: support large 64-bit pci membars, increase pc64 VMAPSIZE to 1TB
This makes vmap()/vunmap() take a vlong size argument,
and change the type of Pci.mem[].size to vlong as well.

Even if vmap() wont support large mappings, it is nice to
get the original unruncated value for error checking.

pc64 needs a bigger VMAP window, as system76 pangolin
puts the framebuffer at a physical address > 512GB.
2021-11-26 20:51:45 +00:00
cinap_lenrek 5484260b42 kernel: move waserror() macro to port/portfns.h 2021-10-11 11:52:37 +00:00
cinap_lenrek 4483500f62 pc, pc64: increase confmem slots to 64
Lenovo Thinkpad P17 Gen1 Professional Mobile Workstation
comes up with around 36 separate memory ranges.

ridiculous!
2021-07-14 17:06:28 +00:00
cinap_lenrek f58d99aa7a virtio: add non-legacy virtio 1.0 drivers for disk and ethernet
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.
2021-07-11 11:24:13 +00:00
cinap_lenrek 15b903c4e1 pc64: avoid getcr3() in mmuflushtlb()
it turns out that calculating physical address of pml4 is faster
than reading the machine register, so pass it explicitely.
2021-05-12 22:40:51 +02:00
cinap_lenrek c0d4498ab8 kernel: clean up Mach structure
Remove unused fields and factor common fields into a
new PMach struct in port/portdat.h.

The fields machno, splpc and proc are not moved to
PMach as they are part of the known offsets from
assembly (l.s).
2021-04-25 17:41:34 +02:00
cinap_lenrek 295acd7e0d kernel: get rid of physical page bank array and use conf.mem[] instead
We can take advantage of the fact that xinit() allocates
kernel memory from conf.mem[] banks always at the beginning
of a bank, so the separate palloc.mem[] array can be eleminated
as we can calculate the amount of non-kernel memory like:

upages = cm->npage - (PGROUND(cm->klimit - cm->kbase)/BY2PG)

for the number of reserved kernel pages,
we provide the new function: ulong nkpages(Confmem*)

This eleminates the error case of running out of slots in
the array and avoids wasting memory in ports that have simple
memory configurations (compared to pc/pc64).
2021-04-02 20:23:25 +02:00
cinap_lenrek a05bab362f pc, pc64: add minimal HPET driver to measure LAPIC and TSC frequencies
This adds the new function pointer PCArch.clockinit(),
which is a timer dependent initialization routine.
It also takes over the job of guesscpuhz(). This way, the
architecture ident code can switch between different
timers (i8253, HPET and XEN timer).
2021-01-17 21:21:12 +01:00
cinap_lenrek 932995bb27 kernel: update procsave() comment, we'r not holding up->rlock anymore 2020-12-21 14:41:10 +01:00
cinap_lenrek e4ce6aadac kernel: handle tos and per process pcycle counters in port/
we might as well handle the per process cycle
counter in the portable part instead of duplicating the code
in every arch and have inconsistent implementations.

we now have a portable kenter() and kexit() function,
that is ment to be used in trap/syscall from user,
which updates the counters.

some kernels missed initializing Mach.cyclefreq.
2020-12-20 22:34:41 +01:00
cinap_lenrek 318fe6a702 ether2114x: vetting the driver for pc64
the tulip driver is used in microsofts hypver-v
as the legacy ethernet adapter for pxe booting.

to make the driver work on pc64, we need to
store the Block* pointers in a separate array
instead of stuffing them into buffer address 2
of the hardware descriptor.

also, enable the driver in the pc64 kernel.
2020-12-17 20:55:59 +01:00
cinap_lenrek 23b52bbf23 pc64: assign fpsave/fprestore only once in fpuinit() 2020-12-06 22:05:00 +01:00
cinap_lenrek cd38d41356 pc64: AMD64 mandates SSE support, remove the check in fpuinit() 2020-12-06 21:44:26 +01:00
cinap_lenrek 8c1bde46f0 pc, pc64: move all fpu specific code from main.c to fpu.c 2020-12-06 21:07:30 +01:00
Sigrid 97b3291533 amd64: FP: back to static size for allocation and copying 2020-12-06 19:40:57 +01:00
Sigrid 334c5e1134 amd64: FP: always use enough to fit AVX state and align to 64 bytes 2020-12-06 19:31:56 +01:00
Sigrid 66b6185845 amd64, vmx: support avx/avx2 for host/guest; use *noavx= in plan9.ini to disable 2020-12-06 18:48:32 +01:00
cinap_lenrek 178a9d12c6 pc, pc64: allocate dma bounce buffer right after xinit() 2020-12-05 16:59:30 +01:00
cinap_lenrek 99696c414a pc, pc64: exclude memory regions with unusual MTRR cache attributes
Use the MTRR registers to exclude memory ranges that
do not have the expected cache attributes:

RAM -> writeback
UMB -> uncached
UPA -> uncached
2020-12-05 16:57:12 +01:00
cinap_lenrek 1d93a5628a pc, pc64, xen: rewrite interrupt handling code
This implements proper intrdisable() support for all
interrupt controllers.

For enable, (*arch->intrassign)(Vctl*) fills in the
Vctl.enable and Vctl.disable pointers with the
appropriate routines and returns the assigned
vector number.

Once the Vctl struct has been linked to its vector
chain, Vctl.enable(Vctl*, shared) gets called with a
flag if the vector has been already enabled (shared).

This order is important here as enabling the interrupt
on the controller before we have linked the chain can
cause spurious interrupts, expecially on mp system
where the interrupt can target a different cpu than
the caller of intrenable().

The intrdisable() case is the other way around.
We first disable the interrupt on the controller
and after that unlink the Vctl from the chain.
On a multiprocessor, the xfree() of the Vctl struct
is delayed to avoid freeing it while it is still
in use by another cpu.

The xen port now also uses pc/irq.c which has been
made generic enougth to handle xen's irq scheme.
Also, archgeneric is now a separate file to avoid
pulling in dependencies from the 8259 interrupt
controller code.
2020-11-29 17:43:22 +01:00
cinap_lenrek a041c90431 pc, pc64: move common irq handling code out of trap.c
Move the common irq handling code out of trap.c
into pc/irq.c so that it can be shared between 386
and amd64 ports.
2020-11-22 17:44:21 +01:00
cinap_lenrek 6dd605dbe2 pc, pc64: fix grub multiboot
It appears that our IDT overlaps with the data structures
passed from grub in multiboot load.

So defer setup of the interrupt table after the multiboot
parameters have been processed.
2020-11-21 23:15:19 +01:00
cinap_lenrek 0f56fefd45 pc, pc64: implement disabling of msi interrupts 2020-11-21 21:48:25 +01:00
cinap_lenrek e6684dbfda pc, pc64: disable all pci devices for /dev/reboot
Make sure all pci busmaster activity is disabled,
including MSI/MSI-X interrupts, before switching
control to the new kernel.
2020-11-21 16:17:20 +01:00
cinap_lenrek 972f95aa63 pc, pc64: load idt early in trapinit0()
loading the interrupt vector table early allows
us to handle traps during bootup before mmuinit()
which gives better diagnostics for debugging.

we also can handle general protection fault on
rdmsr() and wrmsr() which helps during
cpuidentify() and archinit() when probing for
cpu features.
2020-11-17 23:30:09 +01:00
cinap_lenrek 0ba91ae22a pc, pc64: allocate i/o port space for unassigned pci bars, move ioalloc() to port/iomap.c
With some newer UEFI firmware, not all pci bars get
programmed and we have to assign them ourselfs.

This was already done for memory bars. This change
adds the same for i/o port space, by providing a
ioreservewin() function which can be used to allocate
port space within the parent pci-pci bridge window.

Also, the pci code now allocates the pci config
space i/o ports 0xCF8/0xCFC so userspace needs to
use devpnp to access pci config space now. (see
latest realemu change).

Also, this moves the ioalloc()/iofree() code out
of devarch into port/iomap.c as it can be shared
with the ppc mtx kernel.
2020-11-03 20:46:09 +01:00
cinap_lenrek 4f85115526 kernel: massive pci code rewrite
The new pci code is moved to port/pci.[hc] and shared by
all ports.

Each port has its own PCI controller implementation,
providing the pcicfgrw*() functions for low level pci
config space access. The locking for pcicfgrw*() is now
done by the caller (only port/pci.c).

Device drivers now need to include "../port/pci.h" in
addition to "io.h".

The new code now checks bridge windows and membars,
while enumerating the bus, giving the pc driver a chance
to re-assign them. This is needed because some UEFI
implementations fail to assign the bars for some devices,
so we need to do it outselfs. (See pcireservemem()).

While working on this, it was discovered that the pci
code assimed the smallest I/O bar size is 16 (pcibarsize()),
which is wrong. I/O bars can be as small as 4 bytes.
Bit 1 in an I/O bar is also reserved and should be masked off,
making the port mask: port = bar & ~3;
2020-09-13 20:33:17 +02:00
cinap_lenrek e7e6f4fc90 pc64: disable interrupts in mmuwalk() for checkmmu()
we have to disable interrupts during mmuwalk() of user pages
as we can get preempted during mmu walk and the original
m->pml4 might become one of a different process.
2020-07-16 03:11:27 +02:00
cinap_lenrek 182e18ecff devpccard: use 64-bit physical addresses 2020-06-06 15:21:27 +02:00
cinap_lenrek 93f6ce24f4 pc, pc64: use 64-bit physical addresses for ISAConf.port 2020-06-06 14:52:16 +02:00
cinap_lenrek 21e4d88a51 pc, pc64: use 64-bit physical addresses for vmap() and upaalloc() 2020-06-06 14:43:24 +02:00
cinap_lenrek b86bb35c7d pc, pc64: do page attribute table (PAT) init early in cpuidentify()
the page attribute table was initialized in mmuinit(), which is
too late for bootscreen(). So now we check for PAT support and
insert the write-combine entry early in cpuidentify().

this might have been the cause of some slow EFI framebuffers on
machines with overlapping or insufficient MTRR entries.
2020-05-22 23:58:24 +02:00
cinap_lenrek 1fe3143e4c kernel: cleanup the software mouse cursor mess
The swcursor used a 32x32 image for saving/restoring
screen contents for no reason.

Add a doflush argument to swcursorhide(), so that
disabling software cursor with a double buffered
softscreen is properly hidden. The doflush parameter
should be set to 0 in all other cases as swcursordraw()
will flushes both (current and previours) locations.

Make sure swcursorinit() and swcursorhide() clear the
visibility flag, even when gscreen is nil.

Remove the cursor locking and just do everything within
the drawlock. All cursor functions such as curson(),
cursoff() and setcursor() will be called drawlock
locked. This also means &cursor can be read.

Fix devmouse cursor reads and writes. We now have the
global cursor variable that is only modified under
the drawlock. So copy under drawlock.

Move the pc software cursor implementation into vgasoft
driver, so screen.c does not need to handle it as
a special case.

Remove unused functions such as drawhasclients().
2020-04-10 17:12:51 +02:00
cinap_lenrek 7b309d2e28 pc, pc64: remove "got unassigned irq" prints
most pc's are multiprocessors these days, that use apic or
msi interrupts, then the irq does not matter anymore. and
uefi does not even assign irq to pci devices anymore. if
we have a problem enabling an interrupt, we will print.
2020-04-09 13:05:10 +02:00
cinap_lenrek 9e2344a5be pc64: remove rampage() nil check
rampage() never returns nil
2020-04-06 01:29:12 +02:00
cinap_lenrek 5f1b70f437 pc, pc64: new memory map code
This replaces the memory map code for both pc and pc64
kernels with a unified implementation using the new
portable memory map code.

The main motivation is to be robust against broken
e820 memory maps by the bios and delay the Conf.mem[]
allocation after archinit(), so mp and acpi tables
can be reserved and excluded from user memory.

There are a few changes:

new memreserve() function has been added for archinit()
to reserve bios and acpi tables.

upareserve() has been replaced by upaalloc(), which now
has an address argument.

umbrwmalloc() and umbmalloc() have been replaced by
umballoc().

both upaalloc() and umballoc() return physical addresses
or -1 on error. the physical address -1 is now used as
a sentinel value instead of 0 when dealing with physical
addresses.

archmp and archacpi now always use vmap() to access
the bios tables and reserve the ranges. more overflow
checks have been added.

ramscan() has been rewritten using vmap().

to handle the population of kernel memory, pc and pc64
now have pmap() and punmap() functions to do permanent
mappings.
2020-04-04 16:48:37 +02:00
Sigrid f5f37ba5eb pc64: enable uartpci (thanks taw9 for testing) 2020-03-29 19:28:39 +02:00
cinap_lenrek 77a7e3f8fc kernel: cleanup makefile for $CONF.$O target 2020-02-02 20:46:58 +01:00
cinap_lenrek 8d51e7fa1a kernel: implement portable userinit() and simplify process creation
replace machine specific userinit() by a portable
implemntation that uses kproc() to create the first
process. the initcode text is mapped using kmap(),
so there is no need for machine specific tmpmap()
functions.

initcode stack preparation should be done in init0()
where the stack is mapped and can be accessed directly.

replacing the machine specific userinit() allows some
big simplifications as sysrfork() and kproc() are now
the only callers of newproc() and we can avoid initializing
fields that we know are being initialized by these
callers.

rename autogenerated init.h and reboot.h headers.
the initcode[] and rebootcode[] blobs are now in *.i
files and hex generation was moved to portmkfile. the
machine specific mkfile only needs to specify how to
build rebootcode.out and initcode.out.
2020-01-26 19:01:36 +01:00
cinap_lenrek 5254e41f6b pc64: adapt vgaradeon driver to 64-bit (thanks Robert Ransom)
Not yet tested.
2020-01-11 23:31:54 +01:00
cinap_lenrek 5d59a44c21 pc, pc64: clear debug watchpoint registers on exec and exit
when a process does an exec syscall, procsetup() is called and
we have to disable the debug watchpoint registers. just clearing
p->dr is not enougth as we are not going thru a procsave() and
procrestore() cycle which would disable and reload the saved
debug registers.

instead of clearing debug registers in procfork(), we should
clear the saved debug registers before a process goes to die
(pexit() calls sched() with up->state = Moribund) as the Proc
structure can get reused for kernel processes (kproc) which
never call procfork() and would therefore have debug registers
loaded.
2019-12-02 23:32:24 +01:00
cinap_lenrek 21a599743e pc, pc64: merge adjacent e820 map entries of same type
some machines give us over 300 e820 ram entries that are
all adjacent to each other causing us to run out of Map
end Emap entries.

this change adds e820clean() function, which sorts the
current e820 map and discards unusable entries and merges
adjacent entries. e820clean() is called after we parsed
the *e820= boot parameter or when we run out of entries.

an example of such a broken e820 map (thanks mischief):

*e820=1 0000000000000000 0000000000008000 1 0000000000008000 000000000000c000 1 000000000000c000 000000000003f000 1 000000000003f000 0000000000040000 1 0000000000040000 00000000000a0000 1 0000000000100000 0000000001000000 1 0000000001000000 0000000001020000 1 0000000001020000 0000000009d82000 2 0000000009d82000 000000000a000000 1 000000000a000000 000000000a200000 4 000000000a200000 000000000a20b000 1 000000000a20b000 000000000b000000 2 000000000b000000 000000000b020000 1 000000000b020000 0000000010000000 1 0000000010000000 000000001000b000 1 000000001000b000 00000000d9634000 1 00000000d9634000 00000000d96be000 1 00000000d96be000 00000000d96cc000 1 00000000d96cc000 00000000d96db000 1 00000000d96db000 00000000d97df000 1 00000000d97df000 00000000d97ed000 1 00000000d97ed000 00000000d9837000 1 00000000d9837000 00000000d9844000 1 00000000d9844000 00000000d985e000 1 00000000d985e000 00000000d9865000 1 00000000d9865000 00000000d9897000 1 00000000d9897000 00000000d98d7000 1 00000000d98d7000 00000000d98db000 1 00000000d98db000 00000000d98dd000 1 00000000d98dd000 00000000d999d000 1 00000000d999d000 00000000d9a8e000 1 00000000d9a8e000 00000000d9add000 1 00000000d9add000 00000000d9ae2000 1 00000000d9ae2000 00000000d9af3000 1 00000000d9af3000 00000000d9af4000 1 00000000d9af4000 00000000d9af6000 1 00000000d9af6000 00000000d9af7000 1 00000000d9af7000 00000000d9af8000 1 00000000d9af8000 00000000d9af9000 1 00000000d9af9000 00000000d9b5e000 1 00000000d9b5e000 00000000d9b60000 1 00000000d9b60000 00000000d9b8c000 1 00000000d9b8c000 00000000d9b8d000 1 00000000d9b8d000 00000000d9c85000 1 00000000d9c85000 00000000d9c8a000 1 00000000d9c8a000 00000000d9caf000 1 00000000d9caf000 00000000d9cb5000 1 00000000d9cb5000 00000000d9cc1000 1 00000000d9cc1000 00000000d9cc2000 1 00000000d9cc2000 00000000da986000 1 00000000da986000 00000000daeb6000 1 00000000daeb6000 00000000daed7000 1 00000000daed7000 00000000daed8000 1 00000000daed8000 00000000daf61000 1 00000000daf61000 00000000daf7c000 1 00000000daf7c000 00000000db3e6000 1 00000000db3e6000 00000000db4ea000 1 00000000db4ea000 00000000db57d000 1 00000000db57d000 00000000db587000 1 00000000db587000 00000000db58a000 1 00000000db58a000 00000000db58b000 1 00000000db58b000 00000000db591000 1 00000000db591000 00000000db5a7000 1 00000000db5a7000 00000000db5b2000 1 00000000db5b2000 00000000db5ba000 1 00000000db5ba000 00000000db5bb000 1 00000000db5bb000 00000000db5c6000 1 00000000db5c6000 00000000db5c7000 1 00000000db5c7000 00000000db5c8000 1 00000000db5c8000 00000000db5c9000 1 00000000db5c9000 00000000db5cb000 1 00000000db5cb000 00000000db5d0000 1 00000000db5d0000 00000000db5e8000 1 00000000db5e8000 00000000db5ea000 1 00000000db5ea000 00000000db5eb000 1 00000000db5eb000 00000000db5ee000 1 00000000db5ee000 00000000db601000 1 00000000db601000 00000000db602000 1 00000000db602000 00000000db60e000 1 00000000db60e000 00000000db610000 1 00000000db610000 00000000db612000 1 00000000db612000 00000000db614000 1 00000000db614000 00000000db61d000 1 00000000db61d000 00000000db645000 1 00000000db645000 00000000db64c000 1 00000000db64c000 00000000db650000 1 00000000db650000 00000000db651000 1 00000000db651000 00000000db653000 1 00000000db653000 00000000db658000 1 00000000db658000 00000000db659000 1 00000000db659000 00000000db661000 1 00000000db661000 00000000db662000 1 00000000db662000 00000000db665000 1 00000000db665000 00000000db677000 1 00000000db677000 00000000db69d000 1 00000000db69d000 00000000db6a0000 1 00000000db6a0000 00000000db6a8000 1 00000000db6a8000 00000000db6ae000 1 00000000db6ae000 00000000db6c2000 1 00000000db6c2000 00000000db6d4000 1 00000000db6d4000 00000000db6de000 1 00000000db6de000 00000000db6e0000 1 00000000db6e0000 00000000db6e2000 1 00000000db6e2000 00000000db6ef000 1 00000000db6ef000 00000000db6f0000 1 00000000db6f0000 00000000db6f2000 1 00000000db6f2000 00000000db6f3000 1 00000000db6f3000 00000000db810000 1 00000000db810000 00000000db815000 1 00000000db815000 00000000db81f000 1 00000000db81f000 00000000db821000 1 00000000db821000 00000000db85d000 1 00000000db85d000 00000000db869000 1 00000000db869000 00000000db881000 1 00000000db881000 00000000db889000 1 00000000db889000 00000000db88e000 1 00000000db88e000 00000000db88f000 1 00000000db88f000 00000000db891000 1 00000000db891000 00000000db899000 1 00000000db899000 00000000db8a9000 1 00000000db8a9000 00000000db8ab000 1 00000000db8ab000 00000000db8af000 1 00000000db8af000 00000000db8b1000 1 00000000db8b1000 00000000db8b5000 1 00000000db8b5000 00000000db8b7000 1 00000000db8b7000 00000000db8be000 1 00000000db8be000 00000000db8c2000 1 00000000db8c2000 00000000db8c7000 1 00000000db8c7000 00000000db8cf000 1 00000000db8cf000 00000000db8e0000 1 00000000db8e0000 00000000db8e1000 1 00000000db8e1000 00000000db8e2000 1 00000000db8e2000 00000000db8e6000 1 00000000db8e6000 00000000db8e8000 1 00000000db8e8000 00000000db8f4000 1 00000000db8f4000 00000000db904000 1 00000000db904000 00000000db90c000 1 00000000db90c000 00000000db91c000 1 00000000db91c000 00000000db91d000 1 00000000db91d000 00000000db922000 1 00000000db922000 00000000db923000 1 00000000db923000 00000000db929000 1 00000000db929000 00000000db92b000 1 00000000db92b000 00000000db92d000 1 00000000db92d000 00000000db92f000 1 00000000db92f000 00000000db933000 1 00000000db933000 00000000db934000 1 00000000db934000 00000000db936000 1 00000000db936000 00000000db937000 1 00000000db937000 00000000db952000 1 00000000db952000 00000000db96b000 1 00000000db96b000 00000000db998000 1 00000000db998000 00000000db9a1000 1 00000000db9a1000 00000000db9a2000 1 00000000db9a2000 00000000db9a3000 1 00000000db9a3000 00000000db9a4000 1 00000000db9a4000 00000000db9a5000 1 00000000db9a5000 00000000db9a7000 1 00000000db9a7000 00000000db9a8000 1 00000000db9a8000 00000000db9aa000 1 00000000db9aa000 00000000db9ba000 1 00000000db9ba000 00000000db9da000 1 00000000db9da000 00000000db9f7000 1 00000000db9f7000 00000000dba00000 1 00000000dba00000 00000000dba0a000 1 00000000dba0a000 00000000dba11000 1 00000000dba11000 00000000dba12000 1 00000000dba12000 00000000dba51000 1 00000000dba51000 00000000dba5d000 1 00000000dba5d000 00000000dba6c000 1 00000000dba6c000 00000000dba88000 1 00000000dba88000 00000000dba92000 1 00000000dba92000 00000000dba94000 1 00000000dba94000 00000000dbac0000 1 00000000dbac0000 00000000dbac6000 1 00000000dbac6000 00000000dbad2000 1 00000000dbad2000 00000000dbad9000 1 00000000dbad9000 00000000dbae0000 1 00000000dbae0000 00000000dbaeb000 1 00000000dbaeb000 00000000dbaf6000 1 00000000dbaf6000 00000000dbb01000 1 00000000dbb01000 00000000dbb17000 1 00000000dbb17000 00000000dbb1f000 1 00000000dbb1f000 00000000dbb20000 1 00000000dbb20000 00000000dbb23000 1 00000000dbb23000 00000000dbb24000 1 00000000dbb24000 00000000dbb25000 1 00000000dbb25000 00000000dbb3a000 1 00000000dbb3a000 00000000dbb3d000 1 00000000dbb3d000 00000000dbb43000 1 00000000dbb43000 00000000dbb45000 1 00000000dbb45000 00000000dbb49000 1 00000000dbb49000 00000000dbb4c000 1 00000000dbb4c000 00000000dbb4e000 1 00000000dbb4e000 00000000dbb51000 1 00000000dbb51000 00000000dbb54000 1 00000000dbb54000 00000000dbb5a000 1 00000000dbb5a000 00000000dbb5e000 1 00000000dbb5e000 00000000dbb62000 1 00000000dbb62000 00000000dbb67000 1 00000000dbb67000 00000000dbb91000 1 00000000dbb91000 00000000dbb93000 1 00000000dbb93000 00000000dbb94000 1 00000000dbb94000 00000000dbb9d000 1 00000000dbb9d000 00000000dbb9f000 1 00000000dbb9f000 00000000dbbcf000 1 00000000dbbcf000 00000000dbbd0000 1 00000000dbbd0000 00000000dbbd1000 1 00000000dbbd1000 00000000dbbd5000 1 00000000dbbd5000 00000000dbbd6000 1 00000000dbbd6000 00000000dbbd7000 1 00000000dbbd7000 00000000dbbd8000 1 00000000dbbd8000 00000000dbbd9000 1 00000000dbbd9000 00000000dbbdd000 1 00000000dbbdd000 00000000dbbdf000 1 00000000dbbdf000 00000000dbbe1000 1 00000000dbbe1000 00000000dbbeb000 1 00000000dbbeb000 00000000dbbec000 1 00000000dbbec000 00000000dbbef000 1 00000000dbbef000 00000000dbbff000 1 00000000dbbff000 00000000dbc01000 1 00000000dbc01000 00000000dbc05000 1 00000000dbc05000 00000000dbc0f000 1 00000000dbc0f000 00000000dbc11000 1 00000000dbc11000 00000000dbc12000 1 00000000dbc12000 00000000dbc14000 1 00000000dbc14000 00000000dbc15000 1 00000000dbc15000 00000000dbc20000 1 00000000dbc20000 00000000dbc21000 1 00000000dbc21000 00000000dbc22000 1 00000000dbc22000 00000000dbc2a000 1 00000000dbc2a000 00000000dbc2c000 1 00000000dbc2c000 00000000dbc2d000 1 00000000dbc2d000 00000000dbc2f000 1 00000000dbc2f000 00000000dbc30000 1 00000000dbc30000 00000000dbc42000 1 00000000dbc42000 00000000dbc44000 1 00000000dbc44000 00000000dbc54000 1 00000000dbc54000 00000000dbc5c000 1 00000000dbc5c000 00000000dbc5e000 1 00000000dbc5e000 00000000dbc60000 1 00000000dbc60000 00000000dbc64000 1 00000000dbc64000 00000000dbc6d000 1 00000000dbc6d000 00000000dbc7f000 1 00000000dbc7f000 00000000dbc85000 1 00000000dbc85000 00000000dbca3000 1 00000000dbca3000 00000000dbca6000 1 00000000dbca6000 00000000dbcb9000 1 00000000dbcb9000 00000000dbcba000 1 00000000dbcba000 00000000dbcbb000 1 00000000dbcbb000 00000000dbcbc000 1 00000000dbcbc000 00000000dbcbd000 1 00000000dbcbd000 00000000dbcd5000 1 00000000dbcd5000 00000000dbcd8000 1 00000000dbcd8000 00000000dbcd9000 1 00000000dbcd9000 00000000dbcda000 1 00000000dbcda000 00000000dbce1000 1 00000000dbce1000 00000000dbce3000 1 00000000dbce3000 00000000dbce4000 1 00000000dbce4000 00000000dbd06000 1 00000000dbd06000 00000000dbd07000 1 00000000dbd07000 00000000dbd0a000 1 00000000dbd0a000 00000000dbd0b000 1 00000000dbd0b000 00000000dbd0c000 1 00000000dbd0c000 00000000dbd0e000 1 00000000dbd0e000 00000000dbd10000 1 00000000dbd10000 00000000dbd12000 1 00000000dbd12000 00000000dbd15000 1 00000000dbd15000 00000000dbd17000 1 00000000dbd17000 00000000dbd19000 1 00000000dbd19000 00000000dbd1b000 1 00000000dbd1b000 00000000dbd44000 1 00000000dbd44000 00000000dbd46000 1 00000000dbd46000 00000000dbd60000 1 00000000dbd60000 00000000dbd70000 1 00000000dbd70000 00000000dbd79000 1 00000000dbd79000 00000000dbd7a000 1 00000000dbd7a000 00000000dbd7c000 1 00000000dbd7c000 00000000dbd7d000 1 00000000dbd7d000 00000000dbd90000 1 00000000dbd90000 00000000dbd93000 1 00000000dbd93000 00000000dbd97000 1 00000000dbd97000 00000000dbd9a000 1 00000000dbd9a000 00000000dbd9b000 1 00000000dbd9b000 00000000dbd9e000 1 00000000dbd9e000 00000000dbda1000 1 00000000dbda1000 00000000dbda5000 1 00000000dbda5000 00000000dbda9000 1 00000000dbda9000 00000000dbdaf000 1 00000000dbdaf000 00000000dbdb3000 1 00000000dbdb3000 00000000dbdb4000 1 00000000dbdb4000 00000000dbdbe000 1 00000000dbdbe000 00000000dbdbf000 1 00000000dbdbf000 00000000dbdc0000 1 00000000dbdc0000 00000000dbdc1000 1 00000000dbdc1000 00000000dbdc2000 1 00000000dbdc2000 00000000dbdc5000 1 00000000dbdc5000 00000000dbdc6000 1 00000000dbdc6000 00000000dbdc7000 1 00000000dbdc7000 00000000dbdcb000 1 00000000dbdcb000 00000000dbdcf000 1 00000000dbdcf000 00000000dbdd5000 1 00000000dbdd5000 00000000dbdd8000 1 00000000dbdd8000 00000000dbddf000 1 00000000dbddf000 00000000dbde1000 1 00000000dbde1000 00000000dbde5000 1 00000000dbde5000 00000000dbde8000 1 00000000dbde8000 00000000dbded000 1 00000000dbded000 00000000dbdf0000 1 00000000dbdf0000 00000000dbdf4000 1 00000000dbdf4000 00000000dbdf7000 1 00000000dbdf7000 00000000dbdfb000 1 00000000dbdfb000 00000000dbe1e000 1 00000000dbe1e000 00000000dbe20000 1 00000000dbe20000 00000000dbe23000 1 00000000dbe23000 00000000dbe27000 1 00000000dbe27000 00000000dbe28000 1 00000000dbe28000 00000000dbe2a000 1 00000000dbe2a000 00000000dbe2b000 1 00000000dbe2b000 00000000dc24d000 1 00000000dc24d000 00000000dc25c000 1 00000000dc25c000 00000000dc25d000 1 00000000dc25d000 00000000dc25e000 1 00000000dc25e000 00000000dc273000 1 00000000dc273000 00000000dc274000 1 00000000dc274000 00000000dc275000 1 00000000dc275000 00000000dc276000 1 00000000dc276000 00000000dc27a000 1 00000000dc27a000 00000000dc27e000 1 00000000dc27e000 00000000dc283000 1 00000000dc283000 00000000dc284000 1 00000000dc284000 00000000dc2a2000 1 00000000dc2a2000 00000000dc2a6000 1 00000000dc2a6000 00000000dd163000 2 00000000dd163000 00000000dd2a8000 1 00000000dd2a8000 00000000dd42a000 4 00000000dd42a000 00000000dd83e000 1 00000000dd83e000 00000000de38b000 1 00000000de38b000 00000000de430000 1 00000000de430000 00000000de733000 1 00000000de733000 00000000de74f000 1 00000000de74f000 00000000de770000 1 00000000de770000 00000000de77d000 1 00000000de77d000 00000000de783000 1 00000000de783000 00000000de78b000 1 00000000de78b000 00000000de7a4000 1 00000000de7a4000 00000000de7b4000 1 00000000de7b4000 00000000de7c9000 1 00000000de7c9000 00000000de7e0000 1 00000000de7e0000 00000000deff9000 1 00000000deff9000 00000000df000000 1 0000000100000000 000000021f380000 2 00000000000a0000 0000000000100000 2 00000000df000000 00000000e0000000 2 00000000f8000000 00000000fc000000 2 00000000fd000000 0000000100000000
2019-12-01 14:06:30 +01:00
cinap_lenrek d32e5d130c sd53c8xx: fix the driver for amd64, fix alignment/padding issues, fix freechain handling 2019-11-24 21:56:54 +01:00
cinap_lenrek 62eec43340 kernel: clear FPillegal in pexit() and before pprint()
pexit() and pprint() can get called outside of a syscall
(from procctl()) with a process that is in active note
handling and require floating point in the kernel on amd64
for aesni (devtls).
2019-09-08 19:02:01 +02:00
cinap_lenrek 7bb1a9a185 pc64: map kernel text readonly and everything else no-execute
the idea is to catch bugs and make kernel exploitation
harder by mapping the kernel text section readonly
and everything else no-execute.

l.s maps the KZERO address space using 2MB pages so
to get the 4K granularity for the text section we use
the new ptesplit() function to split that mapping up.

we need to set EFER no-execute enable bit early
in apbootstrap so secondary application processors
will understand the NX bit in our shared kernel page
tables. also APBOOTSTRAP needs to be kept executable.

rebootjump() needs to mark REBOOTADDR page executable.
2019-08-29 07:35:22 +02:00