| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
| |
_kvtophys only works with direct-mappable memory, which is scarse,
better use kvtophys that can work with any kind of memory.
* linux/src/include/asm-i386/io.h: Include <intel/pmap.h>
(virt_to_phys): Use kvtophys instead of _kvtophys.
|
|
|
|
| |
* linux/dev/glue/block.c (check_rw_block): Return 0 on no error.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
vm_page_grab was systematically using the VM_PAGE_SEL_DIRECTMAP selector
to play safe with existing code.
This adds a flags parameter to let callers of vm_page_grab specify their
constraints.
Linux drivers need 32bit dmas, Xen drivers use kvtophys to clear some
data. Callers of kmem_pagealloc_physmem and vm_page_grab_phys_addr also use
kvtophys. Otherwise allocations can go to highmem.
This fixes the allocation jam in the directmap segment.
* vm/vm_page.h (VM_PAGE_DMA, VM_PAGE_DMA32, VM_PAGE_DIRECTMAP,
VM_PAGE_HIGHMEM): New macros.
(vm_page_grab): Add flags parameter.
* vm/vm_resident.c (vm_page_grab): Choose allocation selector according
to flags parameter.
(vm_page_convert, vm_page_alloc): Pass VM_PAGE_HIGHMEM to vm_page_grab.
(vm_page_grab_phys_addr): Pass VM_PAGE_DIRECTMAP to vm_page_grab.
* vm/vm_fault.c (vm_fault_page): Pass VM_PAGE_HIGHMEM to vm_page_grab.
* vm/vm_map.c (vm_map_copy_steal_pages): Pass VM_PAGE_HIGHMEM to vm_page_grab.
* kern/slab.c (kmem_pagealloc_physmem): Pass VM_PAGE_DIRECTMAP to vm_page_grab.
* i386/intel/pmap.c (pmap_page_table_page_alloc): Pass VM_PAGE_DIRECTMAP to
vm_page_grab.
* xen/block.c (device_read): Pass VM_PAGE_DIRECTMAP to vm_page_grab.
* linux/dev/glue/block.c (alloc_buffer): Pass VM_PAGE_DMA32 to vm_page_grab.
|
| |
|
|
|
|
| |
* vm/vm_page.c (db_show_vmstat): Add printing the segment size.
|
|
|
|
|
| |
* vm/vm_page.c (db_show_vmstat): Drop displaying cache numbers a second
time.
|
|
|
|
|
|
|
|
|
| |
It would be very tricky for the server to manage deallocation for
device_read, and does not seem useful anyway. device_reply.defs already
has it.
* include/device/device.defs (device_read): Add dealloc flag for the data
array.
|
|
|
|
| |
* vm/vm_page.c (db_show_vmstat)
|
|
|
|
|
|
|
|
| |
with an output similar to the userland vmstat command
* vm/vm_page.c (db_show_vmstat): New function.
* vm/vm_page.h (db_show_vmstat): New prototype.
* ddb/db_command.c (db_show_cmds): Add vmstat command.
|
|
|
|
|
|
|
|
|
|
| |
* linux/dev/drivers/block/ahci.c (ahci_do_port_request): Reject sectors
beyond LBA48 or LBA28.
* linux/dev/glue/block.c (check_rw_block): New function.
(rdwr_partial, rdwr_full): Use check_rw_block to reject block number
overflows.
* linux/src/drivers/block/ide.c (do_rw_disk): Reject sectors beyond
LBA28 or CHS.
|
| |
|
|
|
|
| |
Otherwise userland can send spurious notifications.
|
|
|
|
| |
This is required anyway, and allows the caller to pass on MAKE_SEND.
|
|
|
|
| |
On success we'd have to clean the port right. Just consume it.
|
|
|
|
|
| |
We want to prevent subproxies from requesting larger sizes than what a
proxy initially allowed.
|
| |
|
| |
|
|
|
|
|
|
|
| |
glibc's mmap implementation assumes that gnumach will cap the prot for it,
so for now let's revert back to capping rather than rejecting.
That fixes mmap(SHARED|READ) for read-only objects.
|
|
|
|
| |
This reverts commit af9f471b500bcd0c1023259c7577e074fe6d3ee5.
|
|
|
|
|
|
|
|
|
| |
* If not making a copy, don't cap protection to the limit enforced
by the proxy, and only require read access. This fixes mapping
parts of read-only files MAP_ANON + PROT_READ|PROT_WRITE.
* Instead of silently capping protection, return KERN_PROTECTION_FAILURE
to the caller like the other vm_*() routines do.
|
|
|
|
|
|
|
|
|
|
|
| |
We are still having issues with bogus dates. This adds prints at boot
and time set, to make sure what we actually read and write.
* i386/i386at/rtc.c: Include <kern/printf.h>
(readtodc): Warning about reaching CENTURY_START. Print the time read
from RTC.
(writetodc): Record in RTC remainder of division of year by 100 rather
than subtracting 1900. Print the time written to RTC.
|
|
|
|
|
|
|
| |
This could conflict with read/writing the RTC.
* i386/i386at/kd.c (kd_xga_init): Do not read the CRAM. We were always
assuming VGA anyway.
|
|
|
|
|
|
|
| |
We unmasked by hand kd's irq 1, but com0/1 also need unmasking. More
generally we should unmask irqs as appropriate.
* i386/i386at/model_dep.c (machine_init): Unmask irq 3 and 4.
|
|
|
|
| |
Message-Id: <20210405115921.184572-3-damien@zamaudio.com>
|
|
|
|
| |
Message-Id: <20210405115921.184572-2-damien@zamaudio.com>
|
|
|
|
|
| |
* kern/thread.c (thread_info): Set last_processor to 0 when the thread
never ran.
|
|
|
|
|
|
|
| |
thread->last_processor is a processor_t, not a slot number.
* kern/thread.c (thread_info): Set sched_info->last_processor to
thread->last_processor->slot_num rather than thread->last_processor.
|
|
|
|
| |
Message-Id: <20210405052916.174771-5-damien@zamaudio.com>
|
|
|
|
| |
Message-Id: <20210405052916.174771-4-damien@zamaudio.com>
|
|
|
|
| |
Message-Id: <20210405052916.174771-3-damien@zamaudio.com>
|
|
|
|
| |
Message-Id: <20210405052916.174771-2-damien@zamaudio.com>
|
| |
|
|
|
|
|
|
|
| |
* i386/i386at/boothdr.S (_eintstack): Add missing common.
* i386/xen/xen_boothdr.S (_eintstack): Add missing common.
* x86_64/xen/xen_boothdr.S (_eintstack): Add missing common.
* i386/i386/mp_desc.c (intstack, eintstack): Add missing underscore.
|
|
|
|
|
|
|
| |
Use --enable-ncpus=x --enable-apic where x > 1 for SMP+APIC support.
Use neither for no SMP and old PIC support.
Message-Id: <20210404050812.145483-1-damien@zamaudio.com>
|
|
|
|
|
| |
* i386/i386/pit.h (PITAUX_VAL, PIT_C2): New macros.
(PIT_RATEMODE): Fix macro value.
|
|
|
|
|
| |
* linux/configfrag.ac (--disable-linux-groups): New option.
(AC_OPTION_Linux_group): Default to $enable_linux_groups.
|
|
|
|
|
|
| |
We currently already always assume that irqs user handlers can be shared
* device/intr.c (install_user_intr_handler): Add SA_SHIRQ to flags.
|
|
|
|
|
|
|
|
|
|
| |
* device/intr.c: Include <kern/assert.h>
(struct intr_list): New structure.
(user_intr_handlers): New array.
(user_irq_handler): New function.
(install_user_intr_handler): New function.
Message-Id: <20210330025830.63528-2-damien@zamaudio.com>
|
|
|
|
|
|
|
|
| |
Not only Linux drivers need BIOS mapped.
* i386/i386at/model_dep.c (i386at_init) [!LINUX_DEV]: Map the low
memory.
* i386/intel/pmap.c (pmap_create) [!LINUX_DEV]: Likewise.
|
| |
|
|
|
|
|
|
|
|
|
| |
* linux/dev/arch/i386/kernel/irq.c: Include <i386/irq.h> instead of
<i386/pic.h>.
(irq_action): Use NINTR instead of 16, do not bother expliciting the
initialization.
(install_user_intr_handler, request_irq, free_irq, probe_irq_on,
probe_irq_off, reserve_mach_irqs): Use NINTR instead of 16.
|
|
|
|
|
|
| |
* i386/i386/pic.h (PICM_VECTBASE): Set to 0x20.
* i386/i386at/idt.h (IDTSZ): Set to 0x20 + 0x10.
(PIC_INT_BASE): Set to 0x20.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* i386/i386/apic.c (acpi_get_irq_override): New function.
(apic_get_ioapic): Make it return IoApicData* rather than IoApicData.
(apic_print_info): Manage IoApicData* rather than IoApicData.
* i386/i386/apic.h (struct ApicReg): Use uint32_t instead of unsigned.
(struct ioapic_route_entry): New structure.
(union ioapic_route_entry_union): New union.
(ApicLocalUnit): Rename base to gsi_base. Add ioapic field.
(APIC_IRQ_OVERRIDE_POLARITY_MASK, APIC_IRQ_OVERRIDE_TRIGGER_MASK): New
macros.
(acpi_get_irq_override, ): New prototype.
(apic_get_ioapic): Update prototype.
(lapic): New declaration.
(IMCR_SELECT, IMCR_DATA, MODE_IMCR, IMCR_USE_PIC, IMCR_USE_APIC,
LAPIC_ENABLE, LAPIC_NMI, LAPIC_DISABLE, LAPIC_TIMER_PERIODIC,
LAPIC_TIMER_DIVIDE_2, LAPIC_TIMER_DIVIDE_4, LAPIC_TIMER_DIVIDE_8,
LAPIC_TIMER_DIVIDE_16, LAPIC_TIMER_BASEDIV, NINTR, IOAPIC_FIXED,
IOAPIC_PHYSICAL, IOAPIC_LOGICAL, IOAPIC_NMI, IOAPIC_EXTINT,
IOAPIC_ACTIVE_HIGH, IOAPIC_ACTIVE_LOW, IOAPIC_EDGE_TRIGGERED,
IOAPIC_LEVEL_TRIGGERED, IOAPIC_MASK_ENABLED, IOAPIC_MASK_DISABLED): New
macros.
* i386/i386at/acpi_parse_apic.h (struct acpi_apic_ioapic): Rename base
field to gsi_base.
* i386/i386at/acpi_parse_apic.c (acpi_apic_add_ioapic): Update to
gsi_base new name. Set ioapic field.
(acpi_apic_setup): Rename lapic to lapic_unit.
Message-Id: <20210328060320.36194-5-damien@zamaudio.com>
|
|
|
|
|
|
| |
* i386/i386at/acpi_parse_apic.c (acpi_get_apic): Map rsdt entries read-only.
Message-Id: <20210328060320.36194-4-damien@zamaudio.com>
|
|
|
|
|
|
|
|
|
| |
* i386/i386at/acpi_parse_apic.c (acpi_check_rsdp_align): Make it take a
void* instead of uint32_t.
(acpi_get_rsdp): Apply phystokv on the EBDA base and 0xE0000.
(acpi_apic_setup): Drop spurious negation.
Message-Id: <20210328060320.36194-3-damien@zamaudio.com>
|
|
|
|
|
|
|
|
|
|
| |
This is the last group needed to easily disable the Linux glue.
* linux/configfrag.ac (block): New group.
(floppy): Set group to block.
(ide): Set group to block.
Message-Id: <20210328060320.36194-2-damien@zamaudio.com>
|
|
|
|
| |
Message-Id: <20210326094850.2606-5-damien@zamaudio.com>
|
|
|
|
| |
Message-Id: <20210326094850.2606-4-damien@zamaudio.com>
|
|
|
|
| |
* linux/dev/drivers/block/ahci.c (ahci_probe_dev): Rename spd to det.
|
|
|
|
|
|
|
| |
Avoid panicing on all CPUs that do not support xsaves.
* i386/i386/fpu.c (init_fpu): Panic on CPUs that do not support xsaves
only if the cpu-reported xsave size is smaller than expected.
|