Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 2088 → Rev 2089

/trunk/kernel/genarch/include/kbd/z8530.h
37,8 → 37,8
#ifndef KERN_Z8530_H_
#define KERN_Z8530_H_
 
#include <typedefs.h>
#include <ddi/irq.h>
#include <console/chardev.h>
#include <ipc/irq.h>
 
extern bool z8530_belongs_to_kernel;
 
/trunk/kernel/genarch/include/kbd/ns16550.h
37,8 → 37,8
#ifndef KERN_NS16550_H_
#define KERN_NS16550_H_
 
#include <typedefs.h>
#include <ddi/irq.h>
#include <console/chardev.h>
#include <ipc/irq.h>
 
extern void ns16550_init(devno_t devno, inr_t inr, uintptr_t vaddr);
extern void ns16550_poll(void);
/trunk/kernel/genarch/include/kbd/i8042.h
35,7 → 35,7
#ifndef KERN_I8042_H_
#define KERN_I8042_H_
 
#include <typedefs.h>
#include <console/chardev.h>
 
extern void i8042_init(devno_t kbd_devno, inr_t kbd_inr, devno_t mouse_devno, inr_t mouse_inr);
extern void i8042_poll(void);
/trunk/kernel/genarch/include/kbd/key.h
37,7 → 37,7
#define KERN_KEY_H_
 
#include <arch/types.h>
#include <typedefs.h>
#include <console/chardev.h>
 
#define KEY_RELEASE 0x80
 
/trunk/kernel/genarch/include/mm/as_ht.h
35,10 → 35,56
#ifndef KERN_AS_HT_H_
#define KERN_AS_HT_H_
 
#include <mm/as.h>
#include <mm/mm.h>
#include <arch/mm/asid.h>
#include <adt/list.h>
#include <adt/btree.h>
#include <synch/mutex.h>
 
extern as_operations_t as_ht_operations;
/** Address space structure.
*
* as_t contains the list of as_areas of userspace accessible
* pages for one or more tasks. Ranges of kernel memory pages are not
* supposed to figure in the list as they are shared by all tasks and
* set up during system initialization.
*/
typedef struct {
/** Protected by asidlock. */
link_t inactive_as_with_asid_link;
 
mutex_t lock;
 
/** Number of references (i.e tasks that reference this as). */
count_t refcount;
 
/** Number of processors on wich is this address space active. */
count_t cpu_refcount;
 
/** B+tree of address space areas. */
btree_t as_area_btree;
 
/** Address space identifier. Constant on architectures that do not support ASIDs.*/
asid_t asid;
/** Architecture specific content. */
as_arch_t arch;
} as_t;
 
typedef struct {
link_t link; /**< Page hash table link. */
as_t *as; /**< Address space. */
uintptr_t page; /**< Virtual memory page. */
uintptr_t frame; /**< Physical memory frame. */
unsigned g : 1; /**< Global page. */
unsigned x : 1; /**< Execute. */
unsigned w : 1; /**< Writable. */
unsigned k : 1; /**< Kernel privileges required. */
unsigned c : 1; /**< Cacheable. */
unsigned a : 1; /**< Accessed. */
unsigned d : 1; /**< Dirty. */
unsigned p : 1; /**< Present. */
} pte_t;
 
#endif
 
/** @}
/trunk/kernel/genarch/include/mm/page_pt.h
44,7 → 44,7
#define KERN_PAGE_PT_H_
 
#include <arch/types.h>
#include <typedefs.h>
#include <mm/as.h>
#include <mm/page.h>
 
/*
107,6 → 107,7
#define PTE_WRITABLE(p) PTE_WRITABLE_ARCH((p))
#define PTE_EXECUTABLE(p) PTE_EXECUTABLE_ARCH((p))
 
extern as_operations_t as_pt_operations;
extern page_mapping_operations_t pt_mapping_operations;
 
extern void page_mapping_insert_pt(as_t *as, uintptr_t page, uintptr_t frame, int flags);
/trunk/kernel/genarch/include/mm/as_pt.h
35,10 → 35,46
#ifndef KERN_AS_PT_H_
#define KERN_AS_PT_H_
 
#include <mm/as.h>
#include <mm/mm.h>
#include <arch/mm/asid.h>
#include <adt/list.h>
#include <adt/btree.h>
#include <synch/mutex.h>
 
extern as_operations_t as_pt_operations;
#define AS_PAGE_TABLE
 
/** Address space structure.
*
* as_t contains the list of as_areas of userspace accessible
* pages for one or more tasks. Ranges of kernel memory pages are not
* supposed to figure in the list as they are shared by all tasks and
* set up during system initialization.
*/
typedef struct {
/** Protected by asidlock. */
link_t inactive_as_with_asid_link;
 
mutex_t lock;
 
/** Number of references (i.e tasks that reference this as). */
count_t refcount;
 
/** Number of processors on wich is this address space active. */
count_t cpu_refcount;
 
/** B+tree of address space areas. */
btree_t as_area_btree;
/** Page table pointer. */
pte_t *page_table;
 
/** Address space identifier. Constant on architectures that do not support ASIDs.*/
asid_t asid;
/** Architecture specific content. */
as_arch_t arch;
} as_t;
 
#endif
 
/** @}
/trunk/kernel/genarch/include/mm/page_ht.h
39,10 → 39,10
#ifndef KERN_PAGE_HT_H_
#define KERN_PAGE_HT_H_
 
#include <arch/types.h>
#include <mm/as.h>
#include <mm/page.h>
#include <synch/mutex.h>
#include <arch/types.h>
#include <adt/list.h>
#include <adt/hash_table.h>
 
#define PAGE_HT_KEYS 2
61,22 → 61,9
 
#define SET_PTL0_ADDRESS(x)
 
struct pte {
link_t link; /**< Page hash table link. */
as_t *as; /**< Address space. */
uintptr_t page; /**< Virtual memory page. */
uintptr_t frame; /**< Physical memory frame. */
unsigned g : 1; /**< Global page. */
unsigned x : 1; /**< Execute. */
unsigned w : 1; /**< Writable. */
unsigned k : 1; /**< Kernel privileges required. */
unsigned c : 1; /**< Cacheable. */
unsigned a : 1; /**< Accessed. */
unsigned d : 1; /**< Dirty. */
unsigned p : 1; /**< Present. */
};
extern as_operations_t as_ht_operations;
extern page_mapping_operations_t ht_mapping_operations;
 
extern page_mapping_operations_t ht_mapping_operations;
extern mutex_t page_ht_lock;
extern hash_table_t page_ht;
extern hash_table_operations_t ht_operations;
/trunk/kernel/genarch/include/ofw/ofw_tree.h
30,7 → 30,6
#define KERN_OFW_TREE_H_
 
#include <arch/types.h>
#include <typedefs.h>
 
#define OFW_TREE_PROPERTY_MAX_NAMELEN 32
 
/trunk/kernel/genarch/src/kbd/ns16550.c
45,7 → 45,6
#include <cpu.h>
#include <arch/asm.h>
#include <arch.h>
#include <typedefs.h>
#include <console/chardev.h>
#include <console/console.h>
#include <interrupt.h>
/trunk/kernel/genarch/src/kbd/i8042.c
44,12 → 44,11
#include <cpu.h>
#include <arch/asm.h>
#include <arch.h>
#include <typedefs.h>
#include <console/chardev.h>
#include <console/console.h>
#include <interrupt.h>
#include <sysinfo/sysinfo.h>
#include <ddi/irq.h>
#include <ipc/irq.h>
 
/* Keyboard commands. */
#define KBD_ENABLE 0xf4
/trunk/kernel/genarch/src/kbd/key.c
44,7 → 44,6
#endif
#include <synch/spinlock.h>
#include <console/chardev.h>
#include <typedefs.h>
#include <macros.h>
 
#define PRESSED_SHIFT (1<<0)
/trunk/kernel/genarch/src/kbd/z8530.c
47,7 → 47,6
#include <cpu.h>
#include <arch/asm.h>
#include <arch.h>
#include <typedefs.h>
#include <console/chardev.h>
#include <console/console.h>
#include <interrupt.h>
/trunk/kernel/genarch/src/fb/fb.c
46,7 → 46,6
#include <print.h>
#include <ddi/ddi.h>
#include <arch/types.h>
#include <typedefs.h>
 
#include "helenos.xbm"
 
/trunk/kernel/genarch/src/mm/as_ht.c
35,12 → 35,12
* @brief Address space functions for global page hash table.
*/
 
#include <arch/mm/as.h>
#include <genarch/mm/as_ht.h>
#include <genarch/mm/page_ht.h>
#include <mm/as.h>
#include <mm/frame.h>
#include <arch/types.h>
#include <typedefs.h>
#include <memstr.h>
#include <adt/hash_table.h>
#include <synch/mutex.h>
/trunk/kernel/genarch/src/mm/page_pt.c
42,7 → 42,6
#include <arch/mm/page.h>
#include <arch/mm/as.h>
#include <arch/types.h>
#include <typedefs.h>
#include <arch/asm.h>
#include <memstr.h>
 
/trunk/kernel/genarch/src/mm/asid_fifo.c
42,7 → 42,6
#include <genarch/mm/asid_fifo.h>
#include <arch/mm/asid.h>
#include <mm/asid.h>
#include <typedefs.h>
#include <adt/fifo.h>
 
#define FIFO_STATIC_LIMIT 1024
/trunk/kernel/genarch/src/mm/as_pt.c
43,7 → 43,6
#include <arch/mm/page.h>
#include <arch/mm/as.h>
#include <arch/types.h>
#include <typedefs.h>
#include <memstr.h>
#include <arch.h>
 
/trunk/kernel/genarch/src/mm/page_ht.c
43,7 → 43,6
#include <mm/as.h>
#include <arch/mm/asid.h>
#include <arch/types.h>
#include <typedefs.h>
#include <arch/asm.h>
#include <synch/spinlock.h>
#include <arch.h>
/trunk/kernel/genarch/src/acpi/madt.c
35,7 → 35,6
*/
 
#include <arch/types.h>
#include <typedefs.h>
#include <genarch/acpi/acpi.h>
#include <genarch/acpi/madt.h>
#include <arch/smp/apic.h>