| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* device/ds_routines.c: use static qualifier.
* device/subrs.c: delete unused functions.
* i386/i386/ast_check.c: include prototypes in kern/ast.h
* i386/i386/db_disasm.c: Include prototypes in ddb/db_examine.h
* i386/i386/db_interface.h: Define prototype for kdb_kentry. Expose
debug methods feep and kd_debug_put.
* i386/i386/db_trace.c: delete left over cthreads support, functions are
not used.
* i386/i386/model_dep.h: Define prototype for c_boot_entry.
* i386/i386at/acpi_parse_apic.c: Static qualifiers.
* i386/i386at/autoconf.c: Include header file for prototypes and remove
dead code.
* i386/i386at/autoconf.h: Fix prototype.
* i386/i386at/com.c: Add static qualifiers, delete dead code.
* i386/i386at/com.c: ditto.
* i386/i386at/com.h: Define prototypes for debug functions.
* i386/i386at/int_init.c: Include header.
* i386/i386at/kd.c: Include header for debug interface. Remove dead
kd_cmdreg_read and make xga_getpos static.
* i386/i386at/kd_mouse.c: Static qualifiers.
* i386/i386at/lpr.c: Dead lprpr.
* i386/i386at/model_dep.c: Remove exit function.
* kern/mach_clock.c: Include mig prototypes.
* kern/mach_clock.h: Remove duplicates of mig prototypes.
* kern/machine.c: Use static.
* kern/startup.c: slave_main is unused.
* kern/thread.h: Define thread_stats that is useful for debugging.
* kern/timer.c: Keep db_thread_times since it can be used for debugging.
* kern/timer.h: ditto.
* linux/dev/glue/misc.c: Use mig header for host_get_time.
Message-Id: <Y8oyiecaflCaYhaW@mercury.tail36e24.ts.net>
|
|
|
|
| |
Message-Id: <Y8mYd/pt/og4Tj5I@mercury.tail36e24.ts.net>
|
|
|
|
|
|
| |
Some of the existing definitions lacked the const qualifier, which was
added.
Message-Id: <Y8mYZEKqWN43n2SA@mercury.tail36e24.ts.net>
|
|
|
|
| |
message.h is installed so we need to hide these behind a mach_ prefix
|
|
|
|
|
|
| |
Also updated the mapped time to support the new 64-bit time while
keeping compatible with the user land programs currently using it so
they can be migrated in parallel.
|
| |
|
|
|
|
|
|
| |
This also reverts 566c227636481b246d928772ebeaacbc7c37145b and
963b1794d7117064cee8ab5638b329db51dad854
Message-Id: <Y8d75KSqNL4FFInm@mercury.tail36e24.ts.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a cleanup following the introduction of mach_port_name_t.
The same set of changes is applied to all files:
- rename mach_port_t to mach_port_name_t where a port name is used,
- use MACH_PORT_NAME_NULL and MACH_PORT_NAME_DEAD where appropriate,
- use invalid_port_to_name() and invalid_name_to_port() for conversion
where appropriate,
- use regular copyout() insted of copyout_port() when we deal with
mach_port_name_t already before copyout,
- use the new helper ipc_kmsg_copyout_object_to_port() when we really
want to place a port name in the space of a mach_port_t.
* include/mach/notify.h: Likewise
* ipc/ipc_entry.c: Likewise
* ipc/ipc_kmsg.c: Likewise
* ipc/ipc_kmsg.h: Likewise, and add ipc_kmsg_copyout_object_to_port()
* ipc/ipc_marequest.c: Likewise
* ipc/ipc_object.c: Likewise
* ipc/ipc_port.c: Likewise
* ipc/ipc_space.h: Likewise
* ipc/mach_msg.c: Likewise
* ipc/mach_port.c: Likewise
* kern/exception.c: Likewise
* kern/ipc_mig.c: Likewise
Message-Id: <20230116105857.240210-8-luca@orpolo.org>
|
|
|
|
|
|
|
|
| |
* include/mach/port.h: add _NAME_ variants for port NULL and DEAD and
add helpers to check for invalid port names
* ipc/port.h: add helpers to properly convert to/from invalid mach
port names.
Message-Id: <20230116105857.240210-7-luca@orpolo.org>
|
|
|
|
|
| |
* Makefile.am: define RDXTREE_KEY_32
Message-Id: <20230116105857.240210-6-luca@orpolo.org>
|
|
|
|
|
|
|
|
|
|
| |
* device/device_emul.h: write/writev: update trap argument types
* device/ds_routines.c: update argument types and adjust copyin
* device/ds_routines.h: write/writev: update trap argument type
* include/device/device_types.h: add rpc_io_buf_vec_t type
* kern/ipc_mig.c: write/writev: update trap argument type
* kern/ipc_mig.h: Likewise
Message-Id: <20230116105857.240210-5-luca@orpolo.org>
|
|
|
|
|
|
|
|
|
| |
* include/mach/mach_types.h: use mach port names
* kern/ipc_mig.c: update vm types and use copyin/copyout helpers
* kern/ipc_mig.h: Likewise
Signed-off-by: Luca Dariz <luca@orpolo.org>
Message-Id: <20230116105857.240210-4-luca@orpolo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* i386/i386/copy_user.h: new file to handle 32/64 bit differences
- add msg_usize() to recontruct the user-space message size
- add copyin/copyout helpers for addresses and ports
* include/mach/message.h: add msg alignment macros
* ipc/ipc_kmsg.c:
- copyin/out ports names instead of using pointer magic
* ipc/ipc_mqueue.c: use msg_usize() to check if we can actually
receive the message
* ipc/mach_msg.c: Likewise for continuations in receive path
* x86_64/Makefrag.am: add x86_64/copy_user.c
* x86_64/copy_user.c: new file to handle message expansion and
shrinking during copyinmsg/copyoutmsg for 64 bit kernels.
- port names -> port pointers on all 64-bit builds
- 32-bit pointer -> 64 bit pointer when using 32-bit userspace
* x86_64/locore.S: remove copyinmsg() and copyoutmsg()
Message-Id: <20230116105857.240210-3-luca@orpolo.org>
|
|
|
|
|
|
|
|
|
|
|
| |
* include/mach/message.h: use mach_msg_user_header_t only in KERNEL,
and define it as mach_msh_header_t for user space
* ipc/ipc_kmsg.c: use mach_msg_user_header_t where appropriate
* ipc/ipc_kmsg.h: Likewise
* ipc/mach_msg.c: Likewise
* ipc/mach_msg.h: Likewise
* kern/thread.h: Likewise
Message-Id: <20230116105857.240210-2-luca@orpolo.org>
|
|
|
|
|
| |
stack_statistics, swapin_thread_continue, and memory_object_lock_page are
not used outside their module.
|
|
|
|
|
|
| |
The i386 functions are not used and the more portable versions in kern/strings.c
are faster (1-4x faster in synthetic benchmarks compiled with -O2 on my x86_64 box).
Message-Id: <Y8Yt9FvIagB78uyR@jupiter.tail36e24.ts.net>
|
|
|
|
|
| |
Those functions are unused.
Message-Id: <Y8YtmejHMnhI9CLG@jupiter.tail36e24.ts.net>
|
|
|
|
|
|
|
| |
* ipc/ipc_kmsg.c: drop useless cast.
* ipc/ipc_port.c: upcast rpc_vm_offset_t to full vm_offset_t
* kern/pc_sample.c: Likewise
Message-Id: <20230116130426.246584-4-luca@orpolo.org>
|
|
|
|
|
|
| |
* Makefrag.am: remove ipc/mach_rpc.c
* ipc/mach_rpc.c: remove file, all functions here seem unused.
Message-Id: <20230116130426.246584-3-luca@orpolo.org>
|
|
|
|
|
|
|
| |
* kern/syscall_sw.h: add missing include
Signed-off-by: Luca Dariz <luca@orpolo.org>
Message-Id: <20230116130426.246584-2-luca@orpolo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* ddb/db_break.c: add argument name, compilation fails on Debian/Linux
stable with gcc 10.2 otherwise. For some reason on Debian/Hurd a
simple test program without argname succeeds, unless I force
-std=c11 or similar; I suppose because newer gcc have different
defaults. Gnumach seem to still require c89 for some older code,
otherwise we could explicitely use gnu99/c99 or gnu11/c11.
* ddb/db_cond.c: Likewise
* ddb/db_examine.c: Likewise
* ddb/db_macro.c: Likewise
* ddb/db_watch.c: Likewise
* device/dev_name.c: Likewise
Message-Id: <20230116130426.246584-1-luca@orpolo.org>
|
|
|
|
|
|
|
|
| |
We use __builtin_ffs instead of ffs. strrchr is not used.
Also removed the commented out memset implementation since it is
implemented in arch-specific code.
Message-Id: <Y8NOXbVzhBJknR29@mercury.tail36e24.ts.net>
|
|
|
|
|
|
| |
ad51c68171cb6a1cae15c61ca0218bbee2c05485 missed one replacement which
was not discovered because it’s only when building with smp enabled.
Message-Id: <20230113144732.49786-1-etienne.brateau@gmail.com>
|
|
|
|
|
|
|
| |
mach4.defs and mach_host.defs.
Also move more mach_debug rpcs to kern/mach_debug.h.
Message-Id: <Y7+LPMLOafUQrNHZ@jupiter.tail36e24.ts.net>
|
|
|
|
|
|
|
| |
Not only is uintptr_t more accurate for what protected payloads are but
we also provide compatibility for 64 + 32 bits. Also the use of
natural_t in the RPC definition is wrong since it is always 32 bits.
Message-Id: <Y7+LHVbmYxO/cSKs@jupiter.tail36e24.ts.net>
|
|
|
|
|
|
|
| |
Declared RPCs in ipc/mach_port.c and ddb/db_ext_symtab.c in their corresponding headers.
Ideally these should be used by mig instead of mig declaring its own
prototypes.
Message-Id: <Y7z/BQhmsBbRgxhe@jupiter.tail36e24.ts.net>
|
|
|
|
|
|
|
| |
For x86_64-pc-gnu we still do not have a working glibc so ./configure will fail
under a freestanding environment. We force ./configure to avoid running
compiled C programs as a test which it is not needed when compiling a kernel.
Message-Id: <Y7zYm44O0CNayuAe@jupiter.tail36e24.ts.net>
|
|
|
|
| |
Message-Id: <Y7umiZGUjD3E+Duq@jupiter.tail36e24.ts.net>
|
|
|
|
| |
Message-Id: <Y7ulwrbHJZqKoBPn@jupiter.tail36e24.ts.net>
|
|
|
|
|
|
| |
Also delete sys/ioctl.h and merge it with device/input.h since it is
only needed here.
Message-Id: <Y7uirJzaJeOBzAmq@jupiter.tail36e24.ts.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With the exception of linux, x86_64 ld default's max-page-size
is 2MB (default for i386 is 4K) and compiling gnumach with x86_64-pc-gnu-ld
will generate a kernel image where the boot section starts at the file offset
2MB. This makes it unbootable on grub because the file is no longer multiboot.
Here's the objdump -h output before the patch:
Sections:
Idx Name Size VMA LMA File off Algn
0 .boot 0000c000 0000000001000000 0000000001000000 00200000 2**12
CONTENTS, ALLOC, LOAD, READONLY, CODE
1 .text 0009078f 000000004100c000 000000000100c000 0020c000 2**2
CONTENTS, ALLOC, LOAD, READONLY, CODE
2 .rodata 000110fc 000000004109c7a0 000000000109c7a0 0029c7a0 2**5
CONTENTS, ALLOC, LOAD, READONLY, DATA
3 .eh_frame 000101f0 00000000410ad8a0 00000000010ad8a0 002ad8a0 2**3
CONTENTS, ALLOC, LOAD, READONLY, DATA
4 .data 000070a0 00000000412bdaa0 00000000012bdaa0 002bdaa0 2**5
CONTENTS, ALLOC, LOAD, DATA
5 .bss 00023f10 00000000412c5000 00000000012c5000 002c4b40 2**12
ALLOC
6 .comment 00000012 0000000000000000 0000000000000000 002c4b40 2**0
CONTENTS, READONLY
After, when forcing ld's max-page-size to be 4K:
Sections:
Idx Name Size VMA LMA File off Algn
0 .boot 0000c000 0000000001000000 0000000001000000 00001000 2**12
CONTENTS, ALLOC, LOAD, READONLY, CODE
1 .text 0009078f 000000004100c000 000000000100c000 0000d000 2**2
CONTENTS, ALLOC, LOAD, READONLY, CODE
2 .rodata 000110fc 000000004109c7a0 000000000109c7a0 0009d7a0 2**5
CONTENTS, ALLOC, LOAD, READONLY, DATA
3 .eh_frame 000101f0 00000000410ad8a0 00000000010ad8a0 000ae8a0 2**3
CONTENTS, ALLOC, LOAD, READONLY, DATA
4 .data 000070a0 00000000410beaa0 00000000010beaa0 000beaa0 2**5
CONTENTS, ALLOC, LOAD, DATA
5 .bss 00023f10 00000000410c6000 00000000010c6000 000c5b40 2**12
ALLOC
6 .comment 00000012 0000000000000000 0000000000000000 000c5b40 2**0
CONTENTS, READONLY
It is also possible that something is wrong with the linker script but
couldn't find anything concrete so far. After this patch the kernel is
bootable with x86_64-pc-gnu-ld (and far smaller in size).
Message-Id: <Y7uJYpIsovhShREj@jupiter.tail36e24.ts.net>
|
|
|
|
| |
Message-Id: <Y7exFz3ZkK6hLVdi@jupiter.tail36e24.ts.net>
|
|
|
|
|
| |
mbchk is not part of grub2 and only available on grub-legacy.
Message-Id: <Y7ewlry3pRHRAR/9@jupiter.tail36e24.ts.net>
|
|
|
|
|
|
|
| |
cpu_down is shown as not required when disabling SMP so moving it inside
NCPUS > 1 to eliminate the warning. Note that the diff ended up looking
a bit different due the way functions are laid out.
Message-Id: <Y7ZH6aI3fhWNzyrY@jupiter.tail36e24.ts.net>
|
|
|
|
|
|
|
| |
Changed some ddb command functions to have the expected signature but
not all of them due to the being difficult to inter-dependency between
header files (for those just used cast).
Message-Id: <Y7UO9HTfpZ8U0Nfy@mars>
|
|
|
|
|
|
|
|
|
|
|
|
| |
time_value64_t uses int64_t to track seconds and nanoseconds and hence
is Y2038 proof. It does not have nano second resolution but it could
be provided in the future.
Removed include/sys/time.h as it remaps time_value_t into timeval which
can create confusion.
The timestamp from keyboard and mouse events is no longer set and
replaced with rpc_time_value for better compatibility.
|
|
|
|
| |
Message-Id: <Y7GEhcafJ+4Wn3ao@falom>
|
|
|
|
| |
Message-Id: <Y7GBQ5bk6ZQqtfda@falom>
|
|
|
|
| |
Message-Id: <Y7GBIF6mBjV6kBM+@falom>
|
|
|
|
|
|
|
|
| |
The format constants are not correct for 32 bits and there was
duplication for PRIx* constants (replaced with octal constants).
Fixed a few format warnings too.
Message-Id: <Y6o5KsvtPavCYe8f@mars>
|
|
|
|
| |
Message-Id: <Y6r72z4cKVCMDSKy@mars>
|
|
|
|
| |
Message-Id: <Y6j9bnHphZp0ZPYC@mars>
|
|
|
|
|
|
|
|
|
|
|
| |
Marked some functions as static (private) as needed and added missing
includes.
This also revealed some dead code which was removed.
Note that -Wmissing-prototypes is not enabled here since there is a
bunch more warnings.
Message-Id: <Y6j72lWRL9rsYy4j@mars>
|
| |
|
|
|
|
| |
This is not actually used.
|
|
|
|
|
| |
448889a4f0c3 ("Use -Wstrict-prototypes and fix warnings") simplified the
prototype of ivect, so we have to update the Xen version.
|
| |
|
| |
|
|
|
|
|
|
| |
cef6d34aa026 ("Implement our own functions to convert between host and
network values") dropped the glibc pieces from clib_routines, but
dropped too many ld symbols.
|
|
|
|
|
|
| |
cef6d34aa026 ("Implement our own functions to convert between host and
network values") dropped the glibc pieces from clib_routines, but
dropped too many ld symbols.
|