aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* vm_allocate_contiguous: fix checking the end of the allocationSamuel Thibault2022-02-171-1/+1
|
* mach_vm_object_pages: Print a warning if the physical address is beyond 4GiBSamuel Thibault2022-02-171-0/+2
| | | | vpi_offset is not currently large enough to store it.
* vm_allocate_contiguous: Make sure we enforce physical addresses contraintsSamuel Thibault2022-02-171-0/+3
|
* pmap: Make sure we do not allocate page tables beyond 4GiBSamuel Thibault2022-02-171-1/+4
| | | | vm_page_insert would not be able to store the offset.
* projected_buffer_*: Fix storing physical addressSamuel Thibault2022-02-171-3/+5
|
* xen: Fix storing physical addressesSamuel Thibault2022-02-163-5/+5
|
* io_map: Fix using physical addressesSamuel Thibault2022-02-162-5/+9
|
* db: Fix db_user_to_phys_address returning physical addressesSamuel Thibault2022-02-161-7/+7
| | | | It shall return a phys_addr_t, not vm_offset_t.
* vm_object: Fix vm_object_page_map map function prototypeSamuel Thibault2022-02-163-4/+4
| | | | The map function is supposed to return physical addresses, thus phys_addr_t.
* biosmem: Narrow e820 regions as requiredDamien Zammit2022-02-151-0/+28
| | | | Message-Id: <20220215064133.68593-1-damien@zamaudio.com>
* Drop spurious version suffixSamuel Thibault2022-02-111-1/+1
|
* Merge branch 'master' of git.savannah.gnu.org:/srv/git/hurd/gnumachSamuel Thibault2022-02-060-0/+0
|\
| * Ship x86_64/x86_64Samuel Thibault2022-02-061-0/+4
| | | | | | | | * x86_64/Makefrag.am (EXTRA_DIST): Ship the x86_64/x86_64 symlink.
* | Ship x86_64/x86_64 and x86_64/include/mach/x86_64Samuel Thibault2022-02-061-1/+3
| | | | | | | | | | * Makefrag.am (EXTRA_DIST): Ship the x86_64/x86_64 and x86_64/include/mach/x86_64 symlinks.
* | Makefrag.am: Move architecture condition inside architecture Makefrag.amSamuel Thibault2022-02-064-39/+25
|/ | | | | Otherwise we cannot use _DIST there and have them all taken into account. As a consequence, we can drop duplicate _DIST between i386 and x86_64.
* thread_terminate_release: Error out early if thread is NULLSamuel Thibault2022-01-211-0/+3
| | | | | We do not want to destroy the port and release the stack if thread is NULL, i.e. we will fail.
* Convert from K&R to ANSIEtienne Brateau2022-01-215-49/+29
| | | | | | | | * hardclock.c: convert to ANSI * com.c: ditto * lpr.c: ditto * mem.c: ditto Message-Id: <20220120170004.21722-1-etienne.brateau@gmail.com>
* task_set_name: make string parameter constSamuel Thibault2022-01-163-3/+3
| | | | | This follows mig's cf4bcc3f1435 ("Also add const qualifiers on server side")
* device_types: Add more const_ typesSamuel Thibault2022-01-161-0/+2
|
* typoSamuel Thibault2022-01-161-1/+1
|
* Add yet more const string typesSamuel Thibault2022-01-162-0/+2
|
* mach_debug_types: Add const_dev_name_tSamuel Thibault2022-01-161-0/+1
| | | | This will avoid forcing the caller to respect the definite string size.
* device_types: Add const_dev_name_tSamuel Thibault2022-01-161-0/+1
| | | | This will avoid forcing the caller to respect the definite string size.
* mach_i386: include MACH_I386_IMPORTSSamuel Thibault2022-01-011-0/+4
| | | | Like other defs header do, to allow e.g. including libports/ports.h
* thread: Fix thread_abort clearing of an event waitAlicia2021-12-311-0/+1
| | | | | 881fe9da8bd1 ("kern/thread.c: some minor style changes") introduced a spurious comment.
* Convert from K&R to ANSIEtienne Brateau2021-12-302-22/+8
| | | | | | * device/dev_name.c: Convert function prototypes from K&R to ANSI. * device/subr.c: Convert function prototypes from K&R to ANSI. Message-Id: <20211230112249.13682-2-etienne.brateau@gmail.com>
* kern/thread.c: some minor style changesAdam Kandur2021-12-301-34/+22
| | | | | | | Greeting, I have changed some stuff in kern/thread.c which makes code more readable for me. Maybe it will be usefull. Message-Id: <20211230082643.8171-1-sys.arch.adam@gmail.com>
* ddb: Fix updating sp while progressing through framesSamuel Thibault2021-12-291-1/+6
| | | | Notably trap/interrupt/syscall provide an exact SP value.
* ddb: Unwind over RETSamuel Thibault2021-12-292-6/+30
| | | | | When we don't have a frame but PC points to a RET instruction (e.g. in the userland system call assembly code), we can trivially unwind it.
* ddb: Fix accessing high memorySamuel Thibault2021-12-282-20/+61
| | | | | User processes loaded in high memory are not visible to ddb through the direct mapping. We can however read/write data through copy_from/to_phys.
* rtc: drop message on setting RTC timeSamuel Thibault2021-12-161-8/+0
| | | | | We haven't seen the 2032 bug for a long time, f040677be3c0 ("kd: Do not read the CMOS ram") probably fixed it at last.
* vm_wire: extend per-task wiring limit to 8MiBSamuel Thibault2021-12-161-1/+1
| | | | Like Linux just did.
* memmmap: Use biosmem_addr_available rather than vm_page_lookup_paSamuel Thibault2021-11-283-17/+25
| | | | | | | The segment code actually has vm_page entries for reserved pages, and thus memmmap would reject mapping ACPI pages. Taking the information from biosmem is much more precise, and indeed knows all hardware quirks which can now be dropped from memmmap.
* Fix rejecting the mapping of some pagesSamuel Thibault2021-11-283-10/+27
| | | | | | The memmmap method may reject some offsets (because it falls in non-device ranges), so device_map_page has to notice this and report the error. device_pager_data_request then has to notice as well and report.
* vm_region_get_proxy: rename to create_proxySergey Bugaev2021-11-072-5/+5
| | | | For coherency with memory_object_create_proxy.
* Memory proxies: Add support for anonymous mappingsSergey Bugaev2021-11-071-4/+17
| | | | | | | | * vm/vm_map.c (vm_region_get_proxy): - Return KERN_INVALID_ARGUMENT when the entry is a submap. - Create a pager for the vm_object when the entry doesn't have any yet, since it's an anonymous mapping. Message-Id: <20211106081333.10366-3-jlledom@mailfence.com>
* vm: vm_region_get_proxyJoan Lledó2021-11-073-0/+74
| | | | | | | | | To get a proxy to the region a given address belongs to, with protection and range limited to the region ones. * include/mach/mach4.defs: vm_region_get_proxy RPC declaration * vm/vm_map.c: vm_region_get_proxy implementation Message-Id: <20211106081333.10366-2-jlledom@mailfence.com>
* memory_object_create_proxy: Fix and check coherency with RPCSamuel Thibault2021-11-071-4/+5
| | | | | * vm/memory_object_proxy.c: Include kern/mach4.server.h. (memory_object_create_proxy): Drop const qualifiers.
* memory_object: Fix memory_object_t type in the kernelSamuel Thibault2021-11-071-2/+6
| | | | | | | | | | mach_port_t is for userland, kernel sees the translated ipc_port_t. * include/mach/memory_object.h [MACH_KERNEL]: Include ipc/ipc_types.h [MACH_KERNEL] (memory_object_t): Typedef to ipc_port_t instead of mach_port_t. (memory_object_array_t): Typedef to memory_object_t* instead of mach_port_t*.
* Drop unused device_pager_releaseSamuel Thibault2021-11-071-13/+0
| | | | * device/dev_pager.c (device_pager_release): Drop unused function.
* memory_object_create_proxy: Make len parameter vm_size_array_tSamuel Thibault2021-10-173-2/+4
| | | | | | | | | | | This is a no-op on i386. * i386/include/mach/i386/vm_types.h (vm_size_array_t): New type. * include/mach/mach4.defs (vm_size_array_t): New type. (memory_object_create_proxy): Turn len parameter from vm_offset_array_t to vm_size_array_t. * vm/memory_object_proxy.c (memory_object_create_proxy): Turn len parameter from const vm_offset_t * to const vm_size_t *.
* i386/i386/fpu.h: Fix xrstor and xrstors macrosSamuel Thibault2021-09-231-2/+6
| | | | | | | | | | xrstor and xrstors also take the xsave support bitmask. We were otherwise not necessarily properly reloading all the FPU state, thus leading to various subtle bugs, notably with glibc 2.33's ifunc-optimized memcpy etc. * i386/i386/fpu.h (xrstor, xrstors): Pass fp_xsave_support in EDX:EAX.
* i386/i386/fpu.h: Drop spurious backslashesSamuel Thibault2021-09-231-4/+4
|
* x86_64: Fix installation target of headersSamuel Thibault2021-09-181-2/+2
| | | | | | | * x86_64/Makefrag.am (include_mach_i386dir): Rename to include_mach_x86_64dir, set to $(includedir)/mach/x86_64. (include_mach_i386_HEADERS): Rename to include_mach_x86_64_HEADERS. Reported-by: Andrea Monaco <andrea.monaco@autistici.org>
* replace obsolete AC_CONFIG_HEADER with AC_CONFIG_HEADERSMiguel Figueiredo2021-09-181-1/+1
|
* ahci: Do not even try AHCI identify when device is ATAPIAndrea Monaco2021-09-121-3/+4
| | | | | * linux/dev/drivers/block/ahci.c (ahci_probe_port): Avoid trying AHCI identify when PxCMD.ATAPI is set.
* ahci: Fix warning contentAndrea Monaco2021-09-121-1/+1
| | | | | * linux/dev/drivers/block/ahci.c (ahci_identify): Fix warning for the identify timeout.
* dev_pager: rename hash macrosJoan Lledó2021-08-281-13/+13
| | | | | | | | | | Remove the reference to the pager hash since they are used both in the pager and the device hashes. * device/dev_pager.c: * Rename DEV_PAGER_HASH_COUNT to DEV_HASH_COUNT * Rename dev_pager_hash to dev_hash Message-Id: <20210828100252.18376-3-jlledom@mailfence.com>
* dev_pager: implement offsetJoan Lledó2021-08-281-5/+110
| | | | | | | | | | | | | | * device/dev_pager.c: * struct dev_pager: add offset field * new struct dev_device_entry: includes device and offset * new hash table dev_device_hashtable * index [device + offset] * new functions dev_device_hash[init,insert,delete,lookup] * do the same as their counterparts for dev_pager_hashtable * dev_pager_setup(): record the offset * device_map_page(): add the recorded offset on the fly Message-Id: <20210828100252.18376-2-jlledom@mailfence.com>
* linux block: allow loading data up to 4GiB limitSamuel Thibault2021-08-281-1/+8
| | | | | | | | | | | | | | Linux drivers are only limited by the DMA32 constraint, not by the directmap constraint. But our segment order is currently set to DMA < DMA32 < DIRECTMAP < HIGHMEM (since that is what we will have in 64bit mode). In PAE mode this makes DMA32 limited to 800MiB. Ideally we'd have DMA < DIRECTMAP < DMA32 < HIGHMEM but that'd make the memory code more complex, and we are to remove the Linux drivers anyway. In the meanwhile, In non-PAE mode we can just use HIGHMEM which is already limited to 4GiB, that will do the work. * linux/dev/glue/block.c (VM_PAGE_LINUX): New macro. (device_read): Use VM_PAGE_LINUX instead of VM_PAGE_DMA32.