Age | Commit message (Collapse) | Author |
|
* i386/Makefrag.am (_START_MAP): Define symbol to 0x100000.
* i386/xen/Makefrag.am (_START_MAP): Define symbol to 0xC0000000.
* i386/ldscript: Use _START_MAP instead of hardcoding 0x100000.
|
|
Grub is not able to map us at high addresses. We can however make it load us at
low addresses (through the linker script mapping), then use segmentation to move
ourselves to high addresses, and switch to C which uses high addresses
(through _START definition).
* i386/ldscript: Force mapping kernel at 0x100000, regardless of the value
of _START.
* i386/i386at/boothdr.S (boot_entry): Set up initial segments to project the
bootstrap linear space to high addresses.
|
|
* i386/i386at/model_dep.c (i386at_init): Map BIOS memory at 0.
* i386/intel/pmap.c (pmap_create): Do not map BIOS memory in user tasks.
|
|
The former is the initial value set by the bootloader. It may not be the
same as what Mach will set up.
* i386/i386/vm_param.h (INIT_VM_MIN_KERNEL_ADDRESS): New macro.
* i386/i386at/model_dep.c (i386at_init): Use INIT_VM_MIN_KERNEL_ADDRESS
instead of VM_MIN_KERNEL_ADDRESS.
|
|
* i386/i386/vm_param.h [!MACH_XEN]: Do not include <xen/public/xen.h>.
* i386/i386at/model_dep.c (init_alloc_aligned): Use phystokv to compare physical
memory addresses with kernel start, end, and symbol table.
* i386/intel/pmap.c (pmap_enter): Use kvtophys to convert ptp pointer to pte
entry.
* linux/dev/init/main.c (alloc_contig_mem, linux_init): Use phystokv to convert
allocated pages to virtual pointer.
* linux/src/include/asm-i386/io.h: Include <machine/vm_param.h>.
(virt_to_phys): Call _kvtophys.
(phys_to_virt): Call phystokv.
* linux/src/include/linux/compatmac.h: Include <asm/io.h>.
(ioremap): Use phys_to_virt to convert physical address to virtual pointer.
(my_iounmap): Likewise.
* linux/dev/include/asm-i386/page.h: Include <mach/vm_param.h>.
(PAGE_SHIFT, PAGE_SIZE, PAGE_MASK): Remove macros.
* linux/src/drivers/scsi/ncr53c8xx.c (vm_size_t): Remove type.
* linux/dev/glue/net.c: Include <machine/vm_param.h>
(device_write): Call phystokv to convert from physical page address to
virtual pointer.
* linux/dev/glue/block.c (alloc_buffer, free_buffer, rdwr_full): Likewise.
|
|
* linux/dev/glue/misc.c (issig): Return 0 if current_thread() is NULL.
|
|
* i386/intel/pmap.c (pmap_bootstrap): Check against `va' wrap around
0xffffffff.
|
|
When _start is not close to 0, just using init_alloc_aligned() is not enough
to know how much should be duplicated between linear and virtual mappings.
Just mapping everything that can be is not very costly and should just work
when it can work.
* i386/i386at/model_dep.c (i386at_init) [VM_MIN_KERNEL_ADDRESS !=
LINEAR_MIN_KERNEL_ADDRESS]: Extend `nb_direct' to VM_MIN_KERNEL_ADDRESS -
LINEAR_MIN_KERNEL_ADDRESS.
|
|
* i386/i386/i386asm.sym (PFN_LIST): Enclose in #ifdef MACH_XEN. Thanks
to Samuel Thibault for the suggestion.
|
|
* ddb/db_examine.c (db_xcdump): Do not cast addr before passing to
db_read_bytes.
* ddb/db_macro.c (db_arg_variable): Return long.
* ddb/db_macro.h (db_arg_variable): Likewise.
* ddb/db_sym.c (db_maxoff): Set type to unsigned long.
* ddb/db_task_thread.c (db_set_default_thread, db_get_task_thread): Return
long.
* ddb/db_variables.h (db_variable): Make fcn function field to return long.
(FCN_NULL): Make function type return long.
* i386/i386/db_interface.c (int_regs): Set field sizes to long.
* i386/i386/db_machdep.h (db_expr_t): Set type to long.
* i386/i386/db_trace.c (db_i386_reg_value): Return long. Use long types.
(i386_frame, i386_kregs, interrupt_frame, db_nextframe): Set field sizes to
long.
(db_regs, i386_kregs): Use long * pointers.
(db_lookup_i386_kreg): Return long *.
(db_numargs, db_nextframe, db_stack_trace_cmd, db_i386_stack_trace): Use long
types.
* i386/i386/debug_i386.c (dump_ss): Fix format.
* i386/i386/ktss.c (ktss_init): Use long type.
* i386/i386/pcb.c (set_user_regs): Likewise.
* i386/i386/thread.h (i386_saved_state, v86_segs, i386_kernel_state,
i386_interrupt_state): Set field sizes to long.
* i386/i386/trap.c (kernel_trap, user_trap): Fix formats.
* kern/ast.h (ast_t): Set type to long.
* kern/boot_script.c (create_task, resume_task, prompt_resume_task,
boot_script_set_variable): Use long types.
* kern/boot_script.h (boot_script_set_variable): Use long type.
* kern/bootstrap.c (bootstrap_create): Pass long type.
* kern/lock.c (simple_lock, simple_lock_try): Use long type.
* linux/dev/kernel/softirq.c (linux_soft_intr): Fix format.
|
|
* xen/console.c (hypputc): Warning only once per console write about console
ring smash.
|
|
* i386/i386/xen.h (xchgl): Use xchg instruction instead of xchgl, so the
assembler can detect unsigned long size.
|
|
* i386/configfrag.ac (i386): Remove definition.
* i386/intel/pmap.c (pmap_update_interrupt): Rename i386 to __i386__.
* i386/intel/pmap.h: Likewise.
* kern/debug.c (Debugger): Likewise.
* kern/lock.c (simple_lock, simple_lock_try, db_show_all_slocks): Likewise.
|
|
On amd64 the cpu flags is a 64-bit word, and long on 32-bit systems is
32-bit wide anyway.
* linux/dev/glue/kmem.c (linux_kmalloc, linux_kfree, __get_free_pages,
free_pages): Use unsigned long instead of unsigned.
* linux/dev/include/asm-i386/system.h (__save_flags, __restore_flags):
Likewise.
* linux/dev/kernel/printk.c (printk): Likewise.
* linux/src/drivers/scsi/advansys.c (DvcEnterCritical, DvcLeaveCritical,
advansys_queuecommand, advansys_abort, advansys_reset, advansys_interrupt,
interrupts_enabled, AdvISR): Likewise.
* linux/src/drivers/scsi/aha152x.c (aha152x_intr): Likewise.
* linux/src/drivers/scsi/aha1542.c (aha1542_intr_handle): Likewise.
* linux/src/drivers/scsi/aic7xxx.c (aic7xxx_done_cmds_complete): Likewise.
* linux/src/drivers/scsi/ultrastor.c (log_ultrastor_abort,
ultrastor_queuecommand, ultrastor_abort): Likewise.
|
|
* i386/i386at/com.c (comgetstat): Use natural_t instead of `unsigned int'.
(comsetstat): Likewise.
* i386/i386at/kd.c (kdgetstat, kdsetstat): Likewise.
* i386/i386at/lpr.c (lprgetstat, lprsetstat): Likewise.
|
|
* i386/include/mach/i386/exec/elf.h (Elf32_Addr, Elf32_Off, Elf32_Sword,
Elf32_Word): Use int type instead of long.
|
|
* xen/evt.c (hyp_c_callback): Do not set assembly instruction suffixes,
using 1UL constant instead.
|
|
* i386/include/mach/i386/vm_param.h (i386_btop, i386_ptob, i386_round_page,
i386_trunc_page): Cast to unsigned long.
|
|
* i386/i386/proc_reg.h (get_eflags, get_esp, get_eflags, get_cr0, get_cr2,
get_cr3, get_cr4): Return unsigned long type.
(set_eflags, set_cr0, set_cr3, set_cr4): Take unsigned long type.
|
|
* i386/i386/i386asm.sym (R_EDI): Define macro.
* i386/i386/locore.S (t_page_fault): Use R_CR2-R_EDI instead of hardcoded
12.
|
|
That makes the virtual addressing equal to linear addressing, thus optimizing
some computations away.
* i386/i386/vm_param.h (VM_MIN_KERNEL_ADDRESS) [MACH_XEN]: Set to
0xC0000000UL.
* i386/xen/Makefrag.am (gnumach_LINKFLAGS): Set _START to 0xC0000000.
* i386/xen/xen_boothdr.S (VIRT_BASE, ELF_PADDR_OFFSET): Set to 0xC0000000.
|
|
* i386/intel/pmap.c (pmap_set_page_readonly_init) [PAE]: Access the bootstrap
dirbase with PTEMASK (1 page) instead of PDEMASK (4 pages) through pmap_pde.
|
|
* linux/src/include/linux/interrupt.h (intr_count): Declare as unsigned int.
|
|
* i386/i386/spl.S (splx): Use S_ARG0 instead of reimplementing it.
|
|
* linux/dev/arch/i386/kernel/irq.c (intr_count): Set to int type.
* linux/dev/kernel/softirq.c (bh_active, bh_mask): Likewise.
(linux_soft_intr: active, mask, left): Likewise
* linux/src/include/linux/interrupt.h (bh_active, bh_mask): Likewise.
* linux/src/kernel/softirq.c (intr_count, bh_active, bh_mask): Likewise.
(do_bottom_half: active, mask, left): Likewise
|
|
* i386/ldscript: Reformat to follow binutils version
|
|
* i386/intel/pmap.h (INTEL_PTE_PFN): Keep only 47bits, others are not usable.
|
|
* i386/intel/pmap.h (lin2pdpnum): New macro.
* i386/intel/pmap.c (pmap_set_page_readonly_init): Use lin2pdpnum macro
instead of hardcoding 0.
|
|
* i386/i386at/model_dep.c (i386at_init): Do not copy linear into virtual kernel
mapping when they are equal, and do not drop the former either. Use the
function `i' variable.
|
|
* i386/i386/phys.c (kvtophys): Use pte_to_pa macro instead of reimplementing
it.
|
|
TODO: remonter formats
* i386/include/mach/i386/vm_types.h (vm_offset_t): Define to unsigned long.
(signed32_t): Define to signed int.
(unsigned32_t): Define to unsigned int.
* i386/include/mach/sa/stdarg.h (__va_size): Use sizeof(unsigned long)-1
instead of 3.
* include/mach/port.h (mach_port_t): Define to vm_offset_t instead of
natural_t.
* include/sys/types.h (size_t): Define to unsigned long instead of
natural_t.
* linux/src/include/asm-i386/posix_types.h (__kernel_size_t): Define to
unsigned long.
(__kernel_ssize_t): Define to long.
* linux/src/include/linux/stddef.h (size_t): Define to unsigned long.
* device/dev_pager.c (dev_pager_hash): Cast port to vm_offset_t insted of
natural_t.
(device_pager_data_request): Fix format.
* device/ds_routines.c (ds_no_senders): Fix format.
* i386/i386/io_map.c (io_map): Likewise.
* i386/i386at/autoconf.c (take_dev_irq): Likewise.
* i386/i386at/com.c (comattach): Likewise.
* i386/i386at/lpr.c (lprattach): Likewise.
* i386/i386at/model_dep.c (mem_size_init, mem_size_init, c_boot_entry):
Likewise.
* i386/intel/pmap.c (pmap_enter): Likewise.
* ipc/ipc_notify.c (ipc_notify_port_deleted, ipc_notify_msg_accepted,
ipc_notify_dead_name): Likewise.
* ipc/mach_port.c (mach_port_destroy, mach_port_deallocate): Likewise.
* kern/ipc_kobject.c (ipc_kobject_destroy): Likewise.
* kern/slab.c (kalloc_init): Likewise.
* vm/vm_fault.c (vm_fault_page): Likewise.
* vm/vm_map.c (vm_map_pmap_enter): Likewise.
* xen/block.c (device_read): Likewise.
* device/net_io.c (bpf_match): Take unsigned long * instead of unsigned int
*.
(bpf_do_filter): Make mem unsigned long instead of long.
* i386/i386/ktss.c (ktss_init): Cast pointer to unsigned long instead of
unsigned.
* i386/i386/pcb.c (stack_attach, switch_ktss): Cast pointers to long instead of
int.
* i386/i386/trap.c (dump_ss): Likewise.
* ipc/ipc_hash.c (IH_LOCAL_HASH): Cast object to vm_offset_t.
* ipc/mach_msg.c (mach_msg_receive, mach_msg_receive_continue): Cast kmsg to
vm_offset_t instead of natural_t.
* kern/pc_sample.c (take_pc_sample): Cast to vm_offset_t instead of
natural_t.
* kern/boot_script.c (sym, arg): Set type of `val' field to long instead of int.
(create_task, builtin_symbols, boot_script_parse_line,
boot_script_define_function): Cast to long instead of int.
* kern/bootstrap.c (bootstrap_create): Likewise.
* kern/sched_prim.c (decl_simple_lock_data): Likewise.
* kern/printf.c (vsnprintf): Set size type to size_t.
* kern/printf.h (vsnprintf): Likewise.
* vm/vm_map.h (kentry_data_size): Fix type to vm_size_t.
* vm/vm_object.c (vm_object_pmap_protect_by_page): Fix size parameter type
to vm_size_t.
|
|
* vm/vm_map.h (KENTRY_DATA_SIZE): Define macro.
* vm/vm_map.c (kentry_data_size): Initialize to KENTRY_DATA_SIZE.
|
|
* i386/i386at/com.c (comcninit): Set LINE_CTL register to i8BITS instead of
i7BITS|iPEN.
|
|
* linux/src/drivers/net/3c505.c (elp_sense): Use %s format for printing a mere
string, not the string.
|
|
* linux/src/drivers/net/8390.c: Use %s format for printing a mere string, not
the string.
|
|
* linux/src/drivers/net/3c503.c (el2_probe1): Use %s format for printing a mere
string, not the string.
|
|
* linux/src/drivers/scsi/aha1542.c (aha1542_setup): Use %s format for printing a
mere string, not the string.
|
|
* linux/src/drivers/scsi/advansys.c (asc_prt_line): Use %s format for
printing a mere string, not the string.
|
|
* i386/i386at/model_dep.c (c_boot_entry): Use %s format for printing a mere
string, not the string.
|
|
|
|
When stealing the memset function from the 32bit host libc on a 64bit host
system, glibc tends to bring unwanted references to _Unwind_Resume,
__gcc_personality_v0, etc. So let's stop stealing memset.
* kern/strings.c (memset): New function.
* Makefile.am (clib_routines): Remove memset.
|
|
Use macros instead of raw numeric values.
* ipc/ipc_hash.h (IPC_HASH_GLOBAL_SIZE): New macro.
* ipc/ipc_hash.c (ipc_hash_init): Directly set the global hash table
size to IPC_HASH_GLOBAL_SIZE.
* ipc/ipc_marequest.h (IPC_MAREQUEST_SIZE): New macro.
* ipc/ipc_marequest.c (ipc_marequest_init): Directly set the marequest
hash table size to IPC_MAREQUEST_SIZE.
|
|
Event with feature-no-csum-offload=1, some dom0s (such as Debian Squeeze's
2.6.32) send packets with a blank checksum. Recompute them before givin the
packet to pfinet.
* xen/net.c (recompute_checksum): New function.
(hyp_net_intr): Call recompute_checksum when the checksum is blank but the
data is validated.
|
|
|
|
* kern/sched_prim.c (NUMQUEUES): Increase to 1031
|
|
The zone allocator could limit the size of its zones to an arbitrary
value set at zinit() time. There is no such parameter with the slab
module. As a result of removing those limits, the kern/mach_param.h
header becomes empty, and is simply removed altogether.
* Makefrag.am (libkernel_a_SOURCES): Remove kern/mach_param.h.
* i386/i386/fpu.c: Remove #include <kern/mach_param.h>.
* i386/i386/machine_task.c: Likewise.
* i386/i386/pcb.c: Likewise.
* ipc/ipc_init.c: Likewise.
(ipc_space_max): Remove variable.
(ipc_tree_entry_max): Likewise.
(ipc_port_max): Likewise.
(ipc_pset_max): Likewise.
* ipc/ipc_init.h (IPC_ZONE_TYPE): Remove macro.
(ipc_space_max): Remove extern declaration.
(ipc_tree_entry_max): Likewise.
(ipc_port_max): Likewise.
(ipc_pset_max): Likewise.
* ipc/ipc_hash.c (ipc_hash_init): Don't use ipc_tree_entry_max to
compute ipc_hash_global_size.
* ipc/ipc_marequest.c: Remove #include <kern/mach_param.h>.
(ipc_marequest_max): Remove variable.
(ipc_marequest_init): Don't use ipc_marequest_max to compute
ipc_marequest_size.
(ipc_marequest_info): Return (unsigned int)-1 in maxp.
* kern/act.c: Remove #include <kern/mach_param.h>.
* kern/mach_clock.c: Likewise.
* kern/priority.c: Likewise.
* kern/task.c: Likewise.
* kern/thread.c: Likewise.
* vm/memory_object_proxy.c: Likewise.
* vm/vm_fault.c: Likewise.
|
|
The kmem_suballoc() function, which has been replaced with
kmem_submap(), is called by kernel_task_create(). Rather than update it,
remove this now unused function.
* kern/task.c (kernel_task_create): Remove function.
* kern/task.h (kernel_task_create): Remove prototype.
|
|
* device/dev_pager.c: Remove #include <kern/kalloc.h>.
* i386/i386/io_perm.c: Add #include <kern/kalloc.h>.
* kern/bootstrap.c: Likewise.
* kern/ipc_tt.c: Likewise.
* kern/pc_sample.c: Likewise.
* kern/processor.c: Likewise.
* kern/server_loop.ch: Likewise.
* kern/thread.c: Likewise.
* linux/dev/glue/block.c: Likewise.
* linux/dev/glue/net.c: Likewise.
* vm/vm_map.c: Likewise.
* xen/block.c: Likewise.
* xen/net.c: Likewise.
* xen/store.c: Likewise.
|
|
Unlike the zone allocator, the slab code can't be fed with an initial
chunk of memory. Some VM objects used early during startup now have to
be statically allocated, and kernel map entries need a special path
to avoid recursion when being allocated.
* vm/vm_map.c (vm_submap_object_store): New variable.
(vm_submap_object): Point to vm_submap_object_store.
(kentry_data_size): Initialize to arbitrary value.
(kentry_count): Remove variable.
(kentry_pagealloc): New function.
(vm_map_setup): Likewise.
(vm_map_create): Replace initialization with a call to vm_map_setup().
* vm/vm_map.h (vm_map_setup): New prototype.
* vm/vm_kern.c (kernel_map_store): New variable.
(kernel_map): Point to kernel_map_store.
(kmem_suballoc): Remove function. Replaced with...
(kmem_submap): New function.
(kmem_init): Call vm_map_setup() instead of vm_map_create().
* vm/vm_kern.h (kmem_suballoc): Remove prototype.
(kmem_submap): New prototype.
* vm/vm_object.c (kernel_object_store): New variable.
(kernel_object): Point to kernel_object_store.
(vm_object_template): Change type from vm_object_t to struct vm_object.
(_vm_object_setup): New function.
(_vm_object_allocate): Replace initialization with a call to
_vm_object_setup().
(vm_object_bootstrap): Don't allocate vm_object_template, and use it as
a structure instead of a pointer. Initialize kernel_object and
vm_submap_object with _vm_object_setup() instead of
_vm_object_allocate().
* vm/vm_resident.c (vm_page_bootstrap): Don't initialize
kentry_data_size.
* device/ds_routines.c (device_io_map_store): New variable.
(device_io_map): Point to device_io_map_store.
(mach_device_init): Call kmem_submap() instead of kmem_suballoc().
* ipc/ipc_init.c (ipc_kernel_map_store): New variable.
(ipc_kernel_map): Point to ipc_kernel_map_store.
|
|
* device/dev_lookup.c: Replace zalloc header, types and function calls
with their slab counterparts.
* device/dev_pager.c: Likewise.
* device/ds_routines.c: Likewise.
* device/io_req.h: Likewise.
* device/net_io.c: Likewise.
* i386/i386/fpu.c: Likewise.
* i386/i386/io_perm.c: Likewise.
* i386/i386/machine_task.c: Likewise.
* i386/i386/pcb.c: Likewise.
* i386/i386/task.h: Likewise.
* i386/intel/pmap.c: Likewise.
* i386/intel/pmap.h: Remove #include <kernel/zalloc.h>.
* include/mach_debug/mach_debug.defs (host_zone_info): Replace
routine declaration with skip directive.
(host_slab_info): New routine declaration.
* include/mach_debug/mach_debug_types.defs (zone_name_t)
(zone_name_array_t, zone_info_t, zone_info_array_t): Remove types.
(cache_info_t, cache_info_array_t): New types.
* include/mach_debug/mach_debug_types.h: Replace #include
<mach_debug/zone_info.h> with <mach_debug/slab_info.h>.
* ipc/ipc_entry.c: Replace zalloc header, types and function calls with
their slab counterparts.
* ipc/ipc_entry.h: Likewise.
* ipc/ipc_init.c: Likewise.
* ipc/ipc_marequest.c: Likewise.
* ipc/ipc_object.c: Likewise.
* ipc/ipc_object.h: Likewise.
* ipc/ipc_space.c: Likewise.
* ipc/ipc_space.h: Likewise.
* ipc/ipc_table.c (kalloc_map): Remove extern declaration.
* kern/act.c: Replace zalloc header, types and function calls with their
slab counterparts.
* kern/kalloc.h: Add #include <vm/vm_types.h>.
(MINSIZE): Remove definition.
(kalloc_map): Add extern declaration.
(kget): Remove prototype.
* kern/mach_clock.c: Adjust comment.
* kern/processor.c: Replace zalloc header, types and function calls with
their slab counterparts.
* kern/startup.c: Remove #include <kernel/zalloc.h>.
* kern/task.c: Replace zalloc header, types and function calls with
their slab counterparts.
* kern/thread.c: Likewise.
* vm/memory_object_proxy.c: Likewise.
* vm/vm_external.c: Likewise.
* vm/vm_fault.c: Likewise.
* vm/vm_init.c: Likewise.
* vm/vm_map.c: Likewise.
* vm/vm_object.c: Likewise.
* vm/vm_page.h: Remove #include <kernel/zalloc.h>.
* vm/vm_pageout.c: Replace zalloc header, types and function calls with
their slab counterparts.
* vm/vm_resident.c: Likewise.
(zdata, zdata_size): Remove declarations.
(vm_page_bootstrap): Don't steal memory for the zone system.
|